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>
#include <string.h>

int main(void)
{
    long long ans[100][21];
    int n;
    int add[100];
    int i, j;
    
    scanf("%d", &n);
    
    for (i = 0; i < n; i++){
        scanf("%d", &add[i]);
    }
    
    memset(ans, 0, sizeof(ans));
    
    ans[0][add[0]] = 1;
    
    for (i = 1; i < n; i++){
        for (j = 0; j < 21; j++){
            if (ans[i - 1][j] != 0){
                if (j + add[i] <= 20){
                    ans[i][j + add[i]] += ans[i - 1][j];
                }
                if (j - add[i] >= 0){
                    ans[i][j - add[i]] += ans[i - 1][j];
                }
            }
        }
    }
    
    printf("%lld\n", ans[n - 2][add[n - 1]]);
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-17228(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -17224(%rbp)
	jmp	.L2
.L3:
	leaq	-17216(%rbp), %rdx
	movl	-17224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -17224(%rbp)
.L2:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L3
	leaq	-16816(%rbp), %rax
	movl	$16800, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-17216(%rbp), %eax
	cltq
	movq	$1, -16816(%rbp,%rax,8)
	movl	$1, -17224(%rbp)
	jmp	.L4
.L9:
	movl	$0, -17220(%rbp)
	jmp	.L5
.L8:
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L7
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	addl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L7:
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	subl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L6:
	addl	$1, -17220(%rbp)
.L5:
	cmpl	$20, -17220(%rbp)
	jle	.L8
	addl	$1, -17224(%rbp)
.L4:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L9
	movl	-17228(%rbp), %eax
	leal	-2(%rax), %edx
	movl	-17228(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-17216(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-16384(%rsp), %r11
	.cfi_def_cfa 11, 16424
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$856, %rsp
	.cfi_def_cfa_offset 17280
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 17224(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L2
	leaq	16(%rsp), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	addq	$4, %r12
	cmpl	%ebp, %ebx
	jg	.L3
	leaq	416(%rsp), %r8
	movl	$16800, %edx
	xorl	%esi, %esi
	movq	%r8, %rdi
	call	memset@PLT
	movq	%rax, %r8
	movslq	16(%rsp), %rax
	movq	$1, 416(%rsp,%rax,8)
	cmpl	$1, %ebx
	jle	.L11
	leaq	20(%rsp), %r9
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%r11d, %rdx
	xorl	%eax, %eax
	leaq	(%rdx,%rdx,4), %rcx
	leaq	(%rdx,%rcx,4), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%r8,%rax,8), %rsi
	movl	%eax, %edx
	testq	%rsi, %rsi
	je	.L6
	movl	(%r9), %edi
	leal	(%rdi,%rax), %ecx
	cmpl	$20, %ecx
	jg	.L7
	movslq	%ecx, %rcx
	addq	%r10, %rcx
	addq	%rsi, 416(%rsp,%rcx,8)
.L7:
	subl	%edi, %edx
	js	.L6
	movslq	%edx, %rdx
	movq	(%r8,%rax,8), %rcx
	addq	%r10, %rdx
	addq	%rcx, 416(%rsp,%rdx,8)
.L6:
	addq	$1, %rax
	cmpq	$21, %rax
	jne	.L9
	addl	$1, %r11d
	addq	$168, %r8
	addq	$4, %r9
	cmpl	%r11d, %ebx
	jne	.L10
.L11:
	leal	-1(%rbx), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cltq
	movslq	16(%rsp,%rax,4), %rdx
	leal	-2(%rbx), %eax
	cltq
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rdx, %rax
	movq	416(%rsp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	17224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$17240, %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
.L2:
	.cfi_restore_state
	leaq	416(%rsp), %rdi
	movl	$16800, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	16(%rsp), %rax
	movq	$1, 416(%rsp,%rax,8)
	jmp	.L11
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-16384(%rsp), %r11
	.cfi_def_cfa 11, 16424
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$856, %rsp
	.cfi_def_cfa_offset 17280
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 17224(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L2
	leaq	16(%rsp), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ebx
	addq	$4, %r12
	cmpl	%ebp, %ebx
	jg	.L3
	leaq	416(%rsp), %r8
	movl	$16800, %edx
	xorl	%esi, %esi
	movq	%r8, %rdi
	call	memset@PLT
	movq	%rax, %r8
	movslq	16(%rsp), %rax
	movq	$1, 416(%rsp,%rax,8)
	cmpl	$1, %ebx
	jle	.L11
	leaq	20(%rsp), %r9
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%r11d, %rdx
	xorl	%eax, %eax
	leaq	(%rdx,%rdx,4), %rcx
	leaq	(%rdx,%rcx,4), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%r8,%rax,8), %rsi
	movl	%eax, %edx
	testq	%rsi, %rsi
	je	.L6
	movl	(%r9), %edi
	leal	(%rdi,%rax), %ecx
	cmpl	$20, %ecx
	jg	.L7
	movslq	%ecx, %rcx
	addq	%r10, %rcx
	addq	%rsi, 416(%rsp,%rcx,8)
.L7:
	subl	%edi, %edx
	js	.L6
	movslq	%edx, %rdx
	movq	(%r8,%rax,8), %rcx
	addq	%r10, %rdx
	addq	%rcx, 416(%rsp,%rdx,8)
.L6:
	addq	$1, %rax
	cmpq	$21, %rax
	jne	.L9
	addl	$1, %r11d
	addq	$168, %r8
	addq	$4, %r9
	cmpl	%r11d, %ebx
	jne	.L10
.L11:
	leal	-1(%rbx), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cltq
	movslq	16(%rsp,%rax,4), %rdx
	leal	-2(%rbx), %eax
	cltq
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rdx, %rax
	movq	416(%rsp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	17224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$17240, %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
.L2:
	.cfi_restore_state
	leaq	416(%rsp), %rdi
	movl	$16800, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	16(%rsp), %rax
	movq	$1, 416(%rsp,%rax,8)
	jmp	.L11
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include <string.h>

int main(void)
{
    long long ans[100][21];
    int n;
    int add[100];
    int i, j;
    
    scanf("%d", &n);
    
    for (i = 0; i < n; i++){
        scanf("%d", &add[i]);
    }
    
    memset(ans, 0, sizeof(ans));
    
    ans[0][add[0]] = 1;
    
    for (i = 1; i < n; i++){
        for (j = 0; j < 21; j++){
            if (ans[i - 1][j] != 0){
                if (j + add[i] <= 20){
                    ans[i][j + add[i]] += ans[i - 1][j];
                }
                if (j - add[i] >= 0){
                    ans[i][j - add[i]] += ans[i - 1][j];
                }
            }
        }
    }
    
    printf("%lld\n", ans[n - 2][add[n - 1]]);
    
    return (0);
}
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
#include <stdio.h>
#include <string.h>

int main(void)
{
    long long ans[100][21];
    int n;
    int add[100];
    int i, j;
    
    scanf("%d", &n);
    
    for (i = 0; i < n; i++){
        scanf("%d", &add[i]);
    }
    
    memset(ans, 0, sizeof(ans));
    
    ans[0][add[0]] = 1;
    
    for (i = 1; i < n; i++){
        for (j = 0; j < 21; j++){
            if (ans[i - 1][j] != 0){
                if (j + add[i] <= 20){
                    ans[i][j + add[i]] += ans[i - 1][j];
                }
                if (j - add[i] >= 0){
                    ans[i][j - add[i]] += ans[i - 1][j];
                }
            }
        }
    }
    
    printf("%lld\n", ans[n - 2][add[n - 1]]);
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-17228(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -17224(%rbp)
	jmp	.L2
.L3:
	leaq	-17216(%rbp), %rdx
	movl	-17224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -17224(%rbp)
.L2:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L3
	leaq	-16816(%rbp), %rax
	movl	$16800, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-17216(%rbp), %eax
	cltq
	movq	$1, -16816(%rbp,%rax,8)
	movl	$1, -17224(%rbp)
	jmp	.L4
.L9:
	movl	$0, -17220(%rbp)
	jmp	.L5
.L8:
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L7
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	addl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L7:
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	subl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L6:
	addl	$1, -17220(%rbp)
.L5:
	cmpl	$20, -17220(%rbp)
	jle	.L8
	addl	$1, -17224(%rbp)
.L4:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L9
	movl	-17228(%rbp), %eax
	leal	-2(%rax), %edx
	movl	-17228(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-17216(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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	"%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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-17228(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -17224(%rbp)
	jmp	.L2
.L3:
	leaq	-17216(%rbp), %rdx
	movl	-17224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -17224(%rbp)
.L2:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L3
	leaq	-16816(%rbp), %rax
	movl	$16800, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-17216(%rbp), %eax
	cltq
	movq	$1, -16816(%rbp,%rax,8)
	movl	$1, -17224(%rbp)
	jmp	.L4
.L9:
	movl	$0, -17220(%rbp)
	jmp	.L5
.L8:
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L7
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	addl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L7:
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	testl	%eax, %eax
	js	.L6
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %edx
	movl	-17220(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rcx
	movl	-17224(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-17220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	-16816(%rbp,%rax,8), %rdx
	movl	-17224(%rbp), %eax
	cltq
	movl	-17216(%rbp,%rax,4), %esi
	movl	-17220(%rbp), %eax
	subl	%esi, %eax
	addq	%rdx, %rcx
	movslq	%eax, %rsi
	movl	-17224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, -16816(%rbp,%rax,8)
.L6:
	addl	$1, -17220(%rbp)
.L5:
	cmpl	$20, -17220(%rbp)
	jle	.L8
	addl	$1, -17224(%rbp)
.L4:
	movl	-17228(%rbp), %eax
	cmpl	%eax, -17224(%rbp)
	jl	.L9
	movl	-17228(%rbp), %eax
	leal	-2(%rax), %edx
	movl	-17228(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-17216(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	-16816(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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:
