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 min(a,b) ((a)<(b)?(a):(b))

long long d[10][10];

void warshall_floyd(){
		for(int k=0;k<=9;k++){
				for(int i=0;i<=9;i++){
						for(int j=0;j<=9;j++){
								d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
						}
				}
		}
}

int main(){
		int h,w,i,j,a[200][200];
		scanf("%d%d",&h,&w);
		for(i=0;i<10;i++){
				for(j=0;j<10;j++){
						scanf("%lld",&d[i][j]);
				}
		}
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						scanf("%d",&a[i][j]);
				}
		}
		warshall_floyd();
		long long ans=0;
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						if(a[i][j]!=-1)ans+=d[a[i][j]][1];
				}
		}
		printf("%lld\n",ans);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800
d:
	.zero	800
	.text
	.globl	warshall_floyd
	.type	warshall_floyd, @function
warshall_floyd:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %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,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rcx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -4(%rbp)
.L4:
	cmpl	$9, -4(%rbp)
	jle	.L5
	addl	$1, -8(%rbp)
.L3:
	cmpl	$9, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	warshall_floyd, .-warshall_floyd
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-160036(%rbp), %rdx
	leaq	-160040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160032(%rbp)
	jmp	.L9
.L12:
	movl	$0, -160028(%rbp)
	jmp	.L10
.L11:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L10:
	cmpl	$9, -160028(%rbp)
	jle	.L11
	addl	$1, -160032(%rbp)
.L9:
	cmpl	$9, -160032(%rbp)
	jle	.L12
	movl	$0, -160032(%rbp)
	jmp	.L13
.L16:
	movl	$0, -160028(%rbp)
	jmp	.L14
.L15:
	leaq	-160016(%rbp), %rcx
	movl	-160028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L14:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L15
	addl	$1, -160032(%rbp)
.L13:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L16
	movl	$0, %eax
	call	warshall_floyd
	movq	$0, -160024(%rbp)
	movl	$0, -160032(%rbp)
	jmp	.L17
.L21:
	movl	$0, -160028(%rbp)
	jmp	.L18
.L20:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+d(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -160024(%rbp)
.L19:
	addl	$1, -160028(%rbp)
.L18:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L20
	addl	$1, -160032(%rbp)
.L17:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L21
	movq	-160024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	warshall_floyd
	.type	warshall_floyd, @function
warshall_floyd:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	d(%rip), %r9
	leaq	800(%r9), %rdi
	movq	%r9, %rcx
	movq	%r9, %r8
.L2:
	movq	%r9, %rax
	movq	%r8, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %r10
	movq	(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	8(%rax), %r10
	movq	%rsi, (%rax)
	movq	8(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	16(%rax), %r10
	movq	%rsi, 8(%rax)
	movq	16(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	24(%rax), %r10
	movq	%rsi, 16(%rax)
	movq	24(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	32(%rax), %r10
	movq	%rsi, 24(%rax)
	movq	32(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	40(%rax), %r10
	movq	%rsi, 32(%rax)
	movq	40(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	48(%rax), %r10
	movq	%rsi, 40(%rax)
	movq	48(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	56(%rax), %r10
	movq	%rsi, 48(%rax)
	movq	56(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	%rsi, 56(%rax)
	movq	64(%rcx), %rsi
	movq	64(%rax), %r10
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	72(%rax), %r10
	movq	%rsi, 64(%rax)
	movq	72(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	addq	$80, %rax
	addq	$80, %rdx
	movq	%rsi, -8(%rax)
	cmpq	%rdi, %rax
	jne	.L3
	addq	$80, %rcx
	addq	$8, %r8
	cmpq	%rax, %rcx
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	warshall_floyd, .-warshall_floyd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-159744(%rsp), %r11
	.cfi_def_cfa 11, 159792
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$288, %rsp
	.cfi_def_cfa_offset 160080
	leaq	.LC0(%rip), %rdi
	leaq	80+d(%rip), %rbp
	leaq	800(%rbp), %r13
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 160024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	-80(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$8, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L9
	leaq	80(%rbx), %rbp
	cmpq	%r13, %rbp
	jne	.L8
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L10
	movl	12(%rsp), %r11d
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%r11d, %r11d
	jle	.L42
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	16(%rsp,%r14,4), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r11d
	addq	$4, %rbp
	cmpl	%ebx, %r11d
	jg	.L12
	movl	8(%rsp), %ebx
	addl	$1, %r13d
	cmpl	%r13d, %ebx
	jle	.L43
	addq	$200, %r14
	testl	%r11d, %r11d
	jg	.L17
.L42:
	xorl	%eax, %eax
	call	warshall_floyd
.L25:
	leal	-1(%rbx), %esi
	leal	-1(%r11), %edx
	movq	$-4, %rdi
	xorl	%r8d, %r8d
	leaq	(%rsi,%rsi,4), %rsi
	leaq	0(,%rdx,4), %rax
	leaq	(%rsi,%rsi,4), %rsi
	leaq	20(%rsp,%rax), %rcx
	subq	%rax, %rdi
	leaq	(%rdx,%rsi,8), %rdx
	leaq	d(%rip), %rsi
	leaq	820(%rsp,%rdx,4), %r9
	.p2align 4,,10
	.p2align 3
.L20:
	leaq	(%rdi,%rcx), %rdx
	testl	%r11d, %r11d
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rdx), %rax
	cmpl	$-1, %eax
	je	.L21
	leaq	(%rax,%rax,4), %rax
	salq	$4, %rax
	addq	8(%rsi,%rax), %r8
.L21:
	addq	$4, %rdx
	cmpq	%rcx, %rdx
	jne	.L22
.L24:
	addq	$800, %rcx
	cmpq	%r9, %rcx
	jne	.L20
.L19:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	160024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$160032, %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
.L10:
	.cfi_restore_state
	xorl	%eax, %eax
	call	warshall_floyd
	xorl	%r8d, %r8d
	jmp	.L19
.L43:
	xorl	%eax, %eax
	call	warshall_floyd
	testl	%ebx, %ebx
	jg	.L25
	xorl	%r8d, %r8d
	jmp	.L19
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800
d:
	.zero	800
	.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
	.p2align 4
	.globl	warshall_floyd
	.type	warshall_floyd, @function
warshall_floyd:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	d(%rip), %r9
	leaq	800(%r9), %rdi
	movq	%r9, %rcx
	movq	%r9, %r8
.L2:
	movq	%r9, %rax
	movq	%r8, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %r10
	movq	(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	8(%rax), %r10
	movq	%rsi, (%rax)
	movq	8(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	16(%rax), %r10
	movq	%rsi, 8(%rax)
	movq	16(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	24(%rax), %r10
	movq	%rsi, 16(%rax)
	movq	24(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	32(%rax), %r10
	movq	%rsi, 24(%rax)
	movq	32(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	40(%rax), %r10
	movq	%rsi, 32(%rax)
	movq	40(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	48(%rax), %r10
	movq	%rsi, 40(%rax)
	movq	48(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	56(%rax), %r10
	movq	%rsi, 48(%rax)
	movq	56(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	%rsi, 56(%rax)
	movq	64(%rcx), %rsi
	movq	64(%rax), %r10
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	movq	72(%rax), %r10
	movq	%rsi, 64(%rax)
	movq	72(%rcx), %rsi
	addq	(%rdx), %rsi
	cmpq	%r10, %rsi
	cmovg	%r10, %rsi
	addq	$80, %rax
	addq	$80, %rdx
	movq	%rsi, -8(%rax)
	cmpq	%rdi, %rax
	jne	.L3
	addq	$80, %rcx
	addq	$8, %r8
	cmpq	%rax, %rcx
	jne	.L2
	ret
	.cfi_endproc
.LFE23:
	.size	warshall_floyd, .-warshall_floyd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-159744(%rsp), %r11
	.cfi_def_cfa 11, 159792
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$288, %rsp
	.cfi_def_cfa_offset 160080
	leaq	.LC0(%rip), %rdi
	leaq	80+d(%rip), %rbp
	leaq	800(%rbp), %r13
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 160024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	-80(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$8, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L9
	leaq	80(%rbx), %rbp
	cmpq	%r13, %rbp
	jne	.L8
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	jle	.L10
	movl	12(%rsp), %r11d
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	testl	%r11d, %r11d
	jle	.L42
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	16(%rsp,%r14,4), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r11d
	addq	$4, %rbp
	cmpl	%ebx, %r11d
	jg	.L12
	movl	8(%rsp), %ebx
	addl	$1, %r13d
	cmpl	%r13d, %ebx
	jle	.L43
	addq	$200, %r14
	testl	%r11d, %r11d
	jg	.L17
.L42:
	xorl	%eax, %eax
	call	warshall_floyd
.L25:
	leal	-1(%rbx), %esi
	leal	-1(%r11), %edx
	movq	$-4, %rdi
	xorl	%r8d, %r8d
	leaq	(%rsi,%rsi,4), %rsi
	leaq	0(,%rdx,4), %rax
	leaq	(%rsi,%rsi,4), %rsi
	leaq	20(%rsp,%rax), %rcx
	subq	%rax, %rdi
	leaq	(%rdx,%rsi,8), %rdx
	leaq	d(%rip), %rsi
	leaq	820(%rsp,%rdx,4), %r9
	.p2align 4,,10
	.p2align 3
.L20:
	leaq	(%rdi,%rcx), %rdx
	testl	%r11d, %r11d
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rdx), %rax
	cmpl	$-1, %eax
	je	.L21
	leaq	(%rax,%rax,4), %rax
	salq	$4, %rax
	addq	8(%rsi,%rax), %r8
.L21:
	addq	$4, %rdx
	cmpq	%rcx, %rdx
	jne	.L22
.L24:
	addq	$800, %rcx
	cmpq	%r9, %rcx
	jne	.L20
.L19:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	160024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$160032, %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
.L10:
	.cfi_restore_state
	xorl	%eax, %eax
	call	warshall_floyd
	xorl	%r8d, %r8d
	jmp	.L19
.L43:
	xorl	%eax, %eax
	call	warshall_floyd
	testl	%ebx, %ebx
	jg	.L25
	xorl	%r8d, %r8d
	jmp	.L19
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800
d:
	.zero	800
	.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 min(a,b) ((a)<(b)?(a):(b))

long long d[10][10];

void warshall_floyd(){
		for(int k=0;k<=9;k++){
				for(int i=0;i<=9;i++){
						for(int j=0;j<=9;j++){
								d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
						}
				}
		}
}

int main(){
		int h,w,i,j,a[200][200];
		scanf("%d%d",&h,&w);
		for(i=0;i<10;i++){
				for(j=0;j<10;j++){
						scanf("%lld",&d[i][j]);
				}
		}
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						scanf("%d",&a[i][j]);
				}
		}
		warshall_floyd();
		long long ans=0;
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						if(a[i][j]!=-1)ans+=d[a[i][j]][1];
				}
		}
		printf("%lld\n",ans);
		return 0;
}

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>
#define min(a,b) ((a)<(b)?(a):(b))

long long d[10][10];

void warshall_floyd(){
		for(int k=0;k<=9;k++){
				for(int i=0;i<=9;i++){
						for(int j=0;j<=9;j++){
								d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
						}
				}
		}
}

int main(){
		int h,w,i,j,a[200][200];
		scanf("%d%d",&h,&w);
		for(i=0;i<10;i++){
				for(j=0;j<10;j++){
						scanf("%lld",&d[i][j]);
				}
		}
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						scanf("%d",&a[i][j]);
				}
		}
		warshall_floyd();
		long long ans=0;
		for(i=0;i<h;i++){
				for(j=0;j<w;j++){
						if(a[i][j]!=-1)ans+=d[a[i][j]][1];
				}
		}
		printf("%lld\n",ans);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800
d:
	.zero	800
	.text
	.globl	warshall_floyd
	.type	warshall_floyd, @function
warshall_floyd:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %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,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rcx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -4(%rbp)
.L4:
	cmpl	$9, -4(%rbp)
	jle	.L5
	addl	$1, -8(%rbp)
.L3:
	cmpl	$9, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	warshall_floyd, .-warshall_floyd
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-160036(%rbp), %rdx
	leaq	-160040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160032(%rbp)
	jmp	.L9
.L12:
	movl	$0, -160028(%rbp)
	jmp	.L10
.L11:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L10:
	cmpl	$9, -160028(%rbp)
	jle	.L11
	addl	$1, -160032(%rbp)
.L9:
	cmpl	$9, -160032(%rbp)
	jle	.L12
	movl	$0, -160032(%rbp)
	jmp	.L13
.L16:
	movl	$0, -160028(%rbp)
	jmp	.L14
.L15:
	leaq	-160016(%rbp), %rcx
	movl	-160028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L14:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L15
	addl	$1, -160032(%rbp)
.L13:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L16
	movl	$0, %eax
	call	warshall_floyd
	movq	$0, -160024(%rbp)
	movl	$0, -160032(%rbp)
	jmp	.L17
.L21:
	movl	$0, -160028(%rbp)
	jmp	.L18
.L20:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+d(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -160024(%rbp)
.L19:
	addl	$1, -160028(%rbp)
.L18:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L20
	addl	$1, -160032(%rbp)
.L17:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L21
	movq	-160024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 800
d:
	.zero	800
	.text
	.globl	warshall_floyd
	.type	warshall_floyd, @function
warshall_floyd:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	$0, -8(%rbp)
	jmp	.L3
.L6:
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %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,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rcx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -4(%rbp)
.L4:
	cmpl	$9, -4(%rbp)
	jle	.L5
	addl	$1, -8(%rbp)
.L3:
	cmpl	$9, -8(%rbp)
	jle	.L6
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	warshall_floyd, .-warshall_floyd
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-160036(%rbp), %rdx
	leaq	-160040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160032(%rbp)
	jmp	.L9
.L12:
	movl	$0, -160028(%rbp)
	jmp	.L10
.L11:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L10:
	cmpl	$9, -160028(%rbp)
	jle	.L11
	addl	$1, -160032(%rbp)
.L9:
	cmpl	$9, -160032(%rbp)
	jle	.L12
	movl	$0, -160032(%rbp)
	jmp	.L13
.L16:
	movl	$0, -160028(%rbp)
	jmp	.L14
.L15:
	leaq	-160016(%rbp), %rcx
	movl	-160028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160028(%rbp)
.L14:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L15
	addl	$1, -160032(%rbp)
.L13:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L16
	movl	$0, %eax
	call	warshall_floyd
	movq	$0, -160024(%rbp)
	movl	$0, -160032(%rbp)
	jmp	.L17
.L21:
	movl	$0, -160028(%rbp)
	jmp	.L18
.L20:
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	-160028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-160032(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+d(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -160024(%rbp)
.L19:
	addl	$1, -160028(%rbp)
.L18:
	movl	-160036(%rbp), %eax
	cmpl	%eax, -160028(%rbp)
	jl	.L20
	addl	$1, -160032(%rbp)
.L17:
	movl	-160040(%rbp), %eax
	cmpl	%eax, -160032(%rbp)
	jl	.L21
	movq	-160024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
