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<math.h>
 
int main()
{
long long int N,l;
int a[100001]={0};
scanf("%lld",&N);
for(int i=1;i<=105;i++)
{
    for(int j=1;j<=105;j++)
    {
        for(int k=1;k<=105;k++)
        {
            l=i*i+j*j+k*k+i*j+i*k+j*k;
          a[l]++;
        }
    }
}
for(int i=0;i<N;i++)
{
printf("%d\n",a[i+1]);
}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\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	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400048(%rbp)
	jmp	.L2
.L7:
	movl	$1, -400044(%rbp)
	jmp	.L3
.L6:
	movl	$1, -400040(%rbp)
	jmp	.L4
.L5:
	movl	-400048(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400040(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400044(%rbp), %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, -400024(%rbp)
	movq	-400024(%rbp), %rax
	movl	-400016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movq	-400024(%rbp), %rax
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -400040(%rbp)
.L4:
	cmpl	$105, -400040(%rbp)
	jle	.L5
	addl	$1, -400044(%rbp)
.L3:
	cmpl	$105, -400044(%rbp)
	jle	.L6
	addl	$1, -400048(%rbp)
.L2:
	cmpl	$105, -400048(%rbp)
	jle	.L7
	movl	$0, -400036(%rbp)
	jmp	.L8
.L9:
	movl	-400036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400036(%rbp)
.L8:
	movl	-400036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-400032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	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	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400064
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	movl	$1, %r8d
.L2:
	movl	%r8d, %r11d
	leal	(%r8,%r8), %ebp
	movl	%r8d, %r9d
	movl	$1, %edi
	imull	%r8d, %r11d
.L7:
	movl	%edi, %r10d
	addl	$1, %edx
	leal	(%rdi,%rdi), %esi
	movl	%ebp, %ecx
	imull	%edi, %r10d
	addl	%r11d, %r10d
	leal	1(%r10,%r9), %eax
	addl	%r8d, %eax
	addl	%edi, %eax
	cltq
	movl	%edx, 16(%rsp,%rax,4)
	movl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edx, %eax
	imull	%edx, %eax
	addl	$1, %edx
	addl	%r10d, %eax
	addl	%r9d, %eax
	addl	%ecx, %eax
	addl	%r8d, %ecx
	addl	%esi, %eax
	addl	%edi, %esi
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$106, %edx
	jne	.L3
	addl	$1, %edi
	addl	%r8d, %r9d
	cmpl	$106, %edi
	je	.L4
	movl	%edi, %eax
	imull	%edi, %eax
	leal	1(%r11,%rax), %eax
	addl	%r9d, %eax
	addl	%r8d, %eax
	addl	%edi, %eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	jmp	.L7
.L4:
	addl	$1, %r8d
	cmpl	$106, %r8d
	je	.L17
	movl	%r8d, %eax
	imull	%r8d, %eax
	leal	3(%rax,%r8,2), %eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	jmp	.L2
.L17:
	xorl	%ebp, %ebp
	cmpq	$0, 8(%rsp)
	leaq	.LC1(%rip), %r12
	jle	.L8
.L6:
	movl	4(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, 8(%rsp)
	jg	.L6
.L8:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400064
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	movl	$1, %r8d
.L2:
	movl	%r8d, %r11d
	leal	(%r8,%r8), %ebp
	movl	%r8d, %r9d
	movl	$1, %edi
	imull	%r8d, %r11d
.L7:
	movl	%edi, %r10d
	addl	$1, %edx
	leal	(%rdi,%rdi), %esi
	movl	%ebp, %ecx
	imull	%edi, %r10d
	addl	%r11d, %r10d
	leal	1(%r10,%r9), %eax
	addl	%r8d, %eax
	addl	%edi, %eax
	cltq
	movl	%edx, 16(%rsp,%rax,4)
	movl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edx, %eax
	imull	%edx, %eax
	addl	$1, %edx
	addl	%r10d, %eax
	addl	%r9d, %eax
	addl	%ecx, %eax
	addl	%r8d, %ecx
	addl	%esi, %eax
	addl	%edi, %esi
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$106, %edx
	jne	.L3
	addl	$1, %edi
	addl	%r8d, %r9d
	cmpl	$106, %edi
	je	.L4
	movl	%edi, %eax
	imull	%edi, %eax
	leal	1(%r11,%rax), %eax
	addl	%r9d, %eax
	addl	%r8d, %eax
	addl	%edi, %eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	jmp	.L7
.L4:
	addl	$1, %r8d
	cmpl	$106, %r8d
	je	.L17
	movl	%r8d, %eax
	imull	%r8d, %eax
	leal	3(%rax,%r8,2), %eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	jmp	.L2
.L17:
	xorl	%ebp, %ebp
	cmpq	$0, 8(%rsp)
	leaq	.LC1(%rip), %r12
	jle	.L8
.L6:
	movl	4(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, 8(%rsp)
	jg	.L6
.L8:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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<math.h>
 
int main()
{
long long int N,l;
int a[100001]={0};
scanf("%lld",&N);
for(int i=1;i<=105;i++)
{
    for(int j=1;j<=105;j++)
    {
        for(int k=1;k<=105;k++)
        {
            l=i*i+j*j+k*k+i*j+i*k+j*k;
          a[l]++;
        }
    }
}
for(int i=0;i<N;i++)
{
printf("%d\n",a[i+1]);
}
}
27
 13
 3
 2
 4
 8
 14
 1
 31
 53

0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
 0
0
0
0
0
1
0
0
0
0
3
0
0
 0
0
0
 0
0
 0
0
0
0
 0
0
0
0
0
1
0
0
 0
0
0
0
0
1
0
0
0
0
3
0
0
0
 0
 0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
 0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0

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<math.h>
 
int main()
{
long long int N,l;
int a[100001]={0};
scanf("%lld",&N);
for(int i=1;i<=105;i++)
{
    for(int j=1;j<=105;j++)
    {
        for(int k=1;k<=105;k++)
        {
            l=i*i+j*j+k*k+i*j+i*k+j*k;
          a[l]++;
        }
    }
}
for(int i=0;i<N;i++)
{
printf("%d\n",a[i+1]);
}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\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	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400048(%rbp)
	jmp	.L2
.L7:
	movl	$1, -400044(%rbp)
	jmp	.L3
.L6:
	movl	$1, -400040(%rbp)
	jmp	.L4
.L5:
	movl	-400048(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400040(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400044(%rbp), %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, -400024(%rbp)
	movq	-400024(%rbp), %rax
	movl	-400016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movq	-400024(%rbp), %rax
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -400040(%rbp)
.L4:
	cmpl	$105, -400040(%rbp)
	jle	.L5
	addl	$1, -400044(%rbp)
.L3:
	cmpl	$105, -400044(%rbp)
	jle	.L6
	addl	$1, -400048(%rbp)
.L2:
	cmpl	$105, -400048(%rbp)
	jle	.L7
	movl	$0, -400036(%rbp)
	jmp	.L8
.L9:
	movl	-400036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400036(%rbp)
.L8:
	movl	-400036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-400032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	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	"%lld"
.LC1:
	.string	"%d\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	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400048(%rbp)
	jmp	.L2
.L7:
	movl	$1, -400044(%rbp)
	jmp	.L3
.L6:
	movl	$1, -400040(%rbp)
	jmp	.L4
.L5:
	movl	-400048(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400040(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400044(%rbp), %eax
	addl	%eax, %edx
	movl	-400048(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%eax, %edx
	movl	-400044(%rbp), %eax
	imull	-400040(%rbp), %eax
	addl	%edx, %eax
	cltq
	movq	%rax, -400024(%rbp)
	movq	-400024(%rbp), %rax
	movl	-400016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movq	-400024(%rbp), %rax
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -400040(%rbp)
.L4:
	cmpl	$105, -400040(%rbp)
	jle	.L5
	addl	$1, -400044(%rbp)
.L3:
	cmpl	$105, -400044(%rbp)
	jle	.L6
	addl	$1, -400048(%rbp)
.L2:
	cmpl	$105, -400048(%rbp)
	jle	.L7
	movl	$0, -400036(%rbp)
	jmp	.L8
.L9:
	movl	-400036(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400036(%rbp)
.L8:
	movl	-400036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-400032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	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:
