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>
int compare_int(const void *a, const void *b){return *(int*)b - *(int*)a;}

int main(){
  int N,i,L[200],ans=0;
  scanf("%d",&N);
  for(i=0;i<2*N;i++)scanf("%d",&L[i]);
  qsort(L, 2*N, sizeof(int), compare_int);
  for(i=0;i<N;i++)ans+=L[i*2+1];
  printf("%d\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	leal	(%rax,%rax), %esi
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	%esi, %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %ecx
	cmpl	$3, %ecx
	jbe	.L13
	movl	%ecx, %edx
	leaq	20(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	52(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L7:
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rax), %edi
	cmpl	%esi, %edi
	jge	.L6
	leal	3(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	2(%rax), %edi
	cmpl	%edi, %esi
	jle	.L6
	leal	5(%rcx), %edi
	addl	$3, %eax
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%eax, %esi
	jle	.L6
	addl	$7, %ecx
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$840, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L13:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	leal	(%rax,%rax), %esi
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	%esi, %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %ecx
	cmpl	$3, %ecx
	jbe	.L13
	movl	%ecx, %edx
	leaq	20(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	52(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L7:
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rax), %edi
	cmpl	%esi, %edi
	jge	.L6
	leal	3(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	2(%rax), %edi
	cmpl	%edi, %esi
	jle	.L6
	leal	5(%rcx), %edi
	addl	$3, %eax
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%eax, %esi
	jle	.L6
	addl	$7, %ecx
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$840, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L13:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	leal	(%rax,%rax), %esi
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	%esi, %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %ecx
	cmpl	$3, %ecx
	jbe	.L13
	movl	%ecx, %edx
	leaq	20(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	52(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L7:
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rax), %edi
	cmpl	%esi, %edi
	jge	.L6
	leal	3(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	2(%rax), %edi
	cmpl	%edi, %esi
	jle	.L6
	leal	5(%rcx), %edi
	addl	$3, %eax
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%eax, %esi
	jle	.L6
	addl	$7, %ecx
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$840, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L13:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
int compare_int(const void *a, const void *b){return *(int*)b - *(int*)a;}

int main(){
  int N,i,L[200],ans=0;
  scanf("%d",&N);
  for(i=0;i<2*N;i++)scanf("%d",&L[i]);
  qsort(L, 2*N, sizeof(int), compare_int);
  for(i=0;i<N;i++)ans+=L[i*2+1];
  printf("%d\n",ans);
}```
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>
int compare_int(const void *a, const void *b){return *(int*)b - *(int*)a;}

int main(){
  int N,i,L[200],ans=0;
  scanf("%d",&N);
  for(i=0;i<2*N;i++)scanf("%d",&L[i]);
  qsort(L, 2*N, sizeof(int), compare_int);
  for(i=0;i<N;i++)ans+=L[i*2+1];
  printf("%d\n",ans);
}```

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 <stdlib.h>
int compare_int(const void *a, const void *b){return *(int*)b - *(int*)a;}

int main(){
  int N,i,L[200],ans=0;
  scanf("%d",&N);
  for(i=0;i<2*N;i++)scanf("%d",&L[i]);
  qsort(L, 2*N, sizeof(int), compare_int);
  for(i=0;i<N;i++)ans+=L[i*2+1];
  printf("%d\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	leal	(%rax,%rax), %esi
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	%esi, %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %ecx
	cmpl	$3, %ecx
	jbe	.L13
	movl	%ecx, %edx
	leaq	20(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	52(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L7:
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rax), %edi
	cmpl	%esi, %edi
	jge	.L6
	leal	3(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	2(%rax), %edi
	cmpl	%edi, %esi
	jle	.L6
	leal	5(%rcx), %edi
	addl	$3, %eax
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%eax, %esi
	jle	.L6
	addl	$7, %ecx
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$840, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L13:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax), %esi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	leal	(%rax,%rax), %esi
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	%esi, %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %ecx
	cmpl	$3, %ecx
	jbe	.L13
	movl	%ecx, %edx
	leaq	20(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	52(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	shufps	$136, %xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
.L7:
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rax), %edi
	cmpl	%esi, %edi
	jge	.L6
	leal	3(%rcx), %edi
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	2(%rax), %edi
	cmpl	%edi, %esi
	jle	.L6
	leal	5(%rcx), %edi
	addl	$3, %eax
	movslq	%edi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%eax, %esi
	jle	.L6
	addl	$7, %ecx
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$840, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L13:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```