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 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;
}```

Assembly Code:

```assembly
	.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:
```

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	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
```assembly
	.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:
```
```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;
}```
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 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;
}```

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
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 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;
}```

Assembly Code:

```assembly
	.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:
```

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	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:
```