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>

void merge_sort(long long x[], int n)
{
	static long long y[100001] = {};
	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] < x[q])? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N;
	long long A, B, h[100001];
	scanf("%d %lld %lld", &N, &A, &B);
	for (i = 0; i < N; i++) scanf("%lld", &(h[i]));
	merge_sort(h, N);
	
	long long l = 1, r = (h[N-1] - 1) / B + 1, m, count;
	while (l < r) {
		m = (l + r) / 2;
		count = 0;
		for (i = N - 1; i >= 0; i--) {
			if ((h[i] - B * m) <= 0) break;
			else count += (h[i] - B * m - 1) / (A - B) + 1;
		}
		if (count <= m) r = m;
		else l = m + 1;
	}
	
	printf("%d\n", l);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB0:
	.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	.L13
	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
	leaq	0(,%rax,8), %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
.L10:
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L9:
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L10
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	y.0(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	jmp	.L1
.L13:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800056(%rbp), %rcx
	leaq	-800064(%rbp), %rdx
	leaq	-800072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800068(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800068(%rbp)
.L15:
	movl	-800072(%rbp), %eax
	cmpl	%eax, -800068(%rbp)
	jl	.L16
	movl	-800072(%rbp), %edx
	leaq	-800016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movq	$1, -800048(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	movq	-800056(%rbp), %rsi
	cqto
	idivq	%rsi
	addq	$1, %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L23:
	movq	-800048(%rbp), %rdx
	movq	-800040(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -800024(%rbp)
	movq	$0, -800032(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L21:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	testq	%rax, %rax
	jle	.L26
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$1, %rax
	movq	-800064(%rbp), %rdx
	movq	-800056(%rbp), %rcx
	movq	%rdx, %rdi
	subq	%rcx, %rdi
	cqto
	idivq	%rdi
	addq	$1, %rax
	addq	%rax, -800032(%rbp)
	subl	$1, -800068(%rbp)
.L18:
	cmpl	$0, -800068(%rbp)
	jns	.L21
	jmp	.L20
.L26:
	nop
.L20:
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jg	.L22
	movq	-800024(%rbp), %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L22:
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800048(%rbp)
.L17:
	movq	-800048(%rbp), %rax
	cmpq	-800040(%rbp), %rax
	jl	.L23
	movq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	y.0
	.comm	y.0,800008,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
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	merge_sort.part.0, @function
merge_sort.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%esi, %ebx
	shrl	$31, %ebx
	addl	%esi, %ebx
	sarl	%ebx
	cmpl	$1, %ebx
	je	.L2
	movl	%ebx, %esi
	call	merge_sort.part.0
.L2:
	leal	1(%r12), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %esi
	je	.L3
	movslq	%ebx, %rax
	leaq	0(%rbp,%rax,8), %rdi
	call	merge_sort.part.0
.L3:
	testl	%r12d, %r12d
	jle	.L32
	movslq	%r12d, %rsi
	movl	%ebx, %edx
	movl	$1, %eax
	xorl	%ecx, %ecx
	leaq	-8+y.0(%rip), %r8
.L16:
	cmpl	%ecx, %ebx
	jg	.L5
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	movl	%eax, %ebx
	movq	0(%rbp,%rdx,8), %rdx
	movq	%rdx, (%r8,%rax,8)
	cmpq	%rsi, %rax
	je	.L36
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rdi
	leaq	y.0(%rip), %r8
	movl	%r12d, %r11d
	leaq	8(,%rdx,8), %rdx
	leaq	(%r8,%rdi), %r9
	subl	%eax, %r11d
	leaq	0(%rbp,%rdx), %r10
	cmpq	%r10, %r9
	je	.L20
	leal	-1(%r11), %r10d
	cmpl	$2, %r10d
	jbe	.L20
	cmpl	%ebx, %r12d
	movl	$1, %eax
	leaq	-8(%rbp,%rdx), %rdi
	cmovle	%eax, %r11d
	xorl	%eax, %eax
	movl	%r11d, %r10d
	shrl	%r10d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ecx, %rdi
	movq	0(%rbp,%rdi,8), %rdi
	cmpl	%edx, %r12d
	jle	.L34
	movslq	%edx, %r9
	movq	0(%rbp,%r9,8), %r9
	cmpq	%r9, %rdi
	jl	.L34
	movq	%r9, %rdi
	addl	$1, %edx
	movq	%rdi, (%r8,%rax,8)
	cmpq	%rsi, %rax
	je	.L37
.L17:
	addq	$1, %rax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rdi, (%r8,%rax,8)
	addl	$1, %ecx
	cmpq	%rsi, %rax
	jne	.L17
.L37:
	leaq	y.0(%rip), %r8
.L7:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	leaq	0(,%rsi,8), %rdx
	movq	%rbp, %rdi
	movq	%r8, %rsi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memcpy@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	leaq	y.0(%rip), %r8
	jmp	.L7
.L20:
	movq	%rbp, %rcx
	subq	%rdi, %rcx
	leaq	-8(%rcx,%rdx), %rdx
	jmp	.L14
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge_sort.part.0.cold, @function
merge_sort.part.0.cold:
.LFSB25:
.L12:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	movq	%rax, %rdx
	addq	$1, %rax
	salq	$4, %rdx
	movdqu	(%rdi,%rdx), %xmm0
	movups	%xmm0, (%r9,%rdx)
	cmpl	%eax, %r10d
	ja	.L12
	movl	%r11d, %edi
	andl	$-2, %edi
	leal	(%rcx,%rdi), %edx
	leal	(%rbx,%rdi), %eax
	cmpl	%edi, %r11d
	je	.L7
	movslq	%edx, %rdx
	cltq
	movq	0(%rbp,%rdx,8), %rdx
	movq	%rdx, (%r8,%rax,8)
	jmp	.L7
.L14:
	movq	(%rdx,%rax,8), %rcx
	movq	%rcx, (%r8,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %r12d
	jg	.L14
	jmp	.L7
	.cfi_endproc
.LFE25:
	.text
	.size	merge_sort.part.0, .-merge_sort.part.0
	.section	.text.unlikely
	.size	merge_sort.part.0.cold, .-merge_sort.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	je	.L38
	jmp	merge_sort.part.0
	.p2align 4,,10
	.p2align 3
.L38:
	ret
	.cfi_endproc
.LFE23:
	.size	merge_sort, .-merge_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %lld %lld"
.LC2:
	.string	"%lld"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC1(%rip), %rdi
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	movq	%r12, %rcx
	leaq	32(%rsp), %rbx
	movq	%rbx, %r13
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	testl	%r14d, %r14d
	jle	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	addq	$8, %r13
	cmpl	%ebp, %r14d
	jg	.L42
	cmpl	$1, %r14d
	je	.L43
.L41:
	movl	%r14d, %esi
	movq	%rbx, %rdi
	call	merge_sort.part.0
.L43:
	leal	-1(%r14), %ebp
	movq	24(%rsp), %r13
	movq	16(%rsp), %rdi
	movslq	%ebp, %rax
	movq	32(%rsp,%rax,8), %rax
	subq	%r13, %rdi
	subq	$1, %rax
	cqto
	idivq	%r13
	leaq	1(%rax), %r11
	movslq	%r14d, %rax
	salq	$3, %rax
	leaq	(%r12,%rax), %r9
	addq	%rax, %rbx
	movl	%ebp, %eax
	movl	$1, %r12d
	salq	$3, %rax
	subq	%rax, %r9
.L47:
	cmpq	%r11, %r12
	jge	.L60
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	(%r12,%r11), %rax
	movq	%rax, %r10
	shrq	$63, %r10
	addq	%rax, %r10
	sarq	%r10
	testl	%ebp, %ebp
	js	.L50
	movq	%r13, %r8
	movq	%rbx, %rcx
	xorl	%esi, %esi
	imulq	%r10, %r8
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L61:
	subq	$1, %rax
	subq	$8, %rcx
	cqto
	idivq	%rdi
	leaq	1(%rsi,%rax), %rsi
	cmpq	%rcx, %r9
	je	.L45
.L46:
	movq	-8(%rcx), %rax
	subq	%r8, %rax
	testq	%rax, %rax
	jg	.L61
.L45:
	cmpq	%rsi, %r10
	jl	.L62
.L51:
	movq	%r10, %r11
	cmpq	%r11, %r12
	jl	.L48
.L60:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r12, %rdx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L63
	addq	$800056, %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
.L50:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %r10
	jge	.L51
.L62:
	leaq	1(%r10), %r12
	jmp	.L47
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	y.0
	.comm	y.0,800008,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:

rule
	.file	"temp.c"
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	merge_sort.part.0, @function
merge_sort.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%esi, %ebx
	shrl	$31, %ebx
	addl	%esi, %ebx
	sarl	%ebx
	cmpl	$1, %ebx
	je	.L2
	movl	%ebx, %esi
	call	merge_sort.part.0
.L2:
	leal	1(%r12), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	$1, %esi
	je	.L3
	movslq	%ebx, %rax
	leaq	0(%rbp,%rax,8), %rdi
	call	merge_sort.part.0
.L3:
	testl	%r12d, %r12d
	jle	.L32
	movslq	%r12d, %rsi
	movl	%ebx, %edx
	movl	$1, %eax
	xorl	%ecx, %ecx
	leaq	-8+y.0(%rip), %r8
.L16:
	cmpl	%ecx, %ebx
	jg	.L5
	leal	1(%rdx), %ecx
	movslq	%edx, %rdx
	movl	%eax, %ebx
	movq	0(%rbp,%rdx,8), %rdx
	movq	%rdx, (%r8,%rax,8)
	cmpq	%rsi, %rax
	je	.L36
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rdi
	leaq	y.0(%rip), %r8
	movl	%r12d, %r11d
	leaq	8(,%rdx,8), %rdx
	leaq	(%r8,%rdi), %r9
	subl	%eax, %r11d
	leaq	0(%rbp,%rdx), %r10
	cmpq	%r10, %r9
	je	.L20
	leal	-1(%r11), %r10d
	cmpl	$2, %r10d
	jbe	.L20
	cmpl	%ebx, %r12d
	movl	$1, %eax
	leaq	-8(%rbp,%rdx), %rdi
	cmovle	%eax, %r11d
	xorl	%eax, %eax
	movl	%r11d, %r10d
	shrl	%r10d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ecx, %rdi
	movq	0(%rbp,%rdi,8), %rdi
	cmpl	%edx, %r12d
	jle	.L34
	movslq	%edx, %r9
	movq	0(%rbp,%r9,8), %r9
	cmpq	%r9, %rdi
	jl	.L34
	movq	%r9, %rdi
	addl	$1, %edx
	movq	%rdi, (%r8,%rax,8)
	cmpq	%rsi, %rax
	je	.L37
.L17:
	addq	$1, %rax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rdi, (%r8,%rax,8)
	addl	$1, %ecx
	cmpq	%rsi, %rax
	jne	.L17
.L37:
	leaq	y.0(%rip), %r8
.L7:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	leaq	0(,%rsi,8), %rdx
	movq	%rbp, %rdi
	movq	%r8, %rsi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memcpy@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	leaq	y.0(%rip), %r8
	jmp	.L7
.L20:
	movq	%rbp, %rcx
	subq	%rdi, %rcx
	leaq	-8(%rcx,%rdx), %rdx
	jmp	.L14
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge_sort.part.0.cold, @function
merge_sort.part.0.cold:
.LFSB25:
.L12:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	movq	%rax, %rdx
	addq	$1, %rax
	salq	$4, %rdx
	movdqu	(%rdi,%rdx), %xmm0
	movups	%xmm0, (%r9,%rdx)
	cmpl	%eax, %r10d
	ja	.L12
	movl	%r11d, %edi
	andl	$-2, %edi
	leal	(%rcx,%rdi), %edx
	leal	(%rbx,%rdi), %eax
	cmpl	%edi, %r11d
	je	.L7
	movslq	%edx, %rdx
	cltq
	movq	0(%rbp,%rdx,8), %rdx
	movq	%rdx, (%r8,%rax,8)
	jmp	.L7
.L14:
	movq	(%rdx,%rax,8), %rcx
	movq	%rcx, (%r8,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %r12d
	jg	.L14
	jmp	.L7
	.cfi_endproc
.LFE25:
	.text
	.size	merge_sort.part.0, .-merge_sort.part.0
	.section	.text.unlikely
	.size	merge_sort.part.0.cold, .-merge_sort.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	je	.L38
	jmp	merge_sort.part.0
	.p2align 4,,10
	.p2align 3
.L38:
	ret
	.cfi_endproc
.LFE23:
	.size	merge_sort, .-merge_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %lld %lld"
.LC2:
	.string	"%lld"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC1(%rip), %rdi
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	movq	%r12, %rcx
	leaq	32(%rsp), %rbx
	movq	%rbx, %r13
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	testl	%r14d, %r14d
	jle	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	addq	$8, %r13
	cmpl	%ebp, %r14d
	jg	.L42
	cmpl	$1, %r14d
	je	.L43
.L41:
	movl	%r14d, %esi
	movq	%rbx, %rdi
	call	merge_sort.part.0
.L43:
	leal	-1(%r14), %ebp
	movq	24(%rsp), %r13
	movq	16(%rsp), %rdi
	movslq	%ebp, %rax
	movq	32(%rsp,%rax,8), %rax
	subq	%r13, %rdi
	subq	$1, %rax
	cqto
	idivq	%r13
	leaq	1(%rax), %r11
	movslq	%r14d, %rax
	salq	$3, %rax
	leaq	(%r12,%rax), %r9
	addq	%rax, %rbx
	movl	%ebp, %eax
	movl	$1, %r12d
	salq	$3, %rax
	subq	%rax, %r9
.L47:
	cmpq	%r11, %r12
	jge	.L60
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	(%r12,%r11), %rax
	movq	%rax, %r10
	shrq	$63, %r10
	addq	%rax, %r10
	sarq	%r10
	testl	%ebp, %ebp
	js	.L50
	movq	%r13, %r8
	movq	%rbx, %rcx
	xorl	%esi, %esi
	imulq	%r10, %r8
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L61:
	subq	$1, %rax
	subq	$8, %rcx
	cqto
	idivq	%rdi
	leaq	1(%rsi,%rax), %rsi
	cmpq	%rcx, %r9
	je	.L45
.L46:
	movq	-8(%rcx), %rax
	subq	%r8, %rax
	testq	%rax, %rax
	jg	.L61
.L45:
	cmpq	%rsi, %r10
	jl	.L62
.L51:
	movq	%r10, %r11
	cmpq	%r11, %r12
	jl	.L48
.L60:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r12, %rdx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L63
	addq	$800056, %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
.L50:
	.cfi_restore_state
	xorl	%esi, %esi
	cmpq	%rsi, %r10
	jge	.L51
.L62:
	leaq	1(%r10), %r12
	jmp	.L47
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	y.0
	.comm	y.0,800008,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:

#include <stdio.h>

void merge_sort(long long x[], int n)
{
	static long long y[100001] = {};
	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] < x[q])? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N;
	long long A, B, h[100001];
	scanf("%d %lld %lld", &N, &A, &B);
	for (i = 0; i < N; i++) scanf("%lld", &(h[i]));
	merge_sort(h, N);
	
	long long l = 1, r = (h[N-1] - 1) / B + 1, m, count;
	while (l < r) {
		m = (l + r) / 2;
		count = 0;
		for (i = N - 1; i >= 0; i--) {
			if ((h[i] - B * m) <= 0) break;
			else count += (h[i] - B * m - 1) / (A - B) + 1;
		}
		if (count <= m) r = m;
		else l = m + 1;
	}
	
	printf("%d\n", l);
	fflush(stdout);
	return 0;
}
5 2 1
187174154
900000000
1000000000
1000000000
1000000000
 4 5 3
8
7
6
2
 2 10 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000000
1100000000
 2 17 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000001
1100000000
 5 2 1
187174154
900000000
1000000000
1000000101
1100000000
 2 11 7
20
37
 5 2 1
105611412
900000000
1010000000
1000000101
1100000000
 5 3 1
105611412
900000000
1010000000
1000000101
1100000000

780000000
 2
 5
 800000000
 3
 800000001
 800000021
 4
 802000021
 668333351

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>

void merge_sort(long long x[], int n)
{
	static long long y[100001] = {};
	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] < x[q])? x[p++]: x[q++];
	}
	for (i = 0; i < n; i++) x[i] = y[i];
}

int main()
{
	int i, N;
	long long A, B, h[100001];
	scanf("%d %lld %lld", &N, &A, &B);
	for (i = 0; i < N; i++) scanf("%lld", &(h[i]));
	merge_sort(h, N);
	
	long long l = 1, r = (h[N-1] - 1) / B + 1, m, count;
	while (l < r) {
		m = (l + r) / 2;
		count = 0;
		for (i = N - 1; i >= 0; i--) {
			if ((h[i] - B * m) <= 0) break;
			else count += (h[i] - B * m - 1) / (A - B) + 1;
		}
		if (count <= m) r = m;
		else l = m + 1;
	}
	
	printf("%d\n", l);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	merge_sort
	.type	merge_sort, @function
merge_sort:
.LFB0:
	.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	.L13
	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
	leaq	0(,%rax,8), %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
.L10:
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L9:
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L10
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	y.0(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	jmp	.L1
.L13:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800056(%rbp), %rcx
	leaq	-800064(%rbp), %rdx
	leaq	-800072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800068(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800068(%rbp)
.L15:
	movl	-800072(%rbp), %eax
	cmpl	%eax, -800068(%rbp)
	jl	.L16
	movl	-800072(%rbp), %edx
	leaq	-800016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movq	$1, -800048(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	movq	-800056(%rbp), %rsi
	cqto
	idivq	%rsi
	addq	$1, %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L23:
	movq	-800048(%rbp), %rdx
	movq	-800040(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -800024(%rbp)
	movq	$0, -800032(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L21:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	testq	%rax, %rax
	jle	.L26
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$1, %rax
	movq	-800064(%rbp), %rdx
	movq	-800056(%rbp), %rcx
	movq	%rdx, %rdi
	subq	%rcx, %rdi
	cqto
	idivq	%rdi
	addq	$1, %rax
	addq	%rax, -800032(%rbp)
	subl	$1, -800068(%rbp)
.L18:
	cmpl	$0, -800068(%rbp)
	jns	.L21
	jmp	.L20
.L26:
	nop
.L20:
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jg	.L22
	movq	-800024(%rbp), %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L22:
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800048(%rbp)
.L17:
	movq	-800048(%rbp), %rax
	cmpq	-800040(%rbp), %rax
	jl	.L23
	movq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	y.0
	.comm	y.0,800008,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:
.LFB0:
	.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	.L13
	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
	leaq	0(,%rax,8), %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
.L10:
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %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
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L9:
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	y.0(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L10
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	y.0(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	jmp	.L1
.L13:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge_sort, .-merge_sort
	.section	.rodata
.LC0:
	.string	"%d %lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800056(%rbp), %rcx
	leaq	-800064(%rbp), %rdx
	leaq	-800072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800068(%rbp)
	jmp	.L15
.L16:
	leaq	-800016(%rbp), %rdx
	movl	-800068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800068(%rbp)
.L15:
	movl	-800072(%rbp), %eax
	cmpl	%eax, -800068(%rbp)
	jl	.L16
	movl	-800072(%rbp), %edx
	leaq	-800016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	merge_sort
	movq	$1, -800048(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	movq	-800056(%rbp), %rsi
	cqto
	idivq	%rsi
	addq	$1, %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L23:
	movq	-800048(%rbp), %rdx
	movq	-800040(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -800024(%rbp)
	movq	$0, -800032(%rbp)
	movl	-800072(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -800068(%rbp)
	jmp	.L18
.L21:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	testq	%rax, %rax
	jle	.L26
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	imulq	-800024(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$1, %rax
	movq	-800064(%rbp), %rdx
	movq	-800056(%rbp), %rcx
	movq	%rdx, %rdi
	subq	%rcx, %rdi
	cqto
	idivq	%rdi
	addq	$1, %rax
	addq	%rax, -800032(%rbp)
	subl	$1, -800068(%rbp)
.L18:
	cmpl	$0, -800068(%rbp)
	jns	.L21
	jmp	.L20
.L26:
	nop
.L20:
	movq	-800032(%rbp), %rax
	cmpq	-800024(%rbp), %rax
	jg	.L22
	movq	-800024(%rbp), %rax
	movq	%rax, -800040(%rbp)
	jmp	.L17
.L22:
	movq	-800024(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -800048(%rbp)
.L17:
	movq	-800048(%rbp), %rax
	cmpq	-800040(%rbp), %rax
	jl	.L23
	movq	-800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	y.0
	.comm	y.0,800008,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:
