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 cmp(const void *a,const void *b)
{
	return *(int *)a-*(int *)b;
}
int main()
{
	int n,a[100005]={},flag=0,count=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
		scanf("%d",&a[i]);
	qsort(a,n,sizeof(a[0]),cmp);
	for(int i=0;i<n-1;i++){ //寻找重复的牌的数量
		if(a[i]==a[i+1]){
			flag=1;
			count++;
		}
		else flag=0;
	}
	if(count%2) count++; //如果重复的牌为单数必须再弃一张正常牌
	printf("%d\n",n-count); //贪心策略 每次都弃重复的牌即可
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400032(%rbp), %rax
	movl	$400020, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400036(%rbp)
	movl	$0, -400048(%rbp)
	leaq	-400052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400044(%rbp)
	jmp	.L4
.L5:
	leaq	-400032(%rbp), %rdx
	movl	-400044(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400044(%rbp)
.L4:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400044(%rbp)
	jl	.L5
	movl	-400052(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-400032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -400040(%rbp)
	jmp	.L6
.L9:
	movl	-400040(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %edx
	movl	-400040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	$1, -400036(%rbp)
	addl	$1, -400048(%rbp)
	jmp	.L8
.L7:
	movl	$0, -400036(%rbp)
.L8:
	addl	$1, -400040(%rbp)
.L6:
	movl	-400052(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400040(%rbp)
	jl	.L9
	movl	-400048(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	addl	$1, -400048(%rbp)
.L10:
	movl	-400052(%rbp), %eax
	subl	-400048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400096
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	leal	-1(%rdx), %ecx
	testl	%ecx, %ecx
	jle	.L15
	leal	-2(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%ecx, %esi
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm1
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L9
.L7:
	leal	1(%rsi), %edi
	movslq	%esi, %r9
	movslq	%edi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, 16(%rsp,%r9,4)
	je	.L22
.L10:
	cmpl	%ecx, %edi
	jge	.L9
	leal	2(%rsi), %edi
	movslq	%edi, %r9
	movl	16(%rsp,%r9,4), %r9d
	cmpl	%r9d, %r8d
	je	.L23
.L11:
	cmpl	%edi, %ecx
	jle	.L9
	addl	$3, %esi
	movslq	%esi, %rsi
	cmpl	%r9d, 16(%rsp,%rsi,4)
	je	.L24
.L9:
	movl	%eax, %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %eax
.L6:
	subl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$400056, %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
.L22:
	.cfi_restore_state
	addl	$1, %eax
	jmp	.L10
.L23:
	addl	$1, %eax
	jmp	.L11
.L24:
	addl	$1, %eax
	jmp	.L9
.L15:
	xorl	%eax, %eax
	jmp	.L6
.L16:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L7
.L25:
	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400096
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%rbx, %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	leal	-1(%rdx), %ecx
	testl	%ecx, %ecx
	jle	.L15
	leal	-2(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%ecx, %esi
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm1
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L9
.L7:
	leal	1(%rsi), %edi
	movslq	%esi, %r9
	movslq	%edi, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, 16(%rsp,%r9,4)
	je	.L22
.L10:
	cmpl	%ecx, %edi
	jge	.L9
	leal	2(%rsi), %edi
	movslq	%edi, %r9
	movl	16(%rsp,%r9,4), %r9d
	cmpl	%r9d, %r8d
	je	.L23
.L11:
	cmpl	%edi, %ecx
	jle	.L9
	addl	$3, %esi
	movslq	%esi, %rsi
	cmpl	%r9d, 16(%rsp,%rsi,4)
	je	.L24
.L9:
	movl	%eax, %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %eax
.L6:
	subl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$400056, %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
.L22:
	.cfi_restore_state
	addl	$1, %eax
	jmp	.L10
.L23:
	addl	$1, %eax
	jmp	.L11
.L24:
	addl	$1, %eax
	jmp	.L9
.L15:
	xorl	%eax, %eax
	jmp	.L6
.L16:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L7
.L25:
	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:

#include<stdio.h>
#include<stdlib.h>
int cmp(const void *a,const void *b)
{
	return *(int *)a-*(int *)b;
}
int main()
{
	int n,a[100005]={},flag=0,count=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
		scanf("%d",&a[i]);
	qsort(a,n,sizeof(a[0]),cmp);
	for(int i=0;i<n-1;i++){ //寻找重复的牌的数量
		if(a[i]==a[i+1]){
			flag=1;
			count++;
		}
		else flag=0;
	}
	if(count%2) count++; //如果重复的牌为单数必须再弃一张正常牌
	printf("%d\n",n-count); //贪心策略 每次都弃重复的牌即可
	return 0;
}
5
1 2 0 3 7
 15
1 3 5 2 1 3 2 0 8 6 2 6 11 1 1
 5
2 2 -1 9 16
 15
1 12 6 0 1 2 2 0 8 6 4 6 21 1 3
 15
1 2 9 -1 0 12 1 -1 1 11 -2 4 13 4 3
 5
-4 -4 0 0 0
 15
0 -4 1 8 0 1 -1 -25 49 -3 -35 -2 -8 2 -9
 5
1 2 0 3 11
 15
1 3 5 1 1 3 2 0 8 6 2 6 11 1 1
 5
1 2 0 3 18

5
 7
 3
 9
 11
 1
 13
 5
 7
 5

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 cmp(const void *a,const void *b)
{
	return *(int *)a-*(int *)b;
}
int main()
{
	int n,a[100005]={},flag=0,count=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
		scanf("%d",&a[i]);
	qsort(a,n,sizeof(a[0]),cmp);
	for(int i=0;i<n-1;i++){ //寻找重复的牌的数量
		if(a[i]==a[i+1]){
			flag=1;
			count++;
		}
		else flag=0;
	}
	if(count%2) count++; //如果重复的牌为单数必须再弃一张正常牌
	printf("%d\n",n-count); //贪心策略 每次都弃重复的牌即可
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400032(%rbp), %rax
	movl	$400020, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400036(%rbp)
	movl	$0, -400048(%rbp)
	leaq	-400052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400044(%rbp)
	jmp	.L4
.L5:
	leaq	-400032(%rbp), %rdx
	movl	-400044(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400044(%rbp)
.L4:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400044(%rbp)
	jl	.L5
	movl	-400052(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-400032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -400040(%rbp)
	jmp	.L6
.L9:
	movl	-400040(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %edx
	movl	-400040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	$1, -400036(%rbp)
	addl	$1, -400048(%rbp)
	jmp	.L8
.L7:
	movl	$0, -400036(%rbp)
.L8:
	addl	$1, -400040(%rbp)
.L6:
	movl	-400052(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400040(%rbp)
	jl	.L9
	movl	-400048(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	addl	$1, -400048(%rbp)
.L10:
	movl	-400052(%rbp), %eax
	subl	-400048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	cmp
	.type	cmp, @function
cmp:
.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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400032(%rbp), %rax
	movl	$400020, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -400036(%rbp)
	movl	$0, -400048(%rbp)
	leaq	-400052(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400044(%rbp)
	jmp	.L4
.L5:
	leaq	-400032(%rbp), %rdx
	movl	-400044(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400044(%rbp)
.L4:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400044(%rbp)
	jl	.L5
	movl	-400052(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-400032(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -400040(%rbp)
	jmp	.L6
.L9:
	movl	-400040(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %edx
	movl	-400040(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	$1, -400036(%rbp)
	addl	$1, -400048(%rbp)
	jmp	.L8
.L7:
	movl	$0, -400036(%rbp)
.L8:
	addl	$1, -400040(%rbp)
.L6:
	movl	-400052(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -400040(%rbp)
	jl	.L9
	movl	-400048(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	addl	$1, -400048(%rbp)
.L10:
	movl	-400052(%rbp), %eax
	subl	-400048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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:
