Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
I=16843009;g[101][101],h[101][101];a,b,c;k;*d;x;main(n){for(scanf("%d%*d",&n);a++<n;)for(b=0;b++<n;)h[a][b]=g[a][b]=a-b?I:0;for(;~scanf("%d%d%d",&a,&b,&c);)h[a][b]=h[b][a]=g[a][b]=g[b][a]=c;for(;k++<n;)for(a=0;a++<n;)for(b=0;b++<n;c<*d?*d=c,g[a][b]-I?g[a][b]=I,x++:0:0)d=h[a]+b,c=h[a][k]+h[k][b];printf("%d",x/2);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	I
	.data
	.align 4
	.type	I, @object
	.size	I, 4
I:
	.long	16843009
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 40804
g:
	.zero	40804
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40804
h:
	.zero	40804
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%*d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L7:
	movl	$0, b(%rip)
	jmp	.L3
.L6:
	movl	a(%rip), %edx
	movl	b(%rip), %eax
	cmpl	%eax, %edx
	je	.L4
	movl	I(%rip), %edi
	jmp	.L5
.L4:
	movl	$0, %edi
.L5:
	movl	a(%rip), %ecx
	movl	b(%rip), %esi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L7
	jmp	.L8
.L9:
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movl	c(%rip), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movslq	%r8d, %r8
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	jmp	.L10
.L18:
	movl	$0, a(%rip)
	jmp	.L11
.L17:
	movl	$0, b(%rip)
	jmp	.L12
.L16:
	movl	a(%rip), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	h(%rip), %rdx
	addq	%rax, %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, d(%rip)
	movl	a(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, c(%rip)
	movq	d(%rip), %rax
	movl	(%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
	movq	d(%rip), %rax
	movl	c(%rip), %edx
	movl	%edx, (%rax)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	I(%rip), %eax
	cmpl	%eax, %edx
	je	.L12
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movl	I(%rip), %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, x(%rip)
.L12:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L16
.L11:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L17
.L10:
	movl	k(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, k(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L18
	movl	x(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%*d"
.LC3:
	.string	"%d%d%d"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movl	%r9d, 24(%rsp)
	movq	%r8, 8(%rsp)
	call	scanf@PLT
	movl	a(%rip), %ecx
	movl	60(%rsp), %esi
	movq	8(%rsp), %r8
	movl	24(%rsp), %r9d
	leal	1(%rcx), %eax
	cmpl	%esi, %ecx
	movl	%eax, a(%rip)
	jge	.L2
	cltq
	movl	%esi, %ebx
	leal	1(%rsi), %r14d
	movl	I(%rip), %r15d
	imulq	$404, %rax, %rdi
	leal	-1(%rsi), %eax
	andl	$-4, %ebx
	movq	%r8, 32(%rsp)
	movl	%eax, 8(%rsp)
	movl	%esi, %eax
	movd	%r15d, %xmm6
	movl	%r15d, %ebp
	shrl	$2, %eax
	movl	%r14d, 28(%rsp)
	movdqa	.LC2(%rip), %xmm3
	leaq	g(%rip), %r13
	leal	-1(%rax), %edx
	leal	1(%rbx), %eax
	movl	%r9d, 48(%rsp)
	pshufd	$0, %xmm6, %xmm4
	addq	$1, %rdx
	movl	%eax, 24(%rsp)
	movl	$1, %eax
	movl	%ebx, %r9d
	salq	$4, %rdx
	testl	%esi, %esi
	leaq	h(%rip), %r12
	cmovg	%r14d, %eax
	xorl	%r14d, %r14d
	movl	%eax, 16(%rsp)
.L11:
	movl	%ecx, %r11d
	addl	$1, %ecx
	testl	%esi, %esi
	jle	.L3
	cmpl	$2, 8(%rsp)
	jbe	.L26
	leaq	4+g(%rip), %rax
	movd	%r11d, %xmm5
	movdqa	.LC0(%rip), %xmm1
	leaq	(%rax,%rdi), %r10
	leaq	4+h(%rip), %rax
	pshufd	$0, %xmm5, %xmm2
	leaq	(%rax,%rdi), %r8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm1, %xmm0
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm0
	pandn	%xmm4, %xmm0
	movups	%xmm0, (%r10,%rax)
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	cmpl	%esi, %r9d
	je	.L3
	movl	24(%rsp), %eax
	movl	%r9d, %r8d
.L4:
	movslq	%ecx, %r10
	cmpl	%r8d, %r11d
	movl	%r14d, %ebx
	movslq	%eax, %r8
	leaq	(%r10,%r10,4), %r15
	cmovne	%ebp, %ebx
	leaq	(%r15,%r15,4), %r15
	leaq	(%r10,%r15,4), %r10
	addq	%r10, %r8
	movl	%ebx, 0(%r13,%r8,4)
	movl	%ebx, (%r12,%r8,4)
	leal	1(%rax), %ebx
	cmpl	%eax, %esi
	jle	.L3
	cmpl	%eax, %r11d
	movl	%r14d, %r15d
	movslq	%ebx, %r8
	cmovne	%ebp, %r15d
	addq	%r10, %r8
	addl	$2, %eax
	movl	%r15d, 0(%r13,%r8,4)
	movl	%r15d, (%r12,%r8,4)
	cmpl	%ebx, %esi
	jle	.L3
	cmpl	%ebx, %r11d
	movl	%r14d, %r8d
	cltq
	cmovne	%ebp, %r8d
	addq	%rax, %r10
	movl	%r8d, 0(%r13,%r10,4)
	movl	%r8d, (%r12,%r10,4)
.L3:
	addq	$404, %rdi
	cmpl	%ecx, %esi
	jne	.L11
	movl	16(%rsp), %eax
	movq	32(%rsp), %r8
	movl	48(%rsp), %r9d
	movl	%eax, b(%rip)
	movl	28(%rsp), %eax
	movl	%eax, a(%rip)
.L2:
	movq	%r8, 8(%rsp)
	leaq	c(%rip), %r15
	leaq	b(%rip), %r14
	movl	%r9d, 24(%rsp)
	leaq	a(%rip), %r13
	leaq	.LC3(%rip), %r12
	leaq	g(%rip), %rbp
	leaq	h(%rip), %rbx
	jmp	.L12
.L13:
	movslq	b(%rip), %rsi
	movslq	a(%rip), %rax
	movl	c(%rip), %edx
	leaq	(%rsi,%rsi,4), %rcx
	leaq	(%rax,%rax,4), %rdi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rdi,%rdi,4), %rdi
	leaq	(%rsi,%rcx,4), %rcx
	addq	%rax, %rcx
	leaq	(%rax,%rdi,4), %rax
	addq	%rsi, %rax
	movl	%edx, 0(%rbp,%rcx,4)
	movl	%edx, (%rbx,%rcx,4)
	movl	%edx, 0(%rbp,%rax,4)
	movl	%edx, (%rbx,%rax,4)
.L12:
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movslq	k(%rip), %rax
	movl	x(%rip), %ebx
	movl	60(%rsp), %r10d
	movq	8(%rsp), %r8
	leal	1(%rax), %ecx
	movl	%ebx, 56(%rsp)
	movl	24(%rsp), %r9d
	movl	%ebx, %r15d
	movl	%ecx, k(%rip)
	cmpl	%eax, %r10d
	jle	.L15
	movslq	%ecx, %rcx
	movl	I(%rip), %ebx
	leal	1(%r10), %edi
	movb	$0, 55(%rsp)
	imulq	$404, %rcx, %r11
	movl	%edi, 24(%rsp)
	movl	b(%rip), %edx
	movl	%ebx, 28(%rsp)
	leaq	h(%rip), %rbx
	addq	%rbx, %r11
	leaq	(%rbx,%rcx,4), %rbx
	leal	-1(%r10), %ecx
	subl	%eax, %ecx
	movq	%rbx, 32(%rsp)
	xorl	%ebx, %ebx
	addq	%rcx, %rax
	leaq	8+h(%rip), %rcx
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
.L22:
	testl	%r10d, %r10d
	jle	.L30
	movl	24(%rsp), %edx
	movq	32(%rsp), %rax
	movl	$1, %ebp
	movl	%edx, 48(%rsp)
	leaq	h(%rip), %rdx
	leaq	404(%rax), %rdi
	subq	%rax, %rdx
	movq	%rdx, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L21:
	movq	16(%rsp), %rax
	movl	%r15d, %r13d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	(%rax,%rdi), %r12
	movslq	%ebp, %rax
	leaq	(%rax,%rax,4), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,4), %r14
.L17:
	movl	%r13d, 8(%rsp)
.L19:
	leal	1(%rdx), %eax
	movl	8(%rsp), %r15d
	leaq	4(%r12,%rcx,4), %rsi
	cltq
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rsi, %r8
	movl	(%r11,%rax,4), %r9d
	leaq	4(%rsi), %rsi
	addl	(%rdi), %r9d
	addq	$1, %rax
	movl	$1, %ebx
	cmpl	(%r8), %r9d
	jl	.L48
.L18:
	leal	-1(%rax), %ecx
	movl	%eax, %edx
	cmpl	%ecx, %r10d
	jg	.L20
	addl	$1, %ebp
	addq	$404, %rdi
	cmpl	24(%rsp), %ebp
	jne	.L21
	movl	$1, %eax
.L16:
	addq	$4, 32(%rsp)
	addq	$404, %r11
	movq	32(%rsp), %rdi
	cmpq	40(%rsp), %rdi
	jne	.L22
	movl	48(%rsp), %edi
	cmpb	$0, 55(%rsp)
	movl	%edi, a(%rip)
	movl	24(%rsp), %edi
	movl	%edi, k(%rip)
	je	.L23
	movl	%r15d, x(%rip)
	movl	%r15d, 56(%rsp)
.L23:
	testb	%al, %al
	je	.L24
	movl	%edx, b(%rip)
.L24:
	testb	%bl, %bl
	je	.L15
	movl	%r9d, c(%rip)
	movq	%r8, d(%rip)
.L15:
	movl	56(%rsp), %eax
	leaq	.LC4(%rip), %rdi
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	movslq	%edx, %rcx
	leaq	g(%rip), %rsi
	movl	%r15d, 8(%rsp)
	movl	28(%rsp), %r15d
	leaq	(%r14,%rcx), %rax
	movl	%r9d, (%r8)
	cmpl	%r15d, (%rsi,%rax,4)
	je	.L19
	movl	%r15d, (%rsi,%rax,4)
	addl	$1, %r13d
	movb	$1, 55(%rsp)
	jmp	.L17
.L30:
	movl	$1, 48(%rsp)
	jmp	.L16
.L26:
	movl	$1, %eax
	xorl	%r8d, %r8d
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40804
h:
	.zero	40804
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 40804
g:
	.zero	40804
	.globl	I
	.data
	.align 4
	.type	I, @object
	.size	I, 4
I:
	.long	16843009
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%*d"
.LC3:
	.string	"%d%d%d"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movl	%r9d, 24(%rsp)
	movq	%r8, 8(%rsp)
	call	scanf@PLT
	movl	a(%rip), %ecx
	movl	60(%rsp), %esi
	movq	8(%rsp), %r8
	movl	24(%rsp), %r9d
	leal	1(%rcx), %eax
	cmpl	%esi, %ecx
	movl	%eax, a(%rip)
	jge	.L2
	cltq
	movl	%esi, %ebx
	leal	1(%rsi), %r14d
	movl	I(%rip), %r15d
	imulq	$404, %rax, %rdi
	leal	-1(%rsi), %eax
	andl	$-4, %ebx
	movq	%r8, 32(%rsp)
	movl	%eax, 8(%rsp)
	movl	%esi, %eax
	movd	%r15d, %xmm6
	movl	%r15d, %ebp
	shrl	$2, %eax
	movl	%r14d, 28(%rsp)
	movdqa	.LC2(%rip), %xmm3
	leaq	g(%rip), %r13
	leal	-1(%rax), %edx
	leal	1(%rbx), %eax
	movl	%r9d, 48(%rsp)
	pshufd	$0, %xmm6, %xmm4
	addq	$1, %rdx
	movl	%eax, 24(%rsp)
	movl	$1, %eax
	movl	%ebx, %r9d
	salq	$4, %rdx
	testl	%esi, %esi
	leaq	h(%rip), %r12
	cmovg	%r14d, %eax
	xorl	%r14d, %r14d
	movl	%eax, 16(%rsp)
.L11:
	movl	%ecx, %r11d
	addl	$1, %ecx
	testl	%esi, %esi
	jle	.L3
	cmpl	$2, 8(%rsp)
	jbe	.L26
	leaq	4+g(%rip), %rax
	movd	%r11d, %xmm5
	movdqa	.LC0(%rip), %xmm1
	leaq	(%rax,%rdi), %r10
	leaq	4+h(%rip), %rax
	pshufd	$0, %xmm5, %xmm2
	leaq	(%rax,%rdi), %r8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm1, %xmm0
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm0
	pandn	%xmm4, %xmm0
	movups	%xmm0, (%r10,%rax)
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	cmpl	%esi, %r9d
	je	.L3
	movl	24(%rsp), %eax
	movl	%r9d, %r8d
.L4:
	movslq	%ecx, %r10
	cmpl	%r8d, %r11d
	movl	%r14d, %ebx
	movslq	%eax, %r8
	leaq	(%r10,%r10,4), %r15
	cmovne	%ebp, %ebx
	leaq	(%r15,%r15,4), %r15
	leaq	(%r10,%r15,4), %r10
	addq	%r10, %r8
	movl	%ebx, 0(%r13,%r8,4)
	movl	%ebx, (%r12,%r8,4)
	leal	1(%rax), %ebx
	cmpl	%eax, %esi
	jle	.L3
	cmpl	%eax, %r11d
	movl	%r14d, %r15d
	movslq	%ebx, %r8
	cmovne	%ebp, %r15d
	addq	%r10, %r8
	addl	$2, %eax
	movl	%r15d, 0(%r13,%r8,4)
	movl	%r15d, (%r12,%r8,4)
	cmpl	%ebx, %esi
	jle	.L3
	cmpl	%ebx, %r11d
	movl	%r14d, %r8d
	cltq
	cmovne	%ebp, %r8d
	addq	%rax, %r10
	movl	%r8d, 0(%r13,%r10,4)
	movl	%r8d, (%r12,%r10,4)
.L3:
	addq	$404, %rdi
	cmpl	%ecx, %esi
	jne	.L11
	movl	16(%rsp), %eax
	movq	32(%rsp), %r8
	movl	48(%rsp), %r9d
	movl	%eax, b(%rip)
	movl	28(%rsp), %eax
	movl	%eax, a(%rip)
.L2:
	movq	%r8, 8(%rsp)
	leaq	c(%rip), %r15
	leaq	b(%rip), %r14
	movl	%r9d, 24(%rsp)
	leaq	a(%rip), %r13
	leaq	.LC3(%rip), %r12
	leaq	g(%rip), %rbp
	leaq	h(%rip), %rbx
	jmp	.L12
.L13:
	movslq	b(%rip), %rsi
	movslq	a(%rip), %rax
	movl	c(%rip), %edx
	leaq	(%rsi,%rsi,4), %rcx
	leaq	(%rax,%rax,4), %rdi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rdi,%rdi,4), %rdi
	leaq	(%rsi,%rcx,4), %rcx
	addq	%rax, %rcx
	leaq	(%rax,%rdi,4), %rax
	addq	%rsi, %rax
	movl	%edx, 0(%rbp,%rcx,4)
	movl	%edx, (%rbx,%rcx,4)
	movl	%edx, 0(%rbp,%rax,4)
	movl	%edx, (%rbx,%rax,4)
.L12:
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movslq	k(%rip), %rax
	movl	x(%rip), %ebx
	movl	60(%rsp), %r10d
	movq	8(%rsp), %r8
	leal	1(%rax), %ecx
	movl	%ebx, 56(%rsp)
	movl	24(%rsp), %r9d
	movl	%ebx, %r15d
	movl	%ecx, k(%rip)
	cmpl	%eax, %r10d
	jle	.L15
	movslq	%ecx, %rcx
	movl	I(%rip), %ebx
	leal	1(%r10), %edi
	movb	$0, 55(%rsp)
	imulq	$404, %rcx, %r11
	movl	%edi, 24(%rsp)
	movl	b(%rip), %edx
	movl	%ebx, 28(%rsp)
	leaq	h(%rip), %rbx
	addq	%rbx, %r11
	leaq	(%rbx,%rcx,4), %rbx
	leal	-1(%r10), %ecx
	subl	%eax, %ecx
	movq	%rbx, 32(%rsp)
	xorl	%ebx, %ebx
	addq	%rcx, %rax
	leaq	8+h(%rip), %rcx
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
.L22:
	testl	%r10d, %r10d
	jle	.L30
	movl	24(%rsp), %edx
	movq	32(%rsp), %rax
	movl	$1, %ebp
	movl	%edx, 48(%rsp)
	leaq	h(%rip), %rdx
	leaq	404(%rax), %rdi
	subq	%rax, %rdx
	movq	%rdx, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L21:
	movq	16(%rsp), %rax
	movl	%r15d, %r13d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	(%rax,%rdi), %r12
	movslq	%ebp, %rax
	leaq	(%rax,%rax,4), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rax,%rsi,4), %r14
.L17:
	movl	%r13d, 8(%rsp)
.L19:
	leal	1(%rdx), %eax
	movl	8(%rsp), %r15d
	leaq	4(%r12,%rcx,4), %rsi
	cltq
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rsi, %r8
	movl	(%r11,%rax,4), %r9d
	leaq	4(%rsi), %rsi
	addl	(%rdi), %r9d
	addq	$1, %rax
	movl	$1, %ebx
	cmpl	(%r8), %r9d
	jl	.L48
.L18:
	leal	-1(%rax), %ecx
	movl	%eax, %edx
	cmpl	%ecx, %r10d
	jg	.L20
	addl	$1, %ebp
	addq	$404, %rdi
	cmpl	24(%rsp), %ebp
	jne	.L21
	movl	$1, %eax
.L16:
	addq	$4, 32(%rsp)
	addq	$404, %r11
	movq	32(%rsp), %rdi
	cmpq	40(%rsp), %rdi
	jne	.L22
	movl	48(%rsp), %edi
	cmpb	$0, 55(%rsp)
	movl	%edi, a(%rip)
	movl	24(%rsp), %edi
	movl	%edi, k(%rip)
	je	.L23
	movl	%r15d, x(%rip)
	movl	%r15d, 56(%rsp)
.L23:
	testb	%al, %al
	je	.L24
	movl	%edx, b(%rip)
.L24:
	testb	%bl, %bl
	je	.L15
	movl	%r9d, c(%rip)
	movq	%r8, d(%rip)
.L15:
	movl	56(%rsp), %eax
	leaq	.LC4(%rip), %rdi
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	movslq	%edx, %rcx
	leaq	g(%rip), %rsi
	movl	%r15d, 8(%rsp)
	movl	28(%rsp), %r15d
	leaq	(%r14,%rcx), %rax
	movl	%r9d, (%r8)
	cmpl	%r15d, (%rsi,%rax,4)
	je	.L19
	movl	%r15d, (%rsi,%rax,4)
	addl	$1, %r13d
	movb	$1, 55(%rsp)
	jmp	.L17
.L30:
	movl	$1, 48(%rsp)
	jmp	.L16
.L26:
	movl	$1, %eax
	xorl	%r8d, %r8d
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40804
h:
	.zero	40804
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 40804
g:
	.zero	40804
	.globl	I
	.data
	.align 4
	.type	I, @object
	.size	I, 4
I:
	.long	16843009
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	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:

I=16843009;g[101][101],h[101][101];a,b,c;k;*d;x;main(n){for(scanf("%d%*d",&n);a++<n;)for(b=0;b++<n;)h[a][b]=g[a][b]=a-b?I:0;for(;~scanf("%d%d%d",&a,&b,&c);)h[a][b]=h[b][a]=g[a][b]=g[b][a]=c;for(;k++<n;)for(a=0;a++<n;)for(b=0;b++<n;c<*d?*d=c,g[a][b]-I?g[a][b]=I,x++:0:0)d=h[a]+b,c=h[a][k]+h[k][b];printf("%d",x/2);}
3 3
1 2 2
1 3 1
2 3 3
 4 3
1 2 1
1 3 1
2 3 3
 3 2
1 2 2
2 3 1
 3 2
1 3 2
2 3 1
 3 2
1 3 2
2 0 1
 3 2
1 2 2
2 0 1
 3 2
2 2 2
2 0 1
 3 2
1 1 1
2 3 1
 3 3
1 2 2
1 3 1
2 3 0
 3 2
1 3 2
2 1 1

0 1 0 0 0 0 0 0 1 0
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
I=16843009;g[101][101],h[101][101];a,b,c;k;*d;x;main(n){for(scanf("%d%*d",&n);a++<n;)for(b=0;b++<n;)h[a][b]=g[a][b]=a-b?I:0;for(;~scanf("%d%d%d",&a,&b,&c);)h[a][b]=h[b][a]=g[a][b]=g[b][a]=c;for(;k++<n;)for(a=0;a++<n;)for(b=0;b++<n;c<*d?*d=c,g[a][b]-I?g[a][b]=I,x++:0:0)d=h[a]+b,c=h[a][k]+h[k][b];printf("%d",x/2);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	I
	.data
	.align 4
	.type	I, @object
	.size	I, 4
I:
	.long	16843009
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 40804
g:
	.zero	40804
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40804
h:
	.zero	40804
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%*d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L7:
	movl	$0, b(%rip)
	jmp	.L3
.L6:
	movl	a(%rip), %edx
	movl	b(%rip), %eax
	cmpl	%eax, %edx
	je	.L4
	movl	I(%rip), %edi
	jmp	.L5
.L4:
	movl	$0, %edi
.L5:
	movl	a(%rip), %ecx
	movl	b(%rip), %esi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L7
	jmp	.L8
.L9:
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movl	c(%rip), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movslq	%r8d, %r8
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	jmp	.L10
.L18:
	movl	$0, a(%rip)
	jmp	.L11
.L17:
	movl	$0, b(%rip)
	jmp	.L12
.L16:
	movl	a(%rip), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	h(%rip), %rdx
	addq	%rax, %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, d(%rip)
	movl	a(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, c(%rip)
	movq	d(%rip), %rax
	movl	(%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
	movq	d(%rip), %rax
	movl	c(%rip), %edx
	movl	%edx, (%rax)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	I(%rip), %eax
	cmpl	%eax, %edx
	je	.L12
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movl	I(%rip), %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, x(%rip)
.L12:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L16
.L11:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L17
.L10:
	movl	k(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, k(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L18
	movl	x(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	I
	.data
	.align 4
	.type	I, @object
	.size	I, 4
I:
	.long	16843009
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 40804
g:
	.zero	40804
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40804
h:
	.zero	40804
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d%*d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L7:
	movl	$0, b(%rip)
	jmp	.L3
.L6:
	movl	a(%rip), %edx
	movl	b(%rip), %eax
	cmpl	%eax, %edx
	je	.L4
	movl	I(%rip), %edi
	jmp	.L5
.L4:
	movl	$0, %edi
.L5:
	movl	a(%rip), %ecx
	movl	b(%rip), %esi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L7
	jmp	.L8
.L9:
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movl	c(%rip), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %ecx
	movl	a(%rip), %esi
	movslq	%r8d, %r8
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r9
	addq	%r9, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%edi, (%rdx,%rax)
	movl	a(%rip), %edi
	movl	b(%rip), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	jmp	.L10
.L18:
	movl	$0, a(%rip)
	jmp	.L11
.L17:
	movl	$0, b(%rip)
	jmp	.L12
.L16:
	movl	a(%rip), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	h(%rip), %rdx
	addq	%rax, %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, d(%rip)
	movl	a(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	h(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, c(%rip)
	movq	d(%rip), %rax
	movl	(%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jle	.L12
	movq	d(%rip), %rax
	movl	c(%rip), %edx
	movl	%edx, (%rax)
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	I(%rip), %eax
	cmpl	%eax, %edx
	je	.L12
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	movl	I(%rip), %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	x(%rip), %eax
	addl	$1, %eax
	movl	%eax, x(%rip)
.L12:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L16
.L11:
	movl	a(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, a(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L17
.L10:
	movl	k(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, k(%rip)
	movl	-4(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L18
	movl	x(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
