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>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
#define MOD 1000000007
ll power(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;}
#define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0)
#define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0)

//your code here!

int cmp(const void *a, const void *b){
    ll A=*(ll *)a, B=*(ll *)b;
    if(A==B)return 0;
    else return A>B ? 1:-1;//昇順ソート 1,2,....9
}

int main(void){
    ll N, score[1001], ans=0;
    scanf("%lld", &N);
    rep(i, N) {
        scanf("%lld", score+i);
        ans += score[i];
    }
    if(ans%10) {
        printf("%lld\n", ans);
        return 0;
    }
    else {
        qsort(score, N, sizeof(ll), cmp);
        rep(i, N) {
            if(score[i]%10) {
                printf("%lld\n", ans-score[i]);
                return 0;
            }
        }
        puts("0");
        return 0;
    }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	power
	.type	power, @function
power:
.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	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L3:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L3
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	power, .-power
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L8
	movl	$1, %eax
	jmp	.L7
.L8:
	movl	$-1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -8040(%rbp)
	leaq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -8032(%rbp)
	jmp	.L11
.L12:
	movq	-8032(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	-8016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-8032(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -8040(%rbp)
	addq	$1, -8032(%rbp)
.L11:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8032(%rbp)
	jl	.L12
	movq	-8040(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L13
	movq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L13:
	movq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -8024(%rbp)
	jmp	.L15
.L17:
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L16
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-8040(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L16:
	addq	$1, -8024(%rbp)
.L15:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8024(%rbp)
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.p2align 4
	.globl	power
	.type	power, @function
power:
.LFB51:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jle	.L9
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rax
	imulq	%rdi, %r8
	cmpq	%rax, %rsi
	jne	.L8
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	power, .-power
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3944, %rsp
	.cfi_def_cfa_offset 8080
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L19
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	0(%rbp,%rbx,8), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	0(%rbp,%rbx,8), %r12
	addq	$1, %rbx
	cmpq	%rbx, %rsi
	jg	.L13
	movabsq	$-3689348814741910323, %rax
	movabsq	$1844674407370955160, %rdx
	imulq	%r12, %rax
	addq	%rdx, %rax
	rorq	%rax
	cmpq	%rdx, %rax
	ja	.L23
.L12:
	movq	%rbp, %rdi
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	movq	8(%rsp), %rdi
	testq	%rdi, %rdi
	jle	.L15
	movabsq	$-3689348814741910323, %r8
	xorl	%edx, %edx
	movabsq	$1844674407370955160, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	je	.L15
.L17:
	movq	0(%rbp,%rdx,8), %rsi
	movq	%rsi, %rax
	imulq	%r8, %rax
	addq	%rcx, %rax
	rorq	%rax
	cmpq	%rcx, %rax
	jbe	.L16
	movq	%r12, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	subq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
.L14:
	movq	8024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$8040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L15:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L19:
	xorl	%r12d, %r12d
	leaq	16(%rsp), %rbp
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.p2align 4
	.globl	power
	.type	power, @function
power:
.LFB51:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jle	.L9
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rax
	imulq	%rdi, %r8
	cmpq	%rax, %rsi
	jne	.L8
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	power, .-power
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3944, %rsp
	.cfi_def_cfa_offset 8080
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L19
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	0(%rbp,%rbx,8), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	0(%rbp,%rbx,8), %r12
	addq	$1, %rbx
	cmpq	%rbx, %rsi
	jg	.L13
	movabsq	$-3689348814741910323, %rax
	movabsq	$1844674407370955160, %rdx
	imulq	%r12, %rax
	addq	%rdx, %rax
	rorq	%rax
	cmpq	%rdx, %rax
	ja	.L23
.L12:
	movq	%rbp, %rdi
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	call	qsort@PLT
	movq	8(%rsp), %rdi
	testq	%rdi, %rdi
	jle	.L15
	movabsq	$-3689348814741910323, %r8
	xorl	%edx, %edx
	movabsq	$1844674407370955160, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	je	.L15
.L17:
	movq	0(%rbp,%rdx,8), %rsi
	movq	%rsi, %rax
	imulq	%r8, %rax
	addq	%rcx, %rax
	rorq	%rax
	cmpq	%rcx, %rax
	jbe	.L16
	movq	%r12, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	subq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
.L14:
	movq	8024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$8040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	movq	%r12, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L15:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L19:
	xorl	%r12d, %r12d
	leaq	16(%rsp), %rbp
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
#define MOD 1000000007
ll power(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;}
#define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0)
#define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0)

//your code here!

int cmp(const void *a, const void *b){
    ll A=*(ll *)a, B=*(ll *)b;
    if(A==B)return 0;
    else return A>B ? 1:-1;//昇順ソート 1,2,....9
}

int main(void){
    ll N, score[1001], ans=0;
    scanf("%lld", &N);
    rep(i, N) {
        scanf("%lld", score+i);
        ans += score[i];
    }
    if(ans%10) {
        printf("%lld\n", ans);
        return 0;
    }
    else {
        qsort(score, N, sizeof(ll), cmp);
        rep(i, N) {
            if(score[i]%10) {
                printf("%lld\n", ans-score[i]);
                return 0;
            }
        }
        puts("0");
        return 0;
    }
}

3
4
10
15
 3
10
20
40
 3
5
10
12
 3
8
10
15
 3
7
20
40
 3
5
10
8
 3
1
10
15
 3
7
34
40
 3
5
10
10
 3
7
38
40

29
 0
 27
 33
 67
 23
 26
 81
 25
 85

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>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
#define MOD 1000000007
ll power(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;}
#define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0)
#define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0)

//your code here!

int cmp(const void *a, const void *b){
    ll A=*(ll *)a, B=*(ll *)b;
    if(A==B)return 0;
    else return A>B ? 1:-1;//昇順ソート 1,2,....9
}

int main(void){
    ll N, score[1001], ans=0;
    scanf("%lld", &N);
    rep(i, N) {
        scanf("%lld", score+i);
        ans += score[i];
    }
    if(ans%10) {
        printf("%lld\n", ans);
        return 0;
    }
    else {
        qsort(score, N, sizeof(ll), cmp);
        rep(i, N) {
            if(score[i]%10) {
                printf("%lld\n", ans-score[i]);
                return 0;
            }
        }
        puts("0");
        return 0;
    }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	power
	.type	power, @function
power:
.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	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L3:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L3
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	power, .-power
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L8
	movl	$1, %eax
	jmp	.L7
.L8:
	movl	$-1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -8040(%rbp)
	leaq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -8032(%rbp)
	jmp	.L11
.L12:
	movq	-8032(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	-8016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-8032(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -8040(%rbp)
	addq	$1, -8032(%rbp)
.L11:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8032(%rbp)
	jl	.L12
	movq	-8040(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L13
	movq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L13:
	movq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -8024(%rbp)
	jmp	.L15
.L17:
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L16
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-8040(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L16:
	addq	$1, -8024(%rbp)
.L15:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8024(%rbp)
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	power
	.type	power, @function
power:
.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	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L3:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L3
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	power, .-power
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L8
	movl	$1, %eax
	jmp	.L7
.L8:
	movl	$-1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -8040(%rbp)
	leaq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -8032(%rbp)
	jmp	.L11
.L12:
	movq	-8032(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	-8016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-8032(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -8040(%rbp)
	addq	$1, -8032(%rbp)
.L11:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8032(%rbp)
	jl	.L12
	movq	-8040(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L13
	movq	-8040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L13:
	movq	-8048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -8024(%rbp)
	jmp	.L15
.L17:
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	testq	%rdx, %rdx
	je	.L16
	movq	-8024(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-8040(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L16:
	addq	$1, -8024(%rbp)
.L15:
	movq	-8048(%rbp), %rax
	cmpq	%rax, -8024(%rbp)
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
