Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

main(){
    long nk[40]={1,};
    int i;
    int n;

    for(i=0;i<30;i++){
        nk[i+1]+=nk[i];
        nk[i+2]+=nk[i];
        nk[i+3]+=nk[i];
    }

    while(scanf("%d",&n)!=EOF){
        if(!n)
            break;
        printf("%ld\n",nk[n]/3650+1);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC16:
	.string	"%ld\n"
.LC17:
	.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
	movl	$40, %ecx
	movabsq	$-8096351782488411421, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC16(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC17(%rip), %rbx
	subq	$360, %rsp
	.cfi_def_cfa_offset 400
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	12(%rsp), %rbp
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movq	$29249425, 272(%rsp)
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movaps	%xmm0, 240(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movaps	%xmm0, 256(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movq	16(%rsp,%rax,8), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	movq	%rcx, %rax
	imulq	%r13
	xorl	%eax, %eax
	addq	%rcx, %rdx
	sarq	$63, %rcx
	sarq	$11, %rdx
	subq	%rcx, %rdx
	addq	$1, %rdx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L4
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$360, %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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.align 16
.LC1:
	.quad	2
	.quad	4
	.align 16
.LC2:
	.quad	7
	.quad	13
	.align 16
.LC3:
	.quad	24
	.quad	44
	.align 16
.LC4:
	.quad	81
	.quad	149
	.align 16
.LC5:
	.quad	274
	.quad	504
	.align 16
.LC6:
	.quad	927
	.quad	1705
	.align 16
.LC7:
	.quad	3136
	.quad	5768
	.align 16
.LC8:
	.quad	10609
	.quad	19513
	.align 16
.LC9:
	.quad	35890
	.quad	66012
	.align 16
.LC10:
	.quad	121415
	.quad	223317
	.align 16
.LC11:
	.quad	410744
	.quad	755476
	.align 16
.LC12:
	.quad	1389537
	.quad	2555757
	.align 16
.LC13:
	.quad	4700770
	.quad	8646064
	.align 16
.LC14:
	.quad	15902591
	.quad	29249425
	.align 16
.LC15:
	.quad	53798080
	.quad	45152016
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC16:
	.string	"%ld\n"
.LC17:
	.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
	movl	$40, %ecx
	movabsq	$-8096351782488411421, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC16(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC17(%rip), %rbx
	subq	$360, %rsp
	.cfi_def_cfa_offset 400
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	12(%rsp), %rbp
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movq	$29249425, 272(%rsp)
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movaps	%xmm0, 240(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movaps	%xmm0, 256(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movq	16(%rsp,%rax,8), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	movq	%rcx, %rax
	imulq	%r13
	xorl	%eax, %eax
	addq	%rcx, %rdx
	sarq	$63, %rcx
	sarq	$11, %rdx
	subq	%rcx, %rdx
	addq	$1, %rdx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L4
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$360, %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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.align 16
.LC1:
	.quad	2
	.quad	4
	.align 16
.LC2:
	.quad	7
	.quad	13
	.align 16
.LC3:
	.quad	24
	.quad	44
	.align 16
.LC4:
	.quad	81
	.quad	149
	.align 16
.LC5:
	.quad	274
	.quad	504
	.align 16
.LC6:
	.quad	927
	.quad	1705
	.align 16
.LC7:
	.quad	3136
	.quad	5768
	.align 16
.LC8:
	.quad	10609
	.quad	19513
	.align 16
.LC9:
	.quad	35890
	.quad	66012
	.align 16
.LC10:
	.quad	121415
	.quad	223317
	.align 16
.LC11:
	.quad	410744
	.quad	755476
	.align 16
.LC12:
	.quad	1389537
	.quad	2555757
	.align 16
.LC13:
	.quad	4700770
	.quad	8646064
	.align 16
.LC14:
	.quad	15902591
	.quad	29249425
	.align 16
.LC15:
	.quad	53798080
	.quad	45152016
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC16:
	.string	"%ld\n"
.LC17:
	.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
	movl	$40, %ecx
	movabsq	$-8096351782488411421, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC16(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC17(%rip), %rbx
	subq	$360, %rsp
	.cfi_def_cfa_offset 400
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	12(%rsp), %rbp
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movq	$29249425, 272(%rsp)
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movaps	%xmm0, 240(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movaps	%xmm0, 256(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movq	16(%rsp,%rax,8), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	movq	%rcx, %rax
	imulq	%r13
	xorl	%eax, %eax
	addq	%rcx, %rdx
	sarq	$63, %rcx
	sarq	$11, %rdx
	subq	%rcx, %rdx
	addq	$1, %rdx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L4
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$360, %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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.align 16
.LC1:
	.quad	2
	.quad	4
	.align 16
.LC2:
	.quad	7
	.quad	13
	.align 16
.LC3:
	.quad	24
	.quad	44
	.align 16
.LC4:
	.quad	81
	.quad	149
	.align 16
.LC5:
	.quad	274
	.quad	504
	.align 16
.LC6:
	.quad	927
	.quad	1705
	.align 16
.LC7:
	.quad	3136
	.quad	5768
	.align 16
.LC8:
	.quad	10609
	.quad	19513
	.align 16
.LC9:
	.quad	35890
	.quad	66012
	.align 16
.LC10:
	.quad	121415
	.quad	223317
	.align 16
.LC11:
	.quad	410744
	.quad	755476
	.align 16
.LC12:
	.quad	1389537
	.quad	2555757
	.align 16
.LC13:
	.quad	4700770
	.quad	8646064
	.align 16
.LC14:
	.quad	15902591
	.quad	29249425
	.align 16
.LC15:
	.quad	53798080
	.quad	45152016
	.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:
```
```c
#include <stdio.h>

main(){
    long nk[40]={1,};
    int i;
    int n;

    for(i=0;i<30;i++){
        nk[i+1]+=nk[i];
        nk[i+2]+=nk[i];
        nk[i+3]+=nk[i];
    }

    while(scanf("%d",&n)!=EOF){
        if(!n)
            break;
        printf("%ld\n",nk[n]/3650+1);
    }
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

main(){
    long nk[40]={1,};
    int i;
    int n;

    for(i=0;i<30;i++){
        nk[i+1]+=nk[i];
        nk[i+2]+=nk[i];
        nk[i+3]+=nk[i];
    }

    while(scanf("%d",&n)!=EOF){
        if(!n)
            break;
        printf("%ld\n",nk[n]/3650+1);
    }
    return 0;
}```

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.
Optimized Assembly Code:

1
10
14
25
0
 1
10
14
23
0
 1
10
14
6
0
 1
1
20
25
0
 1
10
14
24
0
 1
10
0
25
0
 1
19
14
5
0
 1
18
0
25
0
 1
18
1
25
0
 1
0
14
6
0

1
1
1
701
 1
1
1
207
 1
1
1
1
 1
1
34
701
 1
1
1
381
 1
1
 1
19
1
1
 1
10
 1
10
1
701
 1

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

main(){
    long nk[40]={1,};
    int i;
    int n;

    for(i=0;i<30;i++){
        nk[i+1]+=nk[i];
        nk[i+2]+=nk[i];
        nk[i+3]+=nk[i];
    }

    while(scanf("%d",&n)!=EOF){
        if(!n)
            break;
        printf("%ld\n",nk[n]/3650+1);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC16:
	.string	"%ld\n"
.LC17:
	.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
	movl	$40, %ecx
	movabsq	$-8096351782488411421, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC16(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC17(%rip), %rbx
	subq	$360, %rsp
	.cfi_def_cfa_offset 400
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	12(%rsp), %rbp
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movq	$29249425, 272(%rsp)
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movaps	%xmm0, 240(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movaps	%xmm0, 256(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movq	16(%rsp,%rax,8), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	movq	%rcx, %rax
	imulq	%r13
	xorl	%eax, %eax
	addq	%rcx, %rdx
	sarq	$63, %rcx
	sarq	$11, %rdx
	subq	%rcx, %rdx
	addq	$1, %rdx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L4
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$360, %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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.align 16
.LC1:
	.quad	2
	.quad	4
	.align 16
.LC2:
	.quad	7
	.quad	13
	.align 16
.LC3:
	.quad	24
	.quad	44
	.align 16
.LC4:
	.quad	81
	.quad	149
	.align 16
.LC5:
	.quad	274
	.quad	504
	.align 16
.LC6:
	.quad	927
	.quad	1705
	.align 16
.LC7:
	.quad	3136
	.quad	5768
	.align 16
.LC8:
	.quad	10609
	.quad	19513
	.align 16
.LC9:
	.quad	35890
	.quad	66012
	.align 16
.LC10:
	.quad	121415
	.quad	223317
	.align 16
.LC11:
	.quad	410744
	.quad	755476
	.align 16
.LC12:
	.quad	1389537
	.quad	2555757
	.align 16
.LC13:
	.quad	4700770
	.quad	8646064
	.align 16
.LC14:
	.quad	15902591
	.quad	29249425
	.align 16
.LC15:
	.quad	53798080
	.quad	45152016
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC16:
	.string	"%ld\n"
.LC17:
	.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
	movl	$40, %ecx
	movabsq	$-8096351782488411421, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC16(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC17(%rip), %rbx
	subq	$360, %rsp
	.cfi_def_cfa_offset 400
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	12(%rsp), %rbp
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC8(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC9(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movq	$29249425, 272(%rsp)
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movaps	%xmm0, 240(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movaps	%xmm0, 256(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movq	16(%rsp,%rax,8), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	movq	%rcx, %rax
	imulq	%r13
	xorl	%eax, %eax
	addq	%rcx, %rdx
	sarq	$63, %rcx
	sarq	$11, %rdx
	subq	%rcx, %rdx
	addq	$1, %rdx
	call	__printf_chk@PLT
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L4
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$360, %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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1
	.quad	1
	.align 16
.LC1:
	.quad	2
	.quad	4
	.align 16
.LC2:
	.quad	7
	.quad	13
	.align 16
.LC3:
	.quad	24
	.quad	44
	.align 16
.LC4:
	.quad	81
	.quad	149
	.align 16
.LC5:
	.quad	274
	.quad	504
	.align 16
.LC6:
	.quad	927
	.quad	1705
	.align 16
.LC7:
	.quad	3136
	.quad	5768
	.align 16
.LC8:
	.quad	10609
	.quad	19513
	.align 16
.LC9:
	.quad	35890
	.quad	66012
	.align 16
.LC10:
	.quad	121415
	.quad	223317
	.align 16
.LC11:
	.quad	410744
	.quad	755476
	.align 16
.LC12:
	.quad	1389537
	.quad	2555757
	.align 16
.LC13:
	.quad	4700770
	.quad	8646064
	.align 16
.LC14:
	.quad	15902591
	.quad	29249425
	.align 16
.LC15:
	.quad	53798080
	.quad	45152016
	.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:
```