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<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>

#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define lld long long int

typedef struct node{
    lld a, b;
}node;

int cmp(const void* a, const void* b){
    lld x = ((node*)a)->a, y = ((node*)b)->a;
    if(x > y){
        return 1;
    }
    if(x < y){
        return -1;
    }
    return 0;
}

int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    node x[n];
    rep(i, 0, n){
        scanf("%lld %lld", &x[i].a, &x[i].b);
    }
    qsort(x, n, sizeof(node), cmp);
    lld ans = 0;
    while(m > 0){
        rep(i, 0, n){
            if(m >= x[i].b){
                m -= x[i].b;
                ans += x[i].b * x[i].a;
            }else{
                ans += x[i].a * m;
                m = 0;
                break;
            }
            if(m == 0){
                break;
            }
        }
    }
    printf("%lld", ans);

    return 0;
}```

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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%lld"
	.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	$56, %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	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L9
.L10:
	movl	-88(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-88(%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, -88(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L10
	movl	-96(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	jmp	.L11
.L17:
	movl	$0, -84(%rbp)
	jmp	.L12
.L16:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movl	-92(%rbp), %eax
	movl	%eax, %ecx
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -92(%rbp)
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	jmp	.L11
.L13:
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-92(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L11
.L15:
	addl	$1, -84(%rbp)
.L12:
	movl	-96(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L16
.L11:
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jg	.L17
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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
	movslq	-48(%rbp), %rsi
	movq	%rsp, %rcx
	movq	%rsi, %rdx
	movq	%rsi, %rax
	salq	$4, %rdx
	movq	%rdx, %rdi
	andq	$-4096, %rdi
	subq	%rdi, %rcx
	cmpq	%rcx, %rsp
	je	.L7
.L34:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L34
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L35
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	8(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	addl	$1, %r13d
	addq	$16, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-48(%rbp), %r10d
	movl	-44(%rbp), %ecx
	xorl	%r8d, %r8d
	leal	-1(%r10), %r9d
	addq	$1, %r9
	salq	$4, %r9
	addq	%rbx, %r9
	testl	%ecx, %ecx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	testl	%r10d, %r10d
	jg	.L16
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	imulq	%rdx, %rsi
	addq	%rsi, %r8
	subl	%edx, %ecx
	je	.L14
	addq	$16, %rax
	cmpq	%rax, %r9
	je	.L36
.L16:
	movq	8(%rax), %rdx
	movslq	%ecx, %rdi
	movq	(%rax), %rsi
	cmpq	%rdx, %rdi
	jge	.L37
	imulq	%rsi, %rdi
	addq	%rdi, %r8
.L14:
	movl	$0, -44(%rbp)
.L18:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	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
.L36:
	.cfi_restore_state
	testl	%ecx, %ecx
	jg	.L11
	movl	%ecx, -44(%rbp)
	jmp	.L18
.L35:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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
	movslq	-48(%rbp), %rsi
	movq	%rsp, %rcx
	movq	%rsi, %rdx
	movq	%rsi, %rax
	salq	$4, %rdx
	movq	%rdx, %rdi
	andq	$-4096, %rdi
	subq	%rdi, %rcx
	cmpq	%rcx, %rsp
	je	.L7
.L34:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L34
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L35
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	8(%r12), %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	addl	$1, %r13d
	addq	$16, %r12
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-48(%rbp), %r10d
	movl	-44(%rbp), %ecx
	xorl	%r8d, %r8d
	leal	-1(%r10), %r9d
	addq	$1, %r9
	salq	$4, %r9
	addq	%rbx, %r9
	testl	%ecx, %ecx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	testl	%r10d, %r10d
	jg	.L16
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	imulq	%rdx, %rsi
	addq	%rsi, %r8
	subl	%edx, %ecx
	je	.L14
	addq	$16, %rax
	cmpq	%rax, %r9
	je	.L36
.L16:
	movq	8(%rax), %rdx
	movslq	%ecx, %rdi
	movq	(%rax), %rsi
	cmpq	%rdx, %rdi
	jge	.L37
	imulq	%rsi, %rdi
	addq	%rdi, %r8
.L14:
	movl	$0, -44(%rbp)
.L18:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	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
.L36:
	.cfi_restore_state
	testl	%ecx, %ecx
	jg	.L11
	movl	%ecx, -44(%rbp)
	jmp	.L18
.L35:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>

#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define lld long long int

typedef struct node{
    lld a, b;
}node;

int cmp(const void* a, const void* b){
    lld x = ((node*)a)->a, y = ((node*)b)->a;
    if(x > y){
        return 1;
    }
    if(x < y){
        return -1;
    }
    return 0;
}

int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    node x[n];
    rep(i, 0, n){
        scanf("%lld %lld", &x[i].a, &x[i].b);
    }
    qsort(x, n, sizeof(node), cmp);
    lld ans = 0;
    while(m > 0){
        rep(i, 0, n){
            if(m >= x[i].b){
                m -= x[i].b;
                ans += x[i].b * x[i].a;
            }else{
                ans += x[i].a * m;
                m = 0;
                break;
            }
            if(m == 0){
                break;
            }
        }
    }
    printf("%lld", ans);

    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>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>

#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define lld long long int

typedef struct node{
    lld a, b;
}node;

int cmp(const void* a, const void* b){
    lld x = ((node*)a)->a, y = ((node*)b)->a;
    if(x > y){
        return 1;
    }
    if(x < y){
        return -1;
    }
    return 0;
}

int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    node x[n];
    rep(i, 0, n){
        scanf("%lld %lld", &x[i].a, &x[i].b);
    }
    qsort(x, n, sizeof(node), cmp);
    lld ans = 0;
    while(m > 0){
        rep(i, 0, n){
            if(m >= x[i].b){
                m -= x[i].b;
                ans += x[i].b * x[i].a;
            }else{
                ans += x[i].a * m;
                m = 0;
                break;
            }
            if(m == 0){
                break;
            }
        }
    }
    printf("%lld", ans);

    return 0;
}```

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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%lld"
	.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	$56, %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	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L9
.L10:
	movl	-88(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-88(%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, -88(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L10
	movl	-96(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	jmp	.L11
.L17:
	movl	$0, -84(%rbp)
	jmp	.L12
.L16:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movl	-92(%rbp), %eax
	movl	%eax, %ecx
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -92(%rbp)
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	jmp	.L11
.L13:
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-92(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L11
.L15:
	addl	$1, -84(%rbp)
.L12:
	movl	-96(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L16
.L11:
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jg	.L17
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld"
.LC2:
	.string	"%lld"
	.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	$56, %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	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -88(%rbp)
	jmp	.L9
.L10:
	movl	-88(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-88(%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, -88(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L10
	movl	-96(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	jmp	.L11
.L17:
	movl	$0, -84(%rbp)
	jmp	.L12
.L16:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movl	-92(%rbp), %eax
	movl	%eax, %ecx
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -92(%rbp)
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rcx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	jmp	.L11
.L13:
	movq	-64(%rbp), %rdx
	movl	-84(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-92(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -80(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L11
.L15:
	addl	$1, -84(%rbp)
.L12:
	movl	-96(%rbp), %eax
	cmpl	%eax, -84(%rbp)
	jl	.L16
.L11:
	movl	-92(%rbp), %eax
	testl	%eax, %eax
	jg	.L17
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
