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

```c
long long t[21][2],a,d;int main(b){for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),a=!printf("%lld\n",t[b][0]);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	a(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	leaq	12(%rsp), %r12
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	movq	%r12, %rdx
	call	scanf@PLT
	movq	d(%rip), %rax
	movq	a(%rip), %r8
	cmpq	$20, %rax
	jg	.L3
	movq	a(%rip), %r8
	leaq	t(%rip), %rbx
	movslq	12(%rsp), %rdi
	movq	%r8, %rdx
	andl	$1, %edx
	leaq	(%rbx,%rdx,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	salq	$4, %rdx
	cmpq	%rdi, %rax
	sete	%cl
	addq	$1, %rax
	movq	%rcx, (%rsi,%rdx)
	cmpq	$21, %rax
	jne	.L4
	movq	$21, d(%rip)
.L3:
	leaq	-1(%r8), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, %ebp
	movq	%rax, a(%rip)
	cmpq	$1, %rax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	scanf@PLT
	testl	%eax, %eax
	je	.L15
	movq	a(%rip), %r8
	movslq	12(%rsp), %rsi
	movq	%r8, %r10
	movq	%r8, %rdi
	notq	%r10
	andl	$1, %edi
	andl	$1, %r10d
	testq	%rsi, %rsi
	jle	.L17
	movl	$21, %r9d
	movq	%rsi, %r14
	leaq	(%rbx,%rdi,8), %rdx
	movq	%r10, %r11
	cmpq	%r9, %rsi
	cmovle	%rsi, %r9
	salq	$4, %r14
	xorl	%eax, %eax
	subq	%rdi, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rcx
	subq	%rax, %rcx
	cmpq	%rcx, %rsi
	jge	.L7
	leaq	(%rdx,%r14), %rcx
	addq	$1, %rax
	addq	$16, %rdx
	movq	(%rcx,%r11,8), %rcx
	movq	%rcx, -16(%rdx)
	cmpq	%rax, %r9
	jg	.L10
.L8:
	cmpq	$21, %rax
	je	.L13
.L6:
	movq	%rsi, %r9
	movq	%rax, %rdx
	leaq	(%rsi,%rax), %rax
	subq	%r10, %rdi
	negq	%r9
	leaq	(%r10,%rax,2), %rax
	movq	%rdi, %r14
	movq	%r9, %r11
	leaq	(%rbx,%rax,8), %rax
	salq	$4, %r9
	salq	$5, %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	(%rax,%r11), %rcx
	subq	%rdx, %rdi
	cmpq	%rdi, %rsi
	leaq	(%rax,%r9), %rdi
	jge	.L26
	addq	(%rax), %rcx
.L26:
	addq	$1, %rdx
	movq	%rcx, (%rdi,%r14,8)
	addq	$16, %rax
	cmpq	$20, %rdx
	jle	.L14
.L13:
	subq	$1, %r8
	movq	%rbp, d(%rip)
	movq	%r8, a(%rip)
	cmpq	$1, %r8
	jne	.L5
.L15:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	12(%rsp), %rax
	leaq	.LC2(%rip), %rdi
	salq	$4, %rax
	movq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movq	%rax, a(%rip)
	addq	$16, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	addq	$1, %rax
	movq	$0, (%rdx)
	addq	$16, %rdx
	cmpq	%rax, %r9
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	d
	.bss
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 336
t:
	.zero	336
	.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
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	a(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	leaq	12(%rsp), %r12
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	movq	%r12, %rdx
	call	scanf@PLT
	movq	d(%rip), %rax
	movq	a(%rip), %r8
	cmpq	$20, %rax
	jg	.L3
	movq	a(%rip), %r8
	leaq	t(%rip), %rbx
	movslq	12(%rsp), %rdi
	movq	%r8, %rdx
	andl	$1, %edx
	leaq	(%rbx,%rdx,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	salq	$4, %rdx
	cmpq	%rdi, %rax
	sete	%cl
	addq	$1, %rax
	movq	%rcx, (%rsi,%rdx)
	cmpq	$21, %rax
	jne	.L4
	movq	$21, d(%rip)
.L3:
	leaq	-1(%r8), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, %ebp
	movq	%rax, a(%rip)
	cmpq	$1, %rax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	scanf@PLT
	testl	%eax, %eax
	je	.L15
	movq	a(%rip), %r8
	movslq	12(%rsp), %rsi
	movq	%r8, %r10
	movq	%r8, %rdi
	notq	%r10
	andl	$1, %edi
	andl	$1, %r10d
	testq	%rsi, %rsi
	jle	.L17
	movl	$21, %r9d
	movq	%rsi, %r14
	leaq	(%rbx,%rdi,8), %rdx
	movq	%r10, %r11
	cmpq	%r9, %rsi
	cmovle	%rsi, %r9
	salq	$4, %r14
	xorl	%eax, %eax
	subq	%rdi, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rcx
	subq	%rax, %rcx
	cmpq	%rcx, %rsi
	jge	.L7
	leaq	(%rdx,%r14), %rcx
	addq	$1, %rax
	addq	$16, %rdx
	movq	(%rcx,%r11,8), %rcx
	movq	%rcx, -16(%rdx)
	cmpq	%rax, %r9
	jg	.L10
.L8:
	cmpq	$21, %rax
	je	.L13
.L6:
	movq	%rsi, %r9
	movq	%rax, %rdx
	leaq	(%rsi,%rax), %rax
	subq	%r10, %rdi
	negq	%r9
	leaq	(%r10,%rax,2), %rax
	movq	%rdi, %r14
	movq	%r9, %r11
	leaq	(%rbx,%rax,8), %rax
	salq	$4, %r9
	salq	$5, %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	(%rax,%r11), %rcx
	subq	%rdx, %rdi
	cmpq	%rdi, %rsi
	leaq	(%rax,%r9), %rdi
	jge	.L26
	addq	(%rax), %rcx
.L26:
	addq	$1, %rdx
	movq	%rcx, (%rdi,%r14,8)
	addq	$16, %rax
	cmpq	$20, %rdx
	jle	.L14
.L13:
	subq	$1, %r8
	movq	%rbp, d(%rip)
	movq	%r8, a(%rip)
	cmpq	$1, %r8
	jne	.L5
.L15:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	12(%rsp), %rax
	leaq	.LC2(%rip), %rdi
	salq	$4, %rax
	movq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movq	%rax, a(%rip)
	addq	$16, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	addq	$1, %rax
	movq	$0, (%rdx)
	addq	$16, %rdx
	cmpq	%rax, %r9
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	d
	.bss
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 336
t:
	.zero	336
	.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
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	a(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	leaq	12(%rsp), %r12
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	movq	%r12, %rdx
	call	scanf@PLT
	movq	d(%rip), %rax
	movq	a(%rip), %r8
	cmpq	$20, %rax
	jg	.L3
	movq	a(%rip), %r8
	leaq	t(%rip), %rbx
	movslq	12(%rsp), %rdi
	movq	%r8, %rdx
	andl	$1, %edx
	leaq	(%rbx,%rdx,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	salq	$4, %rdx
	cmpq	%rdi, %rax
	sete	%cl
	addq	$1, %rax
	movq	%rcx, (%rsi,%rdx)
	cmpq	$21, %rax
	jne	.L4
	movq	$21, d(%rip)
.L3:
	leaq	-1(%r8), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, %ebp
	movq	%rax, a(%rip)
	cmpq	$1, %rax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	scanf@PLT
	testl	%eax, %eax
	je	.L15
	movq	a(%rip), %r8
	movslq	12(%rsp), %rsi
	movq	%r8, %r10
	movq	%r8, %rdi
	notq	%r10
	andl	$1, %edi
	andl	$1, %r10d
	testq	%rsi, %rsi
	jle	.L17
	movl	$21, %r9d
	movq	%rsi, %r14
	leaq	(%rbx,%rdi,8), %rdx
	movq	%r10, %r11
	cmpq	%r9, %rsi
	cmovle	%rsi, %r9
	salq	$4, %r14
	xorl	%eax, %eax
	subq	%rdi, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rcx
	subq	%rax, %rcx
	cmpq	%rcx, %rsi
	jge	.L7
	leaq	(%rdx,%r14), %rcx
	addq	$1, %rax
	addq	$16, %rdx
	movq	(%rcx,%r11,8), %rcx
	movq	%rcx, -16(%rdx)
	cmpq	%rax, %r9
	jg	.L10
.L8:
	cmpq	$21, %rax
	je	.L13
.L6:
	movq	%rsi, %r9
	movq	%rax, %rdx
	leaq	(%rsi,%rax), %rax
	subq	%r10, %rdi
	negq	%r9
	leaq	(%r10,%rax,2), %rax
	movq	%rdi, %r14
	movq	%r9, %r11
	leaq	(%rbx,%rax,8), %rax
	salq	$4, %r9
	salq	$5, %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	(%rax,%r11), %rcx
	subq	%rdx, %rdi
	cmpq	%rdi, %rsi
	leaq	(%rax,%r9), %rdi
	jge	.L26
	addq	(%rax), %rcx
.L26:
	addq	$1, %rdx
	movq	%rcx, (%rdi,%r14,8)
	addq	$16, %rax
	cmpq	$20, %rdx
	jle	.L14
.L13:
	subq	$1, %r8
	movq	%rbp, d(%rip)
	movq	%r8, a(%rip)
	cmpq	$1, %r8
	jne	.L5
.L15:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	12(%rsp), %rax
	leaq	.LC2(%rip), %rdi
	salq	$4, %rax
	movq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movq	%rax, a(%rip)
	addq	$16, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	addq	$1, %rax
	movq	$0, (%rdx)
	addq	$16, %rdx
	cmpq	%rax, %r9
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	d
	.bss
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 336
t:
	.zero	336
	.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
long long t[21][2],a,d;int main(b){for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),a=!printf("%lld\n",t[b][0]);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long long t[21][2],a,d;int main(b){for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),a=!printf("%lld\n",t[b][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:

11
8 3 2 4 8 7 2 4 0 8 8

10

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

```c
long long t[21][2],a,d;int main(b){for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),a=!printf("%lld\n",t[b][0]);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	a(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	leaq	12(%rsp), %r12
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	movq	%r12, %rdx
	call	scanf@PLT
	movq	d(%rip), %rax
	movq	a(%rip), %r8
	cmpq	$20, %rax
	jg	.L3
	movq	a(%rip), %r8
	leaq	t(%rip), %rbx
	movslq	12(%rsp), %rdi
	movq	%r8, %rdx
	andl	$1, %edx
	leaq	(%rbx,%rdx,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	salq	$4, %rdx
	cmpq	%rdi, %rax
	sete	%cl
	addq	$1, %rax
	movq	%rcx, (%rsi,%rdx)
	cmpq	$21, %rax
	jne	.L4
	movq	$21, d(%rip)
.L3:
	leaq	-1(%r8), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, %ebp
	movq	%rax, a(%rip)
	cmpq	$1, %rax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	scanf@PLT
	testl	%eax, %eax
	je	.L15
	movq	a(%rip), %r8
	movslq	12(%rsp), %rsi
	movq	%r8, %r10
	movq	%r8, %rdi
	notq	%r10
	andl	$1, %edi
	andl	$1, %r10d
	testq	%rsi, %rsi
	jle	.L17
	movl	$21, %r9d
	movq	%rsi, %r14
	leaq	(%rbx,%rdi,8), %rdx
	movq	%r10, %r11
	cmpq	%r9, %rsi
	cmovle	%rsi, %r9
	salq	$4, %r14
	xorl	%eax, %eax
	subq	%rdi, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rcx
	subq	%rax, %rcx
	cmpq	%rcx, %rsi
	jge	.L7
	leaq	(%rdx,%r14), %rcx
	addq	$1, %rax
	addq	$16, %rdx
	movq	(%rcx,%r11,8), %rcx
	movq	%rcx, -16(%rdx)
	cmpq	%rax, %r9
	jg	.L10
.L8:
	cmpq	$21, %rax
	je	.L13
.L6:
	movq	%rsi, %r9
	movq	%rax, %rdx
	leaq	(%rsi,%rax), %rax
	subq	%r10, %rdi
	negq	%r9
	leaq	(%r10,%rax,2), %rax
	movq	%rdi, %r14
	movq	%r9, %r11
	leaq	(%rbx,%rax,8), %rax
	salq	$4, %r9
	salq	$5, %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	(%rax,%r11), %rcx
	subq	%rdx, %rdi
	cmpq	%rdi, %rsi
	leaq	(%rax,%r9), %rdi
	jge	.L26
	addq	(%rax), %rcx
.L26:
	addq	$1, %rdx
	movq	%rcx, (%rdi,%r14,8)
	addq	$16, %rax
	cmpq	$20, %rdx
	jle	.L14
.L13:
	subq	$1, %r8
	movq	%rbp, d(%rip)
	movq	%r8, a(%rip)
	cmpq	$1, %r8
	jne	.L5
.L15:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	12(%rsp), %rax
	leaq	.LC2(%rip), %rdi
	salq	$4, %rax
	movq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movq	%rax, a(%rip)
	addq	$16, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	addq	$1, %rax
	movq	$0, (%rdx)
	addq	$16, %rdx
	cmpq	%rax, %r9
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	d
	.bss
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 336
t:
	.zero	336
	.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
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	a(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	leaq	12(%rsp), %r12
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	movq	%r12, %rdx
	call	scanf@PLT
	movq	d(%rip), %rax
	movq	a(%rip), %r8
	cmpq	$20, %rax
	jg	.L3
	movq	a(%rip), %r8
	leaq	t(%rip), %rbx
	movslq	12(%rsp), %rdi
	movq	%r8, %rdx
	andl	$1, %edx
	leaq	(%rbx,%rdx,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	salq	$4, %rdx
	cmpq	%rdi, %rax
	sete	%cl
	addq	$1, %rax
	movq	%rcx, (%rsi,%rdx)
	cmpq	$21, %rax
	jne	.L4
	movq	$21, d(%rip)
.L3:
	leaq	-1(%r8), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, %ebp
	movq	%rax, a(%rip)
	cmpq	$1, %rax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	scanf@PLT
	testl	%eax, %eax
	je	.L15
	movq	a(%rip), %r8
	movslq	12(%rsp), %rsi
	movq	%r8, %r10
	movq	%r8, %rdi
	notq	%r10
	andl	$1, %edi
	andl	$1, %r10d
	testq	%rsi, %rsi
	jle	.L17
	movl	$21, %r9d
	movq	%rsi, %r14
	leaq	(%rbx,%rdi,8), %rdx
	movq	%r10, %r11
	cmpq	%r9, %rsi
	cmovle	%rsi, %r9
	salq	$4, %r14
	xorl	%eax, %eax
	subq	%rdi, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rcx
	subq	%rax, %rcx
	cmpq	%rcx, %rsi
	jge	.L7
	leaq	(%rdx,%r14), %rcx
	addq	$1, %rax
	addq	$16, %rdx
	movq	(%rcx,%r11,8), %rcx
	movq	%rcx, -16(%rdx)
	cmpq	%rax, %r9
	jg	.L10
.L8:
	cmpq	$21, %rax
	je	.L13
.L6:
	movq	%rsi, %r9
	movq	%rax, %rdx
	leaq	(%rsi,%rax), %rax
	subq	%r10, %rdi
	negq	%r9
	leaq	(%r10,%rax,2), %rax
	movq	%rdi, %r14
	movq	%r9, %r11
	leaq	(%rbx,%rax,8), %rax
	salq	$4, %r9
	salq	$5, %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	(%rax,%r11), %rcx
	subq	%rdx, %rdi
	cmpq	%rdi, %rsi
	leaq	(%rax,%r9), %rdi
	jge	.L26
	addq	(%rax), %rcx
.L26:
	addq	$1, %rdx
	movq	%rcx, (%rdi,%r14,8)
	addq	$16, %rax
	cmpq	$20, %rdx
	jle	.L14
.L13:
	subq	$1, %r8
	movq	%rbp, d(%rip)
	movq	%r8, a(%rip)
	cmpq	$1, %r8
	jne	.L5
.L15:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	12(%rsp), %rax
	leaq	.LC2(%rip), %rdi
	salq	$4, %rax
	movq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movq	%rax, a(%rip)
	addq	$16, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	addq	$1, %rax
	movq	$0, (%rdx)
	addq	$16, %rdx
	cmpq	%rax, %r9
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	d
	.bss
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 336
t:
	.zero	336
	.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:
```