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>

int V(int d[10],int c[10][10]);
int main()
{
    int m, n, i, j, temp, sum=0;
    int a[11]={0},c[10][10],d[10];
    scanf("%d%d",&m,&n);
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            scanf("%d",&c[i][j]);
        }
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n;j++)
        {
            scanf("%d",&temp);
            a[1+temp]++;
        }
    }
    for(i=0;i<10;i++) d[i]=c[i][1];
    while(V(d,c));
    for(i=0;i<10;i++)
    {
        sum+=a[i+1]*d[i];
    }printf("%d",sum);
    return 0;
}
int V(int d[10],int c[10][10])
{
    int count =0,i,j,temp;
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            if(d[i]>d[j]+c[i][j])
            {
                d[i]=d[j]+c[i][j];
                count++;
            }
        }
    }
    return count;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -516(%rbp)
	movq	$0, -464(%rbp)
	movq	$0, -456(%rbp)
	movq	$0, -448(%rbp)
	movq	$0, -440(%rbp)
	movq	$0, -432(%rbp)
	movl	$0, -424(%rbp)
	leaq	-532(%rbp), %rdx
	leaq	-536(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -524(%rbp)
	jmp	.L2
.L5:
	movl	$0, -520(%rbp)
	jmp	.L3
.L4:
	leaq	-416(%rbp), %rcx
	movl	-520(%rbp), %eax
	movslq	%eax, %rsi
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -520(%rbp)
.L3:
	cmpl	$9, -520(%rbp)
	jle	.L4
	addl	$1, -524(%rbp)
.L2:
	cmpl	$9, -524(%rbp)
	jle	.L5
	movl	$0, -524(%rbp)
	jmp	.L6
.L9:
	movl	$0, -520(%rbp)
	jmp	.L7
.L8:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-528(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-464(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -464(%rbp,%rax,4)
	addl	$1, -520(%rbp)
.L7:
	movl	-532(%rbp), %eax
	cmpl	%eax, -520(%rbp)
	jl	.L8
	addl	$1, -524(%rbp)
.L6:
	movl	-536(%rbp), %eax
	cmpl	%eax, -524(%rbp)
	jl	.L9
	movl	$0, -524(%rbp)
	jmp	.L10
.L11:
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$412, %rax
	movl	(%rax), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	%edx, -512(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L10:
	cmpl	$9, -524(%rbp)
	jle	.L11
	nop
.L12:
	leaq	-416(%rbp), %rdx
	leaq	-512(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	V
	testl	%eax, %eax
	jne	.L12
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-524(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-464(%rbp,%rax,4), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	-512(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -516(%rbp)
	addl	$1, -524(%rbp)
.L13:
	cmpl	$9, -524(%rbp)
	jle	.L14
	movl	-516(%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
	.globl	V
	.type	V, @function
V:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L18
.L22:
	movl	$0, -4(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L20
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
.L20:
	addl	$1, -4(%rbp)
.L19:
	cmpl	$9, -4(%rbp)
	jle	.L21
	addl	$1, -8(%rbp)
.L18:
	cmpl	$9, -8(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	V, .-V
	.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%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$528, %rsp
	.cfi_def_cfa_offset 576
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	movq	$0, 96(%rsp)
	movl	$0, 104(%rsp)
	leaq	112(%rsp), %rbx
	leaq	152(%rsp), %r13
	movaps	%xmm0, 64(%rsp)
	leaq	552(%rsp), %r14
	movaps	%xmm0, 80(%rsp)
	call	__isoc99_scanf@PLT
.L2:
	leaq	-40(%r13), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %r12
	call	__isoc99_scanf@PLT
	cmpq	%r12, %r13
	jne	.L3
	addq	$40, %r13
	cmpq	%r13, %r14
	jne	.L2
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	12(%rsp), %r12
.L5:
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %eax
	cltq
	addl	$1, 64(%rsp,%rax,4)
	movl	8(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L6
	addl	$1, %r13d
	cmpl	%r13d, 4(%rsp)
	jg	.L5
.L4:
	movd	196(%rsp), %xmm1
	movd	116(%rsp), %xmm0
	leaq	16(%rsp), %r9
	leaq	400(%rbx), %r8
	movd	236(%rsp), %xmm4
	movd	156(%rsp), %xmm5
	movd	396(%rsp), %xmm6
	movd	316(%rsp), %xmm7
	punpckldq	%xmm4, %xmm1
	punpckldq	%xmm5, %xmm0
	movd	476(%rsp), %xmm3
	punpcklqdq	%xmm1, %xmm0
	movd	356(%rsp), %xmm1
	movaps	%xmm0, 16(%rsp)
	movd	276(%rsp), %xmm0
	punpckldq	%xmm6, %xmm1
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 32(%rsp)
	movd	436(%rsp), %xmm0
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r9, %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rsi), %eax
	movl	(%rdx), %edi
	addl	16(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L7
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L7:
	movl	4(%rdx), %edi
	addl	20(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L8
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L8:
	movl	8(%rdx), %edi
	addl	24(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L9
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L9:
	movl	12(%rdx), %edi
	addl	28(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L10
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L10:
	movl	16(%rdx), %edi
	addl	32(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L11
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L11:
	movl	20(%rdx), %edi
	addl	36(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L12
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L12:
	movl	24(%rdx), %edi
	addl	40(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L13
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L13:
	movl	28(%rdx), %edi
	addl	44(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L14
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L14:
	movl	32(%rdx), %edi
	addl	48(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L15
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L15:
	movl	36(%rdx), %edi
	addl	52(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L16
	movl	%edi, (%rsi)
	addl	$1, %ecx
.L16:
	addq	$40, %rdx
	addq	$4, %rsi
	cmpq	%rdx, %r8
	jne	.L17
	testl	%ecx, %ecx
	jne	.L18
	movdqu	84(%rsp), %xmm1
	movl	100(%rsp), %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	movdqa	32(%rsp), %xmm2
	movdqa	16(%rsp), %xmm3
	movdqa	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm0
	pshufd	$8, %xmm0, %xmm0
	psrlq	$32, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm2, %xmm1
	imull	48(%rsp), %eax
	movl	%eax, %edx
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	movdqu	68(%rsp), %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	16(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	52(%rsp), %edx
	imull	104(%rsp), %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	V
	.type	V, @function
V:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %rcx
	movq	%rdi, %rsi
	xorl	%r8d, %r8d
	leaq	40(%rdi), %r9
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rsi), %eax
	movl	(%rdx), %edi
	addl	(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L30
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L30:
	movl	4(%rdx), %edi
	addl	4(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L31
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L31:
	movl	8(%rdx), %edi
	addl	8(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L32
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L32:
	movl	12(%rdx), %edi
	addl	12(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L33
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L33:
	movl	16(%rdx), %edi
	addl	16(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L34
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L34:
	movl	20(%rdx), %edi
	addl	20(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L35
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L35:
	movl	24(%rdx), %edi
	addl	24(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L36
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L36:
	movl	28(%rdx), %edi
	addl	28(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L37
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L37:
	movl	32(%rdx), %edi
	addl	32(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L38
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L38:
	movl	36(%rdx), %edi
	addl	36(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L39
	movl	%edi, (%rsi)
	addl	$1, %r8d
.L39:
	addq	$4, %rsi
	addq	$40, %rdx
	cmpq	%rsi, %r9
	jne	.L40
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	V, .-V
	.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%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$528, %rsp
	.cfi_def_cfa_offset 576
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	movq	$0, 96(%rsp)
	movl	$0, 104(%rsp)
	leaq	112(%rsp), %rbx
	leaq	152(%rsp), %r13
	movaps	%xmm0, 64(%rsp)
	leaq	552(%rsp), %r14
	movaps	%xmm0, 80(%rsp)
	call	__isoc99_scanf@PLT
.L2:
	leaq	-40(%r13), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %r12
	call	__isoc99_scanf@PLT
	cmpq	%r12, %r13
	jne	.L3
	addq	$40, %r13
	cmpq	%r13, %r14
	jne	.L2
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	12(%rsp), %r12
.L5:
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %eax
	cltq
	addl	$1, 64(%rsp,%rax,4)
	movl	8(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L6
	addl	$1, %r13d
	cmpl	%r13d, 4(%rsp)
	jg	.L5
.L4:
	movd	196(%rsp), %xmm1
	movd	116(%rsp), %xmm0
	leaq	16(%rsp), %r9
	leaq	400(%rbx), %r8
	movd	236(%rsp), %xmm4
	movd	156(%rsp), %xmm5
	movd	396(%rsp), %xmm6
	movd	316(%rsp), %xmm7
	punpckldq	%xmm4, %xmm1
	punpckldq	%xmm5, %xmm0
	movd	476(%rsp), %xmm3
	punpcklqdq	%xmm1, %xmm0
	movd	356(%rsp), %xmm1
	movaps	%xmm0, 16(%rsp)
	movd	276(%rsp), %xmm0
	punpckldq	%xmm6, %xmm1
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 32(%rsp)
	movd	436(%rsp), %xmm0
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r9, %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rsi), %eax
	movl	(%rdx), %edi
	addl	16(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L7
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L7:
	movl	4(%rdx), %edi
	addl	20(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L8
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L8:
	movl	8(%rdx), %edi
	addl	24(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L9
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L9:
	movl	12(%rdx), %edi
	addl	28(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L10
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L10:
	movl	16(%rdx), %edi
	addl	32(%rsp), %edi
	cmpl	%eax, %edi
	jge	.L11
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L11:
	movl	20(%rdx), %edi
	addl	36(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L12
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L12:
	movl	24(%rdx), %edi
	addl	40(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L13
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L13:
	movl	28(%rdx), %edi
	addl	44(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L14
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L14:
	movl	32(%rdx), %edi
	addl	48(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L15
	movl	%edi, (%rsi)
	addl	$1, %ecx
	movl	%edi, %eax
.L15:
	movl	36(%rdx), %edi
	addl	52(%rsp), %edi
	cmpl	%edi, %eax
	jle	.L16
	movl	%edi, (%rsi)
	addl	$1, %ecx
.L16:
	addq	$40, %rdx
	addq	$4, %rsi
	cmpq	%rdx, %r8
	jne	.L17
	testl	%ecx, %ecx
	jne	.L18
	movdqu	84(%rsp), %xmm1
	movl	100(%rsp), %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	movdqa	32(%rsp), %xmm2
	movdqa	16(%rsp), %xmm3
	movdqa	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm0
	pshufd	$8, %xmm0, %xmm0
	psrlq	$32, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm2, %xmm1
	imull	48(%rsp), %eax
	movl	%eax, %edx
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	movdqu	68(%rsp), %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	16(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	52(%rsp), %edx
	imull	104(%rsp), %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	V
	.type	V, @function
V:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %rcx
	movq	%rdi, %rsi
	xorl	%r8d, %r8d
	leaq	40(%rdi), %r9
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rsi), %eax
	movl	(%rdx), %edi
	addl	(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L30
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L30:
	movl	4(%rdx), %edi
	addl	4(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L31
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L31:
	movl	8(%rdx), %edi
	addl	8(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L32
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L32:
	movl	12(%rdx), %edi
	addl	12(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L33
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L33:
	movl	16(%rdx), %edi
	addl	16(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L34
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L34:
	movl	20(%rdx), %edi
	addl	20(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L35
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L35:
	movl	24(%rdx), %edi
	addl	24(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L36
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L36:
	movl	28(%rdx), %edi
	addl	28(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L37
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L37:
	movl	32(%rdx), %edi
	addl	32(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L38
	movl	%edi, (%rsi)
	addl	$1, %r8d
	movl	%edi, %eax
.L38:
	movl	36(%rdx), %edi
	addl	36(%rcx), %edi
	cmpl	%edi, %eax
	jle	.L39
	movl	%edi, (%rsi)
	addl	$1, %r8d
.L39:
	addq	$4, %rsi
	addq	$40, %rdx
	cmpq	%rsi, %r9
	jne	.L40
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	V, .-V
	.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>

int V(int d[10],int c[10][10]);
int main()
{
    int m, n, i, j, temp, sum=0;
    int a[11]={0},c[10][10],d[10];
    scanf("%d%d",&m,&n);
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            scanf("%d",&c[i][j]);
        }
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n;j++)
        {
            scanf("%d",&temp);
            a[1+temp]++;
        }
    }
    for(i=0;i<10;i++) d[i]=c[i][1];
    while(V(d,c));
    for(i=0;i<10;i++)
    {
        sum+=a[i+1]*d[i];
    }printf("%d",sum);
    return 0;
}
int V(int d[10],int c[10][10])
{
    int count =0,i,j,temp;
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            if(d[i]>d[j]+c[i][j])
            {
                d[i]=d[j]+c[i][j];
                count++;
            }
        }
    }
    return count;
}

2 4
0 9 9 9 9 9 9 9 9 9
9 0 9 9 9 9 9 9 9 9
9 9 0 9 9 9 9 9 9 9
9 9 9 0 2 9 9 9 9 9
9 9 9 9 0 9 9 9 9 2
9 9 9 9 9 0 9 9 9 9
9 9 9 9 9 9 0 9 9 9
9 9 9 9 9 9 9 0 9 9
9 9 9 9 2 9 9 9 0 9
9 2 9 9 9 9 9 9 9 0
-1 -1 -1 -1
8 1 1 8
 3 5
0 4 3 6 2 7 2 5 3 3
4 0 5 3 7 5 3 7 2 7
5 7 0 7 2 9 3 2 9 1
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 3 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
3 5 2 6 1
2 5 3 2 1
6 9 2 5 6
 5 5
0 999 999 999 999 999 999 999 999 999
999 0 999 999 999 999 999 999 999 999
999 999 0 999 999 999 999 999 999 999
999 999 999 0 999 999 999 999 999 999
999 999 999 999 0 999 999 999 999 999
999 999 999 999 999 0 999 999 999 999
999 999 999 999 999 999 0 999 999 999
999 999 999 999 999 999 999 0 999 1330
999 999 999 999 999 999 999 999 0 999
999 999 999 999 999 999 999 999 999 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
 5 5
0 999 999 999 999 999 999 999 999 999
999 0 999 999 999 999 999 999 999 999
999 999 0 999 999 999 999 999 999 999
999 334 999 0 999 999 999 999 999 999
999 999 999 999 0 999 999 999 999 999
999 999 999 999 999 0 999 577 999 999
999 999 999 999 117 999 0 999 999 999
999 999 999 999 999 999 999 0 999 1330
999 999 999 999 999 999 999 999 0 999
999 999 999 999 999 999 999 999 999 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 0 1 1 1
1 1 1 1 1
 3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 7
5 7 0 7 2 9 1 2 9 1
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
0 5 2 6 1
2 5 3 2 1
6 9 2 5 6
 2 4
0 9 9 9 9 9 9 9 13 9
9 0 9 9 9 9 9 9 9 9
9 9 0 9 9 9 9 9 9 9
9 9 9 0 2 9 9 9 9 9
9 9 9 9 0 9 9 9 9 2
9 9 9 9 15 0 9 9 9 9
9 9 9 9 9 9 0 9 9 9
9 9 9 9 9 2 9 0 9 9
9 9 9 5 2 9 9 9 0 9
9 2 9 9 9 9 2 9 9 0
-1 -1 -1 -1
0 1 1 8
 3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 7
5 7 0 7 2 9 1 2 9 0
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
0 5 2 6 1
2 5 3 2 1
6 9 2 5 6
 5 5
0 999 999 999 999 999 999 999 999 999
999 0 999 999 999 999 999 999 999 999
999 999 0 999 999 999 999 999 999 999
999 334 999 0 999 999 999 999 999 999
999 999 999 999 0 999 999 202 999 999
999 999 999 999 999 0 999 577 999 999
999 999 999 999 117 999 0 999 999 999
999 999 999 999 999 999 999 0 999 1330
999 999 999 999 999 999 999 999 0 999
999 999 999 999 999 999 999 999 999 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 0 1 1 1
1 0 1 1 1
 2 4
0 9 9 9 9 9 9 9 13 9
9 0 9 9 9 9 9 9 9 9
9 9 0 9 9 9 9 9 9 9
9 9 9 0 2 9 9 9 9 9
9 9 9 9 0 9 9 9 9 1
9 9 9 15 15 0 9 9 9 9
9 9 9 9 9 9 0 9 9 9
9 9 9 9 9 2 9 0 9 9
9 9 9 5 2 9 9 9 0 9
9 2 9 9 9 9 2 9 9 0
-1 -1 -1 -1
0 1 1 8
 3 5
0 4 3 6 2 7 2 5 3 0
4 0 5 3 12 5 3 7 2 11
5 7 0 7 2 9 1 2 9 0
3 6 2 0 2 7 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 0 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
0 5 2 6 1
2 5 3 2 1
6 9 2 6 6

12 47 0 999 44 15 36 1998 14 35
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>

int V(int d[10],int c[10][10]);
int main()
{
    int m, n, i, j, temp, sum=0;
    int a[11]={0},c[10][10],d[10];
    scanf("%d%d",&m,&n);
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            scanf("%d",&c[i][j]);
        }
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n;j++)
        {
            scanf("%d",&temp);
            a[1+temp]++;
        }
    }
    for(i=0;i<10;i++) d[i]=c[i][1];
    while(V(d,c));
    for(i=0;i<10;i++)
    {
        sum+=a[i+1]*d[i];
    }printf("%d",sum);
    return 0;
}
int V(int d[10],int c[10][10])
{
    int count =0,i,j,temp;
    for(i=0;i<10;i++)
    {
        for(j=0;j<10;j++)
        {
            if(d[i]>d[j]+c[i][j])
            {
                d[i]=d[j]+c[i][j];
                count++;
            }
        }
    }
    return count;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -516(%rbp)
	movq	$0, -464(%rbp)
	movq	$0, -456(%rbp)
	movq	$0, -448(%rbp)
	movq	$0, -440(%rbp)
	movq	$0, -432(%rbp)
	movl	$0, -424(%rbp)
	leaq	-532(%rbp), %rdx
	leaq	-536(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -524(%rbp)
	jmp	.L2
.L5:
	movl	$0, -520(%rbp)
	jmp	.L3
.L4:
	leaq	-416(%rbp), %rcx
	movl	-520(%rbp), %eax
	movslq	%eax, %rsi
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -520(%rbp)
.L3:
	cmpl	$9, -520(%rbp)
	jle	.L4
	addl	$1, -524(%rbp)
.L2:
	cmpl	$9, -524(%rbp)
	jle	.L5
	movl	$0, -524(%rbp)
	jmp	.L6
.L9:
	movl	$0, -520(%rbp)
	jmp	.L7
.L8:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-528(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-464(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -464(%rbp,%rax,4)
	addl	$1, -520(%rbp)
.L7:
	movl	-532(%rbp), %eax
	cmpl	%eax, -520(%rbp)
	jl	.L8
	addl	$1, -524(%rbp)
.L6:
	movl	-536(%rbp), %eax
	cmpl	%eax, -524(%rbp)
	jl	.L9
	movl	$0, -524(%rbp)
	jmp	.L10
.L11:
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$412, %rax
	movl	(%rax), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	%edx, -512(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L10:
	cmpl	$9, -524(%rbp)
	jle	.L11
	nop
.L12:
	leaq	-416(%rbp), %rdx
	leaq	-512(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	V
	testl	%eax, %eax
	jne	.L12
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-524(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-464(%rbp,%rax,4), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	-512(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -516(%rbp)
	addl	$1, -524(%rbp)
.L13:
	cmpl	$9, -524(%rbp)
	jle	.L14
	movl	-516(%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
	.globl	V
	.type	V, @function
V:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L18
.L22:
	movl	$0, -4(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L20
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
.L20:
	addl	$1, -4(%rbp)
.L19:
	cmpl	$9, -4(%rbp)
	jle	.L21
	addl	$1, -8(%rbp)
.L18:
	cmpl	$9, -8(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	V, .-V
	.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%d"
.LC1:
	.string	"%d"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -516(%rbp)
	movq	$0, -464(%rbp)
	movq	$0, -456(%rbp)
	movq	$0, -448(%rbp)
	movq	$0, -440(%rbp)
	movq	$0, -432(%rbp)
	movl	$0, -424(%rbp)
	leaq	-532(%rbp), %rdx
	leaq	-536(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -524(%rbp)
	jmp	.L2
.L5:
	movl	$0, -520(%rbp)
	jmp	.L3
.L4:
	leaq	-416(%rbp), %rcx
	movl	-520(%rbp), %eax
	movslq	%eax, %rsi
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -520(%rbp)
.L3:
	cmpl	$9, -520(%rbp)
	jle	.L4
	addl	$1, -524(%rbp)
.L2:
	cmpl	$9, -524(%rbp)
	jle	.L5
	movl	$0, -524(%rbp)
	jmp	.L6
.L9:
	movl	$0, -520(%rbp)
	jmp	.L7
.L8:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-528(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-464(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -464(%rbp,%rax,4)
	addl	$1, -520(%rbp)
.L7:
	movl	-532(%rbp), %eax
	cmpl	%eax, -520(%rbp)
	jl	.L8
	addl	$1, -524(%rbp)
.L6:
	movl	-536(%rbp), %eax
	cmpl	%eax, -524(%rbp)
	jl	.L9
	movl	$0, -524(%rbp)
	jmp	.L10
.L11:
	movl	-524(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$412, %rax
	movl	(%rax), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	%edx, -512(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L10:
	cmpl	$9, -524(%rbp)
	jle	.L11
	nop
.L12:
	leaq	-416(%rbp), %rdx
	leaq	-512(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	V
	testl	%eax, %eax
	jne	.L12
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-524(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-464(%rbp,%rax,4), %edx
	movl	-524(%rbp), %eax
	cltq
	movl	-512(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -516(%rbp)
	addl	$1, -524(%rbp)
.L13:
	cmpl	$9, -524(%rbp)
	jle	.L14
	movl	-516(%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
	.globl	V
	.type	V, @function
V:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L18
.L22:
	movl	$0, -4(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L20
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
.L20:
	addl	$1, -4(%rbp)
.L19:
	cmpl	$9, -4(%rbp)
	jle	.L21
	addl	$1, -8(%rbp)
.L18:
	cmpl	$9, -8(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	V, .-V
	.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:
