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 SENTINEL 2000000000

int L[MAX/2+2],R[MAX/2+2];
//int cnt=0;  cnt=nlogn

void merge(int A[],int n,int left,int mid,int right){ //分割と統治
    int n1 = mid-left;
    int n2 = right-mid;
    for(int i=0;i<n1;i++) L[i]=A[left+i];
    for(int i=0;i<n2;i++) R[i]=A[mid+i];
    L[n1]=R[n2]=SENTINEL;  //番兵
    int i=0,j=0;
    for(int k=left;k<right;k++){
        //cnt++;
        if(L[i]<=R[j]){
            A[k]=L[i++];
        }else{
            A[k]=R[j++];
        }
    }
}

void mergeSort(int A[],int n,int left,int right){
    if(left+1<right){  //要素数が2つ以上
        int mid = (left+right)/2;
        mergeSort(A,n,left,mid);
        mergeSort(A,n,mid,right);
        merge(A,n,left,mid,right);
    }
}


int main(void){
    int n,m,i,ans;
    scanf("%d%d",&n,&m);
    if(n>=m){
        printf("0\n");
        return 0;
    }
    int x[m];
    for(i=0;i<m;i++){
        scanf("%d",&x[i]);
    }
    mergeSort(x,m,0,m);
    
    int L[m-1];
    for(i=0;i<m-1;i++){
        L[i] = x[i+1] - x[i];
    }
    mergeSort(L,m-1,0,m-1);
    
    ans = x[m-1] - x[0];
    
    i=m-2;
    while(i>=m-n){
        ans -= L[i];
        i--;
    }
    printf("%d\n",ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 1000008
L:
	.zero	1000008
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000008
R:
	.zero	1000008
	.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, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	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	-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	L(%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	R(%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%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %edx
	movl	-100(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L14:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L16:
	cmpq	%rdx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L18
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L19
.L20:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L19:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L20
	movl	-100(%rbp), %edx
	movl	-100(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L21:
	cmpq	%rdx, %rsp
	je	.L22
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L21
.L22:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L23
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L23:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L24
.L25:
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L24:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L25
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -96(%rbp)
	jmp	.L26
.L27:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, -92(%rbp)
	subl	$1, -96(%rbp)
.L26:
	movl	-100(%rbp), %eax
	movl	-104(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L27
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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, %r10d
	movl	%ecx, %edx
	movl	%ecx, %r11d
	movl	%r8d, %ecx
	subl	%r10d, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r9
	subl	%r11d, %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	testl	%edx, %edx
	jle	.L41
	movslq	%r10d, %rax
	leaq	L(%rip), %rsi
	leaq	4(,%rax,4), %rax
	leaq	(%rdi,%rax), %rbx
	movq	%rsi, %rdi
	subq	%rbx, %rdi
	cmpq	$8, %rdi
	jbe	.L5
	leal	-1(%rdx), %edi
	cmpl	$2, %edi
	jbe	.L5
	movl	%edx, %edi
	leaq	-4(%r9,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L6
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L8
	leal	(%r10,%rax), %edi
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %ebx
	movslq	%eax, %rdi
	movl	%ebx, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %edx
	jle	.L8
	leal	(%r10,%rdi), %ebx
	addl	$2, %eax
	movslq	%edi, %rdi
	movslq	%ebx, %rbx
	movl	(%r9,%rbx,4), %ebx
	movl	%ebx, (%rsi,%rdi,4)
	cmpl	%eax, %edx
	jle	.L8
	leal	(%r10,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %edi
	movl	%edi, (%rsi,%rax,4)
.L8:
	leaq	R(%rip), %rdi
	testl	%ecx, %ecx
	jle	.L4
	movslq	%r11d, %rax
	leaq	R(%rip), %rdi
	leaq	4(,%rax,4), %rax
	movq	%rdi, %rbx
	leaq	(%r9,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%rcx), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%ecx, %ebx
	leaq	-4(%r9,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdi,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L15
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L4
	leal	(%r11,%rax), %ebx
	movslq	%ebx, %rbx
	movl	(%r9,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rdi,%rbx,4)
	leal	1(%rax), %ebx
	cmpl	%ebx, %ecx
	jle	.L4
	leal	(%r11,%rbx), %ebp
	addl	$2, %eax
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movl	(%r9,%rbp,4), %ebp
	movl	%ebp, (%rdi,%rbx,4)
	cmpl	%eax, %ecx
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %r11d
	movl	%r11d, (%rdi,%rax,4)
.L4:
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movl	$2000000000, (%rdi,%rcx,4)
	movl	$2000000000, (%rsi,%rdx,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdx
	xorl	%r11d, %r11d
	subl	%r10d, %r8d
	leaq	(%r9,%rdx,4), %rax
	xorl	%r10d, %r10d
	addq	%rdx, %r8
	leaq	4(%r9,%r8,4), %rbx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%rsi,%r9,4), %ecx
	movl	(%rdi,%r8,4), %edx
	cmpl	%ecx, %edx
	jl	.L19
.L42:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r10d
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r10d, %r9
	movl	(%rdi,%r8,4), %edx
	movl	(%rsi,%r9,4), %ecx
	cmpl	%ecx, %edx
	jge	.L42
.L19:
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r11d, %r8
	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
.L14:
	.cfi_restore_state
	leaq	-4(%r9,%rax), %rbx
	movl	%ecx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rdi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%r9,%rax), %rbx
	movl	%edx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %edi
	movl	%edi, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rsi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rdx,%rcx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	.L59
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L60
.L51:
	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
.L59:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L61
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L62
.L48:
	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	.L51
.L60:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L63
.L52:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L64
.L55:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L61:
	leal	0(%r13,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L65
.L46:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L66
.L47:
	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	.L48
.L62:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L67
.L49:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L68
.L50:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L64:
	leal	(%rbx,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L69
.L56:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L70
.L57:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L63:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L71
.L53:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L72
.L54:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L68:
	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	.L50
	.p2align 4,,10
	.p2align 3
.L67:
	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	.L49
	.p2align 4,,10
	.p2align 3
.L72:
	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	.L54
	.p2align 4,,10
	.p2align 3
.L71:
	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	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	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	.L57
	.p2align 4,,10
	.p2align 3
.L69:
	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	.L56
	.p2align 4,,10
	.p2align 3
.L66:
	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	.L47
	.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	.L84
	ret
	.p2align 4,,10
	.p2align 3
.L84:
	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	.L85
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L86
.L78:
	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
.L85:
	.cfi_restore_state
	leal	0(%r13,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L87
.L76:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L88
.L77:
	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	.L78
.L86:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L89
.L79:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L90
.L80:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L90:
	movl	%ebx, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L77
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	cmpl	%esi, -64(%rbp)
	jge	.L128
	movslq	%esi, %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L94:
	cmpq	%rcx, %rsp
	je	.L95
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L94
.L95:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L129
.L96:
	leaq	3(%rsp), %r13
	movq	%r13, %rbx
	andq	$-4, %r13
	shrq	$2, %rbx
	testl	%esi, %esi
	jle	.L97
	movq	%r13, %r15
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L98:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	addq	$4, %r15
	cmpl	%r12d, %esi
	jg	.L98
.L97:
	cmpl	$1, %esi
	jg	.L130
.L99:
	leal	-1(%rsi), %r8d
	movq	%rsp, %rcx
	movslq	%r8d, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L100:
	cmpq	%rcx, %rsp
	je	.L101
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L100
.L130:
	movl	%esi, %ecx
	xorl	%edx, %edx
	movq	%r13, %rdi
	call	mergeSort.part.0
	movslq	-60(%rbp), %rsi
	jmp	.L99
.L101:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L131
.L102:
	movq	%rsp, %r12
	testl	%r8d, %r8d
	jle	.L103
	leal	-2(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L114
	movl	%r8d, %edx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L105:
	movdqu	4(%r13,%rax), %xmm0
	movdqu	0(%r13,%rax), %xmm2
	psubd	%xmm2, %xmm0
	movups	%xmm0, (%r12,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L105
	movl	%r8d, %edx
	andl	$-4, %edx
	movl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L106
.L104:
	movl	%esi, %ecx
	subl	%edx, %ecx
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L107
	leal	1(%rdx), %ecx
	leaq	0(,%rcx,4), %rdx
	movq	0(%r13,%rcx,4), %xmm0
	movq	-4(%r13,%rdx), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, -4(%r12,%rdx)
	movl	%edi, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %edi
	je	.L106
.L107:
	movslq	%eax, %rdx
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	subl	0(%r13,%rdx,4), %eax
	movl	%eax, (%r12,%rdx,4)
.L106:
	cmpl	$1, %r8d
	jle	.L103
	movl	%r8d, %esi
	movl	%r8d, %ecx
	xorl	%edx, %edx
	movq	%r12, %rdi
	call	mergeSort.part.0
	movslq	-60(%rbp), %rsi
.L103:
	leal	-1(%rsi), %eax
	movl	%esi, %edi
	leal	-2(%rsi), %ecx
	cltq
	movl	0(%r13,%rax,4), %edx
	movl	-64(%rbp), %eax
	subl	0(,%rbx,4), %edx
	subl	%eax, %edi
	cmpl	%edi, %ecx
	jl	.L109
	leal	-1(%rax), %r8d
	subl	$2, %eax
	cmpl	$2, %eax
	jbe	.L110
	leaq	-20(%r12,%rsi,4), %rax
	movl	%r8d, %esi
	pxor	%xmm1, %xmm1
	shrl	$2, %esi
	movq	%rax, %r9
	subl	$1, %esi
	salq	$4, %rsi
	subq	%rsi, %r9
	leaq	-16(%r9), %rsi
	.p2align 4,,10
	.p2align 3
.L111:
	movdqu	(%rax), %xmm3
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rsi
	jne	.L111
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	movl	%r8d, %eax
	andl	$-4, %eax
	subl	%eax, %ecx
	cmpl	%r8d, %eax
	je	.L109
.L110:
	movslq	%ecx, %rax
	leal	-1(%rcx), %esi
	leaq	(%r12,%rax,4), %rax
	subl	(%rax), %edx
	cmpl	%edi, %esi
	jl	.L109
	subl	$2, %ecx
	subl	-4(%rax), %edx
	cmpl	%ecx, %edi
	jg	.L109
	subl	-8(%rax), %edx
.L109:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L93:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L132
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L128:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L93
.L131:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L102
.L129:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L96
.L114:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L104
.L132:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	R
	.bss
	.align 32
	.type	R, @object
	.size	R, 1000008
R:
	.zero	1000008
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000008
L:
	.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
	movl	%edx, %r10d
	movl	%ecx, %edx
	movl	%ecx, %r11d
	movl	%r8d, %ecx
	subl	%r10d, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r9
	subl	%r11d, %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	testl	%edx, %edx
	jle	.L41
	movslq	%r10d, %rax
	leaq	L(%rip), %rsi
	leaq	4(,%rax,4), %rax
	leaq	(%rdi,%rax), %rbx
	movq	%rsi, %rdi
	subq	%rbx, %rdi
	cmpq	$8, %rdi
	jbe	.L5
	leal	-1(%rdx), %edi
	cmpl	$2, %edi
	jbe	.L5
	movl	%edx, %edi
	leaq	-4(%r9,%rax), %rbx
	xorl	%eax, %eax
	shrl	$2, %edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rbx,%rax), %xmm0
	movaps	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L6
	movl	%edx, %eax
	andl	$-4, %eax
	testb	$3, %dl
	je	.L8
	leal	(%r10,%rax), %edi
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %ebx
	movslq	%eax, %rdi
	movl	%ebx, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %edx
	jle	.L8
	leal	(%r10,%rdi), %ebx
	addl	$2, %eax
	movslq	%edi, %rdi
	movslq	%ebx, %rbx
	movl	(%r9,%rbx,4), %ebx
	movl	%ebx, (%rsi,%rdi,4)
	cmpl	%eax, %edx
	jle	.L8
	leal	(%r10,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	(%r9,%rdi,4), %edi
	movl	%edi, (%rsi,%rax,4)
.L8:
	leaq	R(%rip), %rdi
	testl	%ecx, %ecx
	jle	.L4
	movslq	%r11d, %rax
	leaq	R(%rip), %rdi
	leaq	4(,%rax,4), %rax
	movq	%rdi, %rbx
	leaq	(%r9,%rax), %rbp
	subq	%rbp, %rbx
	cmpq	$8, %rbx
	jbe	.L14
	leal	-1(%rcx), %ebx
	cmpl	$2, %ebx
	jbe	.L14
	movl	%ecx, %ebx
	leaq	-4(%r9,%rax), %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%rbp,%rax), %xmm1
	movaps	%xmm1, (%rdi,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L15
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L4
	leal	(%r11,%rax), %ebx
	movslq	%ebx, %rbx
	movl	(%r9,%rbx,4), %ebp
	movslq	%eax, %rbx
	movl	%ebp, (%rdi,%rbx,4)
	leal	1(%rax), %ebx
	cmpl	%ebx, %ecx
	jle	.L4
	leal	(%r11,%rbx), %ebp
	addl	$2, %eax
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movl	(%r9,%rbp,4), %ebp
	movl	%ebp, (%rdi,%rbx,4)
	cmpl	%eax, %ecx
	jle	.L4
	addl	%eax, %r11d
	cltq
	movslq	%r11d, %r11
	movl	(%r9,%r11,4), %r11d
	movl	%r11d, (%rdi,%rax,4)
.L4:
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movl	$2000000000, (%rdi,%rcx,4)
	movl	$2000000000, (%rsi,%rdx,4)
	cmpl	%r8d, %r10d
	jge	.L1
	subl	$1, %r8d
	movslq	%r10d, %rdx
	xorl	%r11d, %r11d
	subl	%r10d, %r8d
	leaq	(%r9,%rdx,4), %rax
	xorl	%r10d, %r10d
	addq	%rdx, %r8
	leaq	4(%r9,%r8,4), %rbx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%rsi,%r9,4), %ecx
	movl	(%rdi,%r8,4), %edx
	cmpl	%ecx, %edx
	jl	.L19
.L42:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addl	$1, %r10d
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r10d, %r9
	movl	(%rdi,%r8,4), %edx
	movl	(%rsi,%r9,4), %ecx
	cmpl	%ecx, %edx
	jge	.L42
.L19:
	movl	%edx, (%rax)
	addq	$4, %rax
	addl	$1, %r11d
	cmpq	%rbx, %rax
	je	.L1
	movslq	%r11d, %r8
	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
.L14:
	.cfi_restore_state
	leaq	-4(%r9,%rax), %rbx
	movl	%ecx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %r11d
	movl	%r11d, (%rdi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L17
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	-4(%r9,%rax), %rbx
	movl	%edx, %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %edi
	movl	%edi, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%rbp, %rax
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	L(%rip), %rsi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.p2align 4
	.type	mergeSort.part.0, @function
mergeSort.part.0:
.LFB26:
	.cfi_startproc
	leal	(%rdx,%rcx), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	.L59
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L60
.L51:
	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
.L59:
	.cfi_restore_state
	leal	(%rdx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L61
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L62
.L48:
	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	.L51
.L60:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L63
.L52:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L64
.L55:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L61:
	leal	0(%r13,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L65
.L46:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L66
.L47:
	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	.L48
.L62:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L67
.L49:
	leal	1(%r9), %eax
	cmpl	%eax, %r12d
	jg	.L68
.L50:
	movl	%r12d, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L64:
	leal	(%rbx,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L69
.L56:
	leal	1(%r9), %eax
	cmpl	%eax, %ebx
	jg	.L70
.L57:
	movl	%ebx, %r8d
	movl	%r9d, %ecx
	movl	%r15d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L63:
	leal	(%r12,%r15), %edx
	movl	%edx, %r9d
	shrl	$31, %r9d
	addl	%edx, %r9d
	sarl	%r9d
	cmpl	%r9d, %eax
	jl	.L71
.L53:
	leal	1(%r9), %eax
	cmpl	%eax, %r15d
	jg	.L72
.L54:
	movl	%r15d, %r8d
	movl	%r9d, %ecx
	movl	%r12d, %edx
	movl	%r14d, %esi
	movq	%rbp, %rdi
	call	merge
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %ecx
	movl	%r13d, %edx
	movl	%r9d, 12(%rsp)
	call	mergeSort.part.0
	movl	12(%rsp), %r9d
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L68:
	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	.L50
	.p2align 4,,10
	.p2align 3
.L67:
	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	.L49
	.p2align 4,,10
	.p2align 3
.L72:
	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	.L54
	.p2align 4,,10
	.p2align 3
.L71:
	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	.L53
	.p2align 4,,10
	.p2align 3
.L70:
	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	.L57
	.p2align 4,,10
	.p2align 3
.L69:
	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	.L56
	.p2align 4,,10
	.p2align 3
.L66:
	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	.L47
	.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	.L84
	ret
	.p2align 4,,10
	.p2align 3
.L84:
	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	.L85
	leal	1(%r12), %eax
	cmpl	%eax, %ebx
	jg	.L86
.L78:
	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
.L85:
	.cfi_restore_state
	leal	0(%r13,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L87
.L76:
	leal	1(%r15), %eax
	cmpl	%eax, %r12d
	jg	.L88
.L77:
	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	.L78
.L86:
	leal	(%rbx,%r12), %edx
	movl	%edx, %r15d
	shrl	$31, %r15d
	addl	%edx, %r15d
	sarl	%r15d
	cmpl	%r15d, %eax
	jl	.L89
.L79:
	leal	1(%r15), %eax
	cmpl	%eax, %ebx
	jg	.L90
.L80:
	movl	%ebx, %r8d
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	merge
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L87:
	movl	%r15d, %ecx
	movl	%r13d, %edx
	call	mergeSort.part.0
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L90:
	movl	%ebx, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r15d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r12d, %ecx
	movl	%r15d, %edx
	movl	%ebp, %esi
	movq	%r14, %rdi
	call	mergeSort.part.0
	jmp	.L77
	.cfi_endproc
.LFE24:
	.size	mergeSort, .-mergeSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	cmpl	%esi, -64(%rbp)
	jge	.L128
	movslq	%esi, %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L94:
	cmpq	%rcx, %rsp
	je	.L95
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L94
.L95:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L129
.L96:
	leaq	3(%rsp), %r13
	movq	%r13, %rbx
	andq	$-4, %r13
	shrq	$2, %rbx
	testl	%esi, %esi
	jle	.L97
	movq	%r13, %r15
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L98:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	addq	$4, %r15
	cmpl	%r12d, %esi
	jg	.L98
.L97:
	cmpl	$1, %esi
	jg	.L130
.L99:
	leal	-1(%rsi), %r8d
	movq	%rsp, %rcx
	movslq	%r8d, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L100:
	cmpq	%rcx, %rsp
	je	.L101
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L100
.L130:
	movl	%esi, %ecx
	xorl	%edx, %edx
	movq	%r13, %rdi
	call	mergeSort.part.0
	movslq	-60(%rbp), %rsi
	jmp	.L99
.L101:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L131
.L102:
	movq	%rsp, %r12
	testl	%r8d, %r8d
	jle	.L103
	leal	-2(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L114
	movl	%r8d, %edx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L105:
	movdqu	4(%r13,%rax), %xmm0
	movdqu	0(%r13,%rax), %xmm2
	psubd	%xmm2, %xmm0
	movups	%xmm0, (%r12,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L105
	movl	%r8d, %edx
	andl	$-4, %edx
	movl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L106
.L104:
	movl	%esi, %ecx
	subl	%edx, %ecx
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L107
	leal	1(%rdx), %ecx
	leaq	0(,%rcx,4), %rdx
	movq	0(%r13,%rcx,4), %xmm0
	movq	-4(%r13,%rdx), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, -4(%r12,%rdx)
	movl	%edi, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %edi
	je	.L106
.L107:
	movslq	%eax, %rdx
	addl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	subl	0(%r13,%rdx,4), %eax
	movl	%eax, (%r12,%rdx,4)
.L106:
	cmpl	$1, %r8d
	jle	.L103
	movl	%r8d, %esi
	movl	%r8d, %ecx
	xorl	%edx, %edx
	movq	%r12, %rdi
	call	mergeSort.part.0
	movslq	-60(%rbp), %rsi
.L103:
	leal	-1(%rsi), %eax
	movl	%esi, %edi
	leal	-2(%rsi), %ecx
	cltq
	movl	0(%r13,%rax,4), %edx
	movl	-64(%rbp), %eax
	subl	0(,%rbx,4), %edx
	subl	%eax, %edi
	cmpl	%edi, %ecx
	jl	.L109
	leal	-1(%rax), %r8d
	subl	$2, %eax
	cmpl	$2, %eax
	jbe	.L110
	leaq	-20(%r12,%rsi,4), %rax
	movl	%r8d, %esi
	pxor	%xmm1, %xmm1
	shrl	$2, %esi
	movq	%rax, %r9
	subl	$1, %esi
	salq	$4, %rsi
	subq	%rsi, %r9
	leaq	-16(%r9), %rsi
	.p2align 4,,10
	.p2align 3
.L111:
	movdqu	(%rax), %xmm3
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rsi
	jne	.L111
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	movl	%r8d, %eax
	andl	$-4, %eax
	subl	%eax, %ecx
	cmpl	%r8d, %eax
	je	.L109
.L110:
	movslq	%ecx, %rax
	leal	-1(%rcx), %esi
	leaq	(%r12,%rax,4), %rax
	subl	(%rax), %edx
	cmpl	%edi, %esi
	jl	.L109
	subl	$2, %ecx
	subl	-4(%rax), %edx
	cmpl	%ecx, %edi
	jg	.L109
	subl	-8(%rax), %edx
.L109:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L93:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L132
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L128:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L93
.L131:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L102
.L129:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L96
.L114:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L104
.L132:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	R
	.bss
	.align 32
	.type	R, @object
	.size	R, 1000008
R:
	.zero	1000008
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 1000008
L:
	.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 SENTINEL 2000000000

int L[MAX/2+2],R[MAX/2+2];
//int cnt=0;  cnt=nlogn

void merge(int A[],int n,int left,int mid,int right){ //分割と統治
    int n1 = mid-left;
    int n2 = right-mid;
    for(int i=0;i<n1;i++) L[i]=A[left+i];
    for(int i=0;i<n2;i++) R[i]=A[mid+i];
    L[n1]=R[n2]=SENTINEL;  //番兵
    int i=0,j=0;
    for(int k=left;k<right;k++){
        //cnt++;
        if(L[i]<=R[j]){
            A[k]=L[i++];
        }else{
            A[k]=R[j++];
        }
    }
}

void mergeSort(int A[],int n,int left,int right){
    if(left+1<right){  //要素数が2つ以上
        int mid = (left+right)/2;
        mergeSort(A,n,left,mid);
        mergeSort(A,n,mid,right);
        merge(A,n,left,mid,right);
    }
}


int main(void){
    int n,m,i,ans;
    scanf("%d%d",&n,&m);
    if(n>=m){
        printf("0\n");
        return 0;
    }
    int x[m];
    for(i=0;i<m;i++){
        scanf("%d",&x[i]);
    }
    mergeSort(x,m,0,m);
    
    int L[m-1];
    for(i=0;i<m-1;i++){
        L[i] = x[i+1] - x[i];
    }
    mergeSort(L,m-1,0,m-1);
    
    ans = x[m-1] - x[0];
    
    i=m-2;
    while(i>=m-n){
        ans -= L[i];
        i--;
    }
    printf("%d\n",ans);
    return 0;
}

3 7
-10 -1 0 9 -100 2 17
 100 1
-151489
 3 7
-8 -1 0 9 -100 2 17
 3 7
-10 -3 0 9 -100 2 18
 2 5
10 12 1 4 14
 6 7
-8 -1 0 9 -100 2 17
 2 5
10 12 1 4 21
 2 7
-8 -1 0 9 -100 2 17
 3 7
-10 -3 0 9 -5 0 17
 3 7
-8 -1 0 9 -100 0 17

18
 0
 17
 19
 7
 1
 11
 25
 10
 16

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 SENTINEL 2000000000

int L[MAX/2+2],R[MAX/2+2];
//int cnt=0;  cnt=nlogn

void merge(int A[],int n,int left,int mid,int right){ //分割と統治
    int n1 = mid-left;
    int n2 = right-mid;
    for(int i=0;i<n1;i++) L[i]=A[left+i];
    for(int i=0;i<n2;i++) R[i]=A[mid+i];
    L[n1]=R[n2]=SENTINEL;  //番兵
    int i=0,j=0;
    for(int k=left;k<right;k++){
        //cnt++;
        if(L[i]<=R[j]){
            A[k]=L[i++];
        }else{
            A[k]=R[j++];
        }
    }
}

void mergeSort(int A[],int n,int left,int right){
    if(left+1<right){  //要素数が2つ以上
        int mid = (left+right)/2;
        mergeSort(A,n,left,mid);
        mergeSort(A,n,mid,right);
        merge(A,n,left,mid,right);
    }
}


int main(void){
    int n,m,i,ans;
    scanf("%d%d",&n,&m);
    if(n>=m){
        printf("0\n");
        return 0;
    }
    int x[m];
    for(i=0;i<m;i++){
        scanf("%d",&x[i]);
    }
    mergeSort(x,m,0,m);
    
    int L[m-1];
    for(i=0;i<m-1;i++){
        L[i] = x[i+1] - x[i];
    }
    mergeSort(L,m-1,0,m-1);
    
    ans = x[m-1] - x[0];
    
    i=m-2;
    while(i>=m-n){
        ans -= L[i];
        i--;
    }
    printf("%d\n",ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 1000008
L:
	.zero	1000008
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000008
R:
	.zero	1000008
	.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, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	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	-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	L(%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	R(%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%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %edx
	movl	-100(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L14:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L16:
	cmpq	%rdx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L18
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L19
.L20:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L19:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L20
	movl	-100(%rbp), %edx
	movl	-100(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L21:
	cmpq	%rdx, %rsp
	je	.L22
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L21
.L22:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L23
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L23:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L24
.L25:
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L24:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L25
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -96(%rbp)
	jmp	.L26
.L27:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, -92(%rbp)
	subl	$1, -96(%rbp)
.L26:
	movl	-100(%rbp), %eax
	movl	-104(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L27
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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.
val
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 1000008
L:
	.zero	1000008
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1000008
R:
	.zero	1000008
	.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, -28(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-52(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	R(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	$2000000000, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	L(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L6
.L9:
	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	-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	L(%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	R(%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%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %edx
	movl	-100(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L15
.L14:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L16:
	cmpq	%rdx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L18
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L19
.L20:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L19:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L20
	movl	-100(%rbp), %edx
	movl	-100(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L21:
	cmpq	%rdx, %rsp
	je	.L22
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L21
.L22:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L23
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L23:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L24
.L25:
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -96(%rbp)
.L24:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L25
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-100(%rbp), %eax
	leal	-1(%rax), %esi
	movq	-64(%rbp), %rax
	movl	%edx, %ecx
	movl	$0, %edx
	movq	%rax, %rdi
	call	mergeSort
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -96(%rbp)
	jmp	.L26
.L27:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, -92(%rbp)
	subl	$1, -96(%rbp)
.L26:
	movl	-100(%rbp), %eax
	movl	-104(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L27
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
