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>

int main()
{
	int a[102], i, j, N, cop, ans = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		scanf("%d", &a[i]);
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] < a[j]) {
				cop = a[i];
				a[i] = a[j];
				a[j] = cop;
			}
		}
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] == a[j]) {
				a[j] = -545613;
			}
		}
	}
	for (i = 0; i < N; i++) {
		if (a[i] != -545613) {
			ans++;
		}
	}
	printf("%d", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L2
	cmpl	$1, %ecx
	je	.L4
	leaq	20(%rsp), %r9
	movl	$1, %r10d
	movq	%r9, %r8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r8, %rax
	movl	%r10d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r8), %esi
	movl	(%rax), %edi
	cmpl	%edi, %esi
	jge	.L7
	movl	%edi, -4(%r8)
	movl	%esi, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L8
	addl	$1, %r10d
	addq	$4, %r8
	cmpl	%r10d, %ecx
	jne	.L5
	movq	%r9, %rsi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %rax
	movl	%edi, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %r11d
	cmpl	%r11d, -4(%rsi)
	jne	.L10
	movl	$-545613, (%rax)
.L10:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L11
	addl	$1, %edi
	addq	$4, %rsi
	cmpl	%edi, %ecx
	jne	.L21
.L4:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L23
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm0, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$16, %rax
.L14:
	movdqa	%xmm3, %xmm1
	pcmpeqd	(%rbx), %xmm1
	movq	%rax, %rbx
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L37
	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
	testb	$3, %cl
	je	.L20
.L13:
	movslq	%eax, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L16
	addl	$1, %edx
.L16:
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L20
	movslq	%esi, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L17
	addl	$1, %edx
.L17:
	addl	$2, %eax
	cmpl	%eax, %ecx
	jle	.L20
	cltq
	cmpl	$-545613, 16(%rsp,%rax,4)
	je	.L20
	addl	$1, %edx
.L20:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$440, %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
.L2:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L20
.L23:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-545613
	.long	-545613
	.long	-545613
	.long	-545613
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L2
	cmpl	$1, %ecx
	je	.L4
	leaq	20(%rsp), %r9
	movl	$1, %r10d
	movq	%r9, %r8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r8, %rax
	movl	%r10d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r8), %esi
	movl	(%rax), %edi
	cmpl	%edi, %esi
	jge	.L7
	movl	%edi, -4(%r8)
	movl	%esi, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L8
	addl	$1, %r10d
	addq	$4, %r8
	cmpl	%r10d, %ecx
	jne	.L5
	movq	%r9, %rsi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %rax
	movl	%edi, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %r11d
	cmpl	%r11d, -4(%rsi)
	jne	.L10
	movl	$-545613, (%rax)
.L10:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L11
	addl	$1, %edi
	addq	$4, %rsi
	cmpl	%edi, %ecx
	jne	.L21
.L4:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L23
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm0, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$16, %rax
.L14:
	movdqa	%xmm3, %xmm1
	pcmpeqd	(%rbx), %xmm1
	movq	%rax, %rbx
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L37
	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
	testb	$3, %cl
	je	.L20
.L13:
	movslq	%eax, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L16
	addl	$1, %edx
.L16:
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L20
	movslq	%esi, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L17
	addl	$1, %edx
.L17:
	addl	$2, %eax
	cmpl	%eax, %ecx
	jle	.L20
	cltq
	cmpl	$-545613, 16(%rsp,%rax,4)
	je	.L20
	addl	$1, %edx
.L20:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$440, %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
.L2:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L20
.L23:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-545613
	.long	-545613
	.long	-545613
	.long	-545613
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L2
	cmpl	$1, %ecx
	je	.L4
	leaq	20(%rsp), %r9
	movl	$1, %r10d
	movq	%r9, %r8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r8, %rax
	movl	%r10d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r8), %esi
	movl	(%rax), %edi
	cmpl	%edi, %esi
	jge	.L7
	movl	%edi, -4(%r8)
	movl	%esi, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L8
	addl	$1, %r10d
	addq	$4, %r8
	cmpl	%r10d, %ecx
	jne	.L5
	movq	%r9, %rsi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %rax
	movl	%edi, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %r11d
	cmpl	%r11d, -4(%rsi)
	jne	.L10
	movl	$-545613, (%rax)
.L10:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L11
	addl	$1, %edi
	addq	$4, %rsi
	cmpl	%edi, %ecx
	jne	.L21
.L4:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L23
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm0, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$16, %rax
.L14:
	movdqa	%xmm3, %xmm1
	pcmpeqd	(%rbx), %xmm1
	movq	%rax, %rbx
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L37
	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
	testb	$3, %cl
	je	.L20
.L13:
	movslq	%eax, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L16
	addl	$1, %edx
.L16:
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L20
	movslq	%esi, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L17
	addl	$1, %edx
.L17:
	addl	$2, %eax
	cmpl	%eax, %ecx
	jle	.L20
	cltq
	cmpl	$-545613, 16(%rsp,%rax,4)
	je	.L20
	addl	$1, %edx
.L20:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$440, %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
.L2:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L20
.L23:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-545613
	.long	-545613
	.long	-545613
	.long	-545613
	.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>

int main()
{
	int a[102], i, j, N, cop, ans = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		scanf("%d", &a[i]);
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] < a[j]) {
				cop = a[i];
				a[i] = a[j];
				a[j] = cop;
			}
		}
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] == a[j]) {
				a[j] = -545613;
			}
		}
	}
	for (i = 0; i < N; i++) {
		if (a[i] != -545613) {
			ans++;
		}
	}
	printf("%d", ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main()
{
	int a[102], i, j, N, cop, ans = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		scanf("%d", &a[i]);
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] < a[j]) {
				cop = a[i];
				a[i] = a[j];
				a[j] = cop;
			}
		}
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] == a[j]) {
				a[j] = -545613;
			}
		}
	}
	for (i = 0; i < N; i++) {
		if (a[i] != -545613) {
			ans++;
		}
	}
	printf("%d", 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:

7
50
30
50
100
50
80
35
 3
29
15
15
 4
10
8
14
6
 3
29
15
14
 7
50
40
91
110
50
34
59
 7
50
40
91
110
3
34
59
 3
1
1
1
 7
50
30
50
100
50
80
59
 4
10
8
16
6
 7
50
40
50
100
50
80
59

5 2 4 3 6 7 1 5 4 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>

int main()
{
	int a[102], i, j, N, cop, ans = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		scanf("%d", &a[i]);
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] < a[j]) {
				cop = a[i];
				a[i] = a[j];
				a[j] = cop;
			}
		}
	}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			if (a[i] == a[j]) {
				a[j] = -545613;
			}
		}
	}
	for (i = 0; i < N; i++) {
		if (a[i] != -545613) {
			ans++;
		}
	}
	printf("%d", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L2
	cmpl	$1, %ecx
	je	.L4
	leaq	20(%rsp), %r9
	movl	$1, %r10d
	movq	%r9, %r8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r8, %rax
	movl	%r10d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r8), %esi
	movl	(%rax), %edi
	cmpl	%edi, %esi
	jge	.L7
	movl	%edi, -4(%r8)
	movl	%esi, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L8
	addl	$1, %r10d
	addq	$4, %r8
	cmpl	%r10d, %ecx
	jne	.L5
	movq	%r9, %rsi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %rax
	movl	%edi, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %r11d
	cmpl	%r11d, -4(%rsi)
	jne	.L10
	movl	$-545613, (%rax)
.L10:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L11
	addl	$1, %edi
	addq	$4, %rsi
	cmpl	%edi, %ecx
	jne	.L21
.L4:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L23
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm0, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$16, %rax
.L14:
	movdqa	%xmm3, %xmm1
	pcmpeqd	(%rbx), %xmm1
	movq	%rax, %rbx
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L37
	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
	testb	$3, %cl
	je	.L20
.L13:
	movslq	%eax, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L16
	addl	$1, %edx
.L16:
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L20
	movslq	%esi, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L17
	addl	$1, %edx
.L17:
	addl	$2, %eax
	cmpl	%eax, %ecx
	jle	.L20
	cltq
	cmpl	$-545613, 16(%rsp,%rax,4)
	je	.L20
	addl	$1, %edx
.L20:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$440, %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
.L2:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L20
.L23:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-545613
	.long	-545613
	.long	-545613
	.long	-545613
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %r13
	cmpl	%r12d, %ecx
	jg	.L3
	testl	%ecx, %ecx
	jle	.L2
	cmpl	$1, %ecx
	je	.L4
	leaq	20(%rsp), %r9
	movl	$1, %r10d
	movq	%r9, %r8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r8, %rax
	movl	%r10d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r8), %esi
	movl	(%rax), %edi
	cmpl	%edi, %esi
	jge	.L7
	movl	%edi, -4(%r8)
	movl	%esi, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L8
	addl	$1, %r10d
	addq	$4, %r8
	cmpl	%r10d, %ecx
	jne	.L5
	movq	%r9, %rsi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %rax
	movl	%edi, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %r11d
	cmpl	%r11d, -4(%rsi)
	jne	.L10
	movl	$-545613, (%rax)
.L10:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %ecx
	jg	.L11
	addl	$1, %edi
	addq	$4, %rsi
	cmpl	%edi, %ecx
	jne	.L21
.L4:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L23
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm0, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%rbx), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$16, %rax
.L14:
	movdqa	%xmm3, %xmm1
	pcmpeqd	(%rbx), %xmm1
	movq	%rax, %rbx
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L37
	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
	testb	$3, %cl
	je	.L20
.L13:
	movslq	%eax, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L16
	addl	$1, %edx
.L16:
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L20
	movslq	%esi, %rsi
	cmpl	$-545613, 16(%rsp,%rsi,4)
	je	.L17
	addl	$1, %edx
.L17:
	addl	$2, %eax
	cmpl	%eax, %ecx
	jle	.L20
	cltq
	cmpl	$-545613, 16(%rsp,%rax,4)
	je	.L20
	addl	$1, %edx
.L20:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$440, %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
.L2:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L20
.L23:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-545613
	.long	-545613
	.long	-545613
	.long	-545613
	.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:
```