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>


#define ll long long

int n, f[10][10];
ll ans;
int main() {
	scanf("%d", &n);
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		++f[x][i%10];
	}
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		ans+=f[i%10][x];
	}
	printf("%lld\n", ans);
	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	f
	.align 32
	.type	f, @object
	.size	f, 400
f:
	.zero	400
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.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
	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	$1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -12(%rbp)
.L3:
	cmpl	$9, -12(%rbp)
	jg	.L4
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	f(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	cmpl	$9, -4(%rbp)
	jg	.L8
	movl	-8(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L9
	movq	ans(%rip), %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
.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:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L2
	movl	44+f(%rip), %eax
	addl	$1, %eax
	movl	%eax, 44+f(%rip)
	cmpl	$1, %r8d
	je	.L37
	leal	1(%r8), %r10d
	movl	$2, %edi
	movl	$2, %eax
	movl	$3435973837, %esi
	leaq	f(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edi, %edx
	cltq
	imulq	%rsi, %rdx
	leaq	(%rax,%rax,4), %rax
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %r9d
	movl	%edi, %edx
	addl	$1, %edi
	addl	%r9d, %r9d
	subl	%r9d, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rax,2), %rax
	addl	$1, (%rcx,%rax,4)
	cmpl	%r10d, %edi
	je	.L38
	movl	%edi, %eax
	cmpl	$9, %edi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rsi, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L6
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L38:
	movslq	88+f(%rip), %rax
	movslq	44+f(%rip), %r9
	addq	ans(%rip), %r9
	addq	%rax, %r9
	cmpl	$2, %r8d
	je	.L39
	movslq	132+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$3, %r8d
	je	.L18
	movslq	176+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$4, %r8d
	je	.L19
	movslq	220+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$5, %r8d
	je	.L20
	movslq	264+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$6, %r8d
	je	.L21
	movslq	308+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$7, %r8d
	je	.L22
	movslq	352+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$8, %r8d
	je	.L40
	movslq	396+f(%rip), %rax
	movl	$10, %edi
	addq	%rax, %r9
.L9:
	leal	1(%r8), %r10d
	leaq	f(%rip), %rcx
	movl	$3435973837, %esi
	cmpl	%r8d, %edi
	jg	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edi, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rsi, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L13
	movl	%edi, %edx
	cltq
	imulq	%rsi, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %r8d
	movl	%edi, %edx
	addl	$1, %edi
	addl	%r8d, %r8d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	movslq	(%rcx,%rax,4), %rax
	addq	%rax, %r9
	cmpl	%r10d, %edi
	jne	.L14
.L15:
	movq	%r9, ans(%rip)
.L5:
	movq	%r9, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movl	$6, %edi
	jmp	.L9
.L2:
	movq	ans(%rip), %r9
	jmp	.L5
.L37:
	cltq
	addq	ans(%rip), %rax
	movl	$2, %edi
	movq	%rax, %r9
	jmp	.L9
.L39:
	movl	$3, %edi
	jmp	.L9
.L18:
	movl	$4, %edi
	jmp	.L9
.L19:
	movl	$5, %edi
	jmp	.L9
.L21:
	movl	$7, %edi
	jmp	.L9
.L22:
	movl	$8, %edi
	jmp	.L9
.L40:
	movl	$9, %edi
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 400
f:
	.zero	400
	.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
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L2
	movl	44+f(%rip), %eax
	addl	$1, %eax
	movl	%eax, 44+f(%rip)
	cmpl	$1, %r8d
	je	.L37
	leal	1(%r8), %r10d
	movl	$2, %edi
	movl	$2, %eax
	movl	$3435973837, %esi
	leaq	f(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edi, %edx
	cltq
	imulq	%rsi, %rdx
	leaq	(%rax,%rax,4), %rax
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %r9d
	movl	%edi, %edx
	addl	$1, %edi
	addl	%r9d, %r9d
	subl	%r9d, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rax,2), %rax
	addl	$1, (%rcx,%rax,4)
	cmpl	%r10d, %edi
	je	.L38
	movl	%edi, %eax
	cmpl	$9, %edi
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rsi, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L6
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L38:
	movslq	88+f(%rip), %rax
	movslq	44+f(%rip), %r9
	addq	ans(%rip), %r9
	addq	%rax, %r9
	cmpl	$2, %r8d
	je	.L39
	movslq	132+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$3, %r8d
	je	.L18
	movslq	176+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$4, %r8d
	je	.L19
	movslq	220+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$5, %r8d
	je	.L20
	movslq	264+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$6, %r8d
	je	.L21
	movslq	308+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$7, %r8d
	je	.L22
	movslq	352+f(%rip), %rax
	addq	%rax, %r9
	cmpl	$8, %r8d
	je	.L40
	movslq	396+f(%rip), %rax
	movl	$10, %edi
	addq	%rax, %r9
.L9:
	leal	1(%r8), %r10d
	leaq	f(%rip), %rcx
	movl	$3435973837, %esi
	cmpl	%r8d, %edi
	jg	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edi, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %eax
	movq	%rax, %rdx
	imulq	%rsi, %rax
	shrq	$35, %rax
	cmpl	$99, %edx
	jg	.L13
	movl	%edi, %edx
	cltq
	imulq	%rsi, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %r8d
	movl	%edi, %edx
	addl	$1, %edi
	addl	%r8d, %r8d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	movslq	(%rcx,%rax,4), %rax
	addq	%rax, %r9
	cmpl	%r10d, %edi
	jne	.L14
.L15:
	movq	%r9, ans(%rip)
.L5:
	movq	%r9, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movl	$6, %edi
	jmp	.L9
.L2:
	movq	ans(%rip), %r9
	jmp	.L5
.L37:
	cltq
	addq	ans(%rip), %rax
	movl	$2, %edi
	movq	%rax, %r9
	jmp	.L9
.L39:
	movl	$3, %edi
	jmp	.L9
.L18:
	movl	$4, %edi
	jmp	.L9
.L19:
	movl	$5, %edi
	jmp	.L9
.L21:
	movl	$7, %edi
	jmp	.L9
.L22:
	movl	$8, %edi
	jmp	.L9
.L40:
	movl	$9, %edi
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 400
f:
	.zero	400
	.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:

#include<stdio.h>


#define ll long long

int n, f[10][10];
ll ans;
int main() {
	scanf("%d", &n);
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		++f[x][i%10];
	}
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		ans+=f[i%10][x];
	}
	printf("%lld\n", ans);
	return 0;
}

73
 3093
 50
 101
 0
 11
 1020
 78
 001
 6

63
 95976
 33
 113
 0
 12
 10412
 72
 1
 6

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>


#define ll long long

int n, f[10][10];
ll ans;
int main() {
	scanf("%d", &n);
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		++f[x][i%10];
	}
	for(int i=1; i<=n; ++i){
		int x=i;
		while(x>=10) x/=10;
		ans+=f[i%10][x];
	}
	printf("%lld\n", ans);
	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	f
	.align 32
	.type	f, @object
	.size	f, 400
f:
	.zero	400
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.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
	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	$1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -12(%rbp)
.L3:
	cmpl	$9, -12(%rbp)
	jg	.L4
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	f(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	cmpl	$9, -4(%rbp)
	jg	.L8
	movl	-8(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L9
	movq	ans(%rip), %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
.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 400
f:
	.zero	400
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.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
	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	$1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -12(%rbp)
.L3:
	cmpl	$9, -12(%rbp)
	jg	.L4
	movl	-16(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	f(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	cmpl	$9, -4(%rbp)
	jg	.L8
	movl	-8(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L9
	movq	ans(%rip), %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
.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:
