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>

typedef struct {
	long long key, id, pref, city;
} data;

void merge_sort(data x[], int n)
{
	static data y[200001] = {};
	if (n == 1) return;
	merge_sort(&(x[0]), n/2);
	merge_sort(&(x[n/2]), (n+1)/2);
	
	int i, p, q;
	for (i = 0, p = 0, q = n/2; i < n; i++) {
		if (p >= n/2) y[i] = x[q++];
		else if (q >= n) y[i] = x[p++];
		else y[i] = (x[p].key < x[q].key)? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N, M;
	long long P[100001], Y[100001];
	scanf("%d %d", &N, &M);
	for (i = 0; i < M; i++) scanf("%lld %lld", &(P[i]), &(Y[i]));
	
	data X[100001];
	for (i = 0; i < M; i++) {
		X[i].key = Y[i];
		X[i].pref = P[i];
		X[i].city = i;
	}
	merge_sort(X, M);
	
	int p[100001] = {};
	for (i = 0; i < M; i++) {
		X[i].id = X[i].pref * 1000000 + (++p[X[i].pref]);
		X[i].key = X[i].city;
	}	
	merge_sort(X, M);
	
	for (i = 0; i < M; i++) printf("%012lld\n", X[i].id);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB6:
	.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)
	cmpl	$1, -28(%rbp)
	je	.L12
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L7
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L9
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	y.0(%rip), %rsi
	movq	(%rdi,%rsi), %rax
	movq	8(%rdi,%rsi), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	16(%rdi,%rsi), %rax
	movq	24(%rdi,%rsi), %rdx
	movq	%rax, 16(%rcx)
	movq	%rdx, 24(%rcx)
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L11
	jmp	.L1
.L12:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%012lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-5197824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5200104(%rbp), %rdx
	leaq	-5200108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L14
.L15:
	leaq	-4000064(%rbp), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	-4800080(%rbp), %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5200100(%rbp)
.L14:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L15
	movl	$0, -5200100(%rbp)
	jmp	.L16
.L17:
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4000064(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4800080(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200032, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200024, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L16:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L17
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	leaq	-5200096(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L18
.L19:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	imulq	$1000000, %rax, %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	movl	-5200096(%rbp,%rax,4), %edx
	addl	$1, %edx
	movl	%edx, -5200096(%rbp,%rax,4)
	movl	-5200096(%rbp,%rax,4), %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	%rdx, (%rax)
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200024, %rax
	movq	(%rax), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L18:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L19
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -5200100(%rbp)
	jmp	.L20
.L21:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -5200100(%rbp)
.L20:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L21
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	y.0
	.comm	y.0,6400032,32
	.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
	.type	merge_sort.part.0, @function
merge_sort.part.0:
.LFB41:
	.cfi_startproc
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r12d
	shrl	$31, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	addl	%esi, %r12d
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%esi, %ebx
	sarl	%r12d
	cmpl	$1, %r12d
	je	.L2
	movl	%r12d, %esi
	call	merge_sort.part.0
.L2:
	leal	1(%rbx), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %esi
	je	.L3
	movslq	%r12d, %rdi
	salq	$5, %rdi
	addq	%rbp, %rdi
	call	merge_sort.part.0
.L3:
	testl	%ebx, %ebx
	jle	.L21
	leaq	y.0(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
.L12:
	cmpl	%r8d, %r12d
	jg	.L5
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	addl	$1, %eax
	salq	$5, %rdx
	addq	%rbp, %rdx
	movdqu	(%rdx), %xmm2
	movaps	%xmm2, (%rdi)
	movdqu	16(%rdx), %xmm3
	movaps	%xmm3, 16(%rdi)
	cmpl	%eax, %ebx
	je	.L7
	movslq	%ecx, %rcx
	movslq	%eax, %rdi
	xorl	%edx, %edx
	salq	$5, %rcx
	salq	$5, %rdi
	addq	%rbp, %rcx
	addq	%rsi, %rdi
.L11:
	movdqu	(%rcx,%rdx), %xmm0
	addl	$1, %eax
	movaps	%xmm0, (%rdi,%rdx)
	movdqu	16(%rcx,%rdx), %xmm1
	movaps	%xmm1, 16(%rdi,%rdx)
	addq	$32, %rdx
	cmpl	%eax, %ebx
	jg	.L11
.L7:
	movslq	%ebx, %rdx
	movq	%rbp, %rdi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	salq	$5, %rdx
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memcpy@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	movslq	%r8d, %rcx
	salq	$5, %rcx
	addq	%rbp, %rcx
	cmpl	%edx, %ebx
	jg	.L8
	movdqu	(%rcx), %xmm4
	addl	$1, %r8d
	movaps	%xmm4, (%rdi)
	movdqu	16(%rcx), %xmm5
	movaps	%xmm5, 16(%rdi)
.L9:
	addl	$1, %eax
	cmpl	%eax, %ebx
	je	.L7
	addq	$32, %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%edx, %r9
	salq	$5, %r9
	addq	%rbp, %r9
	movq	(%r9), %r10
	cmpq	%r10, (%rcx)
	jge	.L10
	movdqu	(%rcx), %xmm6
	addl	$1, %r8d
	movaps	%xmm6, (%rdi)
	movdqu	16(%rcx), %xmm7
	movaps	%xmm7, 16(%rdi)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%r9), %xmm6
	addl	$1, %edx
	movaps	%xmm6, (%rdi)
	movdqu	16(%r9), %xmm7
	movaps	%xmm7, 16(%rdi)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	merge_sort.part.0, .-merge_sort.part.0
	.p2align 4
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	je	.L24
	jmp	merge_sort.part.0
	.p2align 4,,10
	.p2align 3
.L24:
	ret
	.cfi_endproc
.LFE39:
	.size	merge_sort, .-merge_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%lld %lld"
.LC4:
	.string	"%012lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-5197824(%rsp), %r11
	.cfi_def_cfa 11, 5197880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2312, %rsp
	.cfi_def_cfa_offset 5200192
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 5200120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L27
	leaq	1200064(%rsp), %rax
	leaq	400048(%rsp), %r15
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
	movq	%r15, %r13
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rbx
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$8, %r13
	leaq	(%rbx,%r12,8), %rdx
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	cmpl	%r12d, %ebp
	jg	.L28
	testl	%ebp, %ebp
	jle	.L27
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L42
	movl	%ebp, %edx
	leaq	2000080(%rsp), %r12
	pxor	%xmm6, %xmm6
	movdqa	.LC0(%rip), %xmm1
	shrl	$2, %edx
	movdqa	.LC3(%rip), %xmm7
	movq	%r12, %rax
	subl	$1, %edx
	salq	$5, %rdx
	leaq	1200096(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	movdqa	%xmm1, %xmm0
	movdqa	%xmm6, %xmm5
	movdqa	(%rbx), %xmm3
	addq	$32, %rbx
	pcmpgtd	%xmm0, %xmm5
	paddd	%xmm7, %xmm1
	subq	$-128, %rax
	addq	$32, %r15
	movdqa	-16(%rbx), %xmm2
	movq	%xmm3, -128(%rax)
	movhps	%xmm3, -96(%rax)
	movq	%xmm2, -64(%rax)
	movhps	%xmm2, -32(%rax)
	movdqa	%xmm0, %xmm2
	movdqa	-32(%r15), %xmm4
	movdqa	-16(%r15), %xmm3
	punpckldq	%xmm5, %xmm2
	punpckhdq	%xmm5, %xmm0
	movq	%xmm4, -112(%rax)
	movhps	%xmm4, -80(%rax)
	movq	%xmm3, -48(%rax)
	movhps	%xmm3, -16(%rax)
	movq	%xmm2, -104(%rax)
	movhps	%xmm2, -72(%rax)
	movq	%xmm0, -40(%rax)
	movhps	%xmm0, -8(%rax)
	cmpq	%rdx, %rbx
	jne	.L30
	movl	%ebp, %eax
	andl	$-4, %eax
	testb	$3, %bpl
	je	.L31
.L29:
	movslq	%eax, %rdx
	movq	1200064(%rsp,%rdx,8), %rsi
	movq	%rdx, %rcx
	movq	%rdx, %xmm6
	movq	400048(%rsp,%rdx,8), %xmm0
	salq	$5, %rcx
	leal	1(%rax), %edx
	punpcklqdq	%xmm6, %xmm0
	movq	%rsi, 2000080(%rsp,%rcx)
	movaps	%xmm0, 2000096(%rsp,%rcx)
	cmpl	%edx, %ebp
	jle	.L31
	movslq	%edx, %rdx
	addl	$2, %eax
	movq	1200064(%rsp,%rdx,8), %rsi
	movq	%rdx, %rcx
	movq	%rdx, %xmm7
	movq	400048(%rsp,%rdx,8), %xmm0
	salq	$5, %rcx
	punpcklqdq	%xmm7, %xmm0
	movq	%rsi, 2000080(%rsp,%rcx)
	movaps	%xmm0, 2000096(%rsp,%rcx)
	cmpl	%eax, %ebp
	jle	.L31
	cltq
	movq	1200064(%rsp,%rax,8), %rcx
	movq	%rax, %rdx
	movq	%rax, %xmm7
	movq	400048(%rsp,%rax,8), %xmm0
	salq	$5, %rdx
	movq	%rcx, 2000080(%rsp,%rdx)
	punpcklqdq	%xmm7, %xmm0
	movaps	%xmm0, 2000096(%rsp,%rdx)
.L31:
	cmpl	$1, %ebp
	je	.L55
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
.L55:
	xorl	%esi, %esi
	leaq	32(%rsp), %rdi
	movl	$400004, %edx
	call	memset@PLT
	leaq	2000088(%rsp), %rbx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	.p2align 4,,10
	.p2align 3
.L34:
	movq	8(%rcx), %rax
	addl	$1, %esi
	addq	$32, %rcx
	movl	32(%rsp,%rax,4), %edi
	leal	1(%rdi), %edx
	movl	%edx, 32(%rsp,%rax,4)
	imulq	$1000000, %rax, %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movq	%rax, -32(%rcx)
	cmpl	%ebp, %esi
	jl	.L34
	movq	%r12, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L35:
	movq	24(%rax), %rcx
	addl	$1, %edx
	addq	$32, %rax
	movq	%rcx, -32(%rax)
	cmpl	%ebp, %edx
	jl	.L35
	cmpl	$1, %ebp
	je	.L36
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
.L36:
	xorl	%ebp, %ebp
	leaq	.LC4(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L38:
	movq	(%rbx), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 28(%rsp)
	jg	.L38
.L39:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	5200120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L56
	addq	$5200136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L27:
	.cfi_restore_state
	leaq	2000080(%rsp), %r12
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
	jmp	.L39
.L42:
	xorl	%eax, %eax
	leaq	2000080(%rsp), %r12
	jmp	.L29
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	y.0
	.comm	y.0,6400032,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.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
	.type	merge_sort.part.0, @function
merge_sort.part.0:
.LFB41:
	.cfi_startproc
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r12d
	shrl	$31, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	addl	%esi, %r12d
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%esi, %ebx
	sarl	%r12d
	cmpl	$1, %r12d
	je	.L2
	movl	%r12d, %esi
	call	merge_sort.part.0
.L2:
	leal	1(%rbx), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %esi
	je	.L3
	movslq	%r12d, %rdi
	salq	$5, %rdi
	addq	%rbp, %rdi
	call	merge_sort.part.0
.L3:
	testl	%ebx, %ebx
	jle	.L21
	leaq	y.0(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
.L12:
	cmpl	%r8d, %r12d
	jg	.L5
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	addl	$1, %eax
	salq	$5, %rdx
	addq	%rbp, %rdx
	movdqu	(%rdx), %xmm2
	movaps	%xmm2, (%rdi)
	movdqu	16(%rdx), %xmm3
	movaps	%xmm3, 16(%rdi)
	cmpl	%eax, %ebx
	je	.L7
	movslq	%ecx, %rcx
	movslq	%eax, %rdi
	xorl	%edx, %edx
	salq	$5, %rcx
	salq	$5, %rdi
	addq	%rbp, %rcx
	addq	%rsi, %rdi
.L11:
	movdqu	(%rcx,%rdx), %xmm0
	addl	$1, %eax
	movaps	%xmm0, (%rdi,%rdx)
	movdqu	16(%rcx,%rdx), %xmm1
	movaps	%xmm1, 16(%rdi,%rdx)
	addq	$32, %rdx
	cmpl	%eax, %ebx
	jg	.L11
.L7:
	movslq	%ebx, %rdx
	movq	%rbp, %rdi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	salq	$5, %rdx
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memcpy@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	movslq	%r8d, %rcx
	salq	$5, %rcx
	addq	%rbp, %rcx
	cmpl	%edx, %ebx
	jg	.L8
	movdqu	(%rcx), %xmm4
	addl	$1, %r8d
	movaps	%xmm4, (%rdi)
	movdqu	16(%rcx), %xmm5
	movaps	%xmm5, 16(%rdi)
.L9:
	addl	$1, %eax
	cmpl	%eax, %ebx
	je	.L7
	addq	$32, %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%edx, %r9
	salq	$5, %r9
	addq	%rbp, %r9
	movq	(%r9), %r10
	cmpq	%r10, (%rcx)
	jge	.L10
	movdqu	(%rcx), %xmm6
	addl	$1, %r8d
	movaps	%xmm6, (%rdi)
	movdqu	16(%rcx), %xmm7
	movaps	%xmm7, 16(%rdi)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%r9), %xmm6
	addl	$1, %edx
	movaps	%xmm6, (%rdi)
	movdqu	16(%r9), %xmm7
	movaps	%xmm7, 16(%rdi)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	merge_sort.part.0, .-merge_sort.part.0
	.p2align 4
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	je	.L24
	jmp	merge_sort.part.0
	.p2align 4,,10
	.p2align 3
.L24:
	ret
	.cfi_endproc
.LFE39:
	.size	merge_sort, .-merge_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%lld %lld"
.LC4:
	.string	"%012lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-5197824(%rsp), %r11
	.cfi_def_cfa 11, 5197880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2312, %rsp
	.cfi_def_cfa_offset 5200192
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 5200120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L27
	leaq	1200064(%rsp), %rax
	leaq	400048(%rsp), %r15
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
	movq	%r15, %r13
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rbx
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$8, %r13
	leaq	(%rbx,%r12,8), %rdx
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	cmpl	%r12d, %ebp
	jg	.L28
	testl	%ebp, %ebp
	jle	.L27
	leal	-1(%rbp), %eax
	cmpl	$2, %eax
	jbe	.L42
	movl	%ebp, %edx
	leaq	2000080(%rsp), %r12
	pxor	%xmm6, %xmm6
	movdqa	.LC0(%rip), %xmm1
	shrl	$2, %edx
	movdqa	.LC3(%rip), %xmm7
	movq	%r12, %rax
	subl	$1, %edx
	salq	$5, %rdx
	leaq	1200096(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	movdqa	%xmm1, %xmm0
	movdqa	%xmm6, %xmm5
	movdqa	(%rbx), %xmm3
	addq	$32, %rbx
	pcmpgtd	%xmm0, %xmm5
	paddd	%xmm7, %xmm1
	subq	$-128, %rax
	addq	$32, %r15
	movdqa	-16(%rbx), %xmm2
	movq	%xmm3, -128(%rax)
	movhps	%xmm3, -96(%rax)
	movq	%xmm2, -64(%rax)
	movhps	%xmm2, -32(%rax)
	movdqa	%xmm0, %xmm2
	movdqa	-32(%r15), %xmm4
	movdqa	-16(%r15), %xmm3
	punpckldq	%xmm5, %xmm2
	punpckhdq	%xmm5, %xmm0
	movq	%xmm4, -112(%rax)
	movhps	%xmm4, -80(%rax)
	movq	%xmm3, -48(%rax)
	movhps	%xmm3, -16(%rax)
	movq	%xmm2, -104(%rax)
	movhps	%xmm2, -72(%rax)
	movq	%xmm0, -40(%rax)
	movhps	%xmm0, -8(%rax)
	cmpq	%rdx, %rbx
	jne	.L30
	movl	%ebp, %eax
	andl	$-4, %eax
	testb	$3, %bpl
	je	.L31
.L29:
	movslq	%eax, %rdx
	movq	1200064(%rsp,%rdx,8), %rsi
	movq	%rdx, %rcx
	movq	%rdx, %xmm6
	movq	400048(%rsp,%rdx,8), %xmm0
	salq	$5, %rcx
	leal	1(%rax), %edx
	punpcklqdq	%xmm6, %xmm0
	movq	%rsi, 2000080(%rsp,%rcx)
	movaps	%xmm0, 2000096(%rsp,%rcx)
	cmpl	%edx, %ebp
	jle	.L31
	movslq	%edx, %rdx
	addl	$2, %eax
	movq	1200064(%rsp,%rdx,8), %rsi
	movq	%rdx, %rcx
	movq	%rdx, %xmm7
	movq	400048(%rsp,%rdx,8), %xmm0
	salq	$5, %rcx
	punpcklqdq	%xmm7, %xmm0
	movq	%rsi, 2000080(%rsp,%rcx)
	movaps	%xmm0, 2000096(%rsp,%rcx)
	cmpl	%eax, %ebp
	jle	.L31
	cltq
	movq	1200064(%rsp,%rax,8), %rcx
	movq	%rax, %rdx
	movq	%rax, %xmm7
	movq	400048(%rsp,%rax,8), %xmm0
	salq	$5, %rdx
	movq	%rcx, 2000080(%rsp,%rdx)
	punpcklqdq	%xmm7, %xmm0
	movaps	%xmm0, 2000096(%rsp,%rdx)
.L31:
	cmpl	$1, %ebp
	je	.L55
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
.L55:
	xorl	%esi, %esi
	leaq	32(%rsp), %rdi
	movl	$400004, %edx
	call	memset@PLT
	leaq	2000088(%rsp), %rbx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	.p2align 4,,10
	.p2align 3
.L34:
	movq	8(%rcx), %rax
	addl	$1, %esi
	addq	$32, %rcx
	movl	32(%rsp,%rax,4), %edi
	leal	1(%rdi), %edx
	movl	%edx, 32(%rsp,%rax,4)
	imulq	$1000000, %rax, %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movq	%rax, -32(%rcx)
	cmpl	%ebp, %esi
	jl	.L34
	movq	%r12, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L35:
	movq	24(%rax), %rcx
	addl	$1, %edx
	addq	$32, %rax
	movq	%rcx, -32(%rax)
	cmpl	%ebp, %edx
	jl	.L35
	cmpl	$1, %ebp
	je	.L36
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
.L36:
	xorl	%ebp, %ebp
	leaq	.LC4(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L38:
	movq	(%rbx), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 28(%rsp)
	jg	.L38
.L39:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	5200120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L56
	addq	$5200136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L27:
	.cfi_restore_state
	leaq	2000080(%rsp), %r12
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	merge_sort.part.0
	jmp	.L39
.L42:
	xorl	%eax, %eax
	leaq	2000080(%rsp), %r12
	jmp	.L29
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	y.0
	.comm	y.0,6400032,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.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>

typedef struct {
	long long key, id, pref, city;
} data;

void merge_sort(data x[], int n)
{
	static data y[200001] = {};
	if (n == 1) return;
	merge_sort(&(x[0]), n/2);
	merge_sort(&(x[n/2]), (n+1)/2);
	
	int i, p, q;
	for (i = 0, p = 0, q = n/2; i < n; i++) {
		if (p >= n/2) y[i] = x[q++];
		else if (q >= n) y[i] = x[p++];
		else y[i] = (x[p].key < x[q].key)? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N, M;
	long long P[100001], Y[100001];
	scanf("%d %d", &N, &M);
	for (i = 0; i < M; i++) scanf("%lld %lld", &(P[i]), &(Y[i]));
	
	data X[100001];
	for (i = 0; i < M; i++) {
		X[i].key = Y[i];
		X[i].pref = P[i];
		X[i].city = i;
	}
	merge_sort(X, M);
	
	int p[100001] = {};
	for (i = 0; i < M; i++) {
		X[i].id = X[i].pref * 1000000 + (++p[X[i].pref]);
		X[i].key = X[i].city;
	}	
	merge_sort(X, M);
	
	for (i = 0; i < M; i++) printf("%012lld\n", X[i].id);
	fflush(stdout);
	return 0;
}
2 3
1 55
2 77
2 99
 2 3
2 32
2 63
1 12
 2 1
2 55
2 77
2 99
 2 2
2 55
2 77
2 99
 2 3
2 55
2 77
2 195
 2 3
1 32
2 63
1 6
 2 3
2 39
2 16
1 12
 2 2
2 55
2 29
2 195
 2 3
2 96
2 77
2 195
 2 1
1 16
2 77
2 195

000001000001
000002000001
000002000002
 000002000001
000002000002
000001000001
 000002000001
 000002000001
000002000002
 000002000001
000002000002
000002000003
 000001000002
000002000001
000001000001
 000002000002
000002000001
000001000001
 000002000002
000002000001
 000002000002
000002000001
000002000003
 000001000001

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>

typedef struct {
	long long key, id, pref, city;
} data;

void merge_sort(data x[], int n)
{
	static data y[200001] = {};
	if (n == 1) return;
	merge_sort(&(x[0]), n/2);
	merge_sort(&(x[n/2]), (n+1)/2);
	
	int i, p, q;
	for (i = 0, p = 0, q = n/2; i < n; i++) {
		if (p >= n/2) y[i] = x[q++];
		else if (q >= n) y[i] = x[p++];
		else y[i] = (x[p].key < x[q].key)? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N, M;
	long long P[100001], Y[100001];
	scanf("%d %d", &N, &M);
	for (i = 0; i < M; i++) scanf("%lld %lld", &(P[i]), &(Y[i]));
	
	data X[100001];
	for (i = 0; i < M; i++) {
		X[i].key = Y[i];
		X[i].pref = P[i];
		X[i].city = i;
	}
	merge_sort(X, M);
	
	int p[100001] = {};
	for (i = 0; i < M; i++) {
		X[i].id = X[i].pref * 1000000 + (++p[X[i].pref]);
		X[i].key = X[i].city;
	}	
	merge_sort(X, M);
	
	for (i = 0; i < M; i++) printf("%012lld\n", X[i].id);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB6:
	.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)
	cmpl	$1, -28(%rbp)
	je	.L12
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L7
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L9
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	y.0(%rip), %rsi
	movq	(%rdi,%rsi), %rax
	movq	8(%rdi,%rsi), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	16(%rdi,%rsi), %rax
	movq	24(%rdi,%rsi), %rdx
	movq	%rax, 16(%rcx)
	movq	%rdx, 24(%rcx)
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L11
	jmp	.L1
.L12:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%012lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-5197824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5200104(%rbp), %rdx
	leaq	-5200108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L14
.L15:
	leaq	-4000064(%rbp), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	-4800080(%rbp), %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5200100(%rbp)
.L14:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L15
	movl	$0, -5200100(%rbp)
	jmp	.L16
.L17:
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4000064(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4800080(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200032, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200024, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L16:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L17
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	leaq	-5200096(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L18
.L19:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	imulq	$1000000, %rax, %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	movl	-5200096(%rbp,%rax,4), %edx
	addl	$1, %edx
	movl	%edx, -5200096(%rbp,%rax,4)
	movl	-5200096(%rbp,%rax,4), %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	%rdx, (%rax)
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200024, %rax
	movq	(%rax), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L18:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L19
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -5200100(%rbp)
	jmp	.L20
.L21:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -5200100(%rbp)
.L20:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L21
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	y.0
	.comm	y.0,6400032,32
	.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	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB6:
	.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)
	cmpl	$1, -28(%rbp)
	je	.L12
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L7
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
	jmp	.L6
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rdi
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rsi
	leaq	y.0(%rip), %rcx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movq	%rax, (%rsi,%rcx)
	movq	%rdx, 8(%rsi,%rcx)
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%rax, 16(%rsi,%rcx)
	movq	%rdx, 24(%rsi,%rcx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L9
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	y.0(%rip), %rsi
	movq	(%rdi,%rsi), %rax
	movq	8(%rdi,%rsi), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	16(%rdi,%rsi), %rax
	movq	24(%rdi,%rsi), %rdx
	movq	%rax, 16(%rcx)
	movq	%rdx, 24(%rcx)
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L11
	jmp	.L1
.L12:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%012lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-5197824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5200104(%rbp), %rdx
	leaq	-5200108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L14
.L15:
	leaq	-4000064(%rbp), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	-4800080(%rbp), %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5200100(%rbp)
.L14:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L15
	movl	$0, -5200100(%rbp)
	jmp	.L16
.L17:
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4000064(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movq	-4800080(%rbp,%rax,8), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200032, %rdx
	movq	%rax, (%rdx)
	movl	-5200100(%rbp), %eax
	cltq
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200024, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L16:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L17
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	leaq	-5200096(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -5200100(%rbp)
	jmp	.L18
.L19:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	imulq	$1000000, %rax, %rcx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200032, %rax
	movq	(%rax), %rax
	movl	-5200096(%rbp,%rax,4), %edx
	addl	$1, %edx
	movl	%edx, -5200096(%rbp,%rax,4)
	movl	-5200096(%rbp,%rax,4), %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	%rdx, (%rax)
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200024, %rax
	movq	(%rax), %rax
	movl	-5200100(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rbp, %rdx
	subq	$3200048, %rdx
	movq	%rax, (%rdx)
	addl	$1, -5200100(%rbp)
.L18:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L19
	movl	-5200104(%rbp), %edx
	leaq	-3200048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movl	$0, -5200100(%rbp)
	jmp	.L20
.L21:
	movl	-5200100(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$3200040, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -5200100(%rbp)
.L20:
	movl	-5200104(%rbp), %eax
	cmpl	%eax, -5200100(%rbp)
	jl	.L21
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	y.0
	.comm	y.0,6400032,32
	.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:
