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

```c
#include<stdio.h>
#include<string.h>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,m,i,j,k,a,b,M=1e9,d[510][510],r;
  char s[510][1010];
  while(scanf("%d %d",&n,&m),n||m){
    scanf("%s %s %s",s[0],s[1],s[2]);
    r=3;
    for(i=0;i<n*n;i++)d[i/n][i%n]=M;
    for(i=0;i<n;i++)d[i][i]=0;
    while(m--){
      scanf("%s",s[r]);
      for(i=0;strcmp(s[r],s[i]);i++);
      if(i==r)r++;
      scanf("%s %d %d",s[r],&a,&b);
      for(j=0;strcmp(s[r],s[j]);j++);
      if(j==r)r++;
      d[i][j]=d[j][i]=a/40+b;
    }
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	for(k=0;k<n;k++)d[j][k]=MIN(d[j][k],d[j][i]+d[i][k]);
      }
    }
    printf("%d\n",d[0][1]+d[1][2]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%s %s %s"
.LC1:
	.string	"%s"
.LC2:
	.string	"%s %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.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
	leaq	-1552384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -1555524(%rbp)
	jmp	.L4
.L26:
	leaq	-1555520(%rbp), %rax
	leaq	2020(%rax), %rcx
	leaq	-1555520(%rbp), %rax
	leaq	1010(%rax), %rdx
	leaq	-1555520(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$3, -1555528(%rbp)
	movl	$0, -1555540(%rbp)
	jmp	.L5
.L6:
	movl	-1555556(%rbp), %edi
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-1555556(%rbp), %ecx
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-1555524(%rbp), %eax
	movl	%eax, -1040416(%rbp,%rdx,4)
	addl	$1, -1555540(%rbp)
.L5:
	movl	-1555556(%rbp), %edx
	movl	-1555556(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L6
	movl	$0, -1555540(%rbp)
	jmp	.L7
.L8:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$9, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1040416, %rax
	movl	$0, (%rax)
	addl	$1, -1555540(%rbp)
.L7:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L8
	jmp	.L9
.L16:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555540(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1555540(%rbp)
.L10:
	leaq	-1555520(%rbp), %rdx
	movl	-1555540(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-1555540(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L12
	addl	$1, -1555528(%rbp)
.L12:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-1555544(%rbp), %rdx
	leaq	-1555548(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555536(%rbp)
	jmp	.L13
.L14:
	addl	$1, -1555536(%rbp)
.L13:
	leaq	-1555520(%rbp), %rdx
	movl	-1555536(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-1555536(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L15
	addl	$1, -1555528(%rbp)
.L15:
	movl	-1555548(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-1555544(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %edx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
.L9:
	movl	-1555552(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -1555552(%rbp)
	testl	%eax, %eax
	jne	.L16
	movl	$0, -1555540(%rbp)
	jmp	.L17
.L22:
	movl	$0, -1555536(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1555532(%rbp)
	jmp	.L19
.L20:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
	addl	$1, -1555532(%rbp)
.L19:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555532(%rbp)
	jl	.L20
	addl	$1, -1555536(%rbp)
.L18:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555536(%rbp)
	jl	.L21
	addl	$1, -1555540(%rbp)
.L17:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L22
	movl	-1040412(%rbp), %edx
	movl	-1038368(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L4:
	leaq	-1555552(%rbp), %rdx
	leaq	-1555556(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1555556(%rbp), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-1555552(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L23:
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	testl	%eax, %eax
	jne	.L26
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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	MIN
	.type	MIN, @function
MIN:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	MIN, .-MIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s %s"
.LC1:
	.string	"%s"
.LC2:
	.string	"%s %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	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
	leaq	-1552384(%rsp), %r11
	.cfi_def_cfa 11, 1552440
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3272, %rsp
	.cfi_def_cfa_offset 1555712
	movq	%fs:40, %rax
	movq	%rax, 1555640(%rsp)
	xorl	%eax, %eax
	leaq	116(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 96(%rsp)
.L4:
	movq	104(%rsp), %rdx
	movq	96(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %eax
	orl	116(%rsp), %eax
	je	.L52
	leaq	128(%rsp), %rax
	leaq	2148(%rsp), %rcx
	movq	%rax, (%rsp)
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rdi
	leaq	1138(%rsp), %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %r8d
	xorl	%ecx, %ecx
	movl	%r8d, %edi
	imull	%r8d, %edi
	testl	%edi, %edi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ecx, %eax
	addl	$1, %ecx
	cltd
	idivl	%r8d
	cltq
	movslq	%edx, %rdx
	movq	%rax, %rsi
	salq	$8, %rsi
	subq	%rax, %rsi
	leaq	(%rdx,%rsi,2), %rax
	movl	$1000000000, 515232(%rsp,%rax,4)
	cmpl	%edi, %ecx
	jne	.L5
.L8:
	movl	116(%rsp), %ecx
	leal	-1(%rcx), %esi
	testl	%r8d, %r8d
	jle	.L53
	leal	-1(%r8), %edi
	leaq	515232(%rsp), %rax
	movq	%rdi, %rdx
	movq	%rax, 88(%rsp)
	salq	$9, %rdx
	subq	%rdi, %rdx
	leaq	517276(%rsp,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$0, (%rax)
	addq	$2044, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, 116(%rsp)
	testl	%ecx, %ecx
	je	.L18
.L31:
	leaq	124(%rsp), %rax
	movl	$3, %r13d
	movq	%rax, 24(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	%r13d, %r14
	movq	(%rsp), %r15
	leaq	.LC1(%rip), %rdi
	xorl	%ebp, %ebp
	imulq	$1010, %r14, %rax
	movq	%r15, %r12
	movq	%r15, %rbx
	addq	%rax, %r12
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, %ebp
.L11:
	movq	%r15, %rsi
	movq	%r12, %rdi
	addq	$1010, %r15
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	%eax, %r14d
	cmpl	%r13d, %ebp
	jne	.L13
	movq	(%rsp), %rax
	movq	8(%rsp), %rdi
	leal	1(%rbp), %r13d
	leaq	1010(%rax,%rdi), %r12
.L13:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %r14d
.L14:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	addq	$1010, %rbx
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L15
	cmpl	%r13d, %r14d
	leal	1(%r14), %eax
	movslq	%r14d, %r8
	movslq	%ebp, %rbp
	cmove	%eax, %r13d
	movslq	120(%rsp), %rax
	movq	%rax, %rdx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$36, %rax
	subl	%edx, %eax
	movq	%r8, %rdx
	addl	124(%rsp), %eax
	salq	$8, %rdx
	subq	%r8, %rdx
	leaq	0(%rbp,%rdx,2), %rdx
	movl	%eax, 515232(%rsp,%rdx,4)
	movq	%rbp, %rdx
	salq	$8, %rdx
	subq	%rbp, %rdx
	leaq	(%r8,%rdx,2), %rdx
	movl	%eax, 515232(%rsp,%rdx,4)
	movl	116(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 116(%rsp)
	testl	%eax, %eax
	jne	.L17
	movl	112(%rsp), %r8d
	leaq	515232(%rsp), %rax
	movq	%rax, 88(%rsp)
	testl	%r8d, %r8d
	jle	.L19
.L18:
	movslq	%r8d, %rax
	movl	$4, %edx
	movq	$0, (%rsp)
	movq	88(%rsp), %r10
	salq	$2, %rax
	testl	%r8d, %r8d
	movl	$0, 84(%rsp)
	cmovg	%rax, %rdx
	movl	$1, %eax
	cmovg	%r8d, %eax
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	%rdx, 8(%rsp)
	movl	%eax, %ebx
	movl	%eax, 16(%rsp)
	shrl	$2, %eax
	andl	$-4, %ebx
	leal	-1(%rax), %r11d
	leal	1(%rbx), %eax
	leal	2(%rbx), %edi
	movl	%ebx, 24(%rsp)
	movslq	%ebx, %rbx
	movl	%eax, 60(%rsp)
	cltq
	addq	$1, %r11
	movq	%rax, 40(%rsp)
	movslq	%edi, %rax
	salq	$4, %r11
	movl	%edi, 80(%rsp)
	movq	%rbx, 32(%rsp)
	movq	%rax, 64(%rsp)
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	84(%rsp), %rsi
	movq	88(%rsp), %rax
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	leaq	4(%r12), %r13
	movq	%rsi, %rdx
	leaq	(%rax,%r12), %rdi
	salq	$8, %rdx
	subq	%rsi, %rdx
	movq	32(%rsp), %rsi
	addq	%rdx, %rdx
	leaq	(%rdx,%rsi), %rbp
	movq	40(%rsp), %rsi
	addq	%rdx, %rsi
	addq	64(%rsp), %rdx
	movq	%rsi, 48(%rsp)
	movq	%rdx, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L29:
	movq	8(%rsp), %rsi
	leaq	(%rcx,%r12), %rdx
	addq	%rcx, %rsi
	cmpq	%rdx, %rsi
	leaq	0(%r13,%rcx), %rdx
	setle	%sil
	cmpq	%rdx, %rcx
	setge	%dl
	orb	%sil, %dl
	je	.L35
	movq	(%rsp), %rsi
	leaq	-4(%rcx,%rsi), %rdx
	cmpq	$8, %rdx
	seta	%sil
	cmpl	$3, %r8d
	setg	%dl
	testb	%dl, %sil
	je	.L35
	movd	(%rdi), %xmm5
	xorl	%edx, %edx
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L23:
	movdqu	(%r10,%rdx), %xmm2
	movdqu	(%rax,%rdx), %xmm4
	paddd	%xmm3, %xmm2
	movdqa	%xmm4, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm4, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rax,%rdx)
	addq	$16, %rdx
	cmpq	%r11, %rdx
	jne	.L23
	movl	24(%rsp), %edx
	cmpl	%edx, 16(%rsp)
	je	.L22
	movslq	%ebx, %rsi
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	movq	32(%rsp), %rsi
	addq	%rdx, %rdx
	leaq	(%rdx,%rsi), %r9
	movl	515232(%rsp,%rbp,4), %esi
	addl	(%rdi), %esi
	movl	515232(%rsp,%r9,4), %r15d
	cmpl	%r15d, %esi
	cmovg	%r15d, %esi
	movl	%esi, 515232(%rsp,%r9,4)
	cmpl	60(%rsp), %r8d
	jle	.L22
	movq	40(%rsp), %rsi
	leaq	(%rdx,%rsi), %r9
	movq	48(%rsp), %rsi
	movl	515232(%rsp,%r9,4), %r15d
	movl	515232(%rsp,%rsi,4), %esi
	addl	(%rdi), %esi
	cmpl	%r15d, %esi
	cmovg	%r15d, %esi
	movl	%esi, 515232(%rsp,%r9,4)
	cmpl	80(%rsp), %r8d
	jle	.L22
	movq	72(%rsp), %r9
	addq	64(%rsp), %rdx
	movl	(%rdi), %esi
	addl	515232(%rsp,%r9,4), %esi
	movl	515232(%rsp,%rdx,4), %r9d
	cmpl	%r9d, %esi
	cmovg	%r9d, %esi
	movl	%esi, 515232(%rsp,%rdx,4)
.L22:
	addl	$1, %ebx
	addq	$2040, %rcx
	addq	$2040, %rax
	addq	$2040, %rdi
	cmpl	%ebx, %r8d
	jg	.L29
	addl	$1, 84(%rsp)
	movl	84(%rsp), %eax
	addq	$2040, %r14
	addq	$2040, %r10
	subq	$2040, (%rsp)
	cmpl	%eax, %r8d
	jle	.L19
	movq	%r13, %r12
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rax, %rsi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %r15
	movl	(%rdi), %edx
	subq	%rcx, %r15
	addl	(%r15,%r14), %edx
	movl	(%rsi), %r15d
	cmpl	%r15d, %edx
	cmovg	%r15d, %edx
	addl	$1, %r9d
	addq	$4, %rsi
	movl	%edx, -4(%rsi)
	cmpl	%r9d, %r8d
	jg	.L21
	jmp	.L22
.L53:
	movl	%esi, 116(%rsp)
	testl	%ecx, %ecx
	jne	.L31
.L19:
	movl	517280(%rsp), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	515236(%rsp), %edx
	call	__printf_chk@PLT
	jmp	.L4
.L52:
	movq	1555640(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$1555656, %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
.L54:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	MIN, .-MIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s %s"
.LC1:
	.string	"%s"
.LC2:
	.string	"%s %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	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
	leaq	-1552384(%rsp), %r11
	.cfi_def_cfa 11, 1552440
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3272, %rsp
	.cfi_def_cfa_offset 1555712
	movq	%fs:40, %rax
	movq	%rax, 1555640(%rsp)
	xorl	%eax, %eax
	leaq	116(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 96(%rsp)
.L4:
	movq	104(%rsp), %rdx
	movq	96(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %eax
	orl	116(%rsp), %eax
	je	.L52
	leaq	128(%rsp), %rax
	leaq	2148(%rsp), %rcx
	movq	%rax, (%rsp)
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rdi
	leaq	1138(%rsp), %rdx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %r8d
	xorl	%ecx, %ecx
	movl	%r8d, %edi
	imull	%r8d, %edi
	testl	%edi, %edi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ecx, %eax
	addl	$1, %ecx
	cltd
	idivl	%r8d
	cltq
	movslq	%edx, %rdx
	movq	%rax, %rsi
	salq	$8, %rsi
	subq	%rax, %rsi
	leaq	(%rdx,%rsi,2), %rax
	movl	$1000000000, 515232(%rsp,%rax,4)
	cmpl	%edi, %ecx
	jne	.L5
.L8:
	movl	116(%rsp), %ecx
	leal	-1(%rcx), %esi
	testl	%r8d, %r8d
	jle	.L53
	leal	-1(%r8), %edi
	leaq	515232(%rsp), %rax
	movq	%rdi, %rdx
	movq	%rax, 88(%rsp)
	salq	$9, %rdx
	subq	%rdi, %rdx
	leaq	517276(%rsp,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$0, (%rax)
	addq	$2044, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, 116(%rsp)
	testl	%ecx, %ecx
	je	.L18
.L31:
	leaq	124(%rsp), %rax
	movl	$3, %r13d
	movq	%rax, 24(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	%r13d, %r14
	movq	(%rsp), %r15
	leaq	.LC1(%rip), %rdi
	xorl	%ebp, %ebp
	imulq	$1010, %r14, %rax
	movq	%r15, %r12
	movq	%r15, %rbx
	addq	%rax, %r12
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, %ebp
.L11:
	movq	%r15, %rsi
	movq	%r12, %rdi
	addq	$1010, %r15
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	%eax, %r14d
	cmpl	%r13d, %ebp
	jne	.L13
	movq	(%rsp), %rax
	movq	8(%rsp), %rdi
	leal	1(%rbp), %r13d
	leaq	1010(%rax,%rdi), %r12
.L13:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %r14d
.L14:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	addq	$1010, %rbx
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L15
	cmpl	%r13d, %r14d
	leal	1(%r14), %eax
	movslq	%r14d, %r8
	movslq	%ebp, %rbp
	cmove	%eax, %r13d
	movslq	120(%rsp), %rax
	movq	%rax, %rdx
	imulq	$1717986919, %rax, %rax
	sarl	$31, %edx
	sarq	$36, %rax
	subl	%edx, %eax
	movq	%r8, %rdx
	addl	124(%rsp), %eax
	salq	$8, %rdx
	subq	%r8, %rdx
	leaq	0(%rbp,%rdx,2), %rdx
	movl	%eax, 515232(%rsp,%rdx,4)
	movq	%rbp, %rdx
	salq	$8, %rdx
	subq	%rbp, %rdx
	leaq	(%r8,%rdx,2), %rdx
	movl	%eax, 515232(%rsp,%rdx,4)
	movl	116(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 116(%rsp)
	testl	%eax, %eax
	jne	.L17
	movl	112(%rsp), %r8d
	leaq	515232(%rsp), %rax
	movq	%rax, 88(%rsp)
	testl	%r8d, %r8d
	jle	.L19
.L18:
	movslq	%r8d, %rax
	movl	$4, %edx
	movq	$0, (%rsp)
	movq	88(%rsp), %r10
	salq	$2, %rax
	testl	%r8d, %r8d
	movl	$0, 84(%rsp)
	cmovg	%rax, %rdx
	movl	$1, %eax
	cmovg	%r8d, %eax
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	%rdx, 8(%rsp)
	movl	%eax, %ebx
	movl	%eax, 16(%rsp)
	shrl	$2, %eax
	andl	$-4, %ebx
	leal	-1(%rax), %r11d
	leal	1(%rbx), %eax
	leal	2(%rbx), %edi
	movl	%ebx, 24(%rsp)
	movslq	%ebx, %rbx
	movl	%eax, 60(%rsp)
	cltq
	addq	$1, %r11
	movq	%rax, 40(%rsp)
	movslq	%edi, %rax
	salq	$4, %r11
	movl	%edi, 80(%rsp)
	movq	%rbx, 32(%rsp)
	movq	%rax, 64(%rsp)
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	84(%rsp), %rsi
	movq	88(%rsp), %rax
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	leaq	4(%r12), %r13
	movq	%rsi, %rdx
	leaq	(%rax,%r12), %rdi
	salq	$8, %rdx
	subq	%rsi, %rdx
	movq	32(%rsp), %rsi
	addq	%rdx, %rdx
	leaq	(%rdx,%rsi), %rbp
	movq	40(%rsp), %rsi
	addq	%rdx, %rsi
	addq	64(%rsp), %rdx
	movq	%rsi, 48(%rsp)
	movq	%rdx, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L29:
	movq	8(%rsp), %rsi
	leaq	(%rcx,%r12), %rdx
	addq	%rcx, %rsi
	cmpq	%rdx, %rsi
	leaq	0(%r13,%rcx), %rdx
	setle	%sil
	cmpq	%rdx, %rcx
	setge	%dl
	orb	%sil, %dl
	je	.L35
	movq	(%rsp), %rsi
	leaq	-4(%rcx,%rsi), %rdx
	cmpq	$8, %rdx
	seta	%sil
	cmpl	$3, %r8d
	setg	%dl
	testb	%dl, %sil
	je	.L35
	movd	(%rdi), %xmm5
	xorl	%edx, %edx
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L23:
	movdqu	(%r10,%rdx), %xmm2
	movdqu	(%rax,%rdx), %xmm4
	paddd	%xmm3, %xmm2
	movdqa	%xmm4, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm4, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rax,%rdx)
	addq	$16, %rdx
	cmpq	%r11, %rdx
	jne	.L23
	movl	24(%rsp), %edx
	cmpl	%edx, 16(%rsp)
	je	.L22
	movslq	%ebx, %rsi
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	movq	32(%rsp), %rsi
	addq	%rdx, %rdx
	leaq	(%rdx,%rsi), %r9
	movl	515232(%rsp,%rbp,4), %esi
	addl	(%rdi), %esi
	movl	515232(%rsp,%r9,4), %r15d
	cmpl	%r15d, %esi
	cmovg	%r15d, %esi
	movl	%esi, 515232(%rsp,%r9,4)
	cmpl	60(%rsp), %r8d
	jle	.L22
	movq	40(%rsp), %rsi
	leaq	(%rdx,%rsi), %r9
	movq	48(%rsp), %rsi
	movl	515232(%rsp,%r9,4), %r15d
	movl	515232(%rsp,%rsi,4), %esi
	addl	(%rdi), %esi
	cmpl	%r15d, %esi
	cmovg	%r15d, %esi
	movl	%esi, 515232(%rsp,%r9,4)
	cmpl	80(%rsp), %r8d
	jle	.L22
	movq	72(%rsp), %r9
	addq	64(%rsp), %rdx
	movl	(%rdi), %esi
	addl	515232(%rsp,%r9,4), %esi
	movl	515232(%rsp,%rdx,4), %r9d
	cmpl	%r9d, %esi
	cmovg	%r9d, %esi
	movl	%esi, 515232(%rsp,%rdx,4)
.L22:
	addl	$1, %ebx
	addq	$2040, %rcx
	addq	$2040, %rax
	addq	$2040, %rdi
	cmpl	%ebx, %r8d
	jg	.L29
	addl	$1, 84(%rsp)
	movl	84(%rsp), %eax
	addq	$2040, %r14
	addq	$2040, %r10
	subq	$2040, (%rsp)
	cmpl	%eax, %r8d
	jle	.L19
	movq	%r13, %r12
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rax, %rsi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %r15
	movl	(%rdi), %edx
	subq	%rcx, %r15
	addl	(%r15,%r14), %edx
	movl	(%rsi), %r15d
	cmpl	%r15d, %edx
	cmovg	%r15d, %edx
	addl	$1, %r9d
	addq	$4, %rsi
	movl	%edx, -4(%rsi)
	cmpl	%r9d, %r8d
	jg	.L21
	jmp	.L22
.L53:
	movl	%esi, 116(%rsp)
	testl	%ecx, %ecx
	jne	.L31
.L19:
	movl	517280(%rsp), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	515236(%rsp), %edx
	call	__printf_chk@PLT
	jmp	.L4
.L52:
	movq	1555640(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$1555656, %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
.L54:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<string.h>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,m,i,j,k,a,b,M=1e9,d[510][510],r;
  char s[510][1010];
  while(scanf("%d %d",&n,&m),n||m){
    scanf("%s %s %s",s[0],s[1],s[2]);
    r=3;
    for(i=0;i<n*n;i++)d[i/n][i%n]=M;
    for(i=0;i<n;i++)d[i][i]=0;
    while(m--){
      scanf("%s",s[r]);
      for(i=0;strcmp(s[r],s[i]);i++);
      if(i==r)r++;
      scanf("%s %d %d",s[r],&a,&b);
      for(j=0;strcmp(s[r],s[j]);j++);
      if(j==r)r++;
      d[i][j]=d[j][i]=a/40+b;
    }
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	for(k=0;k<n;k++)d[j][k]=MIN(d[j][k],d[j][i]+d[i][k]);
      }
    }
    printf("%d\n",d[0][1]+d[1][2]);
  }
  return 0;
}
4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 0
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 3 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 0
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 -1
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 -1
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 4
Kusatsu Nagoya 47 0
Kusatsu Kanazawa 40 1
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 7 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 4
Kusatsu Nagoya 47 0
Kusatsu Kanazawa 40 1
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A H 40 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 4
Kusatsu Nagoya 47 0
Kusatsu Kanazawa 40 1
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 -1
B G 80 0
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 3 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 8
0 0
 4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 0
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 3
Kusatsu Nagoya 40 -1
Kusatsu Kanazawa 40 0
Kanazawa Aizu 62 -1
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0
 4 4
A B G
A B 33 3
B C 80 0
A G 7 0
B G 80 -1
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 4
Kusatsu Nagoya 47 0
Kusatsu Kanazawa 40 1
Kanazawa Aizu 40 0
Tokyo Kanazawa 20 0
Tokyo Aizu 80 4
0 0

5
4
 3
4
 5
2
 3
2
 3
5
 2
5
 5
5
 4
4
 5
3
 2
3

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

```c
#include<stdio.h>
#include<string.h>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,m,i,j,k,a,b,M=1e9,d[510][510],r;
  char s[510][1010];
  while(scanf("%d %d",&n,&m),n||m){
    scanf("%s %s %s",s[0],s[1],s[2]);
    r=3;
    for(i=0;i<n*n;i++)d[i/n][i%n]=M;
    for(i=0;i<n;i++)d[i][i]=0;
    while(m--){
      scanf("%s",s[r]);
      for(i=0;strcmp(s[r],s[i]);i++);
      if(i==r)r++;
      scanf("%s %d %d",s[r],&a,&b);
      for(j=0;strcmp(s[r],s[j]);j++);
      if(j==r)r++;
      d[i][j]=d[j][i]=a/40+b;
    }
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
	for(k=0;k<n;k++)d[j][k]=MIN(d[j][k],d[j][i]+d[i][k]);
      }
    }
    printf("%d\n",d[0][1]+d[1][2]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%s %s %s"
.LC1:
	.string	"%s"
.LC2:
	.string	"%s %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.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
	leaq	-1552384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -1555524(%rbp)
	jmp	.L4
.L26:
	leaq	-1555520(%rbp), %rax
	leaq	2020(%rax), %rcx
	leaq	-1555520(%rbp), %rax
	leaq	1010(%rax), %rdx
	leaq	-1555520(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$3, -1555528(%rbp)
	movl	$0, -1555540(%rbp)
	jmp	.L5
.L6:
	movl	-1555556(%rbp), %edi
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-1555556(%rbp), %ecx
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-1555524(%rbp), %eax
	movl	%eax, -1040416(%rbp,%rdx,4)
	addl	$1, -1555540(%rbp)
.L5:
	movl	-1555556(%rbp), %edx
	movl	-1555556(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L6
	movl	$0, -1555540(%rbp)
	jmp	.L7
.L8:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$9, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1040416, %rax
	movl	$0, (%rax)
	addl	$1, -1555540(%rbp)
.L7:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L8
	jmp	.L9
.L16:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555540(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1555540(%rbp)
.L10:
	leaq	-1555520(%rbp), %rdx
	movl	-1555540(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-1555540(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L12
	addl	$1, -1555528(%rbp)
.L12:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-1555544(%rbp), %rdx
	leaq	-1555548(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555536(%rbp)
	jmp	.L13
.L14:
	addl	$1, -1555536(%rbp)
.L13:
	leaq	-1555520(%rbp), %rdx
	movl	-1555536(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-1555536(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L15
	addl	$1, -1555528(%rbp)
.L15:
	movl	-1555548(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-1555544(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %edx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
.L9:
	movl	-1555552(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -1555552(%rbp)
	testl	%eax, %eax
	jne	.L16
	movl	$0, -1555540(%rbp)
	jmp	.L17
.L22:
	movl	$0, -1555536(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1555532(%rbp)
	jmp	.L19
.L20:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
	addl	$1, -1555532(%rbp)
.L19:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555532(%rbp)
	jl	.L20
	addl	$1, -1555536(%rbp)
.L18:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555536(%rbp)
	jl	.L21
	addl	$1, -1555540(%rbp)
.L17:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L22
	movl	-1040412(%rbp), %edx
	movl	-1038368(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L4:
	leaq	-1555552(%rbp), %rdx
	leaq	-1555556(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1555556(%rbp), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-1555552(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L23:
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	testl	%eax, %eax
	jne	.L26
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%s %s %s"
.LC1:
	.string	"%s"
.LC2:
	.string	"%s %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.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
	leaq	-1552384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -1555524(%rbp)
	jmp	.L4
.L26:
	leaq	-1555520(%rbp), %rax
	leaq	2020(%rax), %rcx
	leaq	-1555520(%rbp), %rax
	leaq	1010(%rax), %rdx
	leaq	-1555520(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$3, -1555528(%rbp)
	movl	$0, -1555540(%rbp)
	jmp	.L5
.L6:
	movl	-1555556(%rbp), %edi
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-1555556(%rbp), %ecx
	movl	-1555540(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-1555524(%rbp), %eax
	movl	%eax, -1040416(%rbp,%rdx,4)
	addl	$1, -1555540(%rbp)
.L5:
	movl	-1555556(%rbp), %edx
	movl	-1555556(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L6
	movl	$0, -1555540(%rbp)
	jmp	.L7
.L8:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$9, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$1040416, %rax
	movl	$0, (%rax)
	addl	$1, -1555540(%rbp)
.L7:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L8
	jmp	.L9
.L16:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555540(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1555540(%rbp)
.L10:
	leaq	-1555520(%rbp), %rdx
	movl	-1555540(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-1555540(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L12
	addl	$1, -1555528(%rbp)
.L12:
	leaq	-1555520(%rbp), %rdx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-1555544(%rbp), %rdx
	leaq	-1555548(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1555536(%rbp)
	jmp	.L13
.L14:
	addl	$1, -1555536(%rbp)
.L13:
	leaq	-1555520(%rbp), %rdx
	movl	-1555536(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rax, %rdx
	leaq	-1555520(%rbp), %rcx
	movl	-1555528(%rbp), %eax
	cltq
	imulq	$1010, %rax, %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-1555536(%rbp), %eax
	cmpl	-1555528(%rbp), %eax
	jne	.L15
	addl	$1, -1555528(%rbp)
.L15:
	movl	-1555548(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-1555544(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %edx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
.L9:
	movl	-1555552(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -1555552(%rbp)
	testl	%eax, %eax
	jne	.L16
	movl	$0, -1555540(%rbp)
	jmp	.L17
.L22:
	movl	$0, -1555536(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1555532(%rbp)
	jmp	.L19
.L20:
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555540(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %edx
	movl	-1555532(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1555536(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -1040416(%rbp,%rax,4)
	addl	$1, -1555532(%rbp)
.L19:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555532(%rbp)
	jl	.L20
	addl	$1, -1555536(%rbp)
.L18:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555536(%rbp)
	jl	.L21
	addl	$1, -1555540(%rbp)
.L17:
	movl	-1555556(%rbp), %eax
	cmpl	%eax, -1555540(%rbp)
	jl	.L22
	movl	-1040412(%rbp), %edx
	movl	-1038368(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L4:
	leaq	-1555552(%rbp), %rdx
	leaq	-1555556(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1555556(%rbp), %eax
	testl	%eax, %eax
	jne	.L23
	movl	-1555552(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L23:
	movl	$1, %eax
	jmp	.L25
.L24:
	movl	$0, %eax
.L25:
	testl	%eax, %eax
	jne	.L26
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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:
