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

```c
n,C[124][101],*p,a,b,c;D(i){int f[101]={0},T;memset(p=C,9,404);for(p[a]=0;T=a;)for(f[T]=1,a=i=0;i++<n;a=f[i]|p[i]>p[a]?a:i)p[i]=fmin(p[i],p[T]+C[T][i]);printf("%d\n",p[b]>1e8?-1:p[b]);}main(k){for(;scanf("%d%d",&n,&k)*n;)for(memset(C,9,5e4);k--;a?scanf("%d%d%d",&a,&b,&c),C[a][b]=fmin(C[a][b],c),C[b][a]=fmin(C[b][a],c):D(scanf("%d%d",&a,&b)))scanf("%d",&a);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 50096
C:
	.zero	50096
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.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
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	C(%rip), %rax
	movq	%rax, p(%rip)
	movl	$404, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	p(%rip), %rdx
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L2
.L7:
	movl	-420(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L3
.L6:
	movq	p(%rip), %rdx
	movl	-420(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-420(%rbp), %eax
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%rdx)
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	p(%rip), %rsi
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	orl	%ecx, %eax
	testl	%eax, %eax
	je	.L4
	movl	a(%rip), %eax
	jmp	.L5
.L4:
	movl	-436(%rbp), %eax
.L5:
	movl	%eax, a(%rip)
.L3:
	movl	-436(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -436(%rbp)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	movl	%eax, -420(%rbp)
	cmpl	$0, -420(%rbp)
	jne	.L7
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$100000000, %eax
	jg	.L8
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	jmp	.L9
.L8:
	movl	$-1, %eax
.L9:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d%d"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L12
.L16:
	movl	$50000, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L15:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	cvttsd2sil	%xmm0, %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	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	b(%rip), %eax
	movl	a(%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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	b(%rip), %ecx
	movl	a(%rip), %eax
	cvttsd2sil	%xmm0, %esi
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%esi, (%rdx,%rax)
	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
	jmp	.L13
.L14:
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	%eax, %edi
	movl	$0, %eax
	call	D
.L13:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L15
.L12:
	leaq	-4(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.text
	.p2align 4
	.type	D.constprop.0.isra.0, @function
D.constprop.0.isra.0:
.LFB3:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	C(%rip), %r14
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	%r14, p(%rip)
	movq	%r12, %rdi
	rep stosq
	movl	$50, %ecx
	movabsq	$651061555542690057, %rax
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movslq	a(%rip), %rcx
	movl	$151587081, (%rdi)
	movl	$0, (%r14,%rcx,4)
	testl	%ecx, %ecx
	je	.L2
	movl	n(%rip), %eax
	movl	$1, 16(%rsp,%rcx,4)
	movl	%eax, 12(%rsp)
	addl	$1, %eax
	movq	%rax, (%rsp)
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rcx,4), %r13
	movl	$1, %ebx
	xorl	%r15d, %r15d
	imulq	$404, %rcx, %rcx
	leaq	(%r14,%rcx), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movl	0(%r13), %eax
	pxor	%xmm0, %xmm0
	addl	0(%rbp,%rbx,4), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%r14,%rbx,4), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	fmin@PLT
	movslq	%r15d, %rcx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	cmpl	%eax, (%r14,%rcx,4)
	setl	%al
	movzbl	%al, %eax
	orl	(%r12,%rbx,4), %eax
	cmove	%ebx, %r15d
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jne	.L5
	testl	%r15d, %r15d
	je	.L15
	movl	12(%rsp), %eax
	movslq	%r15d, %rcx
	movl	$1, 16(%rsp,%rcx,4)
	testl	%eax, %eax
	jg	.L3
.L15:
	movl	$0, a(%rip)
.L2:
	movslq	b(%rip), %rax
	leaq	.LC0(%rip), %rdi
	movl	(%r14,%rax,4), %esi
	movl	$-1, %eax
	cmpl	$100000001, %esi
	cmovge	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE3:
	.size	D.constprop.0.isra.0, .-D.constprop.0.isra.0
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	C(%rip), %r14
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	%r14, p(%rip)
	movq	%r12, %rdi
	rep stosq
	movl	$50, %ecx
	movabsq	$651061555542690057, %rax
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movslq	a(%rip), %rcx
	movl	$151587081, (%rdi)
	movl	$0, (%r14,%rcx,4)
	testl	%ecx, %ecx
	je	.L20
	movl	n(%rip), %eax
	movl	$1, 16(%rsp,%rcx,4)
	movl	%eax, 12(%rsp)
	addl	$1, %eax
	movq	%rax, (%rsp)
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	(%r14,%rcx,4), %r13
	movl	$1, %ebx
	xorl	%r15d, %r15d
	imulq	$404, %rcx, %rcx
	leaq	(%r14,%rcx), %rbp
	.p2align 4,,10
	.p2align 3
.L23:
	movl	0(%r13), %eax
	pxor	%xmm0, %xmm0
	addl	0(%rbp,%rbx,4), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%r14,%rbx,4), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	fmin@PLT
	movslq	%r15d, %rcx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	cmpl	%eax, (%r14,%rcx,4)
	setl	%al
	movzbl	%al, %eax
	orl	(%r12,%rbx,4), %eax
	cmove	%ebx, %r15d
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jne	.L23
	testl	%r15d, %r15d
	je	.L33
	movl	12(%rsp), %eax
	movslq	%r15d, %rcx
	movl	$1, 16(%rsp,%rcx,4)
	testl	%eax, %eax
	jg	.L21
.L33:
	movl	$0, a(%rip)
.L20:
	movslq	b(%rip), %rax
	leaq	.LC0(%rip), %rdi
	movl	(%r14,%rax,4), %esi
	movl	$-1, %eax
	cmpl	$100000001, %esi
	cmovge	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$440, %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
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	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
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	C(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	leaq	44(%rsp), %rax
	movl	%edi, 44(%rsp)
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L37:
	movq	32(%rsp), %rdx
	leaq	n(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	imull	n(%rip), %eax
	testl	%eax, %eax
	je	.L51
	movl	$50000, %edx
	movl	$9, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L37
	leaq	.LC1(%rip), %r13
	leaq	b(%rip), %r12
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L52:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	leaq	c(%rip), %rcx
	call	scanf@PLT
	movslq	a(%rip), %r15
	movslq	b(%rip), %rax
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	c(%rip), %xmm1
	leaq	(%r15,%r15,4), %rcx
	movq	%rax, 24(%rsp)
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,4), %rcx
	addq	%rax, %rcx
	movsd	%xmm1, 8(%rsp)
	cvtsi2sdl	(%rbx,%rcx,4), %xmm0
	movq	%rcx, 16(%rsp)
	call	fmin@PLT
	movq	16(%rsp), %rcx
	movq	24(%rsp), %rax
	cvttsd2sil	%xmm0, %esi
	pxor	%xmm0, %xmm0
	movsd	8(%rsp), %xmm1
	movl	%esi, (%rbx,%rcx,4)
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rax, %r15
	cvtsi2sdl	(%rbx,%r15,4), %xmm0
	call	fmin@PLT
	cvttsd2sil	%xmm0, %edx
	movl	%edx, (%rbx,%r15,4)
.L50:
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L37
.L41:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	jne	.L52
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	xorl	%eax, %eax
	call	D.constprop.0.isra.0
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	c
	.bss
	.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	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 50096
C:
	.zero	50096
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.text
	.p2align 4
	.type	D.constprop.0.isra.0, @function
D.constprop.0.isra.0:
.LFB3:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	C(%rip), %r14
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	%r14, p(%rip)
	movq	%r12, %rdi
	rep stosq
	movl	$50, %ecx
	movabsq	$651061555542690057, %rax
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movslq	a(%rip), %rcx
	movl	$151587081, (%rdi)
	movl	$0, (%r14,%rcx,4)
	testl	%ecx, %ecx
	je	.L2
	movl	n(%rip), %eax
	movl	$1, 16(%rsp,%rcx,4)
	movl	%eax, 12(%rsp)
	addl	$1, %eax
	movq	%rax, (%rsp)
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rcx,4), %r13
	movl	$1, %ebx
	xorl	%r15d, %r15d
	imulq	$404, %rcx, %rcx
	leaq	(%r14,%rcx), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movl	0(%r13), %eax
	pxor	%xmm0, %xmm0
	addl	0(%rbp,%rbx,4), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%r14,%rbx,4), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	fmin@PLT
	movslq	%r15d, %rcx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	cmpl	%eax, (%r14,%rcx,4)
	setl	%al
	movzbl	%al, %eax
	orl	(%r12,%rbx,4), %eax
	cmove	%ebx, %r15d
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jne	.L5
	testl	%r15d, %r15d
	je	.L15
	movl	12(%rsp), %eax
	movslq	%r15d, %rcx
	movl	$1, 16(%rsp,%rcx,4)
	testl	%eax, %eax
	jg	.L3
.L15:
	movl	$0, a(%rip)
.L2:
	movslq	b(%rip), %rax
	leaq	.LC0(%rip), %rdi
	movl	(%r14,%rax,4), %esi
	movl	$-1, %eax
	cmpl	$100000001, %esi
	cmovge	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE3:
	.size	D.constprop.0.isra.0, .-D.constprop.0.isra.0
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	C(%rip), %r14
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	movq	%r14, p(%rip)
	movq	%r12, %rdi
	rep stosq
	movl	$50, %ecx
	movabsq	$651061555542690057, %rax
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movslq	a(%rip), %rcx
	movl	$151587081, (%rdi)
	movl	$0, (%r14,%rcx,4)
	testl	%ecx, %ecx
	je	.L20
	movl	n(%rip), %eax
	movl	$1, 16(%rsp,%rcx,4)
	movl	%eax, 12(%rsp)
	addl	$1, %eax
	movq	%rax, (%rsp)
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	(%r14,%rcx,4), %r13
	movl	$1, %ebx
	xorl	%r15d, %r15d
	imulq	$404, %rcx, %rcx
	leaq	(%r14,%rcx), %rbp
	.p2align 4,,10
	.p2align 3
.L23:
	movl	0(%r13), %eax
	pxor	%xmm0, %xmm0
	addl	0(%rbp,%rbx,4), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%r14,%rbx,4), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	fmin@PLT
	movslq	%r15d, %rcx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%r14,%rbx,4)
	cmpl	%eax, (%r14,%rcx,4)
	setl	%al
	movzbl	%al, %eax
	orl	(%r12,%rbx,4), %eax
	cmove	%ebx, %r15d
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jne	.L23
	testl	%r15d, %r15d
	je	.L33
	movl	12(%rsp), %eax
	movslq	%r15d, %rcx
	movl	$1, 16(%rsp,%rcx,4)
	testl	%eax, %eax
	jg	.L21
.L33:
	movl	$0, a(%rip)
.L20:
	movslq	b(%rip), %rax
	leaq	.LC0(%rip), %rdi
	movl	(%r14,%rax,4), %esi
	movl	$-1, %eax
	cmpl	$100000001, %esi
	cmovge	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$440, %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
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	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
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	C(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	leaq	44(%rsp), %rax
	movl	%edi, 44(%rsp)
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L37:
	movq	32(%rsp), %rdx
	leaq	n(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	imull	n(%rip), %eax
	testl	%eax, %eax
	je	.L51
	movl	$50000, %edx
	movl	$9, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L37
	leaq	.LC1(%rip), %r13
	leaq	b(%rip), %r12
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L52:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	leaq	c(%rip), %rcx
	call	scanf@PLT
	movslq	a(%rip), %r15
	movslq	b(%rip), %rax
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	c(%rip), %xmm1
	leaq	(%r15,%r15,4), %rcx
	movq	%rax, 24(%rsp)
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,4), %rcx
	addq	%rax, %rcx
	movsd	%xmm1, 8(%rsp)
	cvtsi2sdl	(%rbx,%rcx,4), %xmm0
	movq	%rcx, 16(%rsp)
	call	fmin@PLT
	movq	16(%rsp), %rcx
	movq	24(%rsp), %rax
	cvttsd2sil	%xmm0, %esi
	pxor	%xmm0, %xmm0
	movsd	8(%rsp), %xmm1
	movl	%esi, (%rbx,%rcx,4)
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rax, %r15
	cvtsi2sdl	(%rbx,%r15,4), %xmm0
	call	fmin@PLT
	cvttsd2sil	%xmm0, %edx
	movl	%edx, (%rbx,%r15,4)
.L50:
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L37
.L41:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	jne	.L52
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	xorl	%eax, %eax
	call	D.constprop.0.isra.0
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	c
	.bss
	.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	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 50096
C:
	.zero	50096
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

n,C[124][101],*p,a,b,c;D(i){int f[101]={0},T;memset(p=C,9,404);for(p[a]=0;T=a;)for(f[T]=1,a=i=0;i++<n;a=f[i]|p[i]>p[a]?a:i)p[i]=fmin(p[i],p[T]+C[T][i]);printf("%d\n",p[b]>1e8?-1:p[b]);}main(k){for(;scanf("%d%d",&n,&k)*n;)for(memset(C,9,5e4);k--;a?scanf("%d%d%d",&a,&b,&c),C[a][b]=fmin(C[a][b],c),C[b][a]=fmin(C[b][a],c):D(scanf("%d%d",&a,&b)))scanf("%d",&a);}
3 8
1 3 1 10
0 2 3
1 2 2 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 15934
0 2 1
0 4 1
0 3 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 2 20
1 1 1 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 212055
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 15934
0 2 1
0 4 1
0 3 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 2 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 150117
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 15934
0 2 1
0 4 2
0 3 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 15934
0 2 1
0 4 1
0 1 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 85440
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 1 843468
1 4 5 15934
0 2 1
0 4 2
0 1 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 2780
0 2 1
0 4 1
0 3 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 1 3
5 16
1 1 2 343750
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 5 843468
1 4 5 15934
0 2 1
0 4 1
0 3 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 85440
1 1 3 3343
1 1 4 347392
1 1 5 5497
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 1 843468
1 4 5 2961
0 2 1
0 4 1
0 1 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 20
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 85440
1 1 3 3343
1 1 4 347392
1 1 5 2257
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 1 843468
1 4 5 2961
0 2 1
0 4 1
0 1 2
0 4 2
0 4 3
0 5 3
0 0
 3 8
1 3 1 10
0 2 3
1 2 3 1
1 1 2 5
0 3 2
1 1 3 7
1 2 1 9
0 2 3
5 16
1 1 2 85440
1 1 3 3343
1 1 4 347392
1 1 5 2257
1 2 3 123394
1 2 4 545492
1 2 5 458
1 3 4 343983
1 3 1 843468
1 4 5 2961
0 2 1
0 4 1
0 1 2
0 4 2
0 4 3
0 5 3
0 0

-1
15
12
5955
21431
9298
16392
24774
8840
 -1
-1
16
5955
21431
9298
16392
24774
8840
 -1
15
12
5955
16392
9298
16392
24774
8840
 -1
15
12
5955
21431
5955
16392
24774
8840
 -1
15
12
5955
16392
5955
16392
24774
8840
 -1
15
12
5955
8277
9298
3238
11620
8840
 -1
15
7
5955
21431
9298
16392
24774
8840
 -1
15
12
5955
8458
5955
3419
11801
8840
 -1
15
12
2715
5218
2715
3419
8561
5600
 -1
1
1
2715
5218
2715
3419
8561
5600

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

```c
n,C[124][101],*p,a,b,c;D(i){int f[101]={0},T;memset(p=C,9,404);for(p[a]=0;T=a;)for(f[T]=1,a=i=0;i++<n;a=f[i]|p[i]>p[a]?a:i)p[i]=fmin(p[i],p[T]+C[T][i]);printf("%d\n",p[b]>1e8?-1:p[b]);}main(k){for(;scanf("%d%d",&n,&k)*n;)for(memset(C,9,5e4);k--;a?scanf("%d%d%d",&a,&b,&c),C[a][b]=fmin(C[a][b],c),C[b][a]=fmin(C[b][a],c):D(scanf("%d%d",&a,&b)))scanf("%d",&a);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 50096
C:
	.zero	50096
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.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
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	C(%rip), %rax
	movq	%rax, p(%rip)
	movl	$404, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	p(%rip), %rdx
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L2
.L7:
	movl	-420(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L3
.L6:
	movq	p(%rip), %rdx
	movl	-420(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-420(%rbp), %eax
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%rdx)
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	p(%rip), %rsi
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	orl	%ecx, %eax
	testl	%eax, %eax
	je	.L4
	movl	a(%rip), %eax
	jmp	.L5
.L4:
	movl	-436(%rbp), %eax
.L5:
	movl	%eax, a(%rip)
.L3:
	movl	-436(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -436(%rbp)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	movl	%eax, -420(%rbp)
	cmpl	$0, -420(%rbp)
	jne	.L7
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$100000000, %eax
	jg	.L8
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	jmp	.L9
.L8:
	movl	$-1, %eax
.L9:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d%d"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L12
.L16:
	movl	$50000, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L15:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	cvttsd2sil	%xmm0, %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	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	b(%rip), %eax
	movl	a(%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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	b(%rip), %ecx
	movl	a(%rip), %eax
	cvttsd2sil	%xmm0, %esi
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%esi, (%rdx,%rax)
	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
	jmp	.L13
.L14:
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	%eax, %edi
	movl	$0, %eax
	call	D
.L13:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L15
.L12:
	leaq	-4(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 50096
C:
	.zero	50096
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.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
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	C(%rip), %rax
	movq	%rax, p(%rip)
	movl	$404, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	p(%rip), %rdx
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	jmp	.L2
.L7:
	movl	-420(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L3
.L6:
	movq	p(%rip), %rdx
	movl	-420(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-420(%rbp), %eax
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	cvttsd2sil	%xmm0, %eax
	movl	%eax, (%rdx)
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movq	p(%rip), %rdx
	movl	-436(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	p(%rip), %rsi
	movl	a(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	orl	%ecx, %eax
	testl	%eax, %eax
	je	.L4
	movl	a(%rip), %eax
	jmp	.L5
.L4:
	movl	-436(%rbp), %eax
.L5:
	movl	%eax, a(%rip)
.L3:
	movl	-436(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -436(%rbp)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L6
.L2:
	movl	a(%rip), %eax
	movl	%eax, -420(%rbp)
	cmpl	$0, -420(%rbp)
	jne	.L7
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$100000000, %eax
	jg	.L8
	movq	p(%rip), %rdx
	movl	b(%rip), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	jmp	.L9
.L8:
	movl	$-1, %eax
.L9:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d%d"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L12
.L16:
	movl	$50000, %edx
	movl	$9, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L15:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	a(%rip), %eax
	movl	b(%rip), %edx
	cvttsd2sil	%xmm0, %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	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	c(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	b(%rip), %eax
	movl	a(%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	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	b(%rip), %ecx
	movl	a(%rip), %eax
	cvttsd2sil	%xmm0, %esi
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%esi, (%rdx,%rax)
	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
	jmp	.L13
.L14:
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	%eax, %edi
	movl	$0, %eax
	call	D
.L13:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L15
.L12:
	leaq	-4(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	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:
