Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <time.h>
typedef long long llint;
typedef struct{
    llint aa;
    llint bb;
}frequent;
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->aa - ((frequent*)q)->aa;
}

int main(void){
    llint n,m,i,money=0;
    scanf("%lld%lld",&n,&m);
    frequent ab[n]; 
    for(i=0;i<n;i++){
        scanf("%lld%lld",&ab[i].aa,&ab[i].bb);
    }
    qsort(ab,n,sizeof(frequent),cmp);
    for(i=0;i<n;i++){
        if(m<=ab[i].bb){
            money+=m*ab[i].aa;
            break;
        }else{
            m-=ab[i].bb;
            money+=ab[i].bb*ab[i].aa;
        }
    }




    printf("%lld\n",money);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.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
	movq	-56(%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
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L24
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L25
.L6:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	jle	.L14
	movq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	%rax, %rcx
	imulq	%rdi, %rax
	addq	$1, %rsi
	addq	$16, %rdx
	movl	$1, %r10d
	addq	%rax, %r8
	cmpq	%rsi, %r9
	je	.L26
.L12:
	movq	8(%rdx), %rax
	movq	(%rdx), %rdi
	cmpq	%rcx, %rax
	jl	.L10
	testb	%r10b, %r10b
	je	.L11
	movq	%rcx, -48(%rbp)
.L11:
	imulq	%rdi, %rcx
	addq	%rcx, %r8
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L26:
	.cfi_restore_state
	movq	%rcx, -48(%rbp)
	jmp	.L9
.L25:
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%r8d, %r8d
	jmp	.L9
.L27:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.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
	movq	-56(%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
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L24
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L25
.L6:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	jle	.L14
	movq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	%rax, %rcx
	imulq	%rdi, %rax
	addq	$1, %rsi
	addq	$16, %rdx
	movl	$1, %r10d
	addq	%rax, %r8
	cmpq	%rsi, %r9
	je	.L26
.L12:
	movq	8(%rdx), %rax
	movq	(%rdx), %rdi
	cmpq	%rcx, %rax
	jl	.L10
	testb	%r10b, %r10b
	je	.L11
	movq	%rcx, -48(%rbp)
.L11:
	imulq	%rdi, %rcx
	addq	%rcx, %r8
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L26:
	.cfi_restore_state
	movq	%rcx, -48(%rbp)
	jmp	.L9
.L25:
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%r8d, %r8d
	jmp	.L9
.L27:
	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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.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
	movq	-56(%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
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L24
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L25
.L6:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	jle	.L14
	movq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	%rax, %rcx
	imulq	%rdi, %rax
	addq	$1, %rsi
	addq	$16, %rdx
	movl	$1, %r10d
	addq	%rax, %r8
	cmpq	%rsi, %r9
	je	.L26
.L12:
	movq	8(%rdx), %rax
	movq	(%rdx), %rdi
	cmpq	%rcx, %rax
	jl	.L10
	testb	%r10b, %r10b
	je	.L11
	movq	%rcx, -48(%rbp)
.L11:
	imulq	%rdi, %rcx
	addq	%rcx, %r8
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L26:
	.cfi_restore_state
	movq	%rcx, -48(%rbp)
	jmp	.L9
.L25:
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%r8d, %r8d
	jmp	.L9
.L27:
	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:
```
```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <time.h>
typedef long long llint;
typedef struct{
    llint aa;
    llint bb;
}frequent;
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->aa - ((frequent*)q)->aa;
}

int main(void){
    llint n,m,i,money=0;
    scanf("%lld%lld",&n,&m);
    frequent ab[n]; 
    for(i=0;i<n;i++){
        scanf("%lld%lld",&ab[i].aa,&ab[i].bb);
    }
    qsort(ab,n,sizeof(frequent),cmp);
    for(i=0;i<n;i++){
        if(m<=ab[i].bb){
            money+=m*ab[i].aa;
            break;
        }else{
            m-=ab[i].bb;
            money+=ab[i].bb*ab[i].aa;
        }
    }




    printf("%lld\n",money);
    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <time.h>
typedef long long llint;
typedef struct{
    llint aa;
    llint bb;
}frequent;
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->aa - ((frequent*)q)->aa;
}

int main(void){
    llint n,m,i,money=0;
    scanf("%lld%lld",&n,&m);
    frequent ab[n]; 
    for(i=0;i<n;i++){
        scanf("%lld%lld",&ab[i].aa,&ab[i].bb);
    }
    qsort(ab,n,sizeof(frequent),cmp);
    for(i=0;i<n;i++){
        if(m<=ab[i].bb){
            money+=m*ab[i].aa;
            break;
        }else{
            m-=ab[i].bb;
            money+=ab[i].bb*ab[i].aa;
        }
    }




    printf("%lld\n",money);
    return 0;
}
```

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.
Optimized Assembly Code:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <time.h>
typedef long long llint;
typedef struct{
    llint aa;
    llint bb;
}frequent;
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->aa - ((frequent*)q)->aa;
}

int main(void){
    llint n,m,i,money=0;
    scanf("%lld%lld",&n,&m);
    frequent ab[n]; 
    for(i=0;i<n;i++){
        scanf("%lld%lld",&ab[i].aa,&ab[i].bb);
    }
    qsort(ab,n,sizeof(frequent),cmp);
    for(i=0;i<n;i++){
        if(m<=ab[i].bb){
            money+=m*ab[i].aa;
            break;
        }else{
            m-=ab[i].bb;
            money+=ab[i].bb*ab[i].aa;
        }
    }




    printf("%lld\n",money);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.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
	movq	-56(%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
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L24
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L25
.L6:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	jle	.L14
	movq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	%rax, %rcx
	imulq	%rdi, %rax
	addq	$1, %rsi
	addq	$16, %rdx
	movl	$1, %r10d
	addq	%rax, %r8
	cmpq	%rsi, %r9
	je	.L26
.L12:
	movq	8(%rdx), %rax
	movq	(%rdx), %rdi
	cmpq	%rcx, %rax
	jl	.L10
	testb	%r10b, %r10b
	je	.L11
	movq	%rcx, -48(%rbp)
.L11:
	imulq	%rdi, %rcx
	addq	%rcx, %r8
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L26:
	.cfi_restore_state
	movq	%rcx, -48(%rbp)
	jmp	.L9
.L25:
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%r8d, %r8d
	jmp	.L9
.L27:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.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
	movq	-56(%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
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L24
.L5:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L25
.L6:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	jle	.L7
	movq	%rbx, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L8
.L7:
	leaq	cmp(%rip), %rcx
	movl	$16, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	jle	.L14
	movq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	%rax, %rcx
	imulq	%rdi, %rax
	addq	$1, %rsi
	addq	$16, %rdx
	movl	$1, %r10d
	addq	%rax, %r8
	cmpq	%rsi, %r9
	je	.L26
.L12:
	movq	8(%rdx), %rax
	movq	(%rdx), %rdi
	cmpq	%rcx, %rax
	jl	.L10
	testb	%r10b, %r10b
	je	.L11
	movq	%rcx, -48(%rbp)
.L11:
	imulq	%rdi, %rcx
	addq	%rcx, %r8
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L26:
	.cfi_restore_state
	movq	%rcx, -48(%rbp)
	jmp	.L9
.L25:
	orq	$0, -8(%rsp,%rax)
	jmp	.L6
.L14:
	xorl	%r8d, %r8d
	jmp	.L9
.L27:
	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:
```