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 i,j,k,n;
long long int a[110][25],x;
//long long int b;

int main(){
	scanf("%d%lld",&n,&x);
	for(i=0;i<n-1;i++)for(j=0;j<=20;j++)a[i][j]=0;
	a[0][x]=1;
	for(i=1;i<n-1;i++){
		scanf("%lld",&x);
		for(j=0;j<=20;j++){
			if(a[i-1][j]>0){
				if(j+x<=20 && j+x>=0)a[i][j+x]+=a[i-1][j];
				if(j-x<=20 && j-x>=0)a[i][j-x]+=a[i-1][j];
			}
		}
	}
	scanf("%lld",&x);
	printf("%lld\n",a[n-2][x]);
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.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	a
	.align 32
	.type	a, @object
	.size	a, 22000
a:
	.zero	22000
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld"
.LC2:
	.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	x(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movq	x(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, i(%rip)
	jmp	.L6
.L11:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jle	.L8
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L9
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	testq	%rax, %rax
	js	.L9
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movq	x(%rip), %rdx
	addq	%rdx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdi
	movq	x(%rip), %rdx
	addq	%rdx, %rdi
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L9:
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L8
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	testq	%rax, %rax
	js	.L8
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rdi
	subq	%rdi, %rdx
	movq	%rdx, %r8
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L7:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L10
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L11
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	subl	$2, %eax
	movq	x(%rip), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdx
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L2
	subl	$2, %eax
	movq	%rbp, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rcx
	leaq	200(%rbp), %rax
	leaq	(%rax,%rcx,8), %rsi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	8(%rdx), %rdi
	movq	%rdx, %rcx
	movq	$0, (%rdx)
	addq	$200, %rdx
	andq	$-8, %rdi
	movq	$0, -40(%rdx)
	subq	%rdi, %rcx
	addl	$168, %ecx
	shrl	$3, %ecx
	rep stosq
	cmpq	%rsi, %rdx
	jne	.L3
	movq	x(%rip), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, j(%rip)
	movl	$1, i(%rip)
	movq	$1, 0(%rbp,%rax,8)
	cmpl	$1, %r8d
	jle	.L10
	movl	$21, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %r9d
	movq	x(%rip), %rdx
	movq	%rbx, %r8
	leal	-1(%r9), %ecx
	movq	%rdx, %rax
	subq	%rdx, %r8
	movslq	%ecx, %rcx
	negq	%rax
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	addq	%rdx, %rcx
	leaq	0(%rbp,%rcx,8), %rsi
	movslq	%r9d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%rbp,%rcx,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rsi,%rax,8), %rcx
	testq	%rcx, %rcx
	jle	.L6
	cmpq	$20, %rdx
	ja	.L7
	addq	%rcx, (%rdi,%rdx,8)
.L7:
	cmpq	$20, %rax
	ja	.L6
	movq	(%rsi,%rax,8), %rcx
	addq	%rcx, (%rdi,%rax,8)
.L6:
	addq	$1, %rax
	addq	$1, %rdx
	cmpq	%r8, %rax
	jne	.L9
	movl	n(%rip), %eax
	addl	$1, %r9d
	movl	$21, j(%rip)
	movl	%r9d, i(%rip)
	subl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L4
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	subl	$2, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	x(%rip), %rax
	movq	0(%rbp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	movq	x(%rip), %rax
	leaq	.LC1(%rip), %r13
	movl	$1, i(%rip)
	movq	$1, 0(%rbp,%rax,8)
	jmp	.L10
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	x
	.bss
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 22000
a:
	.zero	22000
	.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
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.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%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdx
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L2
	subl	$2, %eax
	movq	%rbp, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rcx
	leaq	200(%rbp), %rax
	leaq	(%rax,%rcx,8), %rsi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	8(%rdx), %rdi
	movq	%rdx, %rcx
	movq	$0, (%rdx)
	addq	$200, %rdx
	andq	$-8, %rdi
	movq	$0, -40(%rdx)
	subq	%rdi, %rcx
	addl	$168, %ecx
	shrl	$3, %ecx
	rep stosq
	cmpq	%rsi, %rdx
	jne	.L3
	movq	x(%rip), %rax
	leaq	.LC1(%rip), %r13
	movl	$21, j(%rip)
	movl	$1, i(%rip)
	movq	$1, 0(%rbp,%rax,8)
	cmpl	$1, %r8d
	jle	.L10
	movl	$21, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %r9d
	movq	x(%rip), %rdx
	movq	%rbx, %r8
	leal	-1(%r9), %ecx
	movq	%rdx, %rax
	subq	%rdx, %r8
	movslq	%ecx, %rcx
	negq	%rax
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	addq	%rdx, %rcx
	leaq	0(%rbp,%rcx,8), %rsi
	movslq	%r9d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%rbp,%rcx,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rsi,%rax,8), %rcx
	testq	%rcx, %rcx
	jle	.L6
	cmpq	$20, %rdx
	ja	.L7
	addq	%rcx, (%rdi,%rdx,8)
.L7:
	cmpq	$20, %rax
	ja	.L6
	movq	(%rsi,%rax,8), %rcx
	addq	%rcx, (%rdi,%rax,8)
.L6:
	addq	$1, %rax
	addq	$1, %rdx
	cmpq	%r8, %rax
	jne	.L9
	movl	n(%rip), %eax
	addl	$1, %r9d
	movl	$21, j(%rip)
	movl	%r9d, i(%rip)
	subl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L4
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	subl	$2, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	x(%rip), %rax
	movq	0(%rbp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	movq	x(%rip), %rax
	leaq	.LC1(%rip), %r13
	movl	$1, i(%rip)
	movq	$1, 0(%rbp,%rax,8)
	jmp	.L10
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	x
	.bss
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 22000
a:
	.zero	22000
	.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
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.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 i,j,k,n;
long long int a[110][25],x;
//long long int b;

int main(){
	scanf("%d%lld",&n,&x);
	for(i=0;i<n-1;i++)for(j=0;j<=20;j++)a[i][j]=0;
	a[0][x]=1;
	for(i=1;i<n-1;i++){
		scanf("%lld",&x);
		for(j=0;j<=20;j++){
			if(a[i-1][j]>0){
				if(j+x<=20 && j+x>=0)a[i][j+x]+=a[i-1][j];
				if(j-x<=20 && j-x>=0)a[i][j-x]+=a[i-1][j];
			}
		}
	}
	scanf("%lld",&x);
	printf("%lld\n",a[n-2][x]);
	
	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>

int i,j,k,n;
long long int a[110][25],x;
//long long int b;

int main(){
	scanf("%d%lld",&n,&x);
	for(i=0;i<n-1;i++)for(j=0;j<=20;j++)a[i][j]=0;
	a[0][x]=1;
	for(i=1;i<n-1;i++){
		scanf("%lld",&x);
		for(j=0;j<=20;j++){
			if(a[i-1][j]>0){
				if(j+x<=20 && j+x>=0)a[i][j+x]+=a[i-1][j];
				if(j-x<=20 && j-x>=0)a[i][j-x]+=a[i-1][j];
			}
		}
	}
	scanf("%lld",&x);
	printf("%lld\n",a[n-2][x]);
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.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	a
	.align 32
	.type	a, @object
	.size	a, 22000
a:
	.zero	22000
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld"
.LC2:
	.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	x(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movq	x(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, i(%rip)
	jmp	.L6
.L11:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jle	.L8
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L9
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	testq	%rax, %rax
	js	.L9
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movq	x(%rip), %rdx
	addq	%rdx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdi
	movq	x(%rip), %rdx
	addq	%rdx, %rdi
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L9:
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L8
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	testq	%rax, %rax
	js	.L8
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rdi
	subq	%rdi, %rdx
	movq	%rdx, %r8
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L7:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L10
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L11
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	subl	$2, %eax
	movq	x(%rip), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.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	a
	.align 32
	.type	a, @object
	.size	a, 22000
a:
	.zero	22000
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d%lld"
.LC1:
	.string	"%lld"
.LC2:
	.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	x(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movq	x(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, i(%rip)
	jmp	.L6
.L11:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jle	.L8
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L9
	movl	j(%rip), %eax
	movslq	%eax, %rdx
	movq	x(%rip), %rax
	addq	%rdx, %rax
	testq	%rax, %rax
	js	.L9
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rcx
	movq	x(%rip), %rdx
	addq	%rdx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdi
	movq	x(%rip), %rdx
	addq	%rdx, %rdi
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L9:
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	cmpq	$20, %rax
	jg	.L8
	movl	j(%rip), %eax
	cltq
	movq	x(%rip), %rdx
	subq	%rdx, %rax
	testq	%rax, %rax
	js	.L8
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	movq	x(%rip), %rdi
	subq	%rdi, %rdx
	movq	%rdx, %r8
	addq	%rsi, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L7:
	movl	j(%rip), %eax
	cmpl	$20, %eax
	jle	.L10
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L11
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	subl	$2, %eax
	movq	x(%rip), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.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:
