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 k,j,flag,n,i,m[200][3]={{0}},p[200]={0};

    scanf("%d",&n);
    for(i=0;i<n;i++)for(j=0;j<3;j++)scanf("%d",&m[i][j]);

    for(j=0;j<3;j++){
        for(i=0;i<n;i++){
            if(m[i][j]==0)continue;
            for(k=i+1,flag=0;k<n;k++){
                if(m[i][j]==m[k][j]){
                    flag=1;
                    m[k][j]=0;
                }
            }
            if(flag)m[i][j]=0;
        }
    }
    for(i=0;i<n;i++){
        for(j=0;j<3;j++){
            p[i]+=m[i][j];
        }
    }
    for(i=0;i<n;i++)printf("%d\n",p[i]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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	$3248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2416(%rbp), %rdx
	movl	$0, %eax
	movl	$300, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3216(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3220(%rbp)
	jmp	.L2
.L5:
	movl	$0, -3228(%rbp)
	jmp	.L3
.L4:
	leaq	-2416(%rbp), %rcx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3228(%rbp)
.L3:
	cmpl	$2, -3228(%rbp)
	jle	.L4
	addl	$1, -3220(%rbp)
.L2:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L5
	movl	$0, -3228(%rbp)
	jmp	.L6
.L14:
	movl	$0, -3220(%rbp)
	jmp	.L7
.L13:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L23
	movl	-3220(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3232(%rbp)
	movl	$0, -3224(%rbp)
	jmp	.L10
.L12:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	$1, -3224(%rbp)
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
.L11:
	addl	$1, -3232(%rbp)
.L10:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3232(%rbp)
	jl	.L12
	cmpl	$0, -3224(%rbp)
	je	.L9
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -3220(%rbp)
.L7:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L13
	addl	$1, -3228(%rbp)
.L6:
	cmpl	$2, -3228(%rbp)
	jle	.L14
	movl	$0, -3220(%rbp)
	jmp	.L15
.L18:
	movl	$0, -3228(%rbp)
	jmp	.L16
.L17:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3220(%rbp), %eax
	cltq
	movl	%edx, -3216(%rbp,%rax,4)
	addl	$1, -3228(%rbp)
.L16:
	cmpl	$2, -3228(%rbp)
	jle	.L17
	addl	$1, -3220(%rbp)
.L15:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L18
	movl	$0, -3220(%rbp)
	jmp	.L19
.L20:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3220(%rbp)
.L19:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$300, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3232, %rsp
	.cfi_def_cfa_offset 3280
	movq	%fs:40, %rax
	movq	%rax, 3224(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %rsi
	leaq	816(%rsp), %rbx
	movq	%rbx, %rdi
	rep stosq
	movl	$100, %ecx
	movq	%rbp, %rdi
	rep stosq
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L16
	movq	%rbx, %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	leaq	4(%r12), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%r12), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r10d
	addq	$12, %r12
	cmpl	%r14d, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L16
	movq	%rbx, %r14
	xorl	%r11d, %r11d
	leal	-1(%r10), %r12d
	leaq	828(%rsp), %r13
.L11:
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	jle	.L6
.L10:
	addq	$1, %r8
	addq	$12, %rcx
.L13:
	movl	(%rcx), %edx
	addl	$1, %edi
	testl	%edx, %edx
	je	.L5
	cmpl	%edi, %r10d
	jle	.L6
	movl	%r12d, %eax
	xorl	%r9d, %r9d
	subl	%edi, %eax
	addq	%r8, %rax
	leaq	(%rax,%rax,2), %rax
	addq	%r11, %rax
	leaq	0(%r13,%rax,4), %rsi
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	movl	(%rcx), %edx
.L9:
	cmpl	%edx, 12(%rax)
	jne	.L7
	movl	$0, 12(%rax)
	movl	$1, %r9d
.L7:
	addq	$12, %rax
	cmpq	%rax, %rsi
	jne	.L30
	testl	%r9d, %r9d
	je	.L10
	movl	$0, (%rcx)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %r11
	addq	$4, %r14
	cmpq	$3, %r11
	jne	.L11
	movq	%rbp, %rdx
	leaq	20(%rsp,%r12,4), %rcx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%rbx), %eax
	addl	(%rdx), %eax
	addq	$4, %rdx
	addq	$12, %rbx
	addl	-8(%rbx), %eax
	addl	-4(%rbx), %eax
	movl	%eax, -4(%rdx)
	cmpq	%rdx, %rcx
	jne	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L15
.L16:
	movq	3224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$3232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$300, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3232, %rsp
	.cfi_def_cfa_offset 3280
	movq	%fs:40, %rax
	movq	%rax, 3224(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %rsi
	leaq	816(%rsp), %rbx
	movq	%rbx, %rdi
	rep stosq
	movl	$100, %ecx
	movq	%rbp, %rdi
	rep stosq
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L16
	movq	%rbx, %r12
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	leaq	4(%r12), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%r12), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r10d
	addq	$12, %r12
	cmpl	%r14d, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L16
	movq	%rbx, %r14
	xorl	%r11d, %r11d
	leal	-1(%r10), %r12d
	leaq	828(%rsp), %r13
.L11:
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	jle	.L6
.L10:
	addq	$1, %r8
	addq	$12, %rcx
.L13:
	movl	(%rcx), %edx
	addl	$1, %edi
	testl	%edx, %edx
	je	.L5
	cmpl	%edi, %r10d
	jle	.L6
	movl	%r12d, %eax
	xorl	%r9d, %r9d
	subl	%edi, %eax
	addq	%r8, %rax
	leaq	(%rax,%rax,2), %rax
	addq	%r11, %rax
	leaq	0(%r13,%rax,4), %rsi
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	movl	(%rcx), %edx
.L9:
	cmpl	%edx, 12(%rax)
	jne	.L7
	movl	$0, 12(%rax)
	movl	$1, %r9d
.L7:
	addq	$12, %rax
	cmpq	%rax, %rsi
	jne	.L30
	testl	%r9d, %r9d
	je	.L10
	movl	$0, (%rcx)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %r11
	addq	$4, %r14
	cmpq	$3, %r11
	jne	.L11
	movq	%rbp, %rdx
	leaq	20(%rsp,%r12,4), %rcx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%rbx), %eax
	addl	(%rdx), %eax
	addq	$4, %rdx
	addq	$12, %rbx
	addl	-8(%rbx), %eax
	addl	-4(%rbx), %eax
	movl	%eax, -4(%rdx)
	cmpq	%rdx, %rcx
	jne	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L15
.L16:
	movq	3224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$3232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

int main(){
    int k,j,flag,n,i,m[200][3]={{0}},p[200]={0};

    scanf("%d",&n);
    for(i=0;i<n;i++)for(j=0;j<3;j++)scanf("%d",&m[i][j]);

    for(j=0;j<3;j++){
        for(i=0;i<n;i++){
            if(m[i][j]==0)continue;
            for(k=i+1,flag=0;k<n;k++){
                if(m[i][j]==m[k][j]){
                    flag=1;
                    m[k][j]=0;
                }
            }
            if(flag)m[i][j]=0;
        }
    }
    for(i=0;i<n;i++){
        for(j=0;j<3;j++){
            p[i]+=m[i][j];
        }
    }
    for(i=0;i<n;i++)printf("%d\n",p[i]);
    return 0;
}
5
100 99 98
100 97 68
63 89 63
99 99 99
89 97 98
 5
100 99 98
100 97 68
63 89 63
68 99 99
89 97 98
 5
100 99 98
100 97 92
63 53 63
99 99 99
89 97 98
 5
100 99 98
100 97 68
63 89 63
68 99 79
89 97 98
 5
100 99 98
100 97 92
63 32 63
99 99 99
89 97 98
 5
100 99 98
100 97 68
63 89 25
68 99 79
89 97 98
 5
100 99 98
000 97 92
63 32 63
99 99 99
89 97 98
 5
100 1 98
100 97 68
63 89 25
68 99 79
89 97 98
 5
100 1 98
100 97 68
44 89 25
68 99 79
89 97 98
 5
100 1 98
100 97 68
16 89 25
68 99 79
89 97 98

0
68
215
198
89
 0
68
215
167
89
 0
92
179
198
89
 0
68
215
147
89
 0
92
158
198
89
 0
68
177
147
89
 100
92
158
198
89
 1
68
177
246
89
 1
68
158
246
89
 1
68
130
246
89

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 k,j,flag,n,i,m[200][3]={{0}},p[200]={0};

    scanf("%d",&n);
    for(i=0;i<n;i++)for(j=0;j<3;j++)scanf("%d",&m[i][j]);

    for(j=0;j<3;j++){
        for(i=0;i<n;i++){
            if(m[i][j]==0)continue;
            for(k=i+1,flag=0;k<n;k++){
                if(m[i][j]==m[k][j]){
                    flag=1;
                    m[k][j]=0;
                }
            }
            if(flag)m[i][j]=0;
        }
    }
    for(i=0;i<n;i++){
        for(j=0;j<3;j++){
            p[i]+=m[i][j];
        }
    }
    for(i=0;i<n;i++)printf("%d\n",p[i]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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	$3248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2416(%rbp), %rdx
	movl	$0, %eax
	movl	$300, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3216(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3220(%rbp)
	jmp	.L2
.L5:
	movl	$0, -3228(%rbp)
	jmp	.L3
.L4:
	leaq	-2416(%rbp), %rcx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3228(%rbp)
.L3:
	cmpl	$2, -3228(%rbp)
	jle	.L4
	addl	$1, -3220(%rbp)
.L2:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L5
	movl	$0, -3228(%rbp)
	jmp	.L6
.L14:
	movl	$0, -3220(%rbp)
	jmp	.L7
.L13:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L23
	movl	-3220(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3232(%rbp)
	movl	$0, -3224(%rbp)
	jmp	.L10
.L12:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	$1, -3224(%rbp)
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
.L11:
	addl	$1, -3232(%rbp)
.L10:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3232(%rbp)
	jl	.L12
	cmpl	$0, -3224(%rbp)
	je	.L9
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -3220(%rbp)
.L7:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L13
	addl	$1, -3228(%rbp)
.L6:
	cmpl	$2, -3228(%rbp)
	jle	.L14
	movl	$0, -3220(%rbp)
	jmp	.L15
.L18:
	movl	$0, -3228(%rbp)
	jmp	.L16
.L17:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3220(%rbp), %eax
	cltq
	movl	%edx, -3216(%rbp,%rax,4)
	addl	$1, -3228(%rbp)
.L16:
	cmpl	$2, -3228(%rbp)
	jle	.L17
	addl	$1, -3220(%rbp)
.L15:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L18
	movl	$0, -3220(%rbp)
	jmp	.L19
.L20:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3220(%rbp)
.L19:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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"
.LC1:
	.string	"%d\n"
	.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	$3248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2416(%rbp), %rdx
	movl	$0, %eax
	movl	$300, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3216(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3220(%rbp)
	jmp	.L2
.L5:
	movl	$0, -3228(%rbp)
	jmp	.L3
.L4:
	leaq	-2416(%rbp), %rcx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3228(%rbp)
.L3:
	cmpl	$2, -3228(%rbp)
	jle	.L4
	addl	$1, -3220(%rbp)
.L2:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L5
	movl	$0, -3228(%rbp)
	jmp	.L6
.L14:
	movl	$0, -3220(%rbp)
	jmp	.L7
.L13:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L23
	movl	-3220(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3232(%rbp)
	movl	$0, -3224(%rbp)
	jmp	.L10
.L12:
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2416(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	$1, -3224(%rbp)
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3232(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
.L11:
	addl	$1, -3232(%rbp)
.L10:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3232(%rbp)
	jl	.L12
	cmpl	$0, -3224(%rbp)
	je	.L9
	movl	-3228(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -2416(%rbp,%rax,4)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -3220(%rbp)
.L7:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L13
	addl	$1, -3228(%rbp)
.L6:
	cmpl	$2, -3228(%rbp)
	jle	.L14
	movl	$0, -3220(%rbp)
	jmp	.L15
.L18:
	movl	$0, -3228(%rbp)
	jmp	.L16
.L17:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %ecx
	movl	-3228(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3220(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3220(%rbp), %eax
	cltq
	movl	%edx, -3216(%rbp,%rax,4)
	addl	$1, -3228(%rbp)
.L16:
	cmpl	$2, -3228(%rbp)
	jle	.L17
	addl	$1, -3220(%rbp)
.L15:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L18
	movl	$0, -3220(%rbp)
	jmp	.L19
.L20:
	movl	-3220(%rbp), %eax
	cltq
	movl	-3216(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3220(%rbp)
.L19:
	movl	-3236(%rbp), %eax
	cmpl	%eax, -3220(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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:
