Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define MAX 200000
#define S 1000000000
int L[MAX],R[MAX];
long long merge(int A[],int n,int left,int mid,int right){
  int i,j,k;
  long long cnt =0;
  int n1 = mid-left;
  int n2 = right-mid;
  for(i=0;i<n1;i++)L[i]=A[left+i];
  for(i=0;i<n2;i++)R[i]=A[mid+i];
  L[n1]=R[n2]=S;
  i=j=0;
  for(k=left;k<right;k++){
    if(L[i]<=R[j])
      A[k]=L[i++];
    else{
      A[k]=R[j++];
      cnt += n1-i;
    }
  }
  return cnt;
}

long long mergeSort(int A[],int n,int left,int right){
  int mid;
  long long v1,v2,v3;
  if(left+1<right){
    mid=(left+right)/2;
    v1=mergeSort(A,n,left,mid);
    v2=mergeSort(A,n,mid,right);
    v3=merge(A,n,left,mid,right);
    return v1+v2+v3;
  }
  else return 0;
}

int main(){
  int A[MAX],n,i;
  long long ans;
  scanf("%d",&n);;
  for(i=0;i<n;i++)scanf("%d",&A[i]);
  ans=mergeSort(A,n,0,n);
  printf("%lld\n",ans);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 800000
L:
	.zero	800000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 800000
R:
	.zero	800000
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	%r8d, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	$0, -28(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L6
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L8:
	addl	$1, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	-48(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -52(%rbp)
	jle	.L12
	movl	-48(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -16(%rbp)
	movl	-52(%rbp), %edi
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1312, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800028(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800028(%rbp)
.L15:
	movl	-800032(%rbp), %eax
	cmpl	%eax, -800028(%rbp)
	jl	.L16
	movl	-800032(%rbp), %edx
	movl	-800032(%rbp), %esi
	leaq	-800016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -800024(%rbp)
	movq	-800024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edx, %r10d
	movq	%rdi, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%ecx, %ebx
	subl	%edx, %ebx
	movl	%r8d, %edx
	subl	%ecx, %edx
	testl	%ebx, %ebx
	jle	.L41
	movslq	%r10d, %rax
	leaq	L(%rip), %rsi
	leaq	4(,%rax,4), %rax
	leaq	(%rdi,%rax), %r11
	movq	%rsi, %rdi
	subq	%r11, %rdi
	cmpq	$8, %rdi
	jbe	.L5
	leal	-1(%rbx), %edi
	cmpl	$2, %edi
	jbe	.L5
	movl	%ebx, %edi
	leaq	-4(%r9,%rax), %r11
	xorl	%eax, %eax
	shrl	$2, %edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%r11,%rax), %xmm0
	movaps	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L6
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L8
	leal	(%r10,%rax), %edi
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %r11d
	movslq	%eax, %rdi
	movl	%r11d, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%ebx, %edi
	jge	.L8
	leal	(%rdi,%r10), %r11d
	addl	$2, %eax
	movslq	%edi, %rdi
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %r11d
	movl	%r11d, (%rsi,%rdi,4)
	cmpl	%ebx, %eax
	jge	.L8
	leal	(%rax,%r10), %edi
	cltq
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %edi
	movl	%edi, (%rsi,%rax,4)
.L8:
	leaq	R(%rip), %rdi
	testl	%edx, %edx
	jle	.L4
	movslq	%ecx, %rax
	leaq	R(%rip), %rdi
	leaq	4(,%rax,4), %rax
	movq	%rdi, %r11
	leaq	(%r9,%rax), %rbp
	subq	%rbp, %r11
	cmpq	$8, %r11
	jbe	.L14
	leal	-1(%rdx), %r11d
	cmpl	$2, %r11d
	jbe	.L14
	movl	%edx, %r11d
	leaq	-4(%r9,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %r11d
	salq	$4, %r11
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdi,%rax)
	addq	$16, %rax
	cmpq	%r11, %rax
	jne	.L15
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L4
	leal	(%rcx,%rax), %r11d
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %ebp
	movslq	%eax, %r11
	movl	%ebp, (%rdi,%r11,4)
	leal	1(%rax), %r11d
	cmpl	%r11d, %edx
	jle	.L4
	leal	(%rcx,%r11), %ebp
	addl	$2, %eax
	movslq	%r11d, %r11
	movslq	%ebp, %rbp
	movl	(%r9,%rbp,4), %ebp
	movl	%ebp, (%rdi,%r11,4)
	cmpl	%edx, %eax
	jge	.L4
	addl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	(%r9,%rcx,4), %ecx
	movl	%ecx, (%rdi,%rax,4)
.L4:
	movslq	%edx, %rdx
	movslq	%ebx, %rax
	xorl	%r12d, %r12d
	movl	$1000000000, (%rdi,%rdx,4)
	movl	$1000000000, (%rsi,%rax,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdx
	xorl	%r12d, %r12d
	xorl	%r11d, %r11d
	subl	%r10d, %r8d
	leaq	(%r9,%rdx,4), %rax
	xorl	%r10d, %r10d
	addq	%rdx, %r8
	leaq	4(%r9,%r8,4), %rbp
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%rsi,%r10,4), %ecx
	movl	(%rdi,%r9,4), %edx
	cmpl	%ecx, %edx
	jl	.L19
.L42:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rbp
	je	.L1
	movslq	%r8d, %r10
	movl	(%rdi,%r9,4), %edx
	movl	(%rsi,%r10,4), %ecx
	cmpl	%ecx, %edx
	jge	.L42
.L19:
	movl	%ebx, %ecx
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	subl	%r8d, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %r12
	cmpq	%rbp, %rax
	je	.L1
	movslq	%r11d, %r9
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L1:
	movq	%r12, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	leaq	-4(%r9,%rax), %r11
	movl	%edx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r11,%rax,4), %ecx
	movl	%ecx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%r9,%rax), %r11
	movl	%ebx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11,%rax,4), %edi
	movl	%edi, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rsi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rdx,%rcx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	leal	1(%rdx), %eax
	movl	%ecx, %ebx
	sarl	%r12d
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%eax, %r12d
	jg	.L67
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L68
.L51:
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movq	%rbp, %rdi
	call	merge
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	addq	%r14, %rax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	xorl	%r15d, %r15d
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L69
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L70
.L48:
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movq	%rbp, %rdi
	movl	%esi, 24(%rsp)
	call	merge
	movl	24(%rsp), %esi
	leaq	(%rax,%r15), %r14
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L51
.L68:
	leal	(%rbx,%r12), %edx
	xorl	%r15d, %r15d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L71
.L52:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L72
.L55:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movl	%esi, 24(%rsp)
	call	merge
	movl	24(%rsp), %esi
	addq	%rax, %r15
	addq	%r15, %r14
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L69:
	leal	0(%r13,%r14), %edx
	xorl	%r9d, %r9d
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L73
.L46:
	leal	1(%r15), %eax
	cmpl	%eax, %r14d
	jg	.L74
.L47:
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	movl	%r13d, %edx
	movq	%rbp, %rdi
	movq	%r9, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	8(%rsp), %r9
	movl	24(%rsp), %esi
	leaq	(%rax,%r9), %r15
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L48
.L70:
	leal	(%r12,%r14), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L75
.L49:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L76
.L50:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r14d, %edx
	movq	%rbp, %rdi
	movq	%r10, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	8(%rsp), %r10
	movl	24(%rsp), %esi
	addq	%r10, %rax
	addq	%rax, %r15
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L72:
	leal	(%rbx,%r9), %edx
	xorl	%r11d, %r11d
	movl	%edx, %r10d
	shrl	$31, %r10d
	addl	%edx, %r10d
	sarl	%r10d
	cmpl	%r10d, %eax
	jl	.L77
.L56:
	leal	1(%r10), %eax
	cmpl	%eax, %ebx
	jg	.L78
.L57:
	movl	%r9d, %edx
	movl	%ebx, %r8d
	movl	%r10d, %ecx
	movq	%rbp, %rdi
	movq	%r11, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	16(%rsp), %r11
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%r11, %rax
	addq	%rax, %r15
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L71:
	leal	(%r12,%r9), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L79
.L53:
	leal	1(%r15), %eax
	cmpl	%eax, %r9d
	jg	.L80
.L54:
	movl	%r9d, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	leaq	(%rax,%r10), %r15
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L73:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	24(%rsp), %esi
	movq	%rax, %r9
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L76:
	movl	%r9d, %edx
	movl	%r12d, %ecx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%rax, %r10
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L75:
	movl	%r9d, %ecx
	movl	%r14d, %edx
	movq	%rbp, %rdi
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r10
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%rax, %r10
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L79:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r10
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L78:
	movl	%r10d, %edx
	movl	%ebx, %ecx
	movq	%rbp, %rdi
	movl	%r9d, 28(%rsp)
	movq	%r11, 16(%rsp)
	movl	%r10d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r11
	movl	28(%rsp), %r9d
	movl	8(%rsp), %r10d
	movl	24(%rsp), %esi
	addq	%rax, %r11
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%r10d, %ecx
	movl	%r9d, %edx
	movq	%rbp, %rdi
	movl	%r10d, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	16(%rsp), %r10d
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r11
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L74:
	movl	%r14d, %ecx
	movl	%r15d, %edx
	movq	%rbp, %rdi
	movq	%r9, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	8(%rsp), %r9
	movl	24(%rsp), %esi
	addq	%rax, %r9
	jmp	.L47
	.cfi_endproc
.LFE26:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	addl	$1, %edx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%ecx, %edx
	jl	.L95
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L95:
	.cfi_restore_state
	leal	0(%r13,%rcx), %eax
	movq	%rdi, %r14
	movl	%esi, %r15d
	movl	%ecx, %ebx
	movl	%eax, %r12d
	xorl	%ebp, %ebp
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	cmpl	%r12d, %edx
	jl	.L96
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L97
.L86:
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	merge
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	addq	%rbp, %rax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L96:
	.cfi_restore_state
	leal	0(%r13,%r12), %eax
	xorl	%r9d, %r9d
	movl	%eax, %ebp
	shrl	$31, %ebp
	addl	%eax, %ebp
	sarl	%ebp
	cmpl	%ebp, %edx
	jl	.L98
.L84:
	leal	1(%rbp), %eax
	cmpl	%eax, %r12d
	jg	.L99
.L85:
	movl	%ebp, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r9, (%rsp)
	call	merge
	movq	(%rsp), %r9
	leaq	(%rax,%r9), %rbp
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L86
.L97:
	leal	(%rbx,%r12), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L100
.L87:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L101
.L88:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r10, (%rsp)
	call	merge
	movq	(%rsp), %r10
	addq	%r10, %rax
	addq	%rax, %rbp
	jmp	.L86
	.p2align 4,,10
	.p2align 3
.L98:
	movl	%ebp, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	movq	%rax, %r9
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L101:
	movl	%r9d, %edx
	movl	%ebx, %ecx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r10, 8(%rsp)
	movl	%r9d, (%rsp)
	call	mergeSort.part.0
	movq	8(%rsp), %r10
	movl	(%rsp), %r9d
	addq	%rax, %r10
	jmp	.L88
	.p2align 4,,10
	.p2align 3
.L100:
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movl	%r9d, (%rsp)
	call	mergeSort.part.0
	movl	(%rsp), %r9d
	movq	%rax, %r10
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L99:
	movl	%r12d, %ecx
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r9, (%rsp)
	call	mergeSort.part.0
	movq	(%rsp), %r9
	addq	%rax, %r9
	jmp	.L85
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L106
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L104:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L104
	xorl	%edx, %edx
	cmpl	$1, %esi
	jle	.L103
	movl	%esi, %ecx
	movq	%r13, %rdi
	call	mergeSort.part.0
	movq	%rax, %rdx
.L103:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	addq	$800040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L106:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L103
.L110:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	R
	.bss
	.align 32
	.type	R, @object
	.size	R, 800000
R:
	.zero	800000
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 800000
L:
	.zero	800000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edx, %r10d
	movq	%rdi, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%ecx, %ebx
	subl	%edx, %ebx
	movl	%r8d, %edx
	subl	%ecx, %edx
	testl	%ebx, %ebx
	jle	.L41
	movslq	%r10d, %rax
	leaq	L(%rip), %rsi
	leaq	4(,%rax,4), %rax
	leaq	(%rdi,%rax), %r11
	movq	%rsi, %rdi
	subq	%r11, %rdi
	cmpq	$8, %rdi
	jbe	.L5
	leal	-1(%rbx), %edi
	cmpl	$2, %edi
	jbe	.L5
	movl	%ebx, %edi
	leaq	-4(%r9,%rax), %r11
	xorl	%eax, %eax
	shrl	$2, %edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%r11,%rax), %xmm0
	movaps	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L6
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L8
	leal	(%r10,%rax), %edi
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %r11d
	movslq	%eax, %rdi
	movl	%r11d, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%ebx, %edi
	jge	.L8
	leal	(%rdi,%r10), %r11d
	addl	$2, %eax
	movslq	%edi, %rdi
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %r11d
	movl	%r11d, (%rsi,%rdi,4)
	cmpl	%ebx, %eax
	jge	.L8
	leal	(%rax,%r10), %edi
	cltq
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %edi
	movl	%edi, (%rsi,%rax,4)
.L8:
	leaq	R(%rip), %rdi
	testl	%edx, %edx
	jle	.L4
	movslq	%ecx, %rax
	leaq	R(%rip), %rdi
	leaq	4(,%rax,4), %rax
	movq	%rdi, %r11
	leaq	(%r9,%rax), %rbp
	subq	%rbp, %r11
	cmpq	$8, %r11
	jbe	.L14
	leal	-1(%rdx), %r11d
	cmpl	$2, %r11d
	jbe	.L14
	movl	%edx, %r11d
	leaq	-4(%r9,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %r11d
	salq	$4, %r11
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdi,%rax)
	addq	$16, %rax
	cmpq	%r11, %rax
	jne	.L15
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L4
	leal	(%rcx,%rax), %r11d
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %ebp
	movslq	%eax, %r11
	movl	%ebp, (%rdi,%r11,4)
	leal	1(%rax), %r11d
	cmpl	%r11d, %edx
	jle	.L4
	leal	(%rcx,%r11), %ebp
	addl	$2, %eax
	movslq	%r11d, %r11
	movslq	%ebp, %rbp
	movl	(%r9,%rbp,4), %ebp
	movl	%ebp, (%rdi,%r11,4)
	cmpl	%edx, %eax
	jge	.L4
	addl	%eax, %ecx
	cltq
	movslq	%ecx, %rcx
	movl	(%r9,%rcx,4), %ecx
	movl	%ecx, (%rdi,%rax,4)
.L4:
	movslq	%edx, %rdx
	movslq	%ebx, %rax
	xorl	%r12d, %r12d
	movl	$1000000000, (%rdi,%rdx,4)
	movl	$1000000000, (%rsi,%rax,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdx
	xorl	%r12d, %r12d
	xorl	%r11d, %r11d
	subl	%r10d, %r8d
	leaq	(%r9,%rdx,4), %rax
	xorl	%r10d, %r10d
	addq	%rdx, %r8
	leaq	4(%r9,%r8,4), %rbp
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%rsi,%r10,4), %ecx
	movl	(%rdi,%r9,4), %edx
	cmpl	%ecx, %edx
	jl	.L19
.L42:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rbp
	je	.L1
	movslq	%r8d, %r10
	movl	(%rdi,%r9,4), %edx
	movl	(%rsi,%r10,4), %ecx
	cmpl	%ecx, %edx
	jge	.L42
.L19:
	movl	%ebx, %ecx
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	subl	%r8d, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %r12
	cmpq	%rbp, %rax
	je	.L1
	movslq	%r11d, %r9
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L1:
	movq	%r12, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	leaq	-4(%r9,%rax), %r11
	movl	%edx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r11,%rax,4), %ecx
	movl	%ecx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%r9,%rax), %r11
	movl	%ebx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11,%rax,4), %edi
	movl	%edi, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rsi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rdx,%rcx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	leal	1(%rdx), %eax
	movl	%ecx, %ebx
	sarl	%r12d
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%eax, %r12d
	jg	.L67
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L68
.L51:
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movq	%rbp, %rdi
	call	merge
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	addq	%r14, %rax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	xorl	%r15d, %r15d
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L69
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L70
.L48:
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movq	%rbp, %rdi
	movl	%esi, 24(%rsp)
	call	merge
	movl	24(%rsp), %esi
	leaq	(%rax,%r15), %r14
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L51
.L68:
	leal	(%rbx,%r12), %edx
	xorl	%r15d, %r15d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L71
.L52:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L72
.L55:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movl	%esi, 24(%rsp)
	call	merge
	movl	24(%rsp), %esi
	addq	%rax, %r15
	addq	%r15, %r14
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L69:
	leal	0(%r13,%r14), %edx
	xorl	%r9d, %r9d
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L73
.L46:
	leal	1(%r15), %eax
	cmpl	%eax, %r14d
	jg	.L74
.L47:
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	movl	%r13d, %edx
	movq	%rbp, %rdi
	movq	%r9, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	8(%rsp), %r9
	movl	24(%rsp), %esi
	leaq	(%rax,%r9), %r15
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L48
.L70:
	leal	(%r12,%r14), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L75
.L49:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L76
.L50:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r14d, %edx
	movq	%rbp, %rdi
	movq	%r10, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	8(%rsp), %r10
	movl	24(%rsp), %esi
	addq	%r10, %rax
	addq	%rax, %r15
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L72:
	leal	(%rbx,%r9), %edx
	xorl	%r11d, %r11d
	movl	%edx, %r10d
	shrl	$31, %r10d
	addl	%edx, %r10d
	sarl	%r10d
	cmpl	%r10d, %eax
	jl	.L77
.L56:
	leal	1(%r10), %eax
	cmpl	%eax, %ebx
	jg	.L78
.L57:
	movl	%r9d, %edx
	movl	%ebx, %r8d
	movl	%r10d, %ecx
	movq	%rbp, %rdi
	movq	%r11, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	16(%rsp), %r11
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%r11, %rax
	addq	%rax, %r15
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L71:
	leal	(%r12,%r9), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L79
.L53:
	leal	1(%r15), %eax
	cmpl	%eax, %r9d
	jg	.L80
.L54:
	movl	%r9d, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	merge
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	leaq	(%rax,%r10), %r15
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L73:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	24(%rsp), %esi
	movq	%rax, %r9
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L76:
	movl	%r9d, %edx
	movl	%r12d, %ecx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%rax, %r10
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L75:
	movl	%r9d, %ecx
	movl	%r14d, %edx
	movq	%rbp, %rdi
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r10
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movq	%rbp, %rdi
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r10
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	addq	%rax, %r10
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L79:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movq	%rbp, %rdi
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r10
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L78:
	movl	%r10d, %edx
	movl	%ebx, %ecx
	movq	%rbp, %rdi
	movl	%r9d, 28(%rsp)
	movq	%r11, 16(%rsp)
	movl	%r10d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	16(%rsp), %r11
	movl	28(%rsp), %r9d
	movl	8(%rsp), %r10d
	movl	24(%rsp), %esi
	addq	%rax, %r11
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%r10d, %ecx
	movl	%r9d, %edx
	movq	%rbp, %rdi
	movl	%r10d, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movl	16(%rsp), %r10d
	movl	8(%rsp), %r9d
	movl	24(%rsp), %esi
	movq	%rax, %r11
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L74:
	movl	%r14d, %ecx
	movl	%r15d, %edx
	movq	%rbp, %rdi
	movq	%r9, 8(%rsp)
	movl	%esi, 24(%rsp)
	call	mergeSort.part.0
	movq	8(%rsp), %r9
	movl	24(%rsp), %esi
	addq	%rax, %r9
	jmp	.L47
	.cfi_endproc
.LFE26:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	addl	$1, %edx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%ecx, %edx
	jl	.L95
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L95:
	.cfi_restore_state
	leal	0(%r13,%rcx), %eax
	movq	%rdi, %r14
	movl	%esi, %r15d
	movl	%ecx, %ebx
	movl	%eax, %r12d
	xorl	%ebp, %ebp
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	cmpl	%r12d, %edx
	jl	.L96
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L97
.L86:
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	merge
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	addq	%rbp, %rax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L96:
	.cfi_restore_state
	leal	0(%r13,%r12), %eax
	xorl	%r9d, %r9d
	movl	%eax, %ebp
	shrl	$31, %ebp
	addl	%eax, %ebp
	sarl	%ebp
	cmpl	%ebp, %edx
	jl	.L98
.L84:
	leal	1(%rbp), %eax
	cmpl	%eax, %r12d
	jg	.L99
.L85:
	movl	%ebp, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r9, (%rsp)
	call	merge
	movq	(%rsp), %r9
	leaq	(%rax,%r9), %rbp
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L86
.L97:
	leal	(%rbx,%r12), %edx
	xorl	%r10d, %r10d
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L100
.L87:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L101
.L88:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r10, (%rsp)
	call	merge
	movq	(%rsp), %r10
	addq	%r10, %rax
	addq	%rax, %rbp
	jmp	.L86
	.p2align 4,,10
	.p2align 3
.L98:
	movl	%ebp, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	movq	%rax, %r9
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L101:
	movl	%r9d, %edx
	movl	%ebx, %ecx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r10, 8(%rsp)
	movl	%r9d, (%rsp)
	call	mergeSort.part.0
	movq	8(%rsp), %r10
	movl	(%rsp), %r9d
	addq	%rax, %r10
	jmp	.L88
	.p2align 4,,10
	.p2align 3
.L100:
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movl	%r9d, (%rsp)
	call	mergeSort.part.0
	movl	(%rsp), %r9d
	movq	%rax, %r10
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L99:
	movl	%r12d, %ecx
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r9, (%rsp)
	call	mergeSort.part.0
	movq	(%rsp), %r9
	addq	%rax, %r9
	jmp	.L85
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L106
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L104:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L104
	xorl	%edx, %edx
	cmpl	$1, %esi
	jle	.L103
	movl	%esi, %ecx
	movq	%r13, %rdi
	call	mergeSort.part.0
	movq	%rax, %rdx
.L103:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L110
	addq	$800040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L106:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L103
.L110:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	R
	.bss
	.align 32
	.type	R, @object
	.size	R, 800000
R:
	.zero	800000
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 800000
L:
	.zero	800000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define MAX 200000
#define S 1000000000
int L[MAX],R[MAX];
long long merge(int A[],int n,int left,int mid,int right){
  int i,j,k;
  long long cnt =0;
  int n1 = mid-left;
  int n2 = right-mid;
  for(i=0;i<n1;i++)L[i]=A[left+i];
  for(i=0;i<n2;i++)R[i]=A[mid+i];
  L[n1]=R[n2]=S;
  i=j=0;
  for(k=left;k<right;k++){
    if(L[i]<=R[j])
      A[k]=L[i++];
    else{
      A[k]=R[j++];
      cnt += n1-i;
    }
  }
  return cnt;
}

long long mergeSort(int A[],int n,int left,int right){
  int mid;
  long long v1,v2,v3;
  if(left+1<right){
    mid=(left+right)/2;
    v1=mergeSort(A,n,left,mid);
    v2=mergeSort(A,n,mid,right);
    v3=merge(A,n,left,mid,right);
    return v1+v2+v3;
  }
  else return 0;
}

int main(){
  int A[MAX],n,i;
  long long ans;
  scanf("%d",&n);;
  for(i=0;i<n;i++)scanf("%d",&A[i]);
  ans=mergeSort(A,n,0,n);
  printf("%lld\n",ans);
  return 0;
}
3
6 1 2
 5
3 10 2 1 4
 3
6 1 0
 5
3 10 1 1 4
 3
0 -1 1
 5
1 6 1 0 0
 3
-2 -2 -2
 5
0 -13 17 1 0
 5
2 0 -1 -2 -1
 5
4 1 0 0 -1

2
 6
 3
 5
 1
 7
 0
 4
 8
 9

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define MAX 200000
#define S 1000000000
int L[MAX],R[MAX];
long long merge(int A[],int n,int left,int mid,int right){
  int i,j,k;
  long long cnt =0;
  int n1 = mid-left;
  int n2 = right-mid;
  for(i=0;i<n1;i++)L[i]=A[left+i];
  for(i=0;i<n2;i++)R[i]=A[mid+i];
  L[n1]=R[n2]=S;
  i=j=0;
  for(k=left;k<right;k++){
    if(L[i]<=R[j])
      A[k]=L[i++];
    else{
      A[k]=R[j++];
      cnt += n1-i;
    }
  }
  return cnt;
}

long long mergeSort(int A[],int n,int left,int right){
  int mid;
  long long v1,v2,v3;
  if(left+1<right){
    mid=(left+right)/2;
    v1=mergeSort(A,n,left,mid);
    v2=mergeSort(A,n,mid,right);
    v3=merge(A,n,left,mid,right);
    return v1+v2+v3;
  }
  else return 0;
}

int main(){
  int A[MAX],n,i;
  long long ans;
  scanf("%d",&n);;
  for(i=0;i<n;i++)scanf("%d",&A[i]);
  ans=mergeSort(A,n,0,n);
  printf("%lld\n",ans);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 800000
L:
	.zero	800000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 800000
R:
	.zero	800000
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	%r8d, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	$0, -28(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L6
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L8:
	addl	$1, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	-48(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -52(%rbp)
	jle	.L12
	movl	-48(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -16(%rbp)
	movl	-52(%rbp), %edi
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1312, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800028(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800028(%rbp)
.L15:
	movl	-800032(%rbp), %eax
	cmpl	%eax, -800028(%rbp)
	jl	.L16
	movl	-800032(%rbp), %edx
	movl	-800032(%rbp), %esi
	leaq	-800016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -800024(%rbp)
	movq	-800024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 800000
L:
	.zero	800000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 800000
R:
	.zero	800000
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	%r8d, -56(%rbp)
	movq	$0, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L3
	movl	$0, -28(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L6
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	movl	-16(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
.L8:
	addl	$1, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movl	-48(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -52(%rbp)
	jle	.L12
	movl	-48(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -16(%rbp)
	movl	-52(%rbp), %edi
	movl	-28(%rbp), %ecx
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movq	-40(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1312, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800028(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800028(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800028(%rbp)
.L15:
	movl	-800032(%rbp), %eax
	cmpl	%eax, -800028(%rbp)
	jl	.L16
	movl	-800032(%rbp), %edx
	movl	-800032(%rbp), %esi
	leaq	-800016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movq	%rax, -800024(%rbp)
	movq	-800024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
