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 <string.h>
#include <stdlib.h>
#include <stdbool.h>
#define ll long long int
#define lim 100010

int compare_int(const void *a, const void *b){return *(int*)a - *(int*)b;}
int main(void){
	int n;
	scanf("%d",&n);
	int L[2*n];
	for(int i=0;i<2*n;i++)scanf("%d",&L[i]);
	qsort(L,2*n,sizeof(int),compare_int);
	int ans=0;
	for(int i=0;i<2*n;i+=2){
		ans += L[i];
	}
	printf("%d",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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	-44(%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
	movl	-44(%rbp), %eax
	movq	%rsp, %rdi
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L23
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L24
.L6:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L7
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	addl	%eax, %eax
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L15
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L16
	shrl	$3, %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %edx
	movq	%r13, %rax
	movq	%rdx, %rcx
	salq	$5, %rdx
	addq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm0, %xmm1
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L10:
	movslq	%eax, %rcx
	leal	2(%rax), %edi
	leaq	0(%r13,%rcx,4), %rcx
	addl	(%rcx), %edx
	cmpl	%esi, %edi
	jge	.L9
	leal	4(%rax), %edi
	addl	8(%rcx), %edx
	cmpl	%edi, %esi
	jle	.L9
	addl	$6, %eax
	addl	16(%rcx), %edx
	cmpl	%eax, %esi
	jle	.L9
	addl	24(%rcx), %edx
.L9:
	xorl	%eax, %eax
	movq	%r14, %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,%rcx)
	jmp	.L6
.L15:
	xorl	%edx, %edx
	jmp	.L9
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L25:
	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	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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	-44(%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
	movl	-44(%rbp), %eax
	movq	%rsp, %rdi
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L23
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L24
.L6:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L7
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	addl	%eax, %eax
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L15
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L16
	shrl	$3, %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %edx
	movq	%r13, %rax
	movq	%rdx, %rcx
	salq	$5, %rdx
	addq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm0, %xmm1
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L10:
	movslq	%eax, %rcx
	leal	2(%rax), %edi
	leaq	0(%r13,%rcx,4), %rcx
	addl	(%rcx), %edx
	cmpl	%esi, %edi
	jge	.L9
	leal	4(%rax), %edi
	addl	8(%rcx), %edx
	cmpl	%edi, %esi
	jle	.L9
	addl	$6, %eax
	addl	16(%rcx), %edx
	cmpl	%eax, %esi
	jle	.L9
	addl	24(%rcx), %edx
.L9:
	xorl	%eax, %eax
	movq	%r14, %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,%rcx)
	jmp	.L6
.L15:
	xorl	%edx, %edx
	jmp	.L9
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L25:
	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	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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	-44(%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
	movl	-44(%rbp), %eax
	movq	%rsp, %rdi
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L23
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L24
.L6:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L7
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	addl	%eax, %eax
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L15
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L16
	shrl	$3, %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %edx
	movq	%r13, %rax
	movq	%rdx, %rcx
	salq	$5, %rdx
	addq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm0, %xmm1
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L10:
	movslq	%eax, %rcx
	leal	2(%rax), %edi
	leaq	0(%r13,%rcx,4), %rcx
	addl	(%rcx), %edx
	cmpl	%esi, %edi
	jge	.L9
	leal	4(%rax), %edi
	addl	8(%rcx), %edx
	cmpl	%edi, %esi
	jle	.L9
	addl	$6, %eax
	addl	16(%rcx), %edx
	cmpl	%eax, %esi
	jle	.L9
	addl	24(%rcx), %edx
.L9:
	xorl	%eax, %eax
	movq	%r14, %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,%rcx)
	jmp	.L6
.L15:
	xorl	%edx, %edx
	jmp	.L9
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L25:
	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 <string.h>
#include <stdlib.h>
#include <stdbool.h>
#define ll long long int
#define lim 100010

int compare_int(const void *a, const void *b){return *(int*)a - *(int*)b;}
int main(void){
	int n;
	scanf("%d",&n);
	int L[2*n];
	for(int i=0;i<2*n;i++)scanf("%d",&L[i]);
	qsort(L,2*n,sizeof(int),compare_int);
	int ans=0;
	for(int i=0;i<2*n;i+=2){
		ans += L[i];
	}
	printf("%d",ans);
	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 <string.h>
#include <stdlib.h>
#include <stdbool.h>
#define ll long long int
#define lim 100010

int compare_int(const void *a, const void *b){return *(int*)a - *(int*)b;}
int main(void){
	int n;
	scanf("%d",&n);
	int L[2*n];
	for(int i=0;i<2*n;i++)scanf("%d",&L[i]);
	qsort(L,2*n,sizeof(int),compare_int);
	int ans=0;
	for(int i=0;i<2*n;i+=2){
		ans += L[i];
	}
	printf("%d",ans);
	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
100 1 2 3 14 15 58 58 9 29
 2
1 3 1 1
 5
100 1 2 3 1 15 58 58 9 29
 2
1 2 1 2
 5
100 1 2 3 1 19 40 14 9 29
 2
1 2 0 1
 5
110 1 2 3 1 19 40 14 1 29
 5
110 1 0 3 1 19 40 14 1 29
 2
2 0 0 0
 2
2 -1 0 0

105 2 99 3 71 1 64 63 0 -1
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 <string.h>
#include <stdlib.h>
#include <stdbool.h>
#define ll long long int
#define lim 100010

int compare_int(const void *a, const void *b){return *(int*)a - *(int*)b;}
int main(void){
	int n;
	scanf("%d",&n);
	int L[2*n];
	for(int i=0;i<2*n;i++)scanf("%d",&L[i]);
	qsort(L,2*n,sizeof(int),compare_int);
	int ans=0;
	for(int i=0;i<2*n;i+=2){
		ans += L[i];
	}
	printf("%d",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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	-44(%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
	movl	-44(%rbp), %eax
	movq	%rsp, %rdi
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L23
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L24
.L6:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L7
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	addl	%eax, %eax
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L15
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L16
	shrl	$3, %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %edx
	movq	%r13, %rax
	movq	%rdx, %rcx
	salq	$5, %rdx
	addq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm0, %xmm1
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L10:
	movslq	%eax, %rcx
	leal	2(%rax), %edi
	leaq	0(%r13,%rcx,4), %rcx
	addl	(%rcx), %edx
	cmpl	%esi, %edi
	jge	.L9
	leal	4(%rax), %edi
	addl	8(%rcx), %edx
	cmpl	%edi, %esi
	jle	.L9
	addl	$6, %eax
	addl	16(%rcx), %edx
	cmpl	%eax, %esi
	jle	.L9
	addl	24(%rcx), %edx
.L9:
	xorl	%eax, %eax
	movq	%r14, %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,%rcx)
	jmp	.L6
.L15:
	xorl	%edx, %edx
	jmp	.L9
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L25:
	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	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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	-44(%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
	movl	-44(%rbp), %eax
	movq	%rsp, %rdi
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	15(,%rsi,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L23
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L24
.L6:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L7
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	addl	%eax, %eax
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L15
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L16
	shrl	$3, %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %edx
	movq	%r13, %rax
	movq	%rdx, %rcx
	salq	$5, %rdx
	addq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm0, %xmm1
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L10:
	movslq	%eax, %rcx
	leal	2(%rax), %edi
	leaq	0(%r13,%rcx,4), %rcx
	addl	(%rcx), %edx
	cmpl	%esi, %edi
	jge	.L9
	leal	4(%rax), %edi
	addl	8(%rcx), %edx
	cmpl	%edi, %esi
	jle	.L9
	addl	$6, %eax
	addl	16(%rcx), %edx
	cmpl	%eax, %esi
	jle	.L9
	addl	24(%rcx), %edx
.L9:
	xorl	%eax, %eax
	movq	%r14, %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,%rcx)
	jmp	.L6
.L15:
	xorl	%edx, %edx
	jmp	.L9
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L25:
	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:
```