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, k, ans[100] = {0},count = 0;
	int Y[100], M[100], D[100];

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &Y[i], &M[i], &D[i]);
	}
	
	for (i = 0; i < n; i++) {
		for (j = Y[i]; j < 1000; j++) {
			if (count == 0) {
				for (k = M[i]; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			else {
				for (k = 1; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			count++;
		}
		count = 0;
		
	}

	for (i = 0; i < n; i++)
		printf("%d\n", ans[i] - D[i] + 1);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -1620(%rbp)
	leaq	-1636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1632(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1632(%rbp)
.L2:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L3
	movl	$0, -1632(%rbp)
	jmp	.L4
.L19:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1628(%rbp)
	jmp	.L5
.L18:
	cmpl	$0, -1620(%rbp)
	jne	.L6
	movl	-1632(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1624(%rbp)
	jmp	.L7
.L11:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L8
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
.L8:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L10:
	addl	$1, -1624(%rbp)
.L7:
	cmpl	$10, -1624(%rbp)
	jle	.L11
	jmp	.L12
.L6:
	movl	$1, -1624(%rbp)
	jmp	.L13
.L17:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L14
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L15
.L14:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L16:
	addl	$1, -1624(%rbp)
.L13:
	cmpl	$10, -1624(%rbp)
	jle	.L17
.L12:
	addl	$1, -1620(%rbp)
	addl	$1, -1628(%rbp)
.L5:
	cmpl	$999, -1628(%rbp)
	jle	.L18
	movl	$0, -1620(%rbp)
	addl	$1, -1632(%rbp)
.L4:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L19
	movl	$0, -1632(%rbp)
	jmp	.L20
.L21:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1632(%rbp)
.L20:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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 %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1656, %rsp
	.cfi_def_cfa_offset 1712
	movq	%fs:40, %rax
	movq	%rax, 1640(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L17
	leaq	832(%rsp), %rax
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	leaq	432(%rsp), %rax
	leaq	1232(%rsp), %rbp
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %rbx
	movq	(%rsp), %r15
	leaq	0(%rbp,%r13), %rcx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r14d
	leaq	(%rbx,%r13), %rdx
	leaq	(%r15,%r13), %rsi
	addq	$4, %r13
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L17
	subl	$1, %eax
	movq	%r12, %rdi
	movl	$1000, %r11d
	leaq	436(%rsp,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%r15), %r9d
	movl	%r11d, %r10d
	xorl	%esi, %esi
	subl	%r9d, %r10d
	cmpl	$999, %r9d
	jle	.L15
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	imull	$-1431655765, %ecx, %ecx
	movl	(%rdi), %eax
	leal	195(%rax), %edx
	addl	$200, %eax
	addl	$715827882, %ecx
	cmpl	$1431655765, %ecx
	cmovnb	%edx, %eax
	movl	%eax, (%rdi)
.L9:
	addl	$1, %esi
	cmpl	%r10d, %esi
	je	.L16
.L15:
	leal	(%rsi,%r9), %ecx
	testl	%esi, %esi
	jne	.L28
	movl	(%rbx), %eax
	cmpl	$10, %eax
	jg	.L9
	imull	$-1431655765, %ecx, %ecx
	movl	(%rdi), %edx
	addl	$715827882, %ecx
	cmpl	$1431655764, %ecx
	jbe	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %r14d
	shrl	$31, %r14d
	leal	(%rax,%r14), %ecx
	andl	$1, %ecx
	subl	%r14d, %ecx
	movl	%edx, %r14d
	xorl	%edx, %edx
	cmpl	$1, %ecx
	sete	%dl
	addl	$1, %eax
	leal	19(%rdx,%r14), %edx
	cmpl	$11, %eax
	jne	.L13
	movl	%edx, (%rdi)
	.p2align 4,,10
	.p2align 3
.L30:
	addl	$1, %esi
	cmpl	%r10d, %esi
	jne	.L15
.L16:
	addq	$4, %r15
	addq	$4, %rdi
	addq	$4, %rbx
	cmpq	%r15, %r13
	jne	.L5
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movl	(%r12,%r13,4), %edx
	subl	0(%rbp,%r13,4), %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	addl	$1, %edx
	movl	$1, %edi
	addq	$1, %r13
	call	__printf_chk@PLT
	cmpl	%r13d, 28(%rsp)
	jg	.L6
.L17:
	movq	1640(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1656, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	imull	$-20, %eax, %eax
	leal	220(%rdx,%rax), %edx
	movl	%edx, (%rdi)
	jmp	.L30
.L29:
	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 %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1656, %rsp
	.cfi_def_cfa_offset 1712
	movq	%fs:40, %rax
	movq	%rax, 1640(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L17
	leaq	832(%rsp), %rax
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	leaq	432(%rsp), %rax
	leaq	1232(%rsp), %rbp
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %rbx
	movq	(%rsp), %r15
	leaq	0(%rbp,%r13), %rcx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r14d
	leaq	(%rbx,%r13), %rdx
	leaq	(%r15,%r13), %rsi
	addq	$4, %r13
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L17
	subl	$1, %eax
	movq	%r12, %rdi
	movl	$1000, %r11d
	leaq	436(%rsp,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%r15), %r9d
	movl	%r11d, %r10d
	xorl	%esi, %esi
	subl	%r9d, %r10d
	cmpl	$999, %r9d
	jle	.L15
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	imull	$-1431655765, %ecx, %ecx
	movl	(%rdi), %eax
	leal	195(%rax), %edx
	addl	$200, %eax
	addl	$715827882, %ecx
	cmpl	$1431655765, %ecx
	cmovnb	%edx, %eax
	movl	%eax, (%rdi)
.L9:
	addl	$1, %esi
	cmpl	%r10d, %esi
	je	.L16
.L15:
	leal	(%rsi,%r9), %ecx
	testl	%esi, %esi
	jne	.L28
	movl	(%rbx), %eax
	cmpl	$10, %eax
	jg	.L9
	imull	$-1431655765, %ecx, %ecx
	movl	(%rdi), %edx
	addl	$715827882, %ecx
	cmpl	$1431655764, %ecx
	jbe	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %r14d
	shrl	$31, %r14d
	leal	(%rax,%r14), %ecx
	andl	$1, %ecx
	subl	%r14d, %ecx
	movl	%edx, %r14d
	xorl	%edx, %edx
	cmpl	$1, %ecx
	sete	%dl
	addl	$1, %eax
	leal	19(%rdx,%r14), %edx
	cmpl	$11, %eax
	jne	.L13
	movl	%edx, (%rdi)
	.p2align 4,,10
	.p2align 3
.L30:
	addl	$1, %esi
	cmpl	%r10d, %esi
	jne	.L15
.L16:
	addq	$4, %r15
	addq	$4, %rdi
	addq	$4, %rbx
	cmpq	%r15, %r13
	jne	.L5
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movl	(%r12,%r13,4), %edx
	subl	0(%rbp,%r13,4), %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	addl	$1, %edx
	movl	$1, %edi
	addq	$1, %r13
	call	__printf_chk@PLT
	cmpl	%r13d, 28(%rsp)
	jg	.L6
.L17:
	movq	1640(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1656, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	imull	$-20, %eax, %eax
	leal	220(%rdx,%rax), %edx
	movl	%edx, (%rdi)
	jmp	.L30
.L29:
	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, k, ans[100] = {0},count = 0;
	int Y[100], M[100], D[100];

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &Y[i], &M[i], &D[i]);
	}
	
	for (i = 0; i < n; i++) {
		for (j = Y[i]; j < 1000; j++) {
			if (count == 0) {
				for (k = M[i]; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			else {
				for (k = 1; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			count++;
		}
		count = 0;
		
	}

	for (i = 0; i < n; i++)
		printf("%d\n", ans[i] - D[i] + 1);

	return 0;
}
8
1 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 2 19
696 4 19
999 10 20
 8
1 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 2 26
696 4 19
999 10 20
 8
1 1 1
344 3 1
696 4 1
182 9 5
998 8 7
344 2 19
696 4 19
999 10 20
 8
1 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 3 26
696 4 19
999 10 20
 8
1 1 2
344 3 1
696 5 1
182 9 5
998 8 7
344 2 19
696 4 19
999 10 20
 8
1 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 2 19
716 4 19
999 10 20
 8
1 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 2 26
763 4 19
999 10 20
 8
1 1 1
344 3 1
696 4 1
182 9 5
998 8 7
344 2 19
696 4 19
884 10 20
 8
0 1 1
344 3 1
696 5 1
182 9 5
998 5 7
344 3 26
696 4 19
999 10 20
 8
1 1 2
344 3 1
696 5 0
182 9 5
998 8 7
344 2 19
696 4 19
999 10 20

196470
128976
59710
160715
311
128977
59712
1
 196470
128976
59710
160715
311
128970
59712
1
 196470
128976
59730
160715
252
128977
59712
1
 196470
128976
59710
160715
311
128951
59712
1
 196469
128976
59710
160715
252
128977
59712
1
 196470
128976
59710
160715
311
128977
55778
1
 196470
128976
59710
160715
311
128970
46533
1
 196470
128976
59730
160715
252
128977
59712
22620
 196670
128976
59710
160715
311
128951
59712
1
 196469
128976
59711
160715
252
128977
59712
1

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, k, ans[100] = {0},count = 0;
	int Y[100], M[100], D[100];

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &Y[i], &M[i], &D[i]);
	}
	
	for (i = 0; i < n; i++) {
		for (j = Y[i]; j < 1000; j++) {
			if (count == 0) {
				for (k = M[i]; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			else {
				for (k = 1; k <= 10; k++) {
					if (j % 3 == 0 || k % 2 == 1)
						ans[i] += 20;
					else
						ans[i] += 19;
				}
			}
			count++;
		}
		count = 0;
		
	}

	for (i = 0; i < n; i++)
		printf("%d\n", ans[i] - D[i] + 1);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -1620(%rbp)
	leaq	-1636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1632(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1632(%rbp)
.L2:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L3
	movl	$0, -1632(%rbp)
	jmp	.L4
.L19:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1628(%rbp)
	jmp	.L5
.L18:
	cmpl	$0, -1620(%rbp)
	jne	.L6
	movl	-1632(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1624(%rbp)
	jmp	.L7
.L11:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L8
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
.L8:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L10:
	addl	$1, -1624(%rbp)
.L7:
	cmpl	$10, -1624(%rbp)
	jle	.L11
	jmp	.L12
.L6:
	movl	$1, -1624(%rbp)
	jmp	.L13
.L17:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L14
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L15
.L14:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L16:
	addl	$1, -1624(%rbp)
.L13:
	cmpl	$10, -1624(%rbp)
	jle	.L17
.L12:
	addl	$1, -1620(%rbp)
	addl	$1, -1628(%rbp)
.L5:
	cmpl	$999, -1628(%rbp)
	jle	.L18
	movl	$0, -1620(%rbp)
	addl	$1, -1632(%rbp)
.L4:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L19
	movl	$0, -1632(%rbp)
	jmp	.L20
.L21:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1632(%rbp)
.L20:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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 %d %d"
.LC2:
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -1620(%rbp)
	leaq	-1636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1632(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1632(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1632(%rbp)
.L2:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L3
	movl	$0, -1632(%rbp)
	jmp	.L4
.L19:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1628(%rbp)
	jmp	.L5
.L18:
	cmpl	$0, -1620(%rbp)
	jne	.L6
	movl	-1632(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1624(%rbp)
	jmp	.L7
.L11:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L8
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
.L8:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L10:
	addl	$1, -1624(%rbp)
.L7:
	cmpl	$10, -1624(%rbp)
	jle	.L11
	jmp	.L12
.L6:
	movl	$1, -1624(%rbp)
	jmp	.L13
.L17:
	movl	-1628(%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
	testl	%eax, %eax
	je	.L14
	movl	-1624(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L15
.L14:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	20(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %eax
	leal	19(%rax), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	%edx, -1616(%rbp,%rax,4)
.L16:
	addl	$1, -1624(%rbp)
.L13:
	cmpl	$10, -1624(%rbp)
	jle	.L17
.L12:
	addl	$1, -1620(%rbp)
	addl	$1, -1628(%rbp)
.L5:
	cmpl	$999, -1628(%rbp)
	jle	.L18
	movl	$0, -1620(%rbp)
	addl	$1, -1632(%rbp)
.L4:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L19
	movl	$0, -1632(%rbp)
	jmp	.L20
.L21:
	movl	-1632(%rbp), %eax
	cltq
	movl	-1616(%rbp,%rax,4), %edx
	movl	-1632(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1632(%rbp)
.L20:
	movl	-1636(%rbp), %eax
	cmpl	%eax, -1632(%rbp)
	jl	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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:
