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;
  int y,m,d;
  int day=0;//count

  int date[3][10]={ {20,20,20,20,20,20,20,20,20,20},
		    {20,19,20,19,20,19,20,19,20,19},
		    {20,19,20,19,20,19,20,19,20,19} };

  scanf("%d",&n);
  for(;n>0;n--){
    scanf("%d %d %d",&y,&m,&d);
    day=date[y%3][m-1]-d;
    m++;
    d=0;
    if(m==11){
      y++;
      m=1;
    }
    if(y==1000)//999??´10?????????????????´???
      printf("%d\n", day+1);
    else{//????????\???

      while(1){
	day+=date[y%3][m-1];
	m++;   
	if(m==11){
	  y++;
	  m=1;
	}
	if(y==1000)	  
	  break;
      }
    printf("%d\n",day+1);
    }
  }
}```

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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	movl	$20, -128(%rbp)
	movl	$20, -124(%rbp)
	movl	$20, -120(%rbp)
	movl	$20, -116(%rbp)
	movl	$20, -112(%rbp)
	movl	$20, -108(%rbp)
	movl	$20, -104(%rbp)
	movl	$20, -100(%rbp)
	movl	$20, -96(%rbp)
	movl	$20, -92(%rbp)
	movl	$20, -88(%rbp)
	movl	$19, -84(%rbp)
	movl	$20, -80(%rbp)
	movl	$19, -76(%rbp)
	movl	$20, -72(%rbp)
	movl	$19, -68(%rbp)
	movl	$20, -64(%rbp)
	movl	$19, -60(%rbp)
	movl	$20, -56(%rbp)
	movl	$19, -52(%rbp)
	movl	$20, -48(%rbp)
	movl	$19, -44(%rbp)
	movl	$20, -40(%rbp)
	movl	$19, -36(%rbp)
	movl	$20, -32(%rbp)
	movl	$19, -28(%rbp)
	movl	$20, -24(%rbp)
	movl	$19, -20(%rbp)
	movl	$20, -16(%rbp)
	movl	$19, -12(%rbp)
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	movl	-136(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L3
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L3:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	jne	.L4
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L6
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L6:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	je	.L13
	jmp	.L4
.L13:
	nop
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-148(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -148(%rbp)
.L2:
	movl	-148(%rbp), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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
.LC4:
	.string	"%d"
.LC5:
	.string	"%d %d %d"
.LC6:
	.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
	leaq	.LC4(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	$144, %rsp
	.cfi_def_cfa_offset 192
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	movq	.LC3(%rip), %rax
	movq	%rsp, %rsi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 128(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	leaq	4(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC6(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %r8
	movl	8(%rsp), %ecx
	movq	%r8, %rsi
	imulq	$1431655766, %r8, %r8
	leal	-1(%rcx), %edx
	addl	$1, %ecx
	movl	%esi, %eax
	movslq	%edx, %rdx
	movl	%ecx, 8(%rsp)
	sarl	$31, %eax
	shrq	$32, %r8
	subl	%eax, %r8d
	movl	%esi, %eax
	leal	(%r8,%r8,2), %edi
	subl	%edi, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	movl	16(%rsp,%rax,4), %edx
	subl	12(%rsp), %edx
	movl	$0, 12(%rsp)
	cmpl	$11, %ecx
	jne	.L3
	addl	$1, %esi
	movl	$1, 8(%rsp)
	movl	$1, %ecx
	movl	%esi, 4(%rsp)
.L3:
	movslq	%esi, %r8
	cmpl	$1000, %esi
	je	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	imulq	$1431655766, %r8, %rax
	movl	%esi, %r9d
	leal	-1(%rcx), %edi
	addl	$1, %ecx
	sarl	$31, %r9d
	movslq	%edi, %rdi
	shrq	$32, %rax
	subl	%r9d, %eax
	leal	(%rax,%rax,2), %r9d
	movl	%esi, %eax
	subl	%r9d, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	addl	16(%rsp,%rax,4), %edx
	cmpl	$11, %ecx
	jne	.L4
	addl	$1, %esi
	cmpl	$1000, %esi
	je	.L7
	movl	$1, %ecx
	movslq	%esi, %r8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, 8(%rsp)
	movl	$1000, 4(%rsp)
.L16:
	addl	$1, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	(%rsp), %eax
	subl	$1, %eax
	movl	%eax, (%rsp)
	testl	%eax, %eax
	jg	.L2
.L8:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$144, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	20
	.long	20
	.long	20
	.long	20
	.align 16
.LC1:
	.long	20
	.long	20
	.long	20
	.long	19
	.align 16
.LC2:
	.long	20
	.long	19
	.long	20
	.long	19
	.set	.LC3,.LC1+8
	.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
.LC4:
	.string	"%d"
.LC5:
	.string	"%d %d %d"
.LC6:
	.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
	leaq	.LC4(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	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	$144, %rsp
	.cfi_def_cfa_offset 192
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	movq	.LC3(%rip), %rax
	movq	%rsp, %rsi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 128(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	leaq	4(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC6(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %r8
	movl	8(%rsp), %ecx
	movq	%r8, %rsi
	imulq	$1431655766, %r8, %r8
	leal	-1(%rcx), %edx
	addl	$1, %ecx
	movl	%esi, %eax
	movslq	%edx, %rdx
	movl	%ecx, 8(%rsp)
	sarl	$31, %eax
	shrq	$32, %r8
	subl	%eax, %r8d
	movl	%esi, %eax
	leal	(%r8,%r8,2), %edi
	subl	%edi, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	movl	16(%rsp,%rax,4), %edx
	subl	12(%rsp), %edx
	movl	$0, 12(%rsp)
	cmpl	$11, %ecx
	jne	.L3
	addl	$1, %esi
	movl	$1, 8(%rsp)
	movl	$1, %ecx
	movl	%esi, 4(%rsp)
.L3:
	movslq	%esi, %r8
	cmpl	$1000, %esi
	je	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	imulq	$1431655766, %r8, %rax
	movl	%esi, %r9d
	leal	-1(%rcx), %edi
	addl	$1, %ecx
	sarl	$31, %r9d
	movslq	%edi, %rdi
	shrq	$32, %rax
	subl	%r9d, %eax
	leal	(%rax,%rax,2), %r9d
	movl	%esi, %eax
	subl	%r9d, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	addl	16(%rsp,%rax,4), %edx
	cmpl	$11, %ecx
	jne	.L4
	addl	$1, %esi
	cmpl	$1000, %esi
	je	.L7
	movl	$1, %ecx
	movslq	%esi, %r8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, 8(%rsp)
	movl	$1000, 4(%rsp)
.L16:
	addl	$1, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	(%rsp), %eax
	subl	$1, %eax
	movl	%eax, (%rsp)
	testl	%eax, %eax
	jg	.L2
.L8:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$144, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	20
	.long	20
	.long	20
	.long	20
	.align 16
.LC1:
	.long	20
	.long	20
	.long	20
	.long	19
	.align 16
.LC2:
	.long	20
	.long	19
	.long	20
	.long	19
	.set	.LC3,.LC1+8
	.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;
  int y,m,d;
  int day=0;//count

  int date[3][10]={ {20,20,20,20,20,20,20,20,20,20},
		    {20,19,20,19,20,19,20,19,20,19},
		    {20,19,20,19,20,19,20,19,20,19} };

  scanf("%d",&n);
  for(;n>0;n--){
    scanf("%d %d %d",&y,&m,&d);
    day=date[y%3][m-1]-d;
    m++;
    d=0;
    if(m==11){
      y++;
      m=1;
    }
    if(y==1000)//999??´10?????????????????´???
      printf("%d\n", day+1);
    else{//????????\???

      while(1){
	day+=date[y%3][m-1];
	m++;   
	if(m==11){
	  y++;
	  m=1;
	}
	if(y==1000)	  
	  break;
      }
    printf("%d\n",day+1);
    }
  }
}
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;
  int y,m,d;
  int day=0;//count

  int date[3][10]={ {20,20,20,20,20,20,20,20,20,20},
		    {20,19,20,19,20,19,20,19,20,19},
		    {20,19,20,19,20,19,20,19,20,19} };

  scanf("%d",&n);
  for(;n>0;n--){
    scanf("%d %d %d",&y,&m,&d);
    day=date[y%3][m-1]-d;
    m++;
    d=0;
    if(m==11){
      y++;
      m=1;
    }
    if(y==1000)//999??´10?????????????????´???
      printf("%d\n", day+1);
    else{//????????\???

      while(1){
	day+=date[y%3][m-1];
	m++;   
	if(m==11){
	  y++;
	  m=1;
	}
	if(y==1000)	  
	  break;
      }
    printf("%d\n",day+1);
    }
  }
}```

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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	movl	$20, -128(%rbp)
	movl	$20, -124(%rbp)
	movl	$20, -120(%rbp)
	movl	$20, -116(%rbp)
	movl	$20, -112(%rbp)
	movl	$20, -108(%rbp)
	movl	$20, -104(%rbp)
	movl	$20, -100(%rbp)
	movl	$20, -96(%rbp)
	movl	$20, -92(%rbp)
	movl	$20, -88(%rbp)
	movl	$19, -84(%rbp)
	movl	$20, -80(%rbp)
	movl	$19, -76(%rbp)
	movl	$20, -72(%rbp)
	movl	$19, -68(%rbp)
	movl	$20, -64(%rbp)
	movl	$19, -60(%rbp)
	movl	$20, -56(%rbp)
	movl	$19, -52(%rbp)
	movl	$20, -48(%rbp)
	movl	$19, -44(%rbp)
	movl	$20, -40(%rbp)
	movl	$19, -36(%rbp)
	movl	$20, -32(%rbp)
	movl	$19, -28(%rbp)
	movl	$20, -24(%rbp)
	movl	$19, -20(%rbp)
	movl	$20, -16(%rbp)
	movl	$19, -12(%rbp)
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	movl	-136(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L3
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L3:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	jne	.L4
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L6
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L6:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	je	.L13
	jmp	.L4
.L13:
	nop
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-148(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -148(%rbp)
.L2:
	movl	-148(%rbp), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	movl	$20, -128(%rbp)
	movl	$20, -124(%rbp)
	movl	$20, -120(%rbp)
	movl	$20, -116(%rbp)
	movl	$20, -112(%rbp)
	movl	$20, -108(%rbp)
	movl	$20, -104(%rbp)
	movl	$20, -100(%rbp)
	movl	$20, -96(%rbp)
	movl	$20, -92(%rbp)
	movl	$20, -88(%rbp)
	movl	$19, -84(%rbp)
	movl	$20, -80(%rbp)
	movl	$19, -76(%rbp)
	movl	$20, -72(%rbp)
	movl	$19, -68(%rbp)
	movl	$20, -64(%rbp)
	movl	$19, -60(%rbp)
	movl	$20, -56(%rbp)
	movl	$19, -52(%rbp)
	movl	$20, -48(%rbp)
	movl	$19, -44(%rbp)
	movl	$20, -40(%rbp)
	movl	$19, -36(%rbp)
	movl	$20, -32(%rbp)
	movl	$19, -28(%rbp)
	movl	$20, -24(%rbp)
	movl	$19, -20(%rbp)
	movl	$20, -16(%rbp)
	movl	$19, -12(%rbp)
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	movl	-136(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L3
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L3:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	jne	.L4
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-144(%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
	movl	-140(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -132(%rbp)
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -140(%rbp)
	movl	-140(%rbp), %eax
	cmpl	$11, %eax
	jne	.L6
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	movl	$1, -140(%rbp)
.L6:
	movl	-144(%rbp), %eax
	cmpl	$1000, %eax
	je	.L13
	jmp	.L4
.L13:
	nop
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-148(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -148(%rbp)
.L2:
	movl	-148(%rbp), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
