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

```c
/*
  AOJ 0557
  Title:A First Grader
  @kankichi573
*/
#include <stdio.h>
int N,a[101];
long long count[100][21];
 
long long solve()
{
  int i,j,next;

  count[0][a[0]]=1;

  for(i=0;i<N-2;i++)
    {
      for(j=0;j<=20;j++)
	{
	  if((next=j-a[i+1])>=0)
	    count[i+1][next]+=count[i][j];
	  if((next=j+a[i+1])<=20)
	    count[i+1][next]+=count[i][j];
	}
    }
  return(count[N-2][a[N-1]]);
}

main()
{
  int i;
  long long ret;
  
  scanf("%d",&N);
	
  for(i=0;i<N;i++)
    scanf("%d",&a[i]);
  
  ret=solve();
  printf("%lld\n",ret);

  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 404
a:
	.zero	404
	.globl	count
	.align 32
	.type	count, @object
	.size	count, 16800
count:
	.zero	16800
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L4
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L4:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20, -4(%rbp)
	jg	.L5
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L5:
	addl	$1, -8(%rbp)
.L3:
	cmpl	$20, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	subl	$2, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	N(%rip), %eax
	leal	-2(%rax), %ecx
	movl	N(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L10:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, %eax
	call	solve
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	a(%rip), %rax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	N(%rip), %r15d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	count(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	$1, (%r12,%rax,8)
	leal	-2(%r15), %eax
	movl	%eax, -4(%rsp)
	testl	%eax, %eax
	jle	.L2
	leal	-3(%r15), %eax
	xorl	%r8d, %r8d
	leaq	4+a(%rip), %rbp
	movq	$-168, %rbx
	leaq	(%rax,%rax,4), %rdx
	movl	$21, %r11d
	movl	$21, %r13d
	leaq	42(%rax,%rdx,4), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	0(%rbp), %rcx
	movl	%r13d, %r10d
	movl	%ecx, %edx
	movq	%rcx, %rsi
	movq	%rcx, %rdi
	subl	%ecx, %r10d
	negq	%rsi
	negl	%edx
	leaq	(%rcx,%r11), %rax
	addl	%edi, %edi
	leaq	(%rbx,%rsi,8), %r9
	movslq	%edx, %rsi
	leaq	(%r12,%rax,8), %rax
	subq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%edx, %edx
	js	.L3
	leaq	(%rax,%r9), %rcx
	movq	(%rcx,%r8), %rcx
	addq	%rcx, (%rax,%rsi,8)
.L3:
	leal	(%rdx,%rdi), %ecx
	cmpl	$20, %ecx
	jg	.L4
	leaq	(%rax,%r9), %rcx
	movq	(%rcx,%r8), %rcx
	addq	%rcx, (%rax)
.L4:
	addl	$1, %edx
	addq	$8, %rax
	cmpl	%r10d, %edx
	jne	.L5
	addq	$21, %r11
	addq	$4, %rbp
	subq	$168, %rbx
	addq	$168, %r8
	cmpq	%r14, %r11
	jne	.L6
.L2:
	leal	-1(%r15), %eax
	leaq	a(%rip), %rdx
	cltq
	movslq	(%rdx,%rax,4), %rdx
	movslq	-4(%rsp), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rdx, %rax
	movq	(%r12,%rax,8), %rax
	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
.LFE23:
	.size	solve, .-solve
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, N(%rip)
	jg	.L13
.L12:
	xorl	%eax, %eax
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	count
	.bss
	.align 32
	.type	count, @object
	.size	count, 16800
count:
	.zero	16800
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 404
a:
	.zero	404
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.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
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	a(%rip), %rax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	N(%rip), %r15d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	count(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	$1, (%r12,%rax,8)
	leal	-2(%r15), %eax
	movl	%eax, -4(%rsp)
	testl	%eax, %eax
	jle	.L2
	leal	-3(%r15), %eax
	xorl	%r8d, %r8d
	leaq	4+a(%rip), %rbp
	movq	$-168, %rbx
	leaq	(%rax,%rax,4), %rdx
	movl	$21, %r11d
	movl	$21, %r13d
	leaq	42(%rax,%rdx,4), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	0(%rbp), %rcx
	movl	%r13d, %r10d
	movl	%ecx, %edx
	movq	%rcx, %rsi
	movq	%rcx, %rdi
	subl	%ecx, %r10d
	negq	%rsi
	negl	%edx
	leaq	(%rcx,%r11), %rax
	addl	%edi, %edi
	leaq	(%rbx,%rsi,8), %r9
	movslq	%edx, %rsi
	leaq	(%r12,%rax,8), %rax
	subq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%edx, %edx
	js	.L3
	leaq	(%rax,%r9), %rcx
	movq	(%rcx,%r8), %rcx
	addq	%rcx, (%rax,%rsi,8)
.L3:
	leal	(%rdx,%rdi), %ecx
	cmpl	$20, %ecx
	jg	.L4
	leaq	(%rax,%r9), %rcx
	movq	(%rcx,%r8), %rcx
	addq	%rcx, (%rax)
.L4:
	addl	$1, %edx
	addq	$8, %rax
	cmpl	%r10d, %edx
	jne	.L5
	addq	$21, %r11
	addq	$4, %rbp
	subq	$168, %rbx
	addq	$168, %r8
	cmpq	%r14, %r11
	jne	.L6
.L2:
	leal	-1(%r15), %eax
	leaq	a(%rip), %rdx
	cltq
	movslq	(%rdx,%rax,4), %rdx
	movslq	-4(%rsp), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rdx, %rax
	movq	(%r12,%rax,8), %rax
	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
.LFE23:
	.size	solve, .-solve
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, N(%rip)
	jg	.L13
.L12:
	xorl	%eax, %eax
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	count
	.bss
	.align 32
	.type	count, @object
	.size	count, 16800
count:
	.zero	16800
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 404
a:
	.zero	404
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.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:

/*
  AOJ 0557
  Title:A First Grader
  @kankichi573
*/
#include <stdio.h>
int N,a[101];
long long count[100][21];
 
long long solve()
{
  int i,j,next;

  count[0][a[0]]=1;

  for(i=0;i<N-2;i++)
    {
      for(j=0;j<=20;j++)
	{
	  if((next=j-a[i+1])>=0)
	    count[i+1][next]+=count[i][j];
	  if((next=j+a[i+1])<=20)
	    count[i+1][next]+=count[i][j];
	}
    }
  return(count[N-2][a[N-1]]);
}

main()
{
  int i;
  long long ret;
  
  scanf("%d",&N);
	
  for(i=0;i<N;i++)
    scanf("%d",&a[i]);
  
  ret=solve();
  printf("%lld\n",ret);

  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
/*
  AOJ 0557
  Title:A First Grader
  @kankichi573
*/
#include <stdio.h>
int N,a[101];
long long count[100][21];
 
long long solve()
{
  int i,j,next;

  count[0][a[0]]=1;

  for(i=0;i<N-2;i++)
    {
      for(j=0;j<=20;j++)
	{
	  if((next=j-a[i+1])>=0)
	    count[i+1][next]+=count[i][j];
	  if((next=j+a[i+1])<=20)
	    count[i+1][next]+=count[i][j];
	}
    }
  return(count[N-2][a[N-1]]);
}

main()
{
  int i;
  long long ret;
  
  scanf("%d",&N);
	
  for(i=0;i<N;i++)
    scanf("%d",&a[i]);
  
  ret=solve();
  printf("%lld\n",ret);

  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 404
a:
	.zero	404
	.globl	count
	.align 32
	.type	count, @object
	.size	count, 16800
count:
	.zero	16800
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L4
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L4:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20, -4(%rbp)
	jg	.L5
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L5:
	addl	$1, -8(%rbp)
.L3:
	cmpl	$20, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	subl	$2, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	N(%rip), %eax
	leal	-2(%rax), %ecx
	movl	N(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L10:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, %eax
	call	solve
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 404
a:
	.zero	404
	.globl	count
	.align 32
	.type	count, @object
	.size	count, 16800
count:
	.zero	16800
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L4
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L4:
	movl	-12(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$20, -4(%rbp)
	jg	.L5
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	addq	%rsi, %rcx
	movl	-4(%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
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L5:
	addl	$1, -8(%rbp)
.L3:
	cmpl	$20, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	subl	$2, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	N(%rip), %eax
	leal	-2(%rax), %ecx
	movl	N(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	count(%rip), %rax
	movq	(%rdx,%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L10:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, %eax
	call	solve
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
