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 500000
#define term 1000000000

int Left[(Max/2)+2], Right[(Max/2)+2];
int c=0;


void merge(int e[], int n, int left, int mid, int right){
  int i,j,k;

  int x = (mid-left);
  int y = (right-mid);

  for ( i=0; i<x; i++ )
   Left[i] = e[left+i];
  for ( i=0; i<y; i++ )
   Right[i] = e[mid+i];

  Left[x]= Right[y] = term;
  i = j = 0;
  for ( k=left; k<right; k++){
    c++;
    if ( Left[i]<=Right[j] ){
      e[k] = Left[i++];
    } else {
      e[k] = Right[j++];
    }
  }
}

void mergeSort(int e[], int n, int left, int right ){
  int mid;
  if ( left+1<right ){
    mid=(left + right)/2;
    mergeSort(e, n, left, mid);
    mergeSort(e, n, mid, right);
    merge(e, n, left, mid, right);
  }
}

int main(){
  int e[Max], n, i;
  scanf("%d", &n);
  for ( i=0; i<n; i++) {
    scanf("%d", &e[i]);
    if (e[i]>=term ){
      return 1;
    }
  }
  mergeSort(e,n,0,n);

  for ( i=0; i<n; i++) {
    if ( i !=0 ) 
    printf(" ");

    printf("%d", e[i]);
    }
  printf("\n");

  printf("%d\n", c);


  return 0;
}


```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Left
	.bss
	.align 32
	.type	Left, @object
	.size	Left, 1000008
Left:
	.zero	1000008
	.globl	Right
	.align 32
	.type	Right, @object
	.size	Right, 1000008
Right:
	.zero	1000008
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.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)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Left(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	nop
	nop
	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	$48, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L12
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000020(%rbp)
	jmp	.L14
.L17:
	leaq	-2000016(%rbp), %rdx
	movl	-2000020(%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
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	cmpl	$999999999, %eax
	jle	.L15
	movl	$1, %eax
	jmp	.L21
.L15:
	addl	$1, -2000020(%rbp)
.L14:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L17
	movl	-2000024(%rbp), %edx
	movl	-2000024(%rbp), %esi
	leaq	-2000016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -2000020(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -2000020(%rbp)
	je	.L19
	movl	$32, %edi
	call	putchar@PLT
.L19:
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -2000020(%rbp)
.L18:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L20
	movl	$10, %edi
	call	putchar@PLT
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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
	movq	%rdi, %rsi
	movl	%ecx, %edi
	movl	%r8d, %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subl	%edx, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edx, %r10d
	movl	%ecx, %r11d
	subl	%ecx, %r9d
	testl	%edi, %edi
	jle	.L41
	movslq	%edx, %rax
	leaq	Left(%rip), %rcx
	leaq	4(,%rax,4), %rax
	movq	%rcx, %rdx
	leaq	(%rsi,%rax), %rbx
	subq	%rbx, %rdx
	cmpq	$8, %rdx
	jbe	.L5
	leal	-1(%rdi), %edx
	cmpl	$2, %edx
	jbe	.L5
	movl	%edi, %edx
	leaq	-4(%rsi,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L6
	movl	%edi, %eax
	andl	$-4, %eax
	testb	$3, %dil
	je	.L8
	leal	(%r10,%rax), %edx
	movslq	%edx, %rdx
	movl	(%rsi,%rdx,4), %ebx
	movslq	%eax, %rdx
	movl	%ebx, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %edi
	jle	.L8
	leal	(%r10,%rdx), %ebx
	addl	$2, %eax
	movslq	%edx, %rdx
	movslq	%ebx, %rbx
	movl	(%rsi,%rbx,4), %ebx
	movl	%ebx, (%rcx,%rdx,4)
	cmpl	%eax, %edi
	jle	.L8
	leal	(%r10,%rax), %edx
	cltq
	movslq	%edx, %rdx
	movl	(%rsi,%rdx,4), %edx
	movl	%edx, (%rcx,%rax,4)
.L8:
	leaq	Right(%rip), %rdx
	testl	%r9d, %r9d
	jle	.L4
	movslq	%r11d, %rax
	leaq	Right(%rip), %rdx
	leaq	4(,%rax,4), %rax
	movq	%rdx, %rbx
	leaq	(%rsi,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%r9), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%r9d, %ebx
	leaq	-4(%rsi,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L15
	movl	%r9d, %eax
	andl	$-4, %eax
	testb	$3, %r9b
	je	.L4
	leal	(%r11,%rax), %ebx
	movslq	%ebx, %rbx
	movl	(%rsi,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rdx,%rbx,4)
	leal	1(%rax), %ebx
	cmpl	%ebx, %r9d
	jle	.L4
	leal	(%r11,%rbx), %ebp
	addl	$2, %eax
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movl	(%rsi,%rbp,4), %ebp
	movl	%ebp, (%rdx,%rbx,4)
	cmpl	%eax, %r9d
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%rsi,%r11,4), %r11d
	movl	%r11d, (%rdx,%rax,4)
.L4:
	movslq	%r9d, %r9
	movslq	%edi, %rdi
	movl	$1000000000, (%rdx,%r9,4)
	movl	$1000000000, (%rcx,%rdi,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdi
	xorl	%r9d, %r9d
	subl	%r10d, %r8d
	leaq	(%rsi,%rdi,4), %rax
	addq	%rdi, %r8
	xorl	%edi, %edi
	leaq	4(%rsi,%r8,4), %rbx
	xorl	%r8d, %r8d
	xorl	%esi, %esi
.L21:
	movl	(%rcx,%rdi,4), %r11d
	movl	(%rdx,%rsi,4), %r10d
	addl	$1, c(%rip)
	cmpl	%r11d, %r10d
	jl	.L19
	movl	%r11d, (%rax)
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rbx
	je	.L1
	movslq	%r8d, %rdi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	movl	%r10d, (%rax)
	addq	$4, %rax
	addl	$1, %r9d
	cmpq	%rax, %rbx
	je	.L1
	movslq	%r9d, %rsi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	-4(%rsi,%rax), %rbx
	movl	%r9d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rdx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%rsi,%rax), %rbx
	movl	%edi, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	Left(%rip), %rcx
	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
	movl	%esi, %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	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%eax, %r12d
	jg	.L58
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L59
.L50:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	%r14d, %esi
	movq	%rbp, %rdi
	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
	jmp	merge
	.p2align 4,,10
	.p2align 3
.L58:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L60
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L61
.L47:
	movl	%r12d, %r8d
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L50
.L59:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L62
.L51:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L63
.L54:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L60:
	leal	0(%r13,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L64
.L45:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L65
.L46:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jle	.L47
.L61:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L66
.L48:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L67
.L49:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L63:
	leal	(%rbx,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L68
.L55:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L69
.L56:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L70
.L52:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L71
.L53:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r9d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L71:
	movl	%r9d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L69:
	movl	%r9d, %edx
	movl	%ebx, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L46
	.cfi_endproc
.LFE26:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB24:
	.cfi_startproc
	endbr64
	leal	1(%rdx), %eax
	cmpl	%ecx, %eax
	jl	.L83
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	leal	(%rdx,%rcx), %edx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%edx, %r12d
	movl	%ecx, %ebx
	sarl	%r12d
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%r12d, %eax
	jl	.L84
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L85
.L77:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	movl	%ebp, %esi
	movq	%r14, %rdi
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	merge
	.p2align 4,,10
	.p2align 3
.L84:
	.cfi_restore_state
	leal	0(%r13,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L86
.L75:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L87
.L76:
	movl	%r12d, %r8d
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L77
.L85:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L88
.L78:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L89
.L79:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L86:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%ebx, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L76
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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	-1998848(%rsp), %r11
	.cfi_def_cfa 11, 1998888
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1192, %rsp
	.cfi_def_cfa_offset 2000080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2000024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L91
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L104:
	movl	12(%rsp), %esi
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %esi
	jle	.L103
.L93:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$999999999, (%rbx)
	jle	.L104
	movl	$1, %eax
	jmp	.L90
.L103:
	cmpl	$1, %esi
	jle	.L94
	movl	%esi, %ecx
	xorl	%edx, %edx
	movq	%r13, %rdi
	call	mergeSort.part.0
.L94:
	xorl	%ebx, %ebx
	cmpl	$0, 12(%rsp)
	jg	.L95
	jmp	.L91
	.p2align 4,,10
	.p2align 3
.L96:
	movl	$32, %edi
	call	putchar@PLT
.L95:
	movl	0(%r13,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L96
.L91:
	movl	$10, %edi
	call	putchar@PLT
	movl	c(%rip), %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L90:
	movq	2000024(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L105
	addq	$2000040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L105:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	Right
	.align 32
	.type	Right, @object
	.size	Right, 1000008
Right:
	.zero	1000008
	.globl	Left
	.align 32
	.type	Left, @object
	.size	Left, 1000008
Left:
	.zero	1000008
	.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
	movq	%rdi, %rsi
	movl	%ecx, %edi
	movl	%r8d, %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subl	%edx, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edx, %r10d
	movl	%ecx, %r11d
	subl	%ecx, %r9d
	testl	%edi, %edi
	jle	.L41
	movslq	%edx, %rax
	leaq	Left(%rip), %rcx
	leaq	4(,%rax,4), %rax
	movq	%rcx, %rdx
	leaq	(%rsi,%rax), %rbx
	subq	%rbx, %rdx
	cmpq	$8, %rdx
	jbe	.L5
	leal	-1(%rdi), %edx
	cmpl	$2, %edx
	jbe	.L5
	movl	%edi, %edx
	leaq	-4(%rsi,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L6
	movl	%edi, %eax
	andl	$-4, %eax
	testb	$3, %dil
	je	.L8
	leal	(%r10,%rax), %edx
	movslq	%edx, %rdx
	movl	(%rsi,%rdx,4), %ebx
	movslq	%eax, %rdx
	movl	%ebx, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %edi
	jle	.L8
	leal	(%r10,%rdx), %ebx
	addl	$2, %eax
	movslq	%edx, %rdx
	movslq	%ebx, %rbx
	movl	(%rsi,%rbx,4), %ebx
	movl	%ebx, (%rcx,%rdx,4)
	cmpl	%eax, %edi
	jle	.L8
	leal	(%r10,%rax), %edx
	cltq
	movslq	%edx, %rdx
	movl	(%rsi,%rdx,4), %edx
	movl	%edx, (%rcx,%rax,4)
.L8:
	leaq	Right(%rip), %rdx
	testl	%r9d, %r9d
	jle	.L4
	movslq	%r11d, %rax
	leaq	Right(%rip), %rdx
	leaq	4(,%rax,4), %rax
	movq	%rdx, %rbx
	leaq	(%rsi,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%r9), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%r9d, %ebx
	leaq	-4(%rsi,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L15
	movl	%r9d, %eax
	andl	$-4, %eax
	testb	$3, %r9b
	je	.L4
	leal	(%r11,%rax), %ebx
	movslq	%ebx, %rbx
	movl	(%rsi,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rdx,%rbx,4)
	leal	1(%rax), %ebx
	cmpl	%ebx, %r9d
	jle	.L4
	leal	(%r11,%rbx), %ebp
	addl	$2, %eax
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movl	(%rsi,%rbp,4), %ebp
	movl	%ebp, (%rdx,%rbx,4)
	cmpl	%eax, %r9d
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%rsi,%r11,4), %r11d
	movl	%r11d, (%rdx,%rax,4)
.L4:
	movslq	%r9d, %r9
	movslq	%edi, %rdi
	movl	$1000000000, (%rdx,%r9,4)
	movl	$1000000000, (%rcx,%rdi,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdi
	xorl	%r9d, %r9d
	subl	%r10d, %r8d
	leaq	(%rsi,%rdi,4), %rax
	addq	%rdi, %r8
	xorl	%edi, %edi
	leaq	4(%rsi,%r8,4), %rbx
	xorl	%r8d, %r8d
	xorl	%esi, %esi
.L21:
	movl	(%rcx,%rdi,4), %r11d
	movl	(%rdx,%rsi,4), %r10d
	addl	$1, c(%rip)
	cmpl	%r11d, %r10d
	jl	.L19
	movl	%r11d, (%rax)
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rbx
	je	.L1
	movslq	%r8d, %rdi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	movl	%r10d, (%rax)
	addq	$4, %rax
	addl	$1, %r9d
	cmpq	%rax, %rbx
	je	.L1
	movslq	%r9d, %rsi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	-4(%rsi,%rax), %rbx
	movl	%r9d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rdx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%rsi,%rax), %rbx
	movl	%edi, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	Left(%rip), %rcx
	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
	movl	%esi, %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	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%eax, %r12d
	jg	.L58
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L59
.L50:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	%r14d, %esi
	movq	%rbp, %rdi
	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
	jmp	merge
	.p2align 4,,10
	.p2align 3
.L58:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L60
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L61
.L47:
	movl	%r12d, %r8d
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L50
.L59:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L62
.L51:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L63
.L54:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L60:
	leal	0(%r13,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L64
.L45:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L65
.L46:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jle	.L47
.L61:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L66
.L48:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L67
.L49:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L63:
	leal	(%rbx,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L68
.L55:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L69
.L56:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L70
.L52:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L71
.L53:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r9d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L71:
	movl	%r9d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L69:
	movl	%r9d, %edx
	movl	%ebx, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L46
	.cfi_endproc
.LFE26:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB24:
	.cfi_startproc
	endbr64
	leal	1(%rdx), %eax
	cmpl	%ecx, %eax
	jl	.L83
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	leal	(%rdx,%rcx), %edx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%edx, %r12d
	movl	%ecx, %ebx
	sarl	%r12d
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%r12d, %eax
	jl	.L84
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L85
.L77:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebx, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	movl	%ebp, %esi
	movq	%r14, %rdi
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	merge
	.p2align 4,,10
	.p2align 3
.L84:
	.cfi_restore_state
	leal	0(%r13,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L86
.L75:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L87
.L76:
	movl	%r12d, %r8d
	movl	%r15d, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jle	.L77
.L85:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L88
.L78:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L89
.L79:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L86:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%ebx, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L76
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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	-1998848(%rsp), %r11
	.cfi_def_cfa 11, 1998888
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1192, %rsp
	.cfi_def_cfa_offset 2000080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2000024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L91
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L104:
	movl	12(%rsp), %esi
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %esi
	jle	.L103
.L93:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$999999999, (%rbx)
	jle	.L104
	movl	$1, %eax
	jmp	.L90
.L103:
	cmpl	$1, %esi
	jle	.L94
	movl	%esi, %ecx
	xorl	%edx, %edx
	movq	%r13, %rdi
	call	mergeSort.part.0
.L94:
	xorl	%ebx, %ebx
	cmpl	$0, 12(%rsp)
	jg	.L95
	jmp	.L91
	.p2align 4,,10
	.p2align 3
.L96:
	movl	$32, %edi
	call	putchar@PLT
.L95:
	movl	0(%r13,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L96
.L91:
	movl	$10, %edi
	call	putchar@PLT
	movl	c(%rip), %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L90:
	movq	2000024(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L105
	addq	$2000040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L105:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	Right
	.align 32
	.type	Right, @object
	.size	Right, 1000008
Right:
	.zero	1000008
	.globl	Left
	.align 32
	.type	Left, @object
	.size	Left, 1000008
Left:
	.zero	1000008
	.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 500000
#define term 1000000000

int Left[(Max/2)+2], Right[(Max/2)+2];
int c=0;


void merge(int e[], int n, int left, int mid, int right){
  int i,j,k;

  int x = (mid-left);
  int y = (right-mid);

  for ( i=0; i<x; i++ )
   Left[i] = e[left+i];
  for ( i=0; i<y; i++ )
   Right[i] = e[mid+i];

  Left[x]= Right[y] = term;
  i = j = 0;
  for ( k=left; k<right; k++){
    c++;
    if ( Left[i]<=Right[j] ){
      e[k] = Left[i++];
    } else {
      e[k] = Right[j++];
    }
  }
}

void mergeSort(int e[], int n, int left, int right ){
  int mid;
  if ( left+1<right ){
    mid=(left + right)/2;
    mergeSort(e, n, left, mid);
    mergeSort(e, n, mid, right);
    merge(e, n, left, mid, right);
  }
}

int main(){
  int e[Max], n, i;
  scanf("%d", &n);
  for ( i=0; i<n; i++) {
    scanf("%d", &e[i]);
    if (e[i]>=term ){
      return 1;
    }
  }
  mergeSort(e,n,0,n);

  for ( i=0; i<n; i++) {
    if ( i !=0 ) 
    printf(" ");

    printf("%d", e[i]);
    }
  printf("\n");

  printf("%d\n", c);


  return 0;
}



10
8 5 9 2 6 3 7 0 10 4
 10
8 5 9 2 6 3 7 0 10 3
 10
8 5 9 2 6 4 11 0 10 3
 10
8 5 9 2 6 4 11 0 10 5
 10
8 5 9 2 6 4 11 1 10 5
 10
10 5 9 2 6 4 11 1 10 5
 10
10 5 9 2 6 4 19 1 10 5
 10
10 5 9 2 6 4 19 2 10 5
 10
10 5 9 2 6 4 19 4 10 5
 10
10 5 9 2 6 4 19 4 10 1

0 2 3 4 5 6 7 8 9 10
34
 0 2 3 3 5 6 7 8 9 10
34
 0 2 3 4 5 6 8 9 10 11
34
 0 2 4 5 5 6 8 9 10 11
34
 1 2 4 5 5 6 8 9 10 11
34
 1 2 4 5 5 6 9 10 10 11
34
 1 2 4 5 5 6 9 10 10 19
34
 2 2 4 5 5 6 9 10 10 19
34
 2 4 4 5 5 6 9 10 10 19
34
 1 2 4 4 5 6 9 10 10 19
34

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 500000
#define term 1000000000

int Left[(Max/2)+2], Right[(Max/2)+2];
int c=0;


void merge(int e[], int n, int left, int mid, int right){
  int i,j,k;

  int x = (mid-left);
  int y = (right-mid);

  for ( i=0; i<x; i++ )
   Left[i] = e[left+i];
  for ( i=0; i<y; i++ )
   Right[i] = e[mid+i];

  Left[x]= Right[y] = term;
  i = j = 0;
  for ( k=left; k<right; k++){
    c++;
    if ( Left[i]<=Right[j] ){
      e[k] = Left[i++];
    } else {
      e[k] = Right[j++];
    }
  }
}

void mergeSort(int e[], int n, int left, int right ){
  int mid;
  if ( left+1<right ){
    mid=(left + right)/2;
    mergeSort(e, n, left, mid);
    mergeSort(e, n, mid, right);
    merge(e, n, left, mid, right);
  }
}

int main(){
  int e[Max], n, i;
  scanf("%d", &n);
  for ( i=0; i<n; i++) {
    scanf("%d", &e[i]);
    if (e[i]>=term ){
      return 1;
    }
  }
  mergeSort(e,n,0,n);

  for ( i=0; i<n; i++) {
    if ( i !=0 ) 
    printf(" ");

    printf("%d", e[i]);
    }
  printf("\n");

  printf("%d\n", c);


  return 0;
}


```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Left
	.bss
	.align 32
	.type	Left, @object
	.size	Left, 1000008
Left:
	.zero	1000008
	.globl	Right
	.align 32
	.type	Right, @object
	.size	Right, 1000008
Right:
	.zero	1000008
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.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)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Left(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	nop
	nop
	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	$48, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L12
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000020(%rbp)
	jmp	.L14
.L17:
	leaq	-2000016(%rbp), %rdx
	movl	-2000020(%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
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	cmpl	$999999999, %eax
	jle	.L15
	movl	$1, %eax
	jmp	.L21
.L15:
	addl	$1, -2000020(%rbp)
.L14:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L17
	movl	-2000024(%rbp), %edx
	movl	-2000024(%rbp), %esi
	leaq	-2000016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -2000020(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -2000020(%rbp)
	je	.L19
	movl	$32, %edi
	call	putchar@PLT
.L19:
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -2000020(%rbp)
.L18:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L20
	movl	$10, %edi
	call	putchar@PLT
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	Left
	.bss
	.align 32
	.type	Left, @object
	.size	Left, 1000008
Left:
	.zero	1000008
	.globl	Right
	.align 32
	.type	Right, @object
	.size	Right, 1000008
Right:
	.zero	1000008
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.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)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-56(%rbp), %eax
	subl	-52(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Right(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	$1000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Right(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	Left(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Left(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Left(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L8
.L7:
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Right(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L9
	nop
	nop
	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	$48, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L12
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	-36(%rbp), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	merge
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\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	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000020(%rbp)
	jmp	.L14
.L17:
	leaq	-2000016(%rbp), %rdx
	movl	-2000020(%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
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	cmpl	$999999999, %eax
	jle	.L15
	movl	$1, %eax
	jmp	.L21
.L15:
	addl	$1, -2000020(%rbp)
.L14:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L17
	movl	-2000024(%rbp), %edx
	movl	-2000024(%rbp), %esi
	leaq	-2000016(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -2000020(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -2000020(%rbp)
	je	.L19
	movl	$32, %edi
	call	putchar@PLT
.L19:
	movl	-2000020(%rbp), %eax
	cltq
	movl	-2000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -2000020(%rbp)
.L18:
	movl	-2000024(%rbp), %eax
	cmpl	%eax, -2000020(%rbp)
	jl	.L20
	movl	$10, %edi
	call	putchar@PLT
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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:
