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>
#include <limits.h>


int S[500000];
int R[250001];
int L[250001];

int count;


void merge(int A[], int left, int mid,int right){
  int i,j,k;
  int n1,n2;
  
  n1 = mid - left;
  n2 = right - mid;
  
  /*L[0...n1], R[0...n2] �𐶐�*/
    
  for( i = 0 ;i<= n1-1;i++){
    L[i] = A[left + i];
  }
  for (i = 0 ;i<= n2-1;i++){
    R[i] = A[mid + i];
  }
  
  L[n1] = INT_MAX;
  R[n2] = INT_MAX;
  
  i = 0;
  j = 0;
  for( k = left;k<= right-1;k++){
    ++count;
    if( L[i] <= R[j]){
      A[k] = L[i];
      i = i + 1;
    }
    else {
      A[k] = R[j];
      j = j + 1;
    }
  }
}

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

  }
}


int main(){
  int i,j,n;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }

  mergeSort(S,0,n);

  for(j=0;j<n;j++){

    if(j!=n-1){
      printf("%d ",S[j]);

    }

    else{
      printf("%d\n",S[j]);
    }
  }

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

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 2000000
S:
	.zero	2000000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000004
R:
	.zero	1000004
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000004
L:
	.zero	1000004
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.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	-48(%rbp), %eax
	subl	-44(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-44(%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	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	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	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	count(%rip), %eax
	addl	$1, %eax
	movl	%eax, count(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jle	.L12
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %edx
	movl	-4(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	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 "
.LC2:
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, -12(%rbp)
.L16:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	count(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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
	movl	%edx, %r11d
	movl	%ecx, %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %r10d
	movl	%r11d, %r8d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%ecx, %edx
	subl	%r11d, %r9d
	subl	%esi, %r8d
	testl	%r8d, %r8d
	jle	.L41
	movslq	%esi, %rax
	leaq	L(%rip), %rcx
	leaq	4(,%rax,4), %rax
	movq	%rcx, %rsi
	leaq	(%rdi,%rax), %rbx
	subq	%rbx, %rsi
	cmpq	$8, %rsi
	jbe	.L5
	leal	-1(%r8), %esi
	cmpl	$2, %esi
	jbe	.L5
	movl	%r8d, %esi
	leaq	-4(%rdi,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rsi
	jne	.L6
	movl	%r8d, %eax
	andl	$-4, %eax
	testb	$3, %r8b
	je	.L8
	leal	(%r10,%rax), %esi
	movslq	%esi, %rsi
	movl	(%rdi,%rsi,4), %ebx
	movslq	%eax, %rsi
	movl	%ebx, (%rcx,%rsi,4)
	leal	1(%rax), %esi
	cmpl	%esi, %r8d
	jle	.L8
	leal	(%r10,%rsi), %ebx
	addl	$2, %eax
	movslq	%esi, %rsi
	movslq	%ebx, %rbx
	movl	(%rdi,%rbx,4), %ebx
	movl	%ebx, (%rcx,%rsi,4)
	cmpl	%eax, %r8d
	jle	.L8
	leal	(%r10,%rax), %esi
	cltq
	movslq	%esi, %rsi
	movl	(%rdi,%rsi,4), %esi
	movl	%esi, (%rcx,%rax,4)
.L8:
	leaq	R(%rip), %rsi
	testl	%r9d, %r9d
	jle	.L4
	movslq	%r11d, %rax
	leaq	R(%rip), %rsi
	leaq	4(,%rax,4), %rax
	movq	%rsi, %rbx
	leaq	(%rdi,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%r9), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%r9d, %ebx
	leaq	-4(%rdi,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rsi,%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	(%rdi,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rsi,%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	(%rdi,%rbp,4), %ebp
	movl	%ebp, (%rsi,%rbx,4)
	cmpl	%eax, %r9d
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%rdi,%r11,4), %r11d
	movl	%r11d, (%rsi,%rax,4)
.L4:
	movslq	%r8d, %r8
	movslq	%r9d, %r9
	movl	$2147483647, (%rcx,%r8,4)
	movl	$2147483647, (%rsi,%r9,4)
	cmpl	%edx, %r10d
	jge	.L1
	subl	$1, %edx
	movslq	%r10d, %r8
	xorl	%r9d, %r9d
	subl	%r10d, %edx
	leaq	(%rdi,%r8,4), %rax
	addq	%r8, %rdx
	xorl	%r8d, %r8d
	leaq	4(%rdi,%rdx,4), %rbx
	xorl	%edi, %edi
	xorl	%edx, %edx
.L21:
	movl	(%rcx,%rdi,4), %r11d
	movl	(%rsi,%rdx,4), %r10d
	addl	$1, count(%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, %rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	-4(%rdi,%rax), %rbx
	movl	%r9d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%rdi,%rax), %rbx
	movl	%r8d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %esi
	movl	%esi, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rcx
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rsi,%rdx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	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
	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
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	leal	1(%rsi), %eax
	sarl	%r12d
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%eax, %r12d
	jg	.L58
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jg	.L59
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%r15, %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	(%rsi,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L60
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L61
.L47:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jle	.L50
.L59:
	leal	0(%r13,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L62
.L51:
	leal	1(%r14), %eax
	cmpl	%eax, %r13d
	jg	.L63
.L54:
	movl	%r13d, %ecx
	movl	%r14d, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L60:
	leal	(%rsi,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L64
.L45:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L65
.L46:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L47
.L61:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L66
.L48:
	leal	1(%rbx), %eax
	cmpl	%eax, %r12d
	jg	.L67
.L49:
	movl	%r12d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L63:
	leal	0(%r13,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L68
.L55:
	leal	1(%rbx), %eax
	cmpl	%eax, %r13d
	jg	.L69
.L56:
	movl	%r13d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L70
.L52:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L71
.L53:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%ebx, %edx
	call	mergeSort.part.0
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r12d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L71:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L69:
	movl	%r13d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	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(%rsi), %eax
	cmpl	%edx, %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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	leal	(%rsi,%rdx), %edx
	movl	%edx, %r13d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	shrl	$31, %r13d
	addl	%edx, %r13d
	sarl	%r13d
	cmpl	%r13d, %eax
	jl	.L84
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jg	.L85
.L77:
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	popq	%rbp
	.cfi_remember_state
	.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	(%rsi,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L86
.L75:
	leal	1(%r15), %eax
	cmpl	%eax, %r13d
	jg	.L87
.L76:
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jle	.L77
.L85:
	leal	(%r12,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L88
.L78:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L89
.L79:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L86:
	movl	%r15d, %edx
	call	mergeSort.part.0
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r13d, %edx
	movl	%r15d, %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"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L91
	leaq	S(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L92:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %r12
	cmpl	%ebx, %edx
	jg	.L92
	cmpl	$1, %edx
	jle	.L93
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	mergeSort.part.0
	movl	4(%rsp), %edx
.L93:
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	leaq	.LC2(%rip), %r12
	testl	%edx, %edx
	jle	.L91
	.p2align 4,,10
	.p2align 3
.L94:
	subl	$1, %edx
	movl	0(%rbp,%rbx,4), %r8d
	movq	%r12, %rsi
	cmpl	%ebx, %edx
	movl	%r8d, %edx
	jne	.L105
	movq	%r13, %rsi
.L105:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	4(%rsp), %edx
	cmpl	%ebx, %edx
	jg	.L94
.L91:
	movl	count(%rip), %edx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L106
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L106:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000004
L:
	.zero	1000004
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000004
R:
	.zero	1000004
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 2000000
S:
	.zero	2000000
	.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
	movl	%edx, %r11d
	movl	%ecx, %r9d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %r10d
	movl	%r11d, %r8d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%ecx, %edx
	subl	%r11d, %r9d
	subl	%esi, %r8d
	testl	%r8d, %r8d
	jle	.L41
	movslq	%esi, %rax
	leaq	L(%rip), %rcx
	leaq	4(,%rax,4), %rax
	movq	%rcx, %rsi
	leaq	(%rdi,%rax), %rbx
	subq	%rbx, %rsi
	cmpq	$8, %rsi
	jbe	.L5
	leal	-1(%r8), %esi
	cmpl	$2, %esi
	jbe	.L5
	movl	%r8d, %esi
	leaq	-4(%rdi,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rsi
	jne	.L6
	movl	%r8d, %eax
	andl	$-4, %eax
	testb	$3, %r8b
	je	.L8
	leal	(%r10,%rax), %esi
	movslq	%esi, %rsi
	movl	(%rdi,%rsi,4), %ebx
	movslq	%eax, %rsi
	movl	%ebx, (%rcx,%rsi,4)
	leal	1(%rax), %esi
	cmpl	%esi, %r8d
	jle	.L8
	leal	(%r10,%rsi), %ebx
	addl	$2, %eax
	movslq	%esi, %rsi
	movslq	%ebx, %rbx
	movl	(%rdi,%rbx,4), %ebx
	movl	%ebx, (%rcx,%rsi,4)
	cmpl	%eax, %r8d
	jle	.L8
	leal	(%r10,%rax), %esi
	cltq
	movslq	%esi, %rsi
	movl	(%rdi,%rsi,4), %esi
	movl	%esi, (%rcx,%rax,4)
.L8:
	leaq	R(%rip), %rsi
	testl	%r9d, %r9d
	jle	.L4
	movslq	%r11d, %rax
	leaq	R(%rip), %rsi
	leaq	4(,%rax,4), %rax
	movq	%rsi, %rbx
	leaq	(%rdi,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%r9), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%r9d, %ebx
	leaq	-4(%rdi,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rsi,%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	(%rdi,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rsi,%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	(%rdi,%rbp,4), %ebp
	movl	%ebp, (%rsi,%rbx,4)
	cmpl	%eax, %r9d
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%rdi,%r11,4), %r11d
	movl	%r11d, (%rsi,%rax,4)
.L4:
	movslq	%r8d, %r8
	movslq	%r9d, %r9
	movl	$2147483647, (%rcx,%r8,4)
	movl	$2147483647, (%rsi,%r9,4)
	cmpl	%edx, %r10d
	jge	.L1
	subl	$1, %edx
	movslq	%r10d, %r8
	xorl	%r9d, %r9d
	subl	%r10d, %edx
	leaq	(%rdi,%r8,4), %rax
	addq	%r8, %rdx
	xorl	%r8d, %r8d
	leaq	4(%rdi,%rdx,4), %rbx
	xorl	%edi, %edi
	xorl	%edx, %edx
.L21:
	movl	(%rcx,%rdi,4), %r11d
	movl	(%rsi,%rdx,4), %r10d
	addl	$1, count(%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, %rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	-4(%rdi,%rax), %rbx
	movl	%r9d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%rdi,%rax), %rbx
	movl	%r8d, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %esi
	movl	%esi, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rcx
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rsi,%rdx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	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
	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
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	leal	1(%rsi), %eax
	sarl	%r12d
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%eax, %r12d
	jg	.L58
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jg	.L59
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%r15, %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	(%rsi,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L60
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L61
.L47:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jle	.L50
.L59:
	leal	0(%r13,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L62
.L51:
	leal	1(%r14), %eax
	cmpl	%eax, %r13d
	jg	.L63
.L54:
	movl	%r13d, %ecx
	movl	%r14d, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L60:
	leal	(%rsi,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L64
.L45:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L65
.L46:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L47
.L61:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L66
.L48:
	leal	1(%rbx), %eax
	cmpl	%eax, %r12d
	jg	.L67
.L49:
	movl	%r12d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L63:
	leal	0(%r13,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L68
.L55:
	leal	1(%rbx), %eax
	cmpl	%eax, %r13d
	jg	.L69
.L56:
	movl	%r13d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L70
.L52:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L71
.L53:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%ebx, %edx
	call	mergeSort.part.0
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r12d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L71:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L69:
	movl	%r13d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	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(%rsi), %eax
	cmpl	%edx, %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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	leal	(%rsi,%rdx), %edx
	movl	%edx, %r13d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	shrl	$31, %r13d
	addl	%edx, %r13d
	sarl	%r13d
	cmpl	%r13d, %eax
	jl	.L84
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jg	.L85
.L77:
	movl	%r12d, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	popq	%rbp
	.cfi_remember_state
	.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	(%rsi,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L86
.L75:
	leal	1(%r15), %eax
	cmpl	%eax, %r13d
	jg	.L87
.L76:
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jle	.L77
.L85:
	leal	(%r12,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L88
.L78:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L89
.L79:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L86:
	movl	%r15d, %edx
	call	mergeSort.part.0
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r13d, %edx
	movl	%r15d, %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"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L91
	leaq	S(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L92:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edx
	addq	$4, %r12
	cmpl	%ebx, %edx
	jg	.L92
	cmpl	$1, %edx
	jle	.L93
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	mergeSort.part.0
	movl	4(%rsp), %edx
.L93:
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	leaq	.LC2(%rip), %r12
	testl	%edx, %edx
	jle	.L91
	.p2align 4,,10
	.p2align 3
.L94:
	subl	$1, %edx
	movl	0(%rbp,%rbx,4), %r8d
	movq	%r12, %rsi
	cmpl	%ebx, %edx
	movl	%r8d, %edx
	jne	.L105
	movq	%r13, %rsi
.L105:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	4(%rsp), %edx
	cmpl	%ebx, %edx
	jg	.L94
.L91:
	movl	count(%rip), %edx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L106
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L106:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000004
L:
	.zero	1000004
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000004
R:
	.zero	1000004
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 2000000
S:
	.zero	2000000
	.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>
#include <limits.h>


int S[500000];
int R[250001];
int L[250001];

int count;


void merge(int A[], int left, int mid,int right){
  int i,j,k;
  int n1,n2;
  
  n1 = mid - left;
  n2 = right - mid;
  
  /*L[0...n1], R[0...n2] �𐶐�*/
    
  for( i = 0 ;i<= n1-1;i++){
    L[i] = A[left + i];
  }
  for (i = 0 ;i<= n2-1;i++){
    R[i] = A[mid + i];
  }
  
  L[n1] = INT_MAX;
  R[n2] = INT_MAX;
  
  i = 0;
  j = 0;
  for( k = left;k<= right-1;k++){
    ++count;
    if( L[i] <= R[j]){
      A[k] = L[i];
      i = i + 1;
    }
    else {
      A[k] = R[j];
      j = j + 1;
    }
  }
}

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

  }
}


int main(){
  int i,j,n;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }

  mergeSort(S,0,n);

  for(j=0;j<n;j++){

    if(j!=n-1){
      printf("%d ",S[j]);

    }

    else{
      printf("%d\n",S[j]);
    }
  }

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

  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>
#include <limits.h>


int S[500000];
int R[250001];
int L[250001];

int count;


void merge(int A[], int left, int mid,int right){
  int i,j,k;
  int n1,n2;
  
  n1 = mid - left;
  n2 = right - mid;
  
  /*L[0...n1], R[0...n2] �𐶐�*/
    
  for( i = 0 ;i<= n1-1;i++){
    L[i] = A[left + i];
  }
  for (i = 0 ;i<= n2-1;i++){
    R[i] = A[mid + i];
  }
  
  L[n1] = INT_MAX;
  R[n2] = INT_MAX;
  
  i = 0;
  j = 0;
  for( k = left;k<= right-1;k++){
    ++count;
    if( L[i] <= R[j]){
      A[k] = L[i];
      i = i + 1;
    }
    else {
      A[k] = R[j];
      j = j + 1;
    }
  }
}

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

  }
}


int main(){
  int i,j,n;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }

  mergeSort(S,0,n);

  for(j=0;j<n;j++){

    if(j!=n-1){
      printf("%d ",S[j]);

    }

    else{
      printf("%d\n",S[j]);
    }
  }

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

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 2000000
S:
	.zero	2000000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000004
R:
	.zero	1000004
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000004
L:
	.zero	1000004
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.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	-48(%rbp), %eax
	subl	-44(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-44(%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	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	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	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	count(%rip), %eax
	addl	$1, %eax
	movl	%eax, count(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jle	.L12
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %edx
	movl	-4(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	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 "
.LC2:
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, -12(%rbp)
.L16:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	count(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 2000000
S:
	.zero	2000000
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000004
R:
	.zero	1000004
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000004
L:
	.zero	1000004
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.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	-48(%rbp), %eax
	subl	-44(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-52(%rbp), %eax
	subl	-48(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-44(%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	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L3
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	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	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L5
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	movl	count(%rip), %eax
	addl	$1, %eax
	movl	%eax, count(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	L(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	R(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	jle	.L12
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %edx
	movl	-4(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	-32(%rbp), %ecx
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %esi
	movq	-24(%rbp), %rax
	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 "
.LC2:
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L19:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addl	$1, -12(%rbp)
.L16:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	count(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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:
