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<stdlib.h>
#include<string.h>
#include<math.h>

int main(){
  int n;
  int i,j;
  int num[10][10];
  int p,q;
  int ans = 0;

  scanf("%d", &n);

  for(i = 0;i <= 9;i++){
    for(j = 0;j <= 9;j++) num[i][j] = 0;
  }

  for(i = 1;i <= n;i++){
    q = i % 10;

    p = i;
    if(p >= 10){
      while(p >= 10){
        p = p/10;
      }
    }

    num[p][q]++;
  }

  for(i = 1;i <= 9;i++){
    for(j = 1;j <= 9;j++){
      ans += num[i][j]*num[j][i];
    }
  }

  printf("%d\n", ans);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -436(%rbp)
	jmp	.L2
.L5:
	movl	$0, -432(%rbp)
	jmp	.L3
.L4:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -432(%rbp)
.L3:
	cmpl	$9, -432(%rbp)
	jle	.L4
	addl	$1, -436(%rbp)
.L2:
	cmpl	$9, -436(%rbp)
	jle	.L5
	movl	$1, -436(%rbp)
	jmp	.L6
.L10:
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -420(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	cmpl	$9, -428(%rbp)
	jle	.L7
	jmp	.L8
.L9:
	movl	-428(%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, -428(%rbp)
.L8:
	cmpl	$9, -428(%rbp)
	jg	.L9
.L7:
	movl	-420(%rbp), %eax
	movslq	%eax, %rcx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movl	-420(%rbp), %eax
	movslq	%eax, %rsi
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
	addl	$1, -436(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	$1, -436(%rbp)
	jmp	.L11
.L14:
	movl	$1, -432(%rbp)
	jmp	.L12
.L13:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-432(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	addl	%eax, -424(%rbp)
	addl	$1, -432(%rbp)
.L12:
	cmpl	$9, -432(%rbp)
	jle	.L13
	addl	$1, -436(%rbp)
.L11:
	cmpl	$9, -436(%rbp)
	jle	.L14
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$440, %rsp
	.cfi_def_cfa_offset 448
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	pxor	%xmm0, %xmm0
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 208(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm0, 336(%rsp)
	movaps	%xmm0, 352(%rsp)
	movaps	%xmm0, 368(%rsp)
	movaps	%xmm0, 384(%rsp)
	movaps	%xmm0, 400(%rsp)
	testl	%eax, %eax
	jle	.L2
	leal	1(%rax), %r8d
	movl	$2, %esi
	movl	$3435973837, %edi
	movl	$1, 60(%rsp)
	cmpl	$1, %eax
	jne	.L7
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movslq	%edx, %rdx
	addl	$1, %esi
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r8d, %esi
	je	.L2
.L7:
	movl	%esi, %edx
	imulq	%rdi, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %eax
	movl	%esi, %edx
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%esi, %eax
	cmpl	$9, %esi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %eax
	movq	%rax, %rcx
	imulq	%rdi, %rax
	shrq	$35, %rax
	cmpl	$99, %ecx
	jg	.L6
	jmp	.L5
.L2:
	leaq	60(%rsp), %rax
	leaq	420(%rsp), %rdi
	xorl	%edx, %edx
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rax), %esi
	imull	(%rcx), %esi
	addq	$40, %rax
	addq	$4, %rcx
	addl	%esi, %edx
	movl	-36(%rax), %esi
	imull	36(%rcx), %esi
	addl	%edx, %esi
	movl	-32(%rax), %edx
	imull	76(%rcx), %edx
	addl	%esi, %edx
	movl	-28(%rax), %esi
	imull	116(%rcx), %esi
	addl	%edx, %esi
	movl	-24(%rax), %edx
	imull	156(%rcx), %edx
	addl	%esi, %edx
	movl	-20(%rax), %esi
	imull	196(%rcx), %esi
	addl	%edx, %esi
	movl	-16(%rax), %edx
	imull	236(%rcx), %edx
	addl	%esi, %edx
	movl	-12(%rax), %esi
	imull	276(%rcx), %esi
	addl	%edx, %esi
	movl	-8(%rax), %edx
	imull	316(%rcx), %edx
	addl	%esi, %edx
	cmpq	%rdi, %rax
	jne	.L4
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	xorl	%eax, %eax
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$440, %rsp
	.cfi_def_cfa_offset 448
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	pxor	%xmm0, %xmm0
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 208(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm0, 336(%rsp)
	movaps	%xmm0, 352(%rsp)
	movaps	%xmm0, 368(%rsp)
	movaps	%xmm0, 384(%rsp)
	movaps	%xmm0, 400(%rsp)
	testl	%eax, %eax
	jle	.L2
	leal	1(%rax), %r8d
	movl	$2, %esi
	movl	$3435973837, %edi
	movl	$1, 60(%rsp)
	cmpl	$1, %eax
	jne	.L7
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movslq	%edx, %rdx
	addl	$1, %esi
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,2), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r8d, %esi
	je	.L2
.L7:
	movl	%esi, %edx
	imulq	%rdi, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %eax
	movl	%esi, %edx
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%esi, %eax
	cmpl	$9, %esi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %eax
	movq	%rax, %rcx
	imulq	%rdi, %rax
	shrq	$35, %rax
	cmpl	$99, %ecx
	jg	.L6
	jmp	.L5
.L2:
	leaq	60(%rsp), %rax
	leaq	420(%rsp), %rdi
	xorl	%edx, %edx
	movq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rax), %esi
	imull	(%rcx), %esi
	addq	$40, %rax
	addq	$4, %rcx
	addl	%esi, %edx
	movl	-36(%rax), %esi
	imull	36(%rcx), %esi
	addl	%edx, %esi
	movl	-32(%rax), %edx
	imull	76(%rcx), %edx
	addl	%esi, %edx
	movl	-28(%rax), %esi
	imull	116(%rcx), %esi
	addl	%edx, %esi
	movl	-24(%rax), %edx
	imull	156(%rcx), %edx
	addl	%esi, %edx
	movl	-20(%rax), %esi
	imull	196(%rcx), %esi
	addl	%edx, %esi
	movl	-16(%rax), %edx
	imull	236(%rcx), %edx
	addl	%esi, %edx
	movl	-12(%rax), %esi
	imull	276(%rcx), %esi
	addl	%edx, %esi
	movl	-8(%rax), %edx
	imull	316(%rcx), %edx
	addl	%esi, %edx
	cmpq	%rdi, %rax
	jne	.L4
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	xorl	%eax, %eax
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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<stdlib.h>
#include<string.h>
#include<math.h>

int main(){
  int n;
  int i,j;
  int num[10][10];
  int p,q;
  int ans = 0;

  scanf("%d", &n);

  for(i = 0;i <= 9;i++){
    for(j = 0;j <= 9;j++) num[i][j] = 0;
  }

  for(i = 1;i <= n;i++){
    q = i % 10;

    p = i;
    if(p >= 10){
      while(p >= 10){
        p = p/10;
      }
    }

    num[p][q]++;
  }

  for(i = 1;i <= 9;i++){
    for(j = 1;j <= 9;j++){
      ans += num[i][j]*num[j][i];
    }
  }

  printf("%d\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>
#include<stdlib.h>
#include<string.h>
#include<math.h>

int main(){
  int n;
  int i,j;
  int num[10][10];
  int p,q;
  int ans = 0;

  scanf("%d", &n);

  for(i = 0;i <= 9;i++){
    for(j = 0;j <= 9;j++) num[i][j] = 0;
  }

  for(i = 1;i <= n;i++){
    q = i % 10;

    p = i;
    if(p >= 10){
      while(p >= 10){
        p = p/10;
      }
    }

    num[p][q]++;
  }

  for(i = 1;i <= 9;i++){
    for(j = 1;j <= 9;j++){
      ans += num[i][j]*num[j][i];
    }
  }

  printf("%d\n", ans);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -436(%rbp)
	jmp	.L2
.L5:
	movl	$0, -432(%rbp)
	jmp	.L3
.L4:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -432(%rbp)
.L3:
	cmpl	$9, -432(%rbp)
	jle	.L4
	addl	$1, -436(%rbp)
.L2:
	cmpl	$9, -436(%rbp)
	jle	.L5
	movl	$1, -436(%rbp)
	jmp	.L6
.L10:
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -420(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	cmpl	$9, -428(%rbp)
	jle	.L7
	jmp	.L8
.L9:
	movl	-428(%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, -428(%rbp)
.L8:
	cmpl	$9, -428(%rbp)
	jg	.L9
.L7:
	movl	-420(%rbp), %eax
	movslq	%eax, %rcx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movl	-420(%rbp), %eax
	movslq	%eax, %rsi
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
	addl	$1, -436(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	$1, -436(%rbp)
	jmp	.L11
.L14:
	movl	$1, -432(%rbp)
	jmp	.L12
.L13:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-432(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	addl	%eax, -424(%rbp)
	addl	$1, -432(%rbp)
.L12:
	cmpl	$9, -432(%rbp)
	jle	.L13
	addl	$1, -436(%rbp)
.L11:
	cmpl	$9, -436(%rbp)
	jle	.L14
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -424(%rbp)
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -436(%rbp)
	jmp	.L2
.L5:
	movl	$0, -432(%rbp)
	jmp	.L3
.L4:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -432(%rbp)
.L3:
	cmpl	$9, -432(%rbp)
	jle	.L4
	addl	$1, -436(%rbp)
.L2:
	cmpl	$9, -436(%rbp)
	jle	.L5
	movl	$1, -436(%rbp)
	jmp	.L6
.L10:
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	subl	%eax, %edx
	movl	%edx, -420(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	cmpl	$9, -428(%rbp)
	jle	.L7
	jmp	.L8
.L9:
	movl	-428(%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, -428(%rbp)
.L8:
	cmpl	$9, -428(%rbp)
	jg	.L9
.L7:
	movl	-420(%rbp), %eax
	movslq	%eax, %rcx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movl	-420(%rbp), %eax
	movslq	%eax, %rsi
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
	addl	$1, -436(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	$1, -436(%rbp)
	jmp	.L11
.L14:
	movl	$1, -432(%rbp)
	jmp	.L12
.L13:
	movl	-432(%rbp), %eax
	movslq	%eax, %rcx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-432(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	addl	%eax, -424(%rbp)
	addl	$1, -432(%rbp)
.L12:
	cmpl	$9, -432(%rbp)
	jle	.L13
	addl	$1, -436(%rbp)
.L11:
	cmpl	$9, -436(%rbp)
	jle	.L14
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
