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 n,i,j,d[200][3];
  int s[200]={0};
  scanf("%d",&n);
  for(i=0;i<n*3;i++)scanf("%d",&d[i/3][i%3]);
  for(i=0;i<3;i++){
    char c[101]={0};
    for(j=0;j<n;j++)c[d[j][i]]++;
    for(j=0;j<n;j++){
      if(c[d[j][i]]==1)s[j]+=d[j][i];
    }
  }
  for(i=0;i<n;i++)printf("%d\n",s[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	$3328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3312(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3324(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3320(%rbp)
	jmp	.L2
.L3:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-3320(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leaq	-2512(%rbp), %rcx
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rdi, %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, -3320(%rbp)
.L2:
	movl	-3324(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L3
	movl	$0, -3320(%rbp)
	jmp	.L4
.L10:
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movb	$0, -12(%rbp)
	movl	$0, -3316(%rbp)
	jmp	.L5
.L6:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movzbl	-112(%rbp,%rdx), %edx
	addl	$1, %edx
	cltq
	movb	%dl, -112(%rbp,%rax)
	addl	$1, -3316(%rbp)
.L5:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L6
	movl	$0, -3316(%rbp)
	jmp	.L7
.L9:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$1, %al
	jne	.L8
	movl	-3316(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %ecx
	movl	-3320(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2512(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3316(%rbp), %eax
	cltq
	movl	%edx, -3312(%rbp,%rax,4)
.L8:
	addl	$1, -3316(%rbp)
.L7:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L9
	addl	$1, -3320(%rbp)
.L4:
	cmpl	$2, -3320(%rbp)
	jle	.L10
	movl	$0, -3320(%rbp)
	jmp	.L11
.L12:
	movl	-3320(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3320(%rbp)
.L11:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	$100, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3328, %rsp
	.cfi_def_cfa_offset 3376
	movq	%fs:40, %rax
	movq	%rax, 3320(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	leaq	816(%rsp), %rbp
	rep stosq
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%r14d, %r14d
	leaq	816(%rsp), %rbp
	movl	$2863311531, %r13d
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r14d, %eax
	movq	%r12, %rdi
	imulq	%r13, %rax
	shrq	$33, %rax
	leal	(%rax,%rax,2), %ecx
	movslq	%eax, %rdx
	movl	%r14d, %eax
	addl	$1, %r14d
	subl	%ecx, %eax
	leaq	(%rdx,%rdx,2), %rdx
	cltq
	addq	%rdx, %rax
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	leal	(%r8,%r8,2), %eax
	cmpl	%r14d, %eax
	jg	.L3
.L2:
	leal	-1(%r8), %eax
	leaq	828(%rsp), %r10
	leaq	(%rax,%rax,2), %rdx
	leaq	20(%rsp,%rax,4), %r9
	leaq	(%r10,%rdx,4), %rdi
.L5:
	pxor	%xmm0, %xmm0
	movb	$0, 3316(%rsp)
	movq	%rbp, %rax
	movl	$0, 3312(%rsp)
	movaps	%xmm0, 3216(%rsp)
	movaps	%xmm0, 3232(%rsp)
	movaps	%xmm0, 3248(%rsp)
	movaps	%xmm0, 3264(%rsp)
	movaps	%xmm0, 3280(%rsp)
	movaps	%xmm0, 3296(%rsp)
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%rax), %rdx
	addq	$12, %rax
	addb	$1, 3216(%rsp,%rdx)
	cmpq	%rdi, %rax
	jne	.L4
	movq	%rbx, %rax
	movq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rsi
	cmpb	$1, 3216(%rsp,%rsi)
	jne	.L7
	addl	%esi, (%rax)
.L7:
	addq	$4, %rax
	addq	$12, %rdx
	cmpq	%rax, %r9
	jne	.L8
.L9:
	addq	$4, %rbp
	addq	$4, %rdi
	cmpq	%rbp, %r10
	jne	.L5
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	testl	%r8d, %r8d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 12(%rsp)
	jg	.L10
.L11:
	movq	3320(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$3328, %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
.L28:
	.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	$100, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3328, %rsp
	.cfi_def_cfa_offset 3376
	movq	%fs:40, %rax
	movq	%rax, 3320(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	leaq	816(%rsp), %rbp
	rep stosq
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%r14d, %r14d
	leaq	816(%rsp), %rbp
	movl	$2863311531, %r13d
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r14d, %eax
	movq	%r12, %rdi
	imulq	%r13, %rax
	shrq	$33, %rax
	leal	(%rax,%rax,2), %ecx
	movslq	%eax, %rdx
	movl	%r14d, %eax
	addl	$1, %r14d
	subl	%ecx, %eax
	leaq	(%rdx,%rdx,2), %rdx
	cltq
	addq	%rdx, %rax
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	leal	(%r8,%r8,2), %eax
	cmpl	%r14d, %eax
	jg	.L3
.L2:
	leal	-1(%r8), %eax
	leaq	828(%rsp), %r10
	leaq	(%rax,%rax,2), %rdx
	leaq	20(%rsp,%rax,4), %r9
	leaq	(%r10,%rdx,4), %rdi
.L5:
	pxor	%xmm0, %xmm0
	movb	$0, 3316(%rsp)
	movq	%rbp, %rax
	movl	$0, 3312(%rsp)
	movaps	%xmm0, 3216(%rsp)
	movaps	%xmm0, 3232(%rsp)
	movaps	%xmm0, 3248(%rsp)
	movaps	%xmm0, 3264(%rsp)
	movaps	%xmm0, 3280(%rsp)
	movaps	%xmm0, 3296(%rsp)
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%rax), %rdx
	addq	$12, %rax
	addb	$1, 3216(%rsp,%rdx)
	cmpq	%rdi, %rax
	jne	.L4
	movq	%rbx, %rax
	movq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	(%rdx), %rsi
	cmpb	$1, 3216(%rsp,%rsi)
	jne	.L7
	addl	%esi, (%rax)
.L7:
	addq	$4, %rax
	addq	$12, %rdx
	cmpq	%rax, %r9
	jne	.L8
.L9:
	addq	$4, %rbp
	addq	$4, %rdi
	cmpq	%rbp, %r10
	jne	.L5
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	testl	%r8d, %r8d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 12(%rsp)
	jg	.L10
.L11:
	movq	3320(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$3328, %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
.L28:
	.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 n,i,j,d[200][3];
  int s[200]={0};
  scanf("%d",&n);
  for(i=0;i<n*3;i++)scanf("%d",&d[i/3][i%3]);
  for(i=0;i<3;i++){
    char c[101]={0};
    for(j=0;j<n;j++)c[d[j][i]]++;
    for(j=0;j<n;j++){
      if(c[d[j][i]]==1)s[j]+=d[j][i];
    }
  }
  for(i=0;i<n;i++)printf("%d\n",s[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 n,i,j,d[200][3];
  int s[200]={0};
  scanf("%d",&n);
  for(i=0;i<n*3;i++)scanf("%d",&d[i/3][i%3]);
  for(i=0;i<3;i++){
    char c[101]={0};
    for(j=0;j<n;j++)c[d[j][i]]++;
    for(j=0;j<n;j++){
      if(c[d[j][i]]==1)s[j]+=d[j][i];
    }
  }
  for(i=0;i<n;i++)printf("%d\n",s[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	$3328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3312(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3324(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3320(%rbp)
	jmp	.L2
.L3:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-3320(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leaq	-2512(%rbp), %rcx
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rdi, %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, -3320(%rbp)
.L2:
	movl	-3324(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L3
	movl	$0, -3320(%rbp)
	jmp	.L4
.L10:
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movb	$0, -12(%rbp)
	movl	$0, -3316(%rbp)
	jmp	.L5
.L6:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movzbl	-112(%rbp,%rdx), %edx
	addl	$1, %edx
	cltq
	movb	%dl, -112(%rbp,%rax)
	addl	$1, -3316(%rbp)
.L5:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L6
	movl	$0, -3316(%rbp)
	jmp	.L7
.L9:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$1, %al
	jne	.L8
	movl	-3316(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %ecx
	movl	-3320(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2512(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3316(%rbp), %eax
	cltq
	movl	%edx, -3312(%rbp,%rax,4)
.L8:
	addl	$1, -3316(%rbp)
.L7:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L9
	addl	$1, -3320(%rbp)
.L4:
	cmpl	$2, -3320(%rbp)
	jle	.L10
	movl	$0, -3320(%rbp)
	jmp	.L11
.L12:
	movl	-3320(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3320(%rbp)
.L11:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	$3328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3312(%rbp), %rdx
	movl	$0, %eax
	movl	$100, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-3324(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3320(%rbp)
	jmp	.L2
.L3:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-3320(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leaq	-2512(%rbp), %rcx
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rdi, %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, -3320(%rbp)
.L2:
	movl	-3324(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L3
	movl	$0, -3320(%rbp)
	jmp	.L4
.L10:
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movb	$0, -12(%rbp)
	movl	$0, -3316(%rbp)
	jmp	.L5
.L6:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movzbl	-112(%rbp,%rdx), %edx
	addl	$1, %edx
	cltq
	movb	%dl, -112(%rbp,%rax)
	addl	$1, -3316(%rbp)
.L5:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L6
	movl	$0, -3316(%rbp)
	jmp	.L7
.L9:
	movl	-3320(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-2512(%rbp,%rax,4), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$1, %al
	jne	.L8
	movl	-3316(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %ecx
	movl	-3320(%rbp), %eax
	movslq	%eax, %rsi
	movl	-3316(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-2512(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-3316(%rbp), %eax
	cltq
	movl	%edx, -3312(%rbp,%rax,4)
.L8:
	addl	$1, -3316(%rbp)
.L7:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3316(%rbp)
	jl	.L9
	addl	$1, -3320(%rbp)
.L4:
	cmpl	$2, -3320(%rbp)
	jle	.L10
	movl	$0, -3320(%rbp)
	jmp	.L11
.L12:
	movl	-3320(%rbp), %eax
	cltq
	movl	-3312(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -3320(%rbp)
.L11:
	movl	-3324(%rbp), %eax
	cmpl	%eax, -3320(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
