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>

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L2:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L8:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L5
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-432(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-428(%rbp), %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
.L6:
	addl	$1, -428(%rbp)
.L5:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	addl	$1, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L8
	movl	$0, -432(%rbp)
	jmp	.L9
.L13:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L10
.L12:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-428(%rbp), %eax
	cltq
	movl	$-545613, -416(%rbp,%rax,4)
.L11:
	addl	$1, -428(%rbp)
.L10:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	addl	$1, -432(%rbp)
.L9:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L13
	movl	$0, -432(%rbp)
	jmp	.L14
.L16:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$-545613, %eax
	je	.L15
	addl	$1, -424(%rbp)
.L15:
	addl	$1, -432(%rbp)
.L14:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L16
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.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
	.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:

#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);
}
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 unoptimized 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);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L2:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L8:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L5
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-432(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-428(%rbp), %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
.L6:
	addl	$1, -428(%rbp)
.L5:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	addl	$1, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L8
	movl	$0, -432(%rbp)
	jmp	.L9
.L13:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L10
.L12:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-428(%rbp), %eax
	cltq
	movl	$-545613, -416(%rbp,%rax,4)
.L11:
	addl	$1, -428(%rbp)
.L10:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	addl	$1, -432(%rbp)
.L9:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L13
	movl	$0, -432(%rbp)
	jmp	.L14
.L16:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$-545613, %eax
	je	.L15
	addl	$1, -424(%rbp)
.L15:
	addl	$1, -432(%rbp)
.L14:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L16
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L2:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L8:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L5
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-432(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-428(%rbp), %eax
	cltq
	movl	-420(%rbp), %edx
	movl	%edx, -416(%rbp,%rax,4)
.L6:
	addl	$1, -428(%rbp)
.L5:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	addl	$1, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L8
	movl	$0, -432(%rbp)
	jmp	.L9
.L13:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L10
.L12:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-428(%rbp), %eax
	cltq
	movl	$-545613, -416(%rbp,%rax,4)
.L11:
	addl	$1, -428(%rbp)
.L10:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	addl	$1, -432(%rbp)
.L9:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L13
	movl	$0, -432(%rbp)
	jmp	.L14
.L16:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$-545613, %eax
	je	.L15
	addl	$1, -424(%rbp)
.L15:
	addl	$1, -432(%rbp)
.L14:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L16
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
