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>

int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main(void) {
	int n;
	scanf("%d", &n);
	int l[n];
	for (int i = 0;i < n;i++) {
		scanf("%d", &l[i]);
	}

	qsort(l, n, sizeof(int), compare_int);
	
	long long ans = 0;
	int tmp = 0;
	for (int a = 0;a < n;a++) {
		for (int b = a+1;b < n;b++) {
			for (int c = b+1;c < n;c++) {
				if (l[a]+l[b] > l[c]) {
					ans++;
				}
			}
		}
	}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%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
	leaq	0(,%rax,4), %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	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L7:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L8
	movl	-104(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L9
.L15:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L10
.L14:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L11
.L13:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jle	.L12
	addq	$1, -80(%rbp)
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L13
	addl	$1, -92(%rbp)
.L10:
	movl	-104(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L14
	addl	$1, -96(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%lld\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
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rcx
	movq	%rsi, %rax
	movq	%rcx, %rdx
	andq	$-4096, %rcx
	subq	%rcx, %rdi
	andq	$-16, %rdx
	cmpq	%rdi, %rsp
	je	.L5
.L33:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L33
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L34
.L6:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L7
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	movq	%rbx, %rdi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L23
	leal	1(%rdi), %eax
	leal	-1(%rdi), %r13d
	movl	$2, %r15d
	xorl	%r8d, %r8d
	movq	%rax, -72(%rbp)
	movl	$1, %r14d
	movl	$1, %r12d
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r14d, %edi
	jle	.L10
	movl	%r15d, %edx
	cmpl	%edi, %r15d
	jge	.L10
	movslq	%r15d, %rax
	movl	-4(%rbx,%r14,4), %r11d
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L20:
	movl	-4(%r9), %r10d
	movl	%edi, %esi
	movl	%r13d, %eax
	subl	%edx, %esi
	addl	%r11d, %r10d
	cmpl	%edx, %edi
	cmovle	%r12d, %esi
	subl	%edx, %eax
	cmpl	$2, %eax
	jbe	.L24
	cmpl	%edx, %edi
	jle	.L24
	movl	%esi, %eax
	movd	%r10d, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm4
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r9,%rax), %rcx
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rax), %xmm7
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm7, %xmm0
	pand	%xmm6, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L14
	movdqa	%xmm1, %xmm0
	movl	%esi, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %r8
	leal	(%rcx,%rdx), %eax
	cmpl	%ecx, %esi
	je	.L15
.L13:
	movslq	%eax, %rcx
	xorl	%esi, %esi
	leaq	(%rbx,%rcx,4), %rcx
	cmpl	%r10d, (%rcx)
	setl	%sil
	addq	%rsi, %r8
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	jle	.L15
	xorl	%esi, %esi
	cmpl	4(%rcx), %r10d
	setg	%sil
	addl	$2, %eax
	addq	%rsi, %r8
	cmpl	%eax, %edi
	jle	.L15
	xorl	%eax, %eax
	cmpl	8(%rcx), %r10d
	setg	%al
	addq	%rax, %r8
.L15:
	addl	$1, %edx
	addq	$4, %r9
	cmpl	%edx, %edi
	jne	.L20
.L10:
	addq	$1, %r14
	addl	$1, %r15d
	cmpq	-72(%rbp), %r14
	jne	.L21
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L35
	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
.L24:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L13
.L34:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L23:
	xorl	%r8d, %r8d
	jmp	.L9
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%lld\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
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rcx
	movq	%rsi, %rax
	movq	%rcx, %rdx
	andq	$-4096, %rcx
	subq	%rcx, %rdi
	andq	$-16, %rdx
	cmpq	%rdi, %rsp
	je	.L5
.L33:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L33
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L34
.L6:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L7
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	movq	%rbx, %rdi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L23
	leal	1(%rdi), %eax
	leal	-1(%rdi), %r13d
	movl	$2, %r15d
	xorl	%r8d, %r8d
	movq	%rax, -72(%rbp)
	movl	$1, %r14d
	movl	$1, %r12d
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r14d, %edi
	jle	.L10
	movl	%r15d, %edx
	cmpl	%edi, %r15d
	jge	.L10
	movslq	%r15d, %rax
	movl	-4(%rbx,%r14,4), %r11d
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L20:
	movl	-4(%r9), %r10d
	movl	%edi, %esi
	movl	%r13d, %eax
	subl	%edx, %esi
	addl	%r11d, %r10d
	cmpl	%edx, %edi
	cmovle	%r12d, %esi
	subl	%edx, %eax
	cmpl	$2, %eax
	jbe	.L24
	cmpl	%edx, %edi
	jle	.L24
	movl	%esi, %eax
	movd	%r10d, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm4
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r9,%rax), %rcx
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rax), %xmm7
	movdqa	%xmm4, %xmm0
	movdqa	%xmm5, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm7, %xmm0
	pand	%xmm6, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L14
	movdqa	%xmm1, %xmm0
	movl	%esi, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %r8
	leal	(%rcx,%rdx), %eax
	cmpl	%ecx, %esi
	je	.L15
.L13:
	movslq	%eax, %rcx
	xorl	%esi, %esi
	leaq	(%rbx,%rcx,4), %rcx
	cmpl	%r10d, (%rcx)
	setl	%sil
	addq	%rsi, %r8
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	jle	.L15
	xorl	%esi, %esi
	cmpl	4(%rcx), %r10d
	setg	%sil
	addl	$2, %eax
	addq	%rsi, %r8
	cmpl	%eax, %edi
	jle	.L15
	xorl	%eax, %eax
	cmpl	8(%rcx), %r10d
	setg	%al
	addq	%rax, %r8
.L15:
	addl	$1, %edx
	addq	$4, %r9
	cmpl	%edx, %edi
	jne	.L20
.L10:
	addq	$1, %r14
	addl	$1, %r15d
	cmpq	-72(%rbp), %r14
	jne	.L21
.L9:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L35
	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
.L24:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L13
.L34:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L23:
	xorl	%r8d, %r8d
	jmp	.L9
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>

int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main(void) {
	int n;
	scanf("%d", &n);
	int l[n];
	for (int i = 0;i < n;i++) {
		scanf("%d", &l[i]);
	}

	qsort(l, n, sizeof(int), compare_int);
	
	long long ans = 0;
	int tmp = 0;
	for (int a = 0;a < n;a++) {
		for (int b = a+1;b < n;b++) {
			for (int c = b+1;c < n;c++) {
				if (l[a]+l[b] > l[c]) {
					ans++;
				}
			}
		}
	}

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

4
5 4 2 1
 7
218 1140 704 233 645 728 389
 3
1 1000 2
 7
218 1140 704 233 645 890 389
 7
218 1140 1051 233 449 890 389
 7
218 1140 1051 16 636 890 389
 7
218 1140 551 40 636 890 487
 7
218 1140 551 40 660 890 487
 7
116 1499 551 40 806 890 487
 7
116 1499 551 40 297 890 487

1
 14
 0
 13
 15
 10
 11
 12
 7
 3

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>

int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main(void) {
	int n;
	scanf("%d", &n);
	int l[n];
	for (int i = 0;i < n;i++) {
		scanf("%d", &l[i]);
	}

	qsort(l, n, sizeof(int), compare_int);
	
	long long ans = 0;
	int tmp = 0;
	for (int a = 0;a < n;a++) {
		for (int b = a+1;b < n;b++) {
			for (int c = b+1;c < n;c++) {
				if (l[a]+l[b] > l[c]) {
					ans++;
				}
			}
		}
	}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%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
	leaq	0(,%rax,4), %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	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L7:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L8
	movl	-104(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L9
.L15:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L10
.L14:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L11
.L13:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jle	.L12
	addq	$1, -80(%rbp)
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L13
	addl	$1, -92(%rbp)
.L10:
	movl	-104(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L14
	addl	$1, -96(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	compare_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%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
	leaq	0(,%rax,4), %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	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -100(%rbp)
.L7:
	movl	-104(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L8
	movl	-104(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -80(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L9
.L15:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L10
.L14:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L11
.L13:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jle	.L12
	addq	$1, -80(%rbp)
.L12:
	addl	$1, -88(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L13
	addl	$1, -92(%rbp)
.L10:
	movl	-104(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L14
	addl	$1, -96(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
