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 <string.h>
#include <math.h>

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

int main(void){
  char buf[1024] = { 0 };
  int num[128] = { 0 };
  char *tok = NULL;
  int N = 0;
  
  //入力読み込み
  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d", &N);
  
  fgets(buf, sizeof(buf), stdin);
  tok = strtok(buf, " ");
  int count = 0;
  while(tok != NULL && count < N){
    num[count++] = atoi(tok);
    tok = strtok(NULL,  " ");
  }
  
  qsort(num, N, sizeof(int), compare_int);
  //for(int i = 0; i < N; i++) printf("%d\n", num[i]);
  int score1 = 0;
  int score2 = 0;
  for(int i = 0; i < N; i++){
    if(i % 2 == 0) score1 += num[i];
    else score2 += num[i];
  }
  printf("%d\n", score1 - score2);
  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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%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	" "
.LC2:
	.string	"%d\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	%rbx
	subq	$1592, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -1056(%rbp)
	movq	$0, -1048(%rbp)
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$126, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-1568(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1576(%rbp)
	movl	$0, -1596(%rbp)
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1596(%rbp), %rdx
	leaq	-1056(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1056(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
	movl	$0, -1592(%rbp)
	jmp	.L4
.L6:
	movl	-1592(%rbp), %ebx
	leal	1(%rbx), %eax
	movl	%eax, -1592(%rbp)
	movq	-1576(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movslq	%ebx, %rdx
	movl	%eax, -1568(%rbp,%rdx,4)
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
.L4:
	cmpq	$0, -1576(%rbp)
	je	.L5
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1592(%rbp)
	jl	.L6
.L5:
	movl	-1596(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1568(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1588(%rbp)
	movl	$0, -1584(%rbp)
	movl	$0, -1580(%rbp)
	jmp	.L7
.L10:
	movl	-1580(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1588(%rbp)
	jmp	.L9
.L8:
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1584(%rbp)
.L9:
	addl	$1, -1580(%rbp)
.L7:
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1580(%rbp)
	jl	.L10
	movl	-1588(%rbp), %eax
	subl	-1584(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	" "
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$126, %ecx
	pxor	%xmm0, %xmm0
	movl	$1024, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$1576, %rsp
	.cfi_def_cfa_offset 1616
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1560(%rsp)
	xorl	%eax, %eax
	leaq	544(%rsp), %rdi
	leaq	16(%rsp), %rbp
	movaps	%xmm0, 528(%rsp)
	leaq	528(%rsp), %r13
	movl	$0, 12(%rsp)
	rep stosq
	movl	$64, %ecx
	movq	%rbp, %rdi
	rep stosq
	movq	%r13, %rdi
	call	fgets@PLT
	leaq	12(%rsp), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movq	%r13, %rdi
	movq	%r12, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L4
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edx
	xorl	%esi, %esi
	call	strtol@PLT
	xorl	%edi, %edi
	movq	%r12, %rsi
	movl	%eax, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L7
.L4:
	cmpl	%ebx, 12(%rsp)
	jg	.L8
.L7:
	movslq	12(%rsp), %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	xorl	%eax, %eax
	xorl	%edx, %edx
	testl	%ecx, %ecx
	jle	.L6
	leal	-1(%rcx), %eax
	cmpl	$3, %eax
	jbe	.L22
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	movdqa	.LC0(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm7
	shrl	$2, %eax
	movdqa	%xmm2, %xmm1
	movdqa	%xmm2, %xmm5
	movq	%rbp, %rdi
	subl	$1, %eax
	movdqa	.LC4(%rip), %xmm6
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	movdqa	(%rdi), %xmm4
	addq	$16, %rdi
	paddd	%xmm7, %xmm3
	pand	%xmm6, %xmm0
	pcmpeqd	%xmm5, %xmm0
	pand	%xmm0, %xmm4
	pandn	-16(%rdi), %xmm0
	paddd	%xmm4, %xmm1
	paddd	%xmm0, %xmm2
	cmpq	%rdi, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$3, %cl
	je	.L6
.L9:
	movslq	%esi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rsi), %edi
	cmpl	%ecx, %edi
	jge	.L6
	testb	$1, %dil
	movslq	%edi, %rdi
	je	.L30
	addl	16(%rsp,%rdi,4), %eax
.L14:
	leal	2(%rsi), %edi
	cmpl	%ecx, %edi
	jge	.L6
	movslq	%edi, %rdi
	addl	$3, %esi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%esi, %ecx
	jle	.L6
	testb	$1, %sil
	movslq	%esi, %rsi
	je	.L17
	addl	16(%rsp,%rsi,4), %eax
.L6:
	subl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1560(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1576, %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
.L30:
	.cfi_restore_state
	addl	16(%rsp,%rdi,4), %edx
	jmp	.L14
.L17:
	addl	16(%rsp,%rsi,4), %edx
	jmp	.L6
.L22:
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L9
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	" "
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$126, %ecx
	pxor	%xmm0, %xmm0
	movl	$1024, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$1576, %rsp
	.cfi_def_cfa_offset 1616
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1560(%rsp)
	xorl	%eax, %eax
	leaq	544(%rsp), %rdi
	leaq	16(%rsp), %rbp
	movaps	%xmm0, 528(%rsp)
	leaq	528(%rsp), %r13
	movl	$0, 12(%rsp)
	rep stosq
	movl	$64, %ecx
	movq	%rbp, %rdi
	rep stosq
	movq	%r13, %rdi
	call	fgets@PLT
	leaq	12(%rsp), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movq	%r13, %rdi
	movq	%r12, %rsi
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L4
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$10, %edx
	xorl	%esi, %esi
	call	strtol@PLT
	xorl	%edi, %edi
	movq	%r12, %rsi
	movl	%eax, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L7
.L4:
	cmpl	%ebx, 12(%rsp)
	jg	.L8
.L7:
	movslq	12(%rsp), %rsi
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	xorl	%eax, %eax
	xorl	%edx, %edx
	testl	%ecx, %ecx
	jle	.L6
	leal	-1(%rcx), %eax
	cmpl	$3, %eax
	jbe	.L22
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	movdqa	.LC0(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm7
	shrl	$2, %eax
	movdqa	%xmm2, %xmm1
	movdqa	%xmm2, %xmm5
	movq	%rbp, %rdi
	subl	$1, %eax
	movdqa	.LC4(%rip), %xmm6
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	movdqa	(%rdi), %xmm4
	addq	$16, %rdi
	paddd	%xmm7, %xmm3
	pand	%xmm6, %xmm0
	pcmpeqd	%xmm5, %xmm0
	pand	%xmm0, %xmm4
	pandn	-16(%rdi), %xmm0
	paddd	%xmm4, %xmm1
	paddd	%xmm0, %xmm2
	cmpq	%rdi, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$3, %cl
	je	.L6
.L9:
	movslq	%esi, %rdi
	addl	16(%rsp,%rdi,4), %edx
	leal	1(%rsi), %edi
	cmpl	%ecx, %edi
	jge	.L6
	testb	$1, %dil
	movslq	%edi, %rdi
	je	.L30
	addl	16(%rsp,%rdi,4), %eax
.L14:
	leal	2(%rsi), %edi
	cmpl	%ecx, %edi
	jge	.L6
	movslq	%edi, %rdi
	addl	$3, %esi
	addl	16(%rsp,%rdi,4), %edx
	cmpl	%esi, %ecx
	jle	.L6
	testb	$1, %sil
	movslq	%esi, %rsi
	je	.L17
	addl	16(%rsp,%rsi,4), %eax
.L6:
	subl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1560(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1576, %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
.L30:
	.cfi_restore_state
	addl	16(%rsp,%rdi,4), %edx
	jmp	.L14
.L17:
	addl	16(%rsp,%rsi,4), %edx
	jmp	.L6
.L22:
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L9
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.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>
#include <string.h>
#include <math.h>

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

int main(void){
  char buf[1024] = { 0 };
  int num[128] = { 0 };
  char *tok = NULL;
  int N = 0;
  
  //入力読み込み
  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d", &N);
  
  fgets(buf, sizeof(buf), stdin);
  tok = strtok(buf, " ");
  int count = 0;
  while(tok != NULL && count < N){
    num[count++] = atoi(tok);
    tok = strtok(NULL,  " ");
  }
  
  qsort(num, N, sizeof(int), compare_int);
  //for(int i = 0; i < N; i++) printf("%d\n", num[i]);
  int score1 = 0;
  int score2 = 0;
  for(int i = 0; i < N; i++){
    if(i % 2 == 0) score1 += num[i];
    else score2 += num[i];
  }
  printf("%d\n", score1 - score2);
  return 0;
}
4
20 18 2 12
 2
2 1
 3
3 7 4
 4
20 1 2 12
 2
2 0
 3
3 9 4
 4
20 1 4 12
 2
2 -1
 2
4 -1
 4
20 2 0 12

12
 1
 6
 9
 2
 8
 11
 3
 5
 10

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 <string.h>
#include <math.h>

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

int main(void){
  char buf[1024] = { 0 };
  int num[128] = { 0 };
  char *tok = NULL;
  int N = 0;
  
  //入力読み込み
  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d", &N);
  
  fgets(buf, sizeof(buf), stdin);
  tok = strtok(buf, " ");
  int count = 0;
  while(tok != NULL && count < N){
    num[count++] = atoi(tok);
    tok = strtok(NULL,  " ");
  }
  
  qsort(num, N, sizeof(int), compare_int);
  //for(int i = 0; i < N; i++) printf("%d\n", num[i]);
  int score1 = 0;
  int score2 = 0;
  for(int i = 0; i < N; i++){
    if(i % 2 == 0) score1 += num[i];
    else score2 += num[i];
  }
  printf("%d\n", score1 - score2);
  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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%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	" "
.LC2:
	.string	"%d\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	%rbx
	subq	$1592, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -1056(%rbp)
	movq	$0, -1048(%rbp)
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$126, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-1568(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1576(%rbp)
	movl	$0, -1596(%rbp)
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1596(%rbp), %rdx
	leaq	-1056(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1056(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
	movl	$0, -1592(%rbp)
	jmp	.L4
.L6:
	movl	-1592(%rbp), %ebx
	leal	1(%rbx), %eax
	movl	%eax, -1592(%rbp)
	movq	-1576(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movslq	%ebx, %rdx
	movl	%eax, -1568(%rbp,%rdx,4)
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
.L4:
	cmpq	$0, -1576(%rbp)
	je	.L5
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1592(%rbp)
	jl	.L6
.L5:
	movl	-1596(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1568(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1588(%rbp)
	movl	$0, -1584(%rbp)
	movl	$0, -1580(%rbp)
	jmp	.L7
.L10:
	movl	-1580(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1588(%rbp)
	jmp	.L9
.L8:
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1584(%rbp)
.L9:
	addl	$1, -1580(%rbp)
.L7:
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1580(%rbp)
	jl	.L10
	movl	-1588(%rbp), %eax
	subl	-1584(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%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	" "
.LC2:
	.string	"%d\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	%rbx
	subq	$1592, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movq	$0, -1056(%rbp)
	movq	$0, -1048(%rbp)
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$126, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-1568(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1576(%rbp)
	movl	$0, -1596(%rbp)
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1596(%rbp), %rdx
	leaq	-1056(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movq	stdin(%rip), %rdx
	leaq	-1056(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1056(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
	movl	$0, -1592(%rbp)
	jmp	.L4
.L6:
	movl	-1592(%rbp), %ebx
	leal	1(%rbx), %eax
	movl	%eax, -1592(%rbp)
	movq	-1576(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movslq	%ebx, %rdx
	movl	%eax, -1568(%rbp,%rdx,4)
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -1576(%rbp)
.L4:
	cmpq	$0, -1576(%rbp)
	je	.L5
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1592(%rbp)
	jl	.L6
.L5:
	movl	-1596(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-1568(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -1588(%rbp)
	movl	$0, -1584(%rbp)
	movl	$0, -1580(%rbp)
	jmp	.L7
.L10:
	movl	-1580(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1588(%rbp)
	jmp	.L9
.L8:
	movl	-1580(%rbp), %eax
	cltq
	movl	-1568(%rbp,%rax,4), %eax
	addl	%eax, -1584(%rbp)
.L9:
	addl	$1, -1580(%rbp)
.L7:
	movl	-1596(%rbp), %eax
	cmpl	%eax, -1580(%rbp)
	jl	.L10
	movl	-1588(%rbp), %eax
	subl	-1584(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.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:
