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>
//小さい順にソート
long long c[100002][2];
void merge(int i,int j,long long s[][2]){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
      else if(j<b){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else if(s[a][0]<s[b][0]){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else{
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
    }
    for(d=i;d<=j;d++){
      s[d][0]=c[d][0];
      s[d][1]=c[d][1];
    }
  }
}

int main(){
  int n,i;
  long long m;
  scanf("%d%lld",&n,&m);
  long long a[n+1][2];
  for(i=0;i<n;i++)
    scanf("%lld%lld",&a[i][0],&a[i][1]);
  merge(0,n-1,a);
  long long count=0,money=0;
  i=0;
  while(count!=m){
    if(count+a[i][1]<m){
      count+=a[i][1];
      money+=a[i][0]*a[i][1];
      i++;
    }
    else{
      money+=a[i][0]*(m-count);
      count=m;
    }
  }
  printf("%lld\n",money);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 1600032
c:
	.zero	1600032
	.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
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L8:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L5
.L4:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L7
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, 8(%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L10
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-96(%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), %eax
	addl	$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
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L16
.L17:
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	8(%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L16:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	movl	-104(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	movl	$0, %edi
	call	merge
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L18
.L20:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L19
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	addq	%rax, -88(%rbp)
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	addl	$1, -100(%rbp)
	jmp	.L18
.L19:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	subq	-88(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jne	.L20
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	merge.part.0, @function
merge.part.0:
.LFB25:
	.cfi_startproc
	leal	(%rdi,%rsi), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%eax, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	shrl	$31, %r13d
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	addl	%eax, %r13d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sarl	%r13d
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%r13d, %edi
	je	.L2
	movl	%r13d, %esi
	call	merge.part.0
.L2:
	leal	1(%r13), %ebx
	cmpl	%ebx, %ebp
	je	.L3
	movq	%r12, %rdx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	merge.part.0
.L3:
	cmpl	%ebp, %r14d
	jg	.L1
	movslq	%r14d, %rax
	leaq	c(%rip), %r8
	movl	%r14d, %esi
	movl	%r14d, %ecx
	movq	%rax, 8(%rsp)
	salq	$4, %rax
	movq	%rax, (%rsp)
	leaq	(%r8,%rax), %r9
	movq	%r9, %r11
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	%ecx, %r13d
	jge	.L5
	movslq	%ebx, %rbx
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%r12, %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rdx)
	movq	8(%rax), %rax
	movq	%rax, 8(%rdx)
	leal	1(%rsi), %edx
	cmpl	%edx, %ebp
	jl	.L7
	addq	$2, %rbx
	movslq	%edx, %rax
	salq	$4, %rax
	salq	$4, %rbx
	leaq	(%r8,%rax), %rdi
	leaq	-16(%r12,%rbx), %rcx
	leaq	16(%r8,%rax), %rax
	cmpq	%rax, %rcx
	jnb	.L20
	addq	%r12, %rbx
	cmpq	%rbx, %rdi
	jb	.L34
.L20:
	movl	%ebp, %eax
	subl	%esi, %eax
	cmpl	%edx, %ebp
	movl	$1, %edx
	cmovge	%eax, %edx
	xorl	%eax, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ecx, %rax
	salq	$4, %rax
	addq	%r12, %rax
	movq	(%rax), %r10
	cmpl	%ebx, %ebp
	jl	.L32
	movslq	%ebx, %rdi
	salq	$4, %rdi
	addq	%r12, %rdi
	movq	(%rdi), %r15
	cmpq	%r10, %r15
	jg	.L32
	movq	%r15, (%rdx)
	movq	8(%rdi), %rax
	addl	$1, %ebx
.L9:
	addl	$1, %esi
	movq	%rax, 8(%rdx)
	cmpl	%esi, %ebp
	jl	.L7
	addq	$16, %rdx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r10, (%rdx)
	addl	$1, %ecx
	movq	8(%rax), %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rsp), %rdi
	leaq	16(%rdi), %rax
	leaq	(%r12,%rdi), %rcx
	addq	%rax, %r8
	cmpq	%r8, %rcx
	jnb	.L24
	addq	%r12, %rax
	cmpq	%rax, %r9
	jb	.L14
.L24:
	addl	$1, %ebp
	xorl	%eax, %eax
	xorl	%edx, %edx
	subl	%r14d, %ebp
	.p2align 4,,10
	.p2align 3
.L16:
	movdqa	(%r9,%rax), %xmm0
	addl	$1, %edx
	movups	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpl	%ebp, %edx
	jb	.L16
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	8(%rsp), %rax
	subl	%r14d, %ebp
	leaq	16+c(%rip), %rdx
	addq	%rbp, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movdqa	(%r11), %xmm1
	addq	$16, %r11
	addq	$16, %rcx
	movups	%xmm1, -16(%rcx)
	cmpq	%rax, %r11
	jne	.L18
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge.part.0.cold, @function
merge.part.0.cold:
.LFSB25:
.L13:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movdqu	(%rcx), %xmm3
	addl	$1, %edx
	addq	$16, %rcx
	addq	$16, %rdi
	movaps	%xmm3, -16(%rdi)
	cmpl	%edx, %ebp
	jge	.L13
	jmp	.L7
.L11:
	movq	%rax, %rsi
	addq	$1, %rax
	salq	$4, %rsi
	movdqu	(%rcx,%rsi), %xmm2
	movaps	%xmm2, (%rdi,%rsi)
	cmpl	%eax, %edx
	ja	.L11
	jmp	.L7
	.cfi_endproc
.LFE25:
	.text
	.size	merge.part.0, .-merge.part.0
	.section	.text.unlikely
	.size	merge.part.0.cold, .-merge.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jne	.L37
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	jmp	merge.part.0
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%lld"
.LC2:
	.string	"%lld%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %esi
	movq	%rsp, %rdx
	leal	1(%rsi), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L40
.L60:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L60
.L40:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L61
.L41:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L42
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %esi
	addl	$1, %r13d
	addq	$16, %r12
	cmpl	%r13d, %esi
	jg	.L43
.L42:
	subl	$1, %esi
	je	.L44
	movq	%rbx, %rdx
	xorl	%edi, %edi
	call	merge.part.0
.L44:
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	.L45
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L47:
	movslq	%edi, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	movq	8(%rax), %rsi
	movq	(%rax), %rax
	leaq	(%rsi,%r8), %rcx
	cmpq	%rcx, %rdx
	jg	.L62
	subq	%r8, %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
.L45:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L63
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	.cfi_restore_state
	imulq	%rsi, %rax
	addl	$1, %edi
	movq	%rcx, %r8
	addq	%rax, %r9
	jmp	.L47
.L61:
	orq	$0, -8(%rsp,%rax)
	jmp	.L41
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 1600032
c:
	.zero	1600032
	.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.part.0, @function
merge.part.0:
.LFB25:
	.cfi_startproc
	leal	(%rdi,%rsi), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%eax, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	shrl	$31, %r13d
	movq	%rdx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	addl	%eax, %r13d
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sarl	%r13d
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	%r13d, %edi
	je	.L2
	movl	%r13d, %esi
	call	merge.part.0
.L2:
	leal	1(%r13), %ebx
	cmpl	%ebx, %ebp
	je	.L3
	movq	%r12, %rdx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	merge.part.0
.L3:
	cmpl	%ebp, %r14d
	jg	.L1
	movslq	%r14d, %rax
	leaq	c(%rip), %r8
	movl	%r14d, %esi
	movl	%r14d, %ecx
	movq	%rax, 8(%rsp)
	salq	$4, %rax
	movq	%rax, (%rsp)
	leaq	(%r8,%rax), %r9
	movq	%r9, %r11
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	%ecx, %r13d
	jge	.L5
	movslq	%ebx, %rbx
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%r12, %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rdx)
	movq	8(%rax), %rax
	movq	%rax, 8(%rdx)
	leal	1(%rsi), %edx
	cmpl	%edx, %ebp
	jl	.L7
	addq	$2, %rbx
	movslq	%edx, %rax
	salq	$4, %rax
	salq	$4, %rbx
	leaq	(%r8,%rax), %rdi
	leaq	-16(%r12,%rbx), %rcx
	leaq	16(%r8,%rax), %rax
	cmpq	%rax, %rcx
	jnb	.L20
	addq	%r12, %rbx
	cmpq	%rbx, %rdi
	jb	.L34
.L20:
	movl	%ebp, %eax
	subl	%esi, %eax
	cmpl	%edx, %ebp
	movl	$1, %edx
	cmovge	%eax, %edx
	xorl	%eax, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ecx, %rax
	salq	$4, %rax
	addq	%r12, %rax
	movq	(%rax), %r10
	cmpl	%ebx, %ebp
	jl	.L32
	movslq	%ebx, %rdi
	salq	$4, %rdi
	addq	%r12, %rdi
	movq	(%rdi), %r15
	cmpq	%r10, %r15
	jg	.L32
	movq	%r15, (%rdx)
	movq	8(%rdi), %rax
	addl	$1, %ebx
.L9:
	addl	$1, %esi
	movq	%rax, 8(%rdx)
	cmpl	%esi, %ebp
	jl	.L7
	addq	$16, %rdx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r10, (%rdx)
	addl	$1, %ecx
	movq	8(%rax), %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rsp), %rdi
	leaq	16(%rdi), %rax
	leaq	(%r12,%rdi), %rcx
	addq	%rax, %r8
	cmpq	%r8, %rcx
	jnb	.L24
	addq	%r12, %rax
	cmpq	%rax, %r9
	jb	.L14
.L24:
	addl	$1, %ebp
	xorl	%eax, %eax
	xorl	%edx, %edx
	subl	%r14d, %ebp
	.p2align 4,,10
	.p2align 3
.L16:
	movdqa	(%r9,%rax), %xmm0
	addl	$1, %edx
	movups	%xmm0, (%rcx,%rax)
	addq	$16, %rax
	cmpl	%ebp, %edx
	jb	.L16
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	8(%rsp), %rax
	subl	%r14d, %ebp
	leaq	16+c(%rip), %rdx
	addq	%rbp, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movdqa	(%r11), %xmm1
	addq	$16, %r11
	addq	$16, %rcx
	movups	%xmm1, -16(%rcx)
	cmpq	%rax, %r11
	jne	.L18
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge.part.0.cold, @function
merge.part.0.cold:
.LFSB25:
.L13:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movdqu	(%rcx), %xmm3
	addl	$1, %edx
	addq	$16, %rcx
	addq	$16, %rdi
	movaps	%xmm3, -16(%rdi)
	cmpl	%edx, %ebp
	jge	.L13
	jmp	.L7
.L11:
	movq	%rax, %rsi
	addq	$1, %rax
	salq	$4, %rsi
	movdqu	(%rcx,%rsi), %xmm2
	movaps	%xmm2, (%rdi,%rsi)
	cmpl	%eax, %edx
	ja	.L11
	jmp	.L7
	.cfi_endproc
.LFE25:
	.text
	.size	merge.part.0, .-merge.part.0
	.section	.text.unlikely
	.size	merge.part.0.cold, .-merge.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jne	.L37
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	jmp	merge.part.0
	.cfi_endproc
.LFE23:
	.size	merge, .-merge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%lld"
.LC2:
	.string	"%lld%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %esi
	movq	%rsp, %rdx
	leal	1(%rsi), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L40
.L60:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L60
.L40:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L61
.L41:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L42
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %esi
	addl	$1, %r13d
	addq	$16, %r12
	cmpl	%r13d, %esi
	jg	.L43
.L42:
	subl	$1, %esi
	je	.L44
	movq	%rbx, %rdx
	xorl	%edi, %edi
	call	merge.part.0
.L44:
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	.L45
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L47:
	movslq	%edi, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	movq	8(%rax), %rsi
	movq	(%rax), %rax
	leaq	(%rsi,%r8), %rcx
	cmpq	%rcx, %rdx
	jg	.L62
	subq	%r8, %rdx
	imulq	%rax, %rdx
	addq	%r9, %rdx
.L45:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L63
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	.cfi_restore_state
	imulq	%rsi, %rax
	addl	$1, %edi
	movq	%rcx, %r8
	addq	%rax, %r9
	jmp	.L47
.L61:
	orq	$0, -8(%rsp,%rax)
	jmp	.L41
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 1600032
c:
	.zero	1600032
	.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>
//小さい順にソート
long long c[100002][2];
void merge(int i,int j,long long s[][2]){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
      else if(j<b){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else if(s[a][0]<s[b][0]){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else{
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
    }
    for(d=i;d<=j;d++){
      s[d][0]=c[d][0];
      s[d][1]=c[d][1];
    }
  }
}

int main(){
  int n,i;
  long long m;
  scanf("%d%lld",&n,&m);
  long long a[n+1][2];
  for(i=0;i<n;i++)
    scanf("%lld%lld",&a[i][0],&a[i][1]);
  merge(0,n-1,a);
  long long count=0,money=0;
  i=0;
  while(count!=m){
    if(count+a[i][1]<m){
      count+=a[i][1];
      money+=a[i][0]*a[i][1];
      i++;
    }
    else{
      money+=a[i][0]*(m-count);
      count=m;
    }
  }
  printf("%lld\n",money);
  return 0;
}

4 30
6 18
2 6
3 10
7 9
 2 3
4 9
2 4
 4 30
6 18
2 1
3 10
7 9
 2 3
4 9
4 4
 2 6
4 9
4 4
 2 6
3 9
4 4
 2 6
3 9
2 4
 2 6
3 9
1 4
 2 3
3 4
1 6
 2 5
3 4
1 6

126
 6
 147
 12
 24
 18
 14
 10
 3
 5

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>
//小さい順にソート
long long c[100002][2];
void merge(int i,int j,long long s[][2]){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
      else if(j<b){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else if(s[a][0]<s[b][0]){
        c[d][0]=s[a][0];
        c[d][1]=s[a][1];
        a++;
      }
      else{
        c[d][0]=s[b][0];
        c[d][1]=s[b][1];
        b++;
      }
    }
    for(d=i;d<=j;d++){
      s[d][0]=c[d][0];
      s[d][1]=c[d][1];
    }
  }
}

int main(){
  int n,i;
  long long m;
  scanf("%d%lld",&n,&m);
  long long a[n+1][2];
  for(i=0;i<n;i++)
    scanf("%lld%lld",&a[i][0],&a[i][1]);
  merge(0,n-1,a);
  long long count=0,money=0;
  i=0;
  while(count!=m){
    if(count+a[i][1]<m){
      count+=a[i][1];
      money+=a[i][0]*a[i][1];
      i++;
    }
    else{
      money+=a[i][0]*(m-count);
      count=m;
    }
  }
  printf("%lld\n",money);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 1600032
c:
	.zero	1600032
	.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
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L8:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L5
.L4:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L7
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, 8(%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L10
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-96(%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), %eax
	addl	$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
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L16
.L17:
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	8(%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L16:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	movl	-104(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	movl	$0, %edi
	call	merge
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L18
.L20:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L19
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	addq	%rax, -88(%rbp)
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	addl	$1, -100(%rbp)
	jmp	.L18
.L19:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	subq	-88(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jne	.L20
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 1600032
c:
	.zero	1600032
	.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
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L11
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L8:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L5
.L4:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L7
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L5
.L7:
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	8(%rax), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+c(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, (%rdx)
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+c(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, 8(%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L10
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-96(%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), %eax
	addl	$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
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L16
.L17:
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	8(%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L16:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	movl	-104(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	movl	$0, %edi
	call	merge
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L18
.L20:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L19
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	addq	%rax, -88(%rbp)
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	addl	$1, -100(%rbp)
	jmp	.L18
.L19:
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	subq	-88(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jne	.L20
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
