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 long double ldouble;
// 小大
int compare(const void *a, const void *b){return *(llint *)a - *(llint *)b;}
typedef struct{
    llint aa;
    llint bb;
}frequent;
// 小大
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->bb - ((frequent*)q)->bb;
}


int main(void){
    llint n,i,sum=0;
    scanf("%lld",&n);
    llint a[n];
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    for(i=0;i<n;i++){
        sum+=a[i]-1;
    }


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

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare, .-compare
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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	-48(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L6
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L7:
	movq	%rsp, %r13
	testq	%rcx, %rcx
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L9
	testq	%rax, %rax
	jle	.L8
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm2
	xorl	%edx, %edx
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	0(%r13,%rcx), %xmm1
	paddq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L11
	movdqa	%xmm0, %xmm1
	movq	%rax, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	testb	$1, %al
	je	.L13
.L10:
	movq	0(%r13,%rcx,8), %rax
	leaq	-1(%rdx,%rax), %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L8:
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L10
.L25:
	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:
```

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	compare
	.type	compare, @function
compare:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare, .-compare
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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	-48(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L6
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L7:
	movq	%rsp, %r13
	testq	%rcx, %rcx
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L9
	testq	%rax, %rax
	jle	.L8
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm2
	xorl	%edx, %edx
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	0(%r13,%rcx), %xmm1
	paddq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L11
	movdqa	%xmm0, %xmm1
	movq	%rax, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	testb	$1, %al
	je	.L13
.L10:
	movq	0(%r13,%rcx,8), %rax
	leaq	-1(%rdx,%rax), %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L8:
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L10
.L25:
	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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare, .-compare
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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	-48(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L6
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L7:
	movq	%rsp, %r13
	testq	%rcx, %rcx
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L9
	testq	%rax, %rax
	jle	.L8
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm2
	xorl	%edx, %edx
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	0(%r13,%rcx), %xmm1
	paddq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L11
	movdqa	%xmm0, %xmm1
	movq	%rax, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	testb	$1, %al
	je	.L13
.L10:
	movq	0(%r13,%rcx,8), %rax
	leaq	-1(%rdx,%rax), %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L8:
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L10
.L25:
	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:
```
```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <time.h>
typedef long long llint;
typedef long double ldouble;
// 小大
int compare(const void *a, const void *b){return *(llint *)a - *(llint *)b;}
typedef struct{
    llint aa;
    llint bb;
}frequent;
// 小大
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->bb - ((frequent*)q)->bb;
}


int main(void){
    llint n,i,sum=0;
    scanf("%lld",&n);
    llint a[n];
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    for(i=0;i<n;i++){
        sum+=a[i]-1;
    }


    printf("%lld\n",sum);
    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 long double ldouble;
// 小大
int compare(const void *a, const void *b){return *(llint *)a - *(llint *)b;}
typedef struct{
    llint aa;
    llint bb;
}frequent;
// 小大
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->bb - ((frequent*)q)->bb;
}


int main(void){
    llint n,i,sum=0;
    scanf("%lld",&n);
    llint a[n];
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    for(i=0;i<n;i++){
        sum+=a[i]-1;
    }


    printf("%lld\n",sum);
    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:

5
7 46 11 17 11
 7
994 518 941 851 647 2 568
 3
3 1 6
 5
7 46 11 17 13
 7
994 518 941 523 647 2 568
 3
3 2 6
 5
7 13 11 17 13
 7
994 518 941 523 647 1 568
 3
3 3 6
 5
7 12 11 17 13

87
 4514
 7
 89
 4186
 8
 56
 4185
 9
 55

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 long double ldouble;
// 小大
int compare(const void *a, const void *b){return *(llint *)a - *(llint *)b;}
typedef struct{
    llint aa;
    llint bb;
}frequent;
// 小大
int cmp( const void *p, const void *q ) {
    return ((frequent*)p)->bb - ((frequent*)q)->bb;
}


int main(void){
    llint n,i,sum=0;
    scanf("%lld",&n);
    llint a[n];
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    for(i=0;i<n;i++){
        sum+=a[i]-1;
    }


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

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare, .-compare
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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	-48(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L6
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L7:
	movq	%rsp, %r13
	testq	%rcx, %rcx
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L9
	testq	%rax, %rax
	jle	.L8
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm2
	xorl	%edx, %edx
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	0(%r13,%rcx), %xmm1
	paddq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L11
	movdqa	%xmm0, %xmm1
	movq	%rax, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	testb	$1, %al
	je	.L13
.L10:
	movq	0(%r13,%rcx,8), %rax
	leaq	-1(%rdx,%rax), %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L8:
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L10
.L25:
	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:
```

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	compare
	.type	compare, @function
compare:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare, .-compare
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB52:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %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	-48(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L6
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L7:
	movq	%rsp, %r13
	testq	%rcx, %rcx
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L9
	testq	%rax, %rax
	jle	.L8
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm2, %xmm2
	xorl	%edx, %edx
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	0(%r13,%rcx), %xmm1
	paddq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L11
	movdqa	%xmm0, %xmm1
	movq	%rax, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	testb	$1, %al
	je	.L13
.L10:
	movq	0(%r13,%rcx,8), %rax
	leaq	-1(%rdx,%rax), %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L8:
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L10
.L25:
	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:
```