Given the following C code and 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;
}
```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}
```
Given the following C 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;
}
```

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.
Optimized Assembly Code:

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 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;
}
```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```