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

int *A;
int comp=0;

void merge(int *A, int left, int mid, int right){
  int *L, *R;
  int n1;
  int n2;
  int i,j,k;

  n1 = mid - left;
  n2 = right - mid;
  //printf("in merge\n" );
  L = (int*)malloc(sizeof(int) * (n1+1));
  R = (int*)malloc(sizeof(int) * (n2+1));

  for(i=0; i<n1; i++){
    L[i]=A[left + i];
  }
  for (i = 0; i < n2; i++) {
    R[i]=A[mid + i];
  }

  L[n1]=INT_MAX;
  R[n2]=INT_MAX;
  i=0;
  j=0;

  for(k=left; k<right; k++){
    if(L[i]<=R[j]){
      A[k]=L[i];
      //printf("A[%d]: %d\n",k,A[k]);
      i++;
      comp++;
    }else{
      A[k]=R[j];
      //printf("A[%d]: %d\n",k,A[k]);
      j++;
      comp++;
    }
  }
}
void mergeSort(int *A, int left, int right){
  int mid;
  //printf("margeSort in\n" );
  if (left+1<right) {
    mid = (left + right)/2;
    //printf("left: %d, mid: %d, right: %d\n",left,mid,right);
    //printf("mid->%d\n",mid );
    mergeSort(A, left, mid);
    mergeSort(A, mid, right);
    //printf("go to merge\n" );
    merge(A, left, mid ,right);
  }
  //merge(A, left, mid ,right);
}

int main() {
  int n;
  int left, right;
  int i;

  //要素の入力
  scanf("%d",&n );
  A = (int*)malloc(sizeof(int) * n);
  for (i=0; i<n; i++) {
    //printf("S[%d]->",i );
    scanf("%d",&A[i]);
  }
  //printf("入力終了\n" );
  mergeSort(A,0,i);

  for (i = 0; i < n; i++) {
    printf("%d",A[i]);
    if(i!=n-1)printf(" ");
  }
  printf("\n%d\n",comp );
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	A
	.bss
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.globl	comp
	.align 4
	.type	comp, @object
	.size	comp, 4
comp:
	.zero	4
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	%edx, -64(%rbp)
	movl	%ecx, -68(%rbp)
	movl	-64(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-68(%rbp), %eax
	subl	-64(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movl	-60(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-64(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
	jmp	.L8
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jl	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB7:
	.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
.LFE7:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, A(%rip)
	movl	$0, -12(%rbp)
	jmp	.L14
.L15:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L14:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movq	A(%rip), %rax
	movl	-12(%rbp), %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	comp(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r12d, %r15d
	subl	%r12d, %r13d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subl	%esi, %r15d
	movl	%ecx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, (%rsp)
	leal	1(%r15), %edi
	movslq	%edi, %rdi
	salq	$2, %rdi
	call	malloc@PLT
	leal	1(%r13), %edi
	movslq	%edi, %rdi
	movq	%rax, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r9
	testl	%r15d, %r15d
	jle	.L14
	movq	(%rsp), %rcx
	movq	%rax, 8(%rsp)
	movslq	%r15d, %r15
	movslq	%ebp, %rax
	leaq	0(,%r15,4), %rdx
	movq	%r14, %rdi
	leaq	(%rcx,%rax,4), %rsi
	call	memcpy@PLT
	movq	8(%rsp), %r9
.L5:
	testl	%r13d, %r13d
	movslq	%r13d, %r13
	jle	.L4
	movq	(%rsp), %rax
	movq	%r9, %rdi
	leaq	0(,%r13,4), %rdx
	leaq	(%rax,%r12,4), %rsi
	call	memcpy@PLT
	movq	%rax, %r9
.L4:
	movl	$2147483647, (%r14,%r15,4)
	movl	$2147483647, (%r9,%r13,4)
	cmpl	%ebx, %ebp
	jge	.L1
	subl	$1, %ebx
	movq	(%rsp), %rsi
	movslq	%ebp, %rdx
	xorl	%r11d, %r11d
	subl	%ebp, %ebx
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	addq	%rdx, %rbx
	leaq	(%rsi,%rdx,4), %rax
	leaq	4(%rsi,%rbx,4), %rbx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r14,%rdi,4), %ecx
	movl	(%r9,%rsi,4), %edx
	cmpl	%edx, %ecx
	jg	.L8
.L15:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r10d
	addl	$1, comp(%rip)
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r10d, %rdi
	movl	(%r9,%rsi,4), %edx
	movl	(%r14,%rdi,4), %ecx
	cmpl	%edx, %ecx
	jle	.L15
.L8:
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	addl	$1, comp(%rip)
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r11d, %rsi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movslq	%r15d, %r15
	jmp	.L5
	.cfi_endproc
.LFE39:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB42:
	.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	.L32
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jg	.L33
.L24:
	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
.L32:
	.cfi_restore_state
	leal	(%rsi,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L34
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L35
.L21:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jle	.L24
.L33:
	leal	0(%r13,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L36
.L25:
	leal	1(%r14), %eax
	cmpl	%eax, %r13d
	jg	.L37
.L28:
	movl	%r13d, %ecx
	movl	%r14d, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L34:
	leal	(%rsi,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L38
.L19:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L39
.L20:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L21
.L35:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L40
.L22:
	leal	1(%rbx), %eax
	cmpl	%eax, %r12d
	jg	.L41
.L23:
	movl	%r12d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L37:
	leal	0(%r13,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L42
.L29:
	leal	1(%rbx), %eax
	cmpl	%eax, %r13d
	jg	.L43
.L30:
	movl	%r13d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L44
.L26:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L45
.L27:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%ebx, %edx
	call	mergeSort.part.0
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L41:
	movl	%r12d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L45:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L44:
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%r13d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L20
	.cfi_endproc
.LFE42:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB40:
	.cfi_startproc
	endbr64
	leal	1(%rsi), %eax
	cmpl	%edx, %eax
	jl	.L57
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	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	.L58
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jg	.L59
.L51:
	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
.L58:
	.cfi_restore_state
	leal	(%rsi,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L60
.L49:
	leal	1(%r15), %eax
	cmpl	%eax, %r13d
	jg	.L61
.L50:
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jle	.L51
.L59:
	leal	(%r12,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L62
.L52:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L63
.L53:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%r15d, %edx
	call	mergeSort.part.0
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L62:
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L50
	.cfi_endproc
.LFE40:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"\n%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, A(%rip)
	testl	%ebx, %ebx
	jle	.L65
	xorl	%ebx, %ebx
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L77:
	movq	A(%rip), %rax
.L67:
	leaq	(%rax,%rbx,4), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leal	1(%rbx), %edx
	addq	$1, %rbx
	cmpl	%ebx, 4(%rsp)
	jg	.L77
	movq	A(%rip), %r12
	cmpl	$1, %edx
	je	.L68
	xorl	%esi, %esi
	movq	%r12, %rdi
	call	mergeSort.part.0
.L68:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L65
	xorl	%ebx, %ebx
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L78:
	movl	$32, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, 4(%rsp)
	jle	.L65
.L70:
	movq	A(%rip), %r12
.L71:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%ebx, %edx
	jne	.L78
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L70
.L65:
	movl	comp(%rip), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L79:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	comp
	.bss
	.align 4
	.type	comp, @object
	.size	comp, 4
comp:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r12d, %r15d
	subl	%r12d, %r13d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subl	%esi, %r15d
	movl	%ecx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, (%rsp)
	leal	1(%r15), %edi
	movslq	%edi, %rdi
	salq	$2, %rdi
	call	malloc@PLT
	leal	1(%r13), %edi
	movslq	%edi, %rdi
	movq	%rax, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r9
	testl	%r15d, %r15d
	jle	.L14
	movq	(%rsp), %rcx
	movq	%rax, 8(%rsp)
	movslq	%r15d, %r15
	movslq	%ebp, %rax
	leaq	0(,%r15,4), %rdx
	movq	%r14, %rdi
	leaq	(%rcx,%rax,4), %rsi
	call	memcpy@PLT
	movq	8(%rsp), %r9
.L5:
	testl	%r13d, %r13d
	movslq	%r13d, %r13
	jle	.L4
	movq	(%rsp), %rax
	movq	%r9, %rdi
	leaq	0(,%r13,4), %rdx
	leaq	(%rax,%r12,4), %rsi
	call	memcpy@PLT
	movq	%rax, %r9
.L4:
	movl	$2147483647, (%r14,%r15,4)
	movl	$2147483647, (%r9,%r13,4)
	cmpl	%ebx, %ebp
	jge	.L1
	subl	$1, %ebx
	movq	(%rsp), %rsi
	movslq	%ebp, %rdx
	xorl	%r11d, %r11d
	subl	%ebp, %ebx
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	addq	%rdx, %rbx
	leaq	(%rsi,%rdx,4), %rax
	leaq	4(%rsi,%rbx,4), %rbx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r14,%rdi,4), %ecx
	movl	(%r9,%rsi,4), %edx
	cmpl	%edx, %ecx
	jg	.L8
.L15:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r10d
	addl	$1, comp(%rip)
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r10d, %rdi
	movl	(%r9,%rsi,4), %edx
	movl	(%r14,%rdi,4), %ecx
	cmpl	%edx, %ecx
	jle	.L15
.L8:
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	addl	$1, comp(%rip)
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r11d, %rsi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movslq	%r15d, %r15
	jmp	.L5
	.cfi_endproc
.LFE39:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB42:
	.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	.L32
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jg	.L33
.L24:
	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
.L32:
	.cfi_restore_state
	leal	(%rsi,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L34
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jg	.L35
.L21:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r12), %eax
	cmpl	%eax, %r13d
	jle	.L24
.L33:
	leal	0(%r13,%r12), %edx
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	cmpl	%r14d, %eax
	jl	.L36
.L25:
	leal	1(%r14), %eax
	cmpl	%eax, %r13d
	jg	.L37
.L28:
	movl	%r13d, %ecx
	movl	%r14d, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L34:
	leal	(%rsi,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L38
.L19:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L39
.L20:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movq	%r15, %rdi
	call	merge
	leal	1(%r14), %eax
	cmpl	%eax, %r12d
	jle	.L21
.L35:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L40
.L22:
	leal	1(%rbx), %eax
	cmpl	%eax, %r12d
	jg	.L41
.L23:
	movl	%r12d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L37:
	leal	0(%r13,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L42
.L29:
	leal	1(%rbx), %eax
	cmpl	%eax, %r13d
	jg	.L43
.L30:
	movl	%r13d, %ecx
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%r12,%r14), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	%ebx, %eax
	jl	.L44
.L26:
	leal	1(%rbx), %eax
	cmpl	%eax, %r14d
	jg	.L45
.L27:
	movl	%r14d, %ecx
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	merge
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%ebx, %edx
	call	mergeSort.part.0
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L41:
	movl	%r12d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L45:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L44:
	movl	%ebx, %edx
	movl	%r12d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%r13d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%ebx, %edx
	movl	%r14d, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%r14d, %edx
	movl	%ebx, %esi
	movq	%r15, %rdi
	call	mergeSort.part.0
	jmp	.L20
	.cfi_endproc
.LFE42:
	.size	mergeSort.part.0, .-mergeSort.part.0
	.p2align 4
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB40:
	.cfi_startproc
	endbr64
	leal	1(%rsi), %eax
	cmpl	%edx, %eax
	jl	.L57
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	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	.L58
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jg	.L59
.L51:
	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
.L58:
	.cfi_restore_state
	leal	(%rsi,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L60
.L49:
	leal	1(%r15), %eax
	cmpl	%eax, %r13d
	jg	.L61
.L50:
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	leal	1(%r13), %eax
	cmpl	%eax, %r12d
	jle	.L51
.L59:
	leal	(%r12,%r13), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L62
.L52:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L63
.L53:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%r15d, %edx
	call	mergeSort.part.0
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%r12d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L62:
	movl	%r15d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%r13d, %edx
	movl	%r15d, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L50
	.cfi_endproc
.LFE40:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"\n%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, A(%rip)
	testl	%ebx, %ebx
	jle	.L65
	xorl	%ebx, %ebx
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L77:
	movq	A(%rip), %rax
.L67:
	leaq	(%rax,%rbx,4), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leal	1(%rbx), %edx
	addq	$1, %rbx
	cmpl	%ebx, 4(%rsp)
	jg	.L77
	movq	A(%rip), %r12
	cmpl	$1, %edx
	je	.L68
	xorl	%esi, %esi
	movq	%r12, %rdi
	call	mergeSort.part.0
.L68:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L65
	xorl	%ebx, %ebx
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L78:
	movl	$32, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, 4(%rsp)
	jle	.L65
.L70:
	movq	A(%rip), %r12
.L71:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%ebx, %edx
	jne	.L78
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L70
.L65:
	movl	comp(%rip), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L79:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	comp
	.bss
	.align 4
	.type	comp, @object
	.size	comp, 4
comp:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.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 <stdlib.h>
#include <limits.h>

int *A;
int comp=0;

void merge(int *A, int left, int mid, int right){
  int *L, *R;
  int n1;
  int n2;
  int i,j,k;

  n1 = mid - left;
  n2 = right - mid;
  //printf("in merge\n" );
  L = (int*)malloc(sizeof(int) * (n1+1));
  R = (int*)malloc(sizeof(int) * (n2+1));

  for(i=0; i<n1; i++){
    L[i]=A[left + i];
  }
  for (i = 0; i < n2; i++) {
    R[i]=A[mid + i];
  }

  L[n1]=INT_MAX;
  R[n2]=INT_MAX;
  i=0;
  j=0;

  for(k=left; k<right; k++){
    if(L[i]<=R[j]){
      A[k]=L[i];
      //printf("A[%d]: %d\n",k,A[k]);
      i++;
      comp++;
    }else{
      A[k]=R[j];
      //printf("A[%d]: %d\n",k,A[k]);
      j++;
      comp++;
    }
  }
}
void mergeSort(int *A, int left, int right){
  int mid;
  //printf("margeSort in\n" );
  if (left+1<right) {
    mid = (left + right)/2;
    //printf("left: %d, mid: %d, right: %d\n",left,mid,right);
    //printf("mid->%d\n",mid );
    mergeSort(A, left, mid);
    mergeSort(A, mid, right);
    //printf("go to merge\n" );
    merge(A, left, mid ,right);
  }
  //merge(A, left, mid ,right);
}

int main() {
  int n;
  int left, right;
  int i;

  //要素の入力
  scanf("%d",&n );
  A = (int*)malloc(sizeof(int) * n);
  for (i=0; i<n; i++) {
    //printf("S[%d]->",i );
    scanf("%d",&A[i]);
  }
  //printf("入力終了\n" );
  mergeSort(A,0,i);

  for (i = 0; i < n; i++) {
    printf("%d",A[i]);
    if(i!=n-1)printf(" ");
  }
  printf("\n%d\n",comp );
  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 <stdlib.h>
#include <limits.h>

int *A;
int comp=0;

void merge(int *A, int left, int mid, int right){
  int *L, *R;
  int n1;
  int n2;
  int i,j,k;

  n1 = mid - left;
  n2 = right - mid;
  //printf("in merge\n" );
  L = (int*)malloc(sizeof(int) * (n1+1));
  R = (int*)malloc(sizeof(int) * (n2+1));

  for(i=0; i<n1; i++){
    L[i]=A[left + i];
  }
  for (i = 0; i < n2; i++) {
    R[i]=A[mid + i];
  }

  L[n1]=INT_MAX;
  R[n2]=INT_MAX;
  i=0;
  j=0;

  for(k=left; k<right; k++){
    if(L[i]<=R[j]){
      A[k]=L[i];
      //printf("A[%d]: %d\n",k,A[k]);
      i++;
      comp++;
    }else{
      A[k]=R[j];
      //printf("A[%d]: %d\n",k,A[k]);
      j++;
      comp++;
    }
  }
}
void mergeSort(int *A, int left, int right){
  int mid;
  //printf("margeSort in\n" );
  if (left+1<right) {
    mid = (left + right)/2;
    //printf("left: %d, mid: %d, right: %d\n",left,mid,right);
    //printf("mid->%d\n",mid );
    mergeSort(A, left, mid);
    mergeSort(A, mid, right);
    //printf("go to merge\n" );
    merge(A, left, mid ,right);
  }
  //merge(A, left, mid ,right);
}

int main() {
  int n;
  int left, right;
  int i;

  //要素の入力
  scanf("%d",&n );
  A = (int*)malloc(sizeof(int) * n);
  for (i=0; i<n; i++) {
    //printf("S[%d]->",i );
    scanf("%d",&A[i]);
  }
  //printf("入力終了\n" );
  mergeSort(A,0,i);

  for (i = 0; i < n; i++) {
    printf("%d",A[i]);
    if(i!=n-1)printf(" ");
  }
  printf("\n%d\n",comp );
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	A
	.bss
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.globl	comp
	.align 4
	.type	comp, @object
	.size	comp, 4
comp:
	.zero	4
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	%edx, -64(%rbp)
	movl	%ecx, -68(%rbp)
	movl	-64(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-68(%rbp), %eax
	subl	-64(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movl	-60(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-64(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
	jmp	.L8
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jl	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB7:
	.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
.LFE7:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, A(%rip)
	movl	$0, -12(%rbp)
	jmp	.L14
.L15:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L14:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movq	A(%rip), %rax
	movl	-12(%rbp), %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	comp(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	A
	.bss
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.globl	comp
	.align 4
	.type	comp, @object
	.size	comp, 4
comp:
	.zero	4
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	%edx, -64(%rbp)
	movl	%ecx, -68(%rbp)
	movl	-64(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-68(%rbp), %eax
	subl	-64(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movl	-60(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-64(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L5
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	$2147483647, (%rax)
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-8(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -36(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
	jmp	.L8
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
	movl	comp(%rip), %eax
	addl	$1, %eax
	movl	%eax, comp(%rip)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jl	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge, .-merge
	.globl	mergeSort
	.type	mergeSort, @function
mergeSort:
.LFB7:
	.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
.LFE7:
	.size	mergeSort, .-mergeSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, A(%rip)
	movl	$0, -12(%rbp)
	jmp	.L14
.L15:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L14:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movq	A(%rip), %rax
	movl	-12(%rbp), %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	mergeSort
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movq	A(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	movl	comp(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
