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

```c
long long a[39][2];i,n,k;main(t){for(;~scanf("%d",&k);++n-2?t=!t:++*a[k+9])for(i=8;n&&++i<30;)a[i][!t]=a[i-k][t]+a[i+k][t];n=!printf("%lld\n",a[k+9][!t]);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 624
a:
	.zero	624
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L7:
	movl	$8, i(%rip)
	jmp	.L3
.L5:
	movl	i(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	cmpl	$0, -4(%rbp)
	sete	%dl
	movzbl	%dl, %edx
	addq	%rsi, %rcx
	movslq	%edx, %rdx
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L3:
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cmpl	$29, %eax
	jle	.L5
.L4:
	movl	n(%rip), %eax
	addl	$1, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L6:
	movl	k(%rip), %eax
	addl	$9, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	a(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	leaq	1(%rdx), %rcx
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L2:
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L7
	movl	k(%rip), %eax
	leal	9(%rax), %edx
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, n(%rip)
	movl	$0, %eax
	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	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	k(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	scanf@PLT
	testl	%r13d, %r13d
	sete	%sil
	sete	%dl
	movzbl	%sil, %esi
	cmpl	$-1, %eax
	je	.L23
	movl	n(%rip), %r8d
	movl	$8, i(%rip)
	testl	%r8d, %r8d
	je	.L24
	movslq	k(%rip), %r14
	movslq	%r13d, %r9
	movzbl	%dl, %edx
	movq	%r9, %rax
	leaq	144(,%rdx,8), %rcx
	leaq	(%r14,%r14), %r15
	movq	%r14, %rdi
	subq	%r15, %rax
	leaq	(%r15,%r9), %r11
	leaq	160(,%rax,8), %rax
	leaq	160(,%r11,8), %r10
	cmpq	%rax, %rcx
	je	.L13
	cmpq	%r10, %rcx
	je	.L13
	leaq	-16(%rbx,%rax), %rdx
	leaq	-16(%rbx,%r10), %rax
	movdqu	16(%rdx), %xmm3
	movdqu	16(%rax), %xmm4
	movdqu	(%rdx), %xmm0
	movdqu	(%rax), %xmm1
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, (%rbx,%rcx)
	movhps	%xmm0, 16(%rbx,%rcx)
	movdqu	48(%rdx), %xmm5
	movdqu	48(%rax), %xmm6
	movdqu	32(%rdx), %xmm0
	movdqu	32(%rax), %xmm1
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 32(%rbx,%rcx)
	movhps	%xmm0, 48(%rbx,%rcx)
	movdqu	80(%rdx), %xmm7
	movdqu	80(%rax), %xmm2
	movdqu	64(%rdx), %xmm0
	movdqu	64(%rax), %xmm1
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 64(%rbx,%rcx)
	movhps	%xmm0, 80(%rbx,%rcx)
	movdqu	112(%rdx), %xmm3
	movdqu	112(%rax), %xmm4
	movdqu	96(%rdx), %xmm0
	movdqu	96(%rax), %xmm1
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 96(%rbx,%rcx)
	movhps	%xmm0, 112(%rbx,%rcx)
	movdqu	144(%rdx), %xmm5
	movdqu	144(%rax), %xmm6
	movdqu	128(%rdx), %xmm0
	movdqu	128(%rax), %xmm1
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 128(%rbx,%rcx)
	movhps	%xmm0, 144(%rbx,%rcx)
	movdqu	176(%rdx), %xmm7
	movdqu	160(%rdx), %xmm0
	movdqu	160(%rax), %xmm1
	movdqu	176(%rax), %xmm2
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 160(%rbx,%rcx)
	movhps	%xmm0, 176(%rbx,%rcx)
	movdqu	192(%rdx), %xmm0
	movdqu	208(%rdx), %xmm3
	movdqu	192(%rax), %xmm1
	movdqu	208(%rax), %xmm4
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 192(%rbx,%rcx)
	movhps	%xmm0, 208(%rbx,%rcx)
	movdqu	224(%rdx), %xmm0
	movdqu	240(%rdx), %xmm5
	movdqu	224(%rax), %xmm1
	movdqu	240(%rax), %xmm6
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 224(%rbx,%rcx)
	movhps	%xmm0, 240(%rbx,%rcx)
	movdqu	272(%rax), %xmm2
	movdqu	256(%rdx), %xmm0
	movdqu	272(%rdx), %xmm7
	movdqu	256(%rax), %xmm1
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 256(%rbx,%rcx)
	movhps	%xmm0, 272(%rbx,%rcx)
	movdqu	304(%rdx), %xmm1
	movdqu	288(%rdx), %xmm0
	movslq	%esi, %rdx
	movdqu	304(%rax), %xmm2
	punpcklqdq	%xmm1, %xmm0
	movdqu	288(%rax), %xmm1
	movl	$29, %eax
	subl	%edi, %eax
	punpcklqdq	%xmm2, %xmm1
	cltq
	paddq	%xmm1, %xmm0
	movq	%xmm0, 288(%rbx,%rcx)
	movhps	%xmm0, 304(%rbx,%rcx)
	leaq	(%r9,%rax,2), %rcx
	leal	29(%rdi), %eax
	cltq
	leaq	(%r9,%rax,2), %rax
	movq	(%rbx,%rax,8), %rax
	addq	(%rbx,%rcx,8), %rax
	movq	%rax, 464(%rbx,%rdx,8)
.L6:
	movl	$30, i(%rip)
	addl	$1, %r8d
	movl	%r8d, n(%rip)
	cmpl	$2, %r8d
	jne	.L10
	addl	$9, %edi
	movslq	%edi, %rdi
	salq	$4, %rdi
	addq	$1, (%rbx,%rdi)
	jmp	.L2
.L24:
	movl	$1, n(%rip)
.L10:
	movl	%esi, %r13d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	480+a(%rip), %rcx
	movl	$9, %r10d
	leaq	18(%r15,%r9), %rax
	subq	%r9, %rdx
	leaq	(%rcx,%r11,8), %r11
	subl	%edi, %r10d
	leaq	(%rbx,%rax,8), %rax
	movq	%r14, %rcx
	negq	%rcx
	movslq	%r10d, %r10
	movq	%rdx, %r14
	salq	$4, %rcx
	salq	$4, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rax,%rcx), %r9
	movq	(%rax), %rdx
	addq	$16, %rax
	addq	-144(%r9,%r10), %rdx
	movq	%rdx, (%r9,%r14,8)
	cmpq	%rax, %r11
	jne	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	movl	k(%rip), %eax
	leaq	.LC1(%rip), %rdi
	addl	$9, %eax
	cltq
	leaq	(%rsi,%rax,2), %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, n(%rip)
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	k
	.bss
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 624
a:
	.zero	624
	.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	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	k(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	scanf@PLT
	testl	%r13d, %r13d
	sete	%sil
	sete	%dl
	movzbl	%sil, %esi
	cmpl	$-1, %eax
	je	.L23
	movl	n(%rip), %r8d
	movl	$8, i(%rip)
	testl	%r8d, %r8d
	je	.L24
	movslq	k(%rip), %r14
	movslq	%r13d, %r9
	movzbl	%dl, %edx
	movq	%r9, %rax
	leaq	144(,%rdx,8), %rcx
	leaq	(%r14,%r14), %r15
	movq	%r14, %rdi
	subq	%r15, %rax
	leaq	(%r15,%r9), %r11
	leaq	160(,%rax,8), %rax
	leaq	160(,%r11,8), %r10
	cmpq	%rax, %rcx
	je	.L13
	cmpq	%r10, %rcx
	je	.L13
	leaq	-16(%rbx,%rax), %rdx
	leaq	-16(%rbx,%r10), %rax
	movdqu	16(%rdx), %xmm3
	movdqu	16(%rax), %xmm4
	movdqu	(%rdx), %xmm0
	movdqu	(%rax), %xmm1
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, (%rbx,%rcx)
	movhps	%xmm0, 16(%rbx,%rcx)
	movdqu	48(%rdx), %xmm5
	movdqu	48(%rax), %xmm6
	movdqu	32(%rdx), %xmm0
	movdqu	32(%rax), %xmm1
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 32(%rbx,%rcx)
	movhps	%xmm0, 48(%rbx,%rcx)
	movdqu	80(%rdx), %xmm7
	movdqu	80(%rax), %xmm2
	movdqu	64(%rdx), %xmm0
	movdqu	64(%rax), %xmm1
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 64(%rbx,%rcx)
	movhps	%xmm0, 80(%rbx,%rcx)
	movdqu	112(%rdx), %xmm3
	movdqu	112(%rax), %xmm4
	movdqu	96(%rdx), %xmm0
	movdqu	96(%rax), %xmm1
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 96(%rbx,%rcx)
	movhps	%xmm0, 112(%rbx,%rcx)
	movdqu	144(%rdx), %xmm5
	movdqu	144(%rax), %xmm6
	movdqu	128(%rdx), %xmm0
	movdqu	128(%rax), %xmm1
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 128(%rbx,%rcx)
	movhps	%xmm0, 144(%rbx,%rcx)
	movdqu	176(%rdx), %xmm7
	movdqu	160(%rdx), %xmm0
	movdqu	160(%rax), %xmm1
	movdqu	176(%rax), %xmm2
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 160(%rbx,%rcx)
	movhps	%xmm0, 176(%rbx,%rcx)
	movdqu	192(%rdx), %xmm0
	movdqu	208(%rdx), %xmm3
	movdqu	192(%rax), %xmm1
	movdqu	208(%rax), %xmm4
	punpcklqdq	%xmm3, %xmm0
	punpcklqdq	%xmm4, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 192(%rbx,%rcx)
	movhps	%xmm0, 208(%rbx,%rcx)
	movdqu	224(%rdx), %xmm0
	movdqu	240(%rdx), %xmm5
	movdqu	224(%rax), %xmm1
	movdqu	240(%rax), %xmm6
	punpcklqdq	%xmm5, %xmm0
	punpcklqdq	%xmm6, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 224(%rbx,%rcx)
	movhps	%xmm0, 240(%rbx,%rcx)
	movdqu	272(%rax), %xmm2
	movdqu	256(%rdx), %xmm0
	movdqu	272(%rdx), %xmm7
	movdqu	256(%rax), %xmm1
	punpcklqdq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, 256(%rbx,%rcx)
	movhps	%xmm0, 272(%rbx,%rcx)
	movdqu	304(%rdx), %xmm1
	movdqu	288(%rdx), %xmm0
	movslq	%esi, %rdx
	movdqu	304(%rax), %xmm2
	punpcklqdq	%xmm1, %xmm0
	movdqu	288(%rax), %xmm1
	movl	$29, %eax
	subl	%edi, %eax
	punpcklqdq	%xmm2, %xmm1
	cltq
	paddq	%xmm1, %xmm0
	movq	%xmm0, 288(%rbx,%rcx)
	movhps	%xmm0, 304(%rbx,%rcx)
	leaq	(%r9,%rax,2), %rcx
	leal	29(%rdi), %eax
	cltq
	leaq	(%r9,%rax,2), %rax
	movq	(%rbx,%rax,8), %rax
	addq	(%rbx,%rcx,8), %rax
	movq	%rax, 464(%rbx,%rdx,8)
.L6:
	movl	$30, i(%rip)
	addl	$1, %r8d
	movl	%r8d, n(%rip)
	cmpl	$2, %r8d
	jne	.L10
	addl	$9, %edi
	movslq	%edi, %rdi
	salq	$4, %rdi
	addq	$1, (%rbx,%rdi)
	jmp	.L2
.L24:
	movl	$1, n(%rip)
.L10:
	movl	%esi, %r13d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	480+a(%rip), %rcx
	movl	$9, %r10d
	leaq	18(%r15,%r9), %rax
	subq	%r9, %rdx
	leaq	(%rcx,%r11,8), %r11
	subl	%edi, %r10d
	leaq	(%rbx,%rax,8), %rax
	movq	%r14, %rcx
	negq	%rcx
	movslq	%r10d, %r10
	movq	%rdx, %r14
	salq	$4, %rcx
	salq	$4, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rax,%rcx), %r9
	movq	(%rax), %rdx
	addq	$16, %rax
	addq	-144(%r9,%r10), %rdx
	movq	%rdx, (%r9,%r14,8)
	cmpq	%rax, %r11
	jne	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	movl	k(%rip), %eax
	leaq	.LC1(%rip), %rdi
	addl	$9, %eax
	cltq
	leaq	(%rsi,%rax,2), %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, n(%rip)
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	k
	.bss
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 624
a:
	.zero	624
	.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:

long long a[39][2];i,n,k;main(t){for(;~scanf("%d",&k);++n-2?t=!t:++*a[k+9])for(i=8;n&&++i<30;)a[i][!t]=a[i-k][t]+a[i+k][t];n=!printf("%lld\n",a[k+9][!t]);}
11
8 3 2 4 8 7 2 4 0 8 8

10

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

```c
long long a[39][2];i,n,k;main(t){for(;~scanf("%d",&k);++n-2?t=!t:++*a[k+9])for(i=8;n&&++i<30;)a[i][!t]=a[i-k][t]+a[i+k][t];n=!printf("%lld\n",a[k+9][!t]);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 624
a:
	.zero	624
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L7:
	movl	$8, i(%rip)
	jmp	.L3
.L5:
	movl	i(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	cmpl	$0, -4(%rbp)
	sete	%dl
	movzbl	%dl, %edx
	addq	%rsi, %rcx
	movslq	%edx, %rdx
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L3:
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cmpl	$29, %eax
	jle	.L5
.L4:
	movl	n(%rip), %eax
	addl	$1, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L6:
	movl	k(%rip), %eax
	addl	$9, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	a(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	leaq	1(%rdx), %rcx
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L2:
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L7
	movl	k(%rip), %eax
	leal	9(%rax), %edx
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, n(%rip)
	movl	$0, %eax
	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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 624
a:
	.zero	624
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L7:
	movl	$8, i(%rip)
	jmp	.L3
.L5:
	movl	i(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	cmpl	$0, -4(%rbp)
	sete	%dl
	movzbl	%dl, %edx
	addq	%rsi, %rcx
	movslq	%edx, %rdx
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L3:
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cmpl	$29, %eax
	jle	.L5
.L4:
	movl	n(%rip), %eax
	addl	$1, %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L6:
	movl	k(%rip), %eax
	addl	$9, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	a(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	leaq	1(%rdx), %rcx
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L2:
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L7
	movl	k(%rip), %eax
	leal	9(%rax), %edx
	cmpl	$0, -4(%rbp)
	sete	%al
	movzbl	%al, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, n(%rip)
	movl	$0, %eax
	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:
