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

```c
#include<stdio.h>
#define M 1000000000
int MIN(int a,int b){return a<b?a:b;}
int zMIN(int a,int b){return a*b?MIN(a,b):a+b;}
int main(){
  int n,m,i,j,a,b,v,min;
  while(scanf("%d %d",&n,&m),n||m){
    int d[110][110]={0};
    while(m--){
      scanf("%d",&a);
      if(a){
	scanf("%d %d %d",&a,&b,&v);
	d[a][b]=d[b][a]=zMIN(v,d[a][b]);
      }
      else{
	scanf("%d %d",&a,&b);
	int f[110]={0};
	int c[110]={0};
	for(j=0;j<n;j++){
	  for(i=f[a]=1;i<=n;i++){
	    if(d[a][i])c[i]=zMIN(c[i],c[a]+d[a][i]);
	  }
	  min=M;
	  for(i=1;i<=n;i++){
	    if(f[i]==0&&c[i]&&min>c[i])min=c[a=i];
	  }
	}
	//for(i=0;i<n;i++)printf("%d ",c[i+1]);printf("\n");
	if(c[b])printf("%d\n",c[b]);
	else    printf("-1\n");
      }
      /*for(i=0;i<n;i++){
	for(j=0;j<n;j++)printf("%d ",d[i+1][j+1]);
	printf("\n");
	}//*/
    }
  }
  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
	.globl	zMIN
	.type	zMIN, @function
zMIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	testl	%eax, %eax
	je	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	jmp	.L6
.L4:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	zMIN, .-zMIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	leaq	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L25:
	leaq	-48432(%rbp), %rax
	movl	$48400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L9
.L21:
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	testl	%eax, %eax
	je	.L10
	leaq	-49344(%rbp), %rcx
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	movl	-49348(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %edx
	movl	-49344(%rbp), %eax
	movl	-49348(%rbp), %ebx
	movl	-49352(%rbp), %r12d
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movslq	%r12d, %rcx
	movslq	%ebx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	movl	-49352(%rbp), %edx
	movl	-49348(%rbp), %ecx
	movslq	%r12d, %rsi
	movslq	%ebx, %rax
	imulq	$110, %rax, %rax
	addq	%rsi, %rax
	movl	-48432(%rbp,%rax,4), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	jmp	.L9
.L10:
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-49328(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-48880(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -49336(%rbp)
	jmp	.L11
.L18:
	movl	-49352(%rbp), %eax
	movslq	%eax, %rdx
	movl	$1, -49328(%rbp,%rdx,4)
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	movl	%eax, -49340(%rbp)
	jmp	.L12
.L14:
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %ecx
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -48880(%rbp,%rdx,4)
.L13:
	addl	$1, -49340(%rbp)
.L12:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L14
	movl	$1000000000, -49332(%rbp)
	movl	$1, -49340(%rbp)
	jmp	.L15
.L17:
	movl	-49340(%rbp), %eax
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	cmpl	%eax, -49332(%rbp)
	jle	.L16
	movl	-49340(%rbp), %eax
	movl	%eax, -49352(%rbp)
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, -49332(%rbp)
.L16:
	addl	$1, -49340(%rbp)
.L15:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L17
	addl	$1, -49336(%rbp)
.L11:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49336(%rbp)
	jl	.L18
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L19
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L19:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	-49356(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -49356(%rbp)
	testl	%eax, %eax
	jne	.L21
.L8:
	leaq	-49356(%rbp), %rdx
	leaq	-49360(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49360(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-49356(%rbp), %eax
	testl	%eax, %eax
	je	.L23
.L22:
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	testl	%eax, %eax
	jne	.L25
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$49344, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	zMIN
	.type	zMIN, @function
zMIN:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	%esi, %eax
	imull	%esi, %edx
	cmpl	%esi, %edi
	cmovle	%edi, %eax
	addl	%esi, %edi
	testl	%edx, %edx
	cmove	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	zMIN, .-zMIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.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	-49152(%rsp), %r11
	.cfi_def_cfa 11, 49208
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$264, %rsp
	.cfi_def_cfa_offset 49472
	movq	%fs:40, %rax
	movq	%rax, 49400(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 48(%rsp)
.L7:
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	jne	.L27
	movl	80(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L43
	leaq	992(%rsp), %rax
	movl	$48400, %edx
	xorl	%esi, %esi
	subl	$1, %ebx
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	%ebx, 80(%rsp)
.L8:
	leaq	88(%rsp), %rax
	leaq	84(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	96(%rsp), %r15
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L44:
	movq	24(%rsp), %rdx
	leaq	92(%rsp), %rcx
	movq	%r14, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	84(%rsp), %rdi
	movslq	88(%rsp), %rdx
	movl	92(%rsp), %esi
	imulq	$110, %rdi, %rcx
	movl	%esi, %r8d
	addq	%rdx, %rcx
	movl	992(%rsp,%rcx,4), %eax
	movl	%eax, %r9d
	imull	%esi, %r9d
	cmpl	%esi, %eax
	cmovle	%eax, %r8d
	addl	%esi, %eax
	testl	%r9d, %r9d
	cmovne	%r8d, %eax
	imulq	$110, %rdx, %rdx
	addq	%rdi, %rdx
	movl	%eax, 992(%rsp,%rdx,4)
	movl	%eax, 992(%rsp,%rcx,4)
.L12:
	movl	80(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 80(%rsp)
	testl	%eax, %eax
	je	.L7
.L25:
	movq	%r14, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	84(%rsp), %ebx
	testl	%ebx, %ebx
	jne	.L44
	movq	24(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$55, %ecx
	movq	%r15, %rdi
	rep stosq
	leaq	544(%rsp), %r11
	movl	$55, %ecx
	movq	%r11, %rdi
	rep stosq
	movl	76(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L14
	subl	$1, %eax
	movq	%r14, 32(%rsp)
	movl	84(%rsp), %edi
	xorl	%r8d, %r8d
	leaq	548(%rsp), %rsi
	movq	40(%rsp), %r14
	leaq	552(%rsp,%rax,4), %r10
	movq	%rsi, 16(%rsp)
	leaq	2(%rax), %r9
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	%edi, %r13
	movq	16(%rsp), %rdx
	movl	$1, 96(%rsp,%r13,4)
	imulq	$440, %r13, %rax
	leaq	4(%r14,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%rcx), %eax
	testl	%eax, %eax
	je	.L15
	movl	(%rdx), %r12d
	addl	544(%rsp,%r13,4), %eax
	movl	%eax, %ebp
	imull	%r12d, %ebp
	movl	%r12d, %esi
	cmpl	%r12d, %eax
	cmovle	%eax, %esi
	addl	%r12d, %eax
	testl	%ebp, %ebp
	cmovne	%esi, %eax
	movl	%eax, (%rdx)
.L15:
	addq	$4, %rdx
	addq	$4, %rcx
	cmpq	%r10, %rdx
	jne	.L18
	movl	$1, %eax
	movl	$1000000000, %esi
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%r15,%rax,4), %edx
	testl	%edx, %edx
	jne	.L19
	movl	(%r11,%rax,4), %ecx
	testl	%ecx, %ecx
	setne	%dl
	cmpl	%ecx, %esi
	setg	%bpl
	andb	%bpl, %dl
	cmovne	%edx, %r8d
	cmovne	%eax, %edi
	cmovne	%ecx, %esi
.L19:
	addq	$1, %rax
	cmpq	%rax, %r9
	jne	.L20
	addl	$1, %ebx
	cmpl	12(%rsp), %ebx
	jne	.L21
	movq	32(%rsp), %r14
	testb	%r8b, %r8b
	je	.L14
	movl	%edi, 84(%rsp)
.L14:
	movslq	88(%rsp), %rax
	movl	544(%rsp,%rax,4), %edx
	testl	%edx, %edx
	je	.L23
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L23:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L12
.L27:
	leaq	992(%rsp), %rax
	movl	$48400, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	80(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 80(%rsp)
	testl	%eax, %eax
	jne	.L8
	jmp	.L7
.L43:
	movq	49400(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$49416, %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
.L45:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	zMIN
	.type	zMIN, @function
zMIN:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	%esi, %eax
	imull	%esi, %edx
	cmpl	%esi, %edi
	cmovle	%edi, %eax
	addl	%esi, %edi
	testl	%edx, %edx
	cmove	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	zMIN, .-zMIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.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	-49152(%rsp), %r11
	.cfi_def_cfa 11, 49208
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$264, %rsp
	.cfi_def_cfa_offset 49472
	movq	%fs:40, %rax
	movq	%rax, 49400(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 48(%rsp)
.L7:
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	jne	.L27
	movl	80(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L43
	leaq	992(%rsp), %rax
	movl	$48400, %edx
	xorl	%esi, %esi
	subl	$1, %ebx
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	%ebx, 80(%rsp)
.L8:
	leaq	88(%rsp), %rax
	leaq	84(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	96(%rsp), %r15
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L44:
	movq	24(%rsp), %rdx
	leaq	92(%rsp), %rcx
	movq	%r14, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	84(%rsp), %rdi
	movslq	88(%rsp), %rdx
	movl	92(%rsp), %esi
	imulq	$110, %rdi, %rcx
	movl	%esi, %r8d
	addq	%rdx, %rcx
	movl	992(%rsp,%rcx,4), %eax
	movl	%eax, %r9d
	imull	%esi, %r9d
	cmpl	%esi, %eax
	cmovle	%eax, %r8d
	addl	%esi, %eax
	testl	%r9d, %r9d
	cmovne	%r8d, %eax
	imulq	$110, %rdx, %rdx
	addq	%rdi, %rdx
	movl	%eax, 992(%rsp,%rdx,4)
	movl	%eax, 992(%rsp,%rcx,4)
.L12:
	movl	80(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 80(%rsp)
	testl	%eax, %eax
	je	.L7
.L25:
	movq	%r14, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	84(%rsp), %ebx
	testl	%ebx, %ebx
	jne	.L44
	movq	24(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$55, %ecx
	movq	%r15, %rdi
	rep stosq
	leaq	544(%rsp), %r11
	movl	$55, %ecx
	movq	%r11, %rdi
	rep stosq
	movl	76(%rsp), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L14
	subl	$1, %eax
	movq	%r14, 32(%rsp)
	movl	84(%rsp), %edi
	xorl	%r8d, %r8d
	leaq	548(%rsp), %rsi
	movq	40(%rsp), %r14
	leaq	552(%rsp,%rax,4), %r10
	movq	%rsi, 16(%rsp)
	leaq	2(%rax), %r9
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	%edi, %r13
	movq	16(%rsp), %rdx
	movl	$1, 96(%rsp,%r13,4)
	imulq	$440, %r13, %rax
	leaq	4(%r14,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%rcx), %eax
	testl	%eax, %eax
	je	.L15
	movl	(%rdx), %r12d
	addl	544(%rsp,%r13,4), %eax
	movl	%eax, %ebp
	imull	%r12d, %ebp
	movl	%r12d, %esi
	cmpl	%r12d, %eax
	cmovle	%eax, %esi
	addl	%r12d, %eax
	testl	%ebp, %ebp
	cmovne	%esi, %eax
	movl	%eax, (%rdx)
.L15:
	addq	$4, %rdx
	addq	$4, %rcx
	cmpq	%r10, %rdx
	jne	.L18
	movl	$1, %eax
	movl	$1000000000, %esi
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%r15,%rax,4), %edx
	testl	%edx, %edx
	jne	.L19
	movl	(%r11,%rax,4), %ecx
	testl	%ecx, %ecx
	setne	%dl
	cmpl	%ecx, %esi
	setg	%bpl
	andb	%bpl, %dl
	cmovne	%edx, %r8d
	cmovne	%eax, %edi
	cmovne	%ecx, %esi
.L19:
	addq	$1, %rax
	cmpq	%rax, %r9
	jne	.L20
	addl	$1, %ebx
	cmpl	12(%rsp), %ebx
	jne	.L21
	movq	32(%rsp), %r14
	testb	%r8b, %r8b
	je	.L14
	movl	%edi, 84(%rsp)
.L14:
	movslq	88(%rsp), %rax
	movl	544(%rsp,%rax,4), %edx
	testl	%edx, %edx
	je	.L23
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L23:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L12
.L27:
	leaq	992(%rsp), %rax
	movl	$48400, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	80(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 80(%rsp)
	testl	%eax, %eax
	jne	.L8
	jmp	.L7
.L43:
	movq	49400(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$49416, %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
.L45:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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>
#define M 1000000000
int MIN(int a,int b){return a<b?a:b;}
int zMIN(int a,int b){return a*b?MIN(a,b):a+b;}
int main(){
  int n,m,i,j,a,b,v,min;
  while(scanf("%d %d",&n,&m),n||m){
    int d[110][110]={0};
    while(m--){
      scanf("%d",&a);
      if(a){
	scanf("%d %d %d",&a,&b,&v);
	d[a][b]=d[b][a]=zMIN(v,d[a][b]);
      }
      else{
	scanf("%d %d",&a,&b);
	int f[110]={0};
	int c[110]={0};
	for(j=0;j<n;j++){
	  for(i=f[a]=1;i<=n;i++){
	    if(d[a][i])c[i]=zMIN(c[i],c[a]+d[a][i]);
	  }
	  min=M;
	  for(i=1;i<=n;i++){
	    if(f[i]==0&&c[i]&&min>c[i])min=c[a=i];
	  }
	}
	//for(i=0;i<n;i++)printf("%d ",c[i+1]);printf("\n");
	if(c[b])printf("%d\n",c[b]);
	else    printf("-1\n");
      }
      /*for(i=0;i<n;i++){
	for(j=0;j<n;j++)printf("%d ",d[i+1][j+1]);
	printf("\n");
	}//*/
    }
  }
  return 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 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
#include<stdio.h>
#define M 1000000000
int MIN(int a,int b){return a<b?a:b;}
int zMIN(int a,int b){return a*b?MIN(a,b):a+b;}
int main(){
  int n,m,i,j,a,b,v,min;
  while(scanf("%d %d",&n,&m),n||m){
    int d[110][110]={0};
    while(m--){
      scanf("%d",&a);
      if(a){
	scanf("%d %d %d",&a,&b,&v);
	d[a][b]=d[b][a]=zMIN(v,d[a][b]);
      }
      else{
	scanf("%d %d",&a,&b);
	int f[110]={0};
	int c[110]={0};
	for(j=0;j<n;j++){
	  for(i=f[a]=1;i<=n;i++){
	    if(d[a][i])c[i]=zMIN(c[i],c[a]+d[a][i]);
	  }
	  min=M;
	  for(i=1;i<=n;i++){
	    if(f[i]==0&&c[i]&&min>c[i])min=c[a=i];
	  }
	}
	//for(i=0;i<n;i++)printf("%d ",c[i+1]);printf("\n");
	if(c[b])printf("%d\n",c[b]);
	else    printf("-1\n");
      }
      /*for(i=0;i<n;i++){
	for(j=0;j<n;j++)printf("%d ",d[i+1][j+1]);
	printf("\n");
	}//*/
    }
  }
  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
	.globl	zMIN
	.type	zMIN, @function
zMIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	testl	%eax, %eax
	je	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	jmp	.L6
.L4:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	zMIN, .-zMIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	leaq	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L25:
	leaq	-48432(%rbp), %rax
	movl	$48400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L9
.L21:
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	testl	%eax, %eax
	je	.L10
	leaq	-49344(%rbp), %rcx
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	movl	-49348(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %edx
	movl	-49344(%rbp), %eax
	movl	-49348(%rbp), %ebx
	movl	-49352(%rbp), %r12d
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movslq	%r12d, %rcx
	movslq	%ebx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	movl	-49352(%rbp), %edx
	movl	-49348(%rbp), %ecx
	movslq	%r12d, %rsi
	movslq	%ebx, %rax
	imulq	$110, %rax, %rax
	addq	%rsi, %rax
	movl	-48432(%rbp,%rax,4), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	jmp	.L9
.L10:
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-49328(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-48880(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -49336(%rbp)
	jmp	.L11
.L18:
	movl	-49352(%rbp), %eax
	movslq	%eax, %rdx
	movl	$1, -49328(%rbp,%rdx,4)
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	movl	%eax, -49340(%rbp)
	jmp	.L12
.L14:
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %ecx
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -48880(%rbp,%rdx,4)
.L13:
	addl	$1, -49340(%rbp)
.L12:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L14
	movl	$1000000000, -49332(%rbp)
	movl	$1, -49340(%rbp)
	jmp	.L15
.L17:
	movl	-49340(%rbp), %eax
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	cmpl	%eax, -49332(%rbp)
	jle	.L16
	movl	-49340(%rbp), %eax
	movl	%eax, -49352(%rbp)
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, -49332(%rbp)
.L16:
	addl	$1, -49340(%rbp)
.L15:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L17
	addl	$1, -49336(%rbp)
.L11:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49336(%rbp)
	jl	.L18
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L19
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L19:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	-49356(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -49356(%rbp)
	testl	%eax, %eax
	jne	.L21
.L8:
	leaq	-49356(%rbp), %rdx
	leaq	-49360(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49360(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-49356(%rbp), %eax
	testl	%eax, %eax
	je	.L23
.L22:
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	testl	%eax, %eax
	jne	.L25
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$49344, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.globl	zMIN
	.type	zMIN, @function
zMIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	testl	%eax, %eax
	je	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	jmp	.L6
.L4:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	zMIN, .-zMIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	leaq	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L25:
	leaq	-48432(%rbp), %rax
	movl	$48400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L9
.L21:
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	testl	%eax, %eax
	je	.L10
	leaq	-49344(%rbp), %rcx
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49352(%rbp), %eax
	movl	-49348(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %edx
	movl	-49344(%rbp), %eax
	movl	-49348(%rbp), %ebx
	movl	-49352(%rbp), %r12d
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movslq	%r12d, %rcx
	movslq	%ebx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	movl	-49352(%rbp), %edx
	movl	-49348(%rbp), %ecx
	movslq	%r12d, %rsi
	movslq	%ebx, %rax
	imulq	$110, %rax, %rax
	addq	%rsi, %rax
	movl	-48432(%rbp,%rax,4), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$110, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -48432(%rbp,%rdx,4)
	jmp	.L9
.L10:
	leaq	-49348(%rbp), %rdx
	leaq	-49352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-49328(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-48880(%rbp), %rdx
	movl	$0, %eax
	movl	$55, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -49336(%rbp)
	jmp	.L11
.L18:
	movl	-49352(%rbp), %eax
	movslq	%eax, %rdx
	movl	$1, -49328(%rbp,%rdx,4)
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	movl	%eax, -49340(%rbp)
	jmp	.L12
.L14:
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %ecx
	movl	-49352(%rbp), %eax
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	movl	-48432(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	zMIN
	movl	-49340(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -48880(%rbp,%rdx,4)
.L13:
	addl	$1, -49340(%rbp)
.L12:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L14
	movl	$1000000000, -49332(%rbp)
	movl	$1, -49340(%rbp)
	jmp	.L15
.L17:
	movl	-49340(%rbp), %eax
	cltq
	movl	-49328(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L16
	movl	-49340(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	cmpl	%eax, -49332(%rbp)
	jle	.L16
	movl	-49340(%rbp), %eax
	movl	%eax, -49352(%rbp)
	movl	-49352(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, -49332(%rbp)
.L16:
	addl	$1, -49340(%rbp)
.L15:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49340(%rbp)
	jle	.L17
	addl	$1, -49336(%rbp)
.L11:
	movl	-49360(%rbp), %eax
	cmpl	%eax, -49336(%rbp)
	jl	.L18
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L19
	movl	-49348(%rbp), %eax
	cltq
	movl	-48880(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L19:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	-49356(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -49356(%rbp)
	testl	%eax, %eax
	jne	.L21
.L8:
	leaq	-49356(%rbp), %rdx
	leaq	-49360(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-49360(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-49356(%rbp), %eax
	testl	%eax, %eax
	je	.L23
.L22:
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	testl	%eax, %eax
	jne	.L25
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$49344, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
