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 a;
  long b;
} Drink;

int cmp( const void *p, const void *q )
{
    return ((Drink*)p)->a - ((Drink*)q)->a;
}

int main(void)
{
  long i;
  long N, M;
  scanf("%ld %ld", &N, &M);

  Drink d[N];
  for (i = 0; i < N; i++)
    scanf("%ld %ld", &d[i].a, &d[i].b);

  qsort(d, N, sizeof(Drink), cmp);

  i = 0;
  long count = 0;
  while (M >= 0) {
    if (M <= d[i].b) {
      count += (d[i].a * M);
      M -= M;
      break;
    } else {
      count += (d[i].a * d[i].b);
      M -= d[i].b;
    }
    i++;
  }

  printf("%ld\n", count);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\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
	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
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L8:
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L8
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L10
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L11
.L10:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rdx
	salq	$4, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	movq	(%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	addq	$1, -88(%rbp)
.L9:
	movq	-96(%rbp), %rax
	testq	%rax, %rax
	jns	.L12
.L11:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L5
.L21:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L21
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L22
.L6:
	leaq	7(%rsp), %rax
	movq	%rax, %r13
	andq	$-8, %rax
	shrq	$3, %r13
	movq	%rax, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rax, %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rsi
	addq	$1, %r14
	addq	$16, %r12
	cmpq	%r14, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	js	.L14
	movq	8(,%r13,8), %rcx
	movq	0(,%r13,8), %rdx
	leaq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	%rcx, %rsi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	imulq	%rcx, %rdx
	subq	%rcx, %rsi
	movq	8(%rax), %rcx
	addq	$16, %rax
	addq	%rdx, %rdi
	movq	-16(%rax), %rdx
	cmpq	%rsi, %rcx
	jl	.L12
.L11:
	imulq	%rsi, %rdx
	movq	$0, -64(%rbp)
	addq	%rdi, %rdx
.L9:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L23
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L22:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%edx, %edx
	jmp	.L9
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L5
.L21:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L21
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L22
.L6:
	leaq	7(%rsp), %rax
	movq	%rax, %r13
	andq	$-8, %rax
	shrq	$3, %r13
	movq	%rax, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rax, %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rsi
	addq	$1, %r14
	addq	$16, %r12
	cmpq	%r14, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	js	.L14
	movq	8(,%r13,8), %rcx
	movq	0(,%r13,8), %rdx
	leaq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	%rcx, %rsi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	imulq	%rcx, %rdx
	subq	%rcx, %rsi
	movq	8(%rax), %rcx
	addq	$16, %rax
	addq	%rdx, %rdi
	movq	-16(%rax), %rdx
	cmpq	%rsi, %rcx
	jl	.L12
.L11:
	imulq	%rsi, %rdx
	movq	$0, -64(%rbp)
	addq	%rdi, %rdx
.L9:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L23
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L22:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%edx, %edx
	jmp	.L9
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:

#include <stdio.h>
#include <stdlib.h>

typedef struct {
  long a;
  long b;
} Drink;

int cmp( const void *p, const void *q )
{
    return ((Drink*)p)->a - ((Drink*)q)->a;
}

int main(void)
{
  long i;
  long N, M;
  scanf("%ld %ld", &N, &M);

  Drink d[N];
  for (i = 0; i < N; i++)
    scanf("%ld %ld", &d[i].a, &d[i].b);

  qsort(d, N, sizeof(Drink), cmp);

  i = 0;
  long count = 0;
  while (M >= 0) {
    if (M <= d[i].b) {
      count += (d[i].a * M);
      M -= M;
      break;
    } else {
      count += (d[i].a * d[i].b);
      M -= d[i].b;
    }
    i++;
  }

  printf("%ld\n", count);
}
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>
#include <stdlib.h>

typedef struct {
  long a;
  long b;
} Drink;

int cmp( const void *p, const void *q )
{
    return ((Drink*)p)->a - ((Drink*)q)->a;
}

int main(void)
{
  long i;
  long N, M;
  scanf("%ld %ld", &N, &M);

  Drink d[N];
  for (i = 0; i < N; i++)
    scanf("%ld %ld", &d[i].a, &d[i].b);

  qsort(d, N, sizeof(Drink), cmp);

  i = 0;
  long count = 0;
  while (M >= 0) {
    if (M <= d[i].b) {
      count += (d[i].a * M);
      M -= M;
      break;
    } else {
      count += (d[i].a * d[i].b);
      M -= d[i].b;
    }
    i++;
  }

  printf("%ld\n", count);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\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
	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
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L8:
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L8
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L10
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L11
.L10:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rdx
	salq	$4, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	movq	(%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	addq	$1, -88(%rbp)
.L9:
	movq	-96(%rbp), %rax
	testq	%rax, %rax
	jns	.L12
.L11:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\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
	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
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L8:
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L8
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L10
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-96(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L11
.L10:
	movq	-64(%rbp), %rdx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rax
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	movq	-64(%rbp), %rcx
	movq	-88(%rbp), %rdx
	salq	$4, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	movq	(%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	addq	$1, -88(%rbp)
.L9:
	movq	-96(%rbp), %rax
	testq	%rax, %rax
	jns	.L12
.L11:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
