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>
#define INF 200000000
#define min(x,y) ((x>y)?y:x)
int main(){
	int i,j,k,n,m,c[105][105],t[105][105],v[105],u[105],a,b,x,y;
	FILE *fp;
	//fp=fopen("test.txt","r");
	fp=stdin;
	while(1){
		fscanf(fp,"%d%d",&n,&m);
		if(n==0 && m==0)break;
		for(i=1;i<=m;i++)for(j=1;j<=m;j++)c[i][j]=t[i][j]=INF;
		for(i=0;i<n;i++){
			fscanf(fp,"%d%d%d%d",&a,&b,&x,&y);
			c[a][b]=c[b][a]=x;
			t[a][b]=t[b][a]=y;
		}
		fscanf(fp,"%d",&k);
		for(i=0;i<k;i++){
			fscanf(fp,"%d%d%d",&a,&b,&x);
			for(j=1;j<=m;j++)v[j]=INF;
			memset(u,-1,sizeof(u));
			v[a]=0;
			while(1){
				y=-1;
				for(j=1;j<=m;j++){
					if(u[j]==-1 && (y==-1 || v[j]<v[y]))y=j;
				}
				if(y==-1)break;
				u[y]=0;
				for(j=1;j<=m;j++){
					if(x==0)v[j]=min(v[j],v[y]+c[y][j]);
					else v[j]=min(v[j],v[y]+t[y][j]);
				}
			}
			printf("%d\n",v[b]);
		}
	}
	fclose(fp);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%d"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3120, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, -89096(%rbp)
.L25:
	leaq	-89124(%rbp), %rcx
	leaq	-89128(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89128(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-89124(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L2:
	movl	$1, -89104(%rbp)
	jmp	.L4
.L7:
	movl	$1, -89100(%rbp)
	jmp	.L5
.L6:
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$200000000, -44112(%rbp,%rax,4)
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movl	-89100(%rbp), %eax
	movslq	%eax, %rsi
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L5:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L6
	addl	$1, -89104(%rbp)
.L4:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jle	.L7
	movl	$0, -89104(%rbp)
	jmp	.L8
.L9:
	leaq	-89108(%rbp), %rdi
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89112(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -88224(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-88224(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89108(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -44112(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -44112(%rbp,%rax,4)
	addl	$1, -89104(%rbp)
.L8:
	movl	-89128(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L9
	leaq	-89132(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -89104(%rbp)
	jmp	.L10
.L24:
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$1, -89100(%rbp)
	jmp	.L11
.L12:
	movl	-89100(%rbp), %eax
	cltq
	movl	$200000000, -89088(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L11:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L12
	leaq	-88656(%rbp), %rax
	movl	$420, %edx
	movl	$-1, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-89120(%rbp), %eax
	cltq
	movl	$0, -89088(%rbp,%rax,4)
.L23:
	movl	$-1, -89108(%rbp)
	movl	$1, -89100(%rbp)
	jmp	.L13
.L16:
	movl	-89100(%rbp), %eax
	cltq
	movl	-88656(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L14
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %edx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L14
.L15:
	movl	-89100(%rbp), %eax
	movl	%eax, -89108(%rbp)
.L14:
	addl	$1, -89100(%rbp)
.L13:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L16
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L31
	movl	-89108(%rbp), %eax
	cltq
	movl	$0, -88656(%rbp,%rax,4)
	movl	$1, -89100(%rbp)
	jmp	.L19
.L22:
	movl	-89112(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-88224(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
	jmp	.L21
.L20:
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-44112(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
.L21:
	addl	$1, -89100(%rbp)
.L19:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L22
	jmp	.L23
.L31:
	nop
	movl	-89116(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -89104(%rbp)
.L10:
	movl	-89132(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L24
	jmp	.L25
.L30:
	nop
	movq	-89096(%rbp), %rax
	movq	%rax, %rdi
	call	fclose@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%d%d"
.LC4:
	.string	"%d%d%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3224, %rsp
	.cfi_def_cfa_offset 89296
	movq	%fs:40, %rax
	movq	%rax, 89224(%rsp)
	movq	stdin(%rip), %rax
	movq	%rax, 56(%rsp)
	leaq	124(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 96(%rsp)
.L15:
	movq	104(%rsp), %rcx
	movq	96(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movq	56(%rsp), %rdi
	call	__isoc99_fscanf@PLT
	movl	120(%rsp), %ebp
	movl	124(%rsp), %r8d
	movdqa	.LC1(%rip), %xmm4
	testl	%ebp, %ebp
	je	.L2
	testl	%r8d, %r8d
	jle	.L12
.L3:
	testl	%r8d, %r8d
	movl	$1, %r10d
	leaq	45544(%rsp), %rcx
	movl	$1, %r9d
	cmovg	%r8d, %r10d
	leaq	1432(%rsp), %rdx
	movl	%r10d, %eax
	movl	%r10d, %r11d
	shrl	$2, %eax
	andl	$-4, %r11d
	leal	-1(%rax), %esi
	leal	1(%r11), %ebx
	addq	$1, %rsi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$3, %r8d
	jle	.L45
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movups	%xmm4, (%rcx,%rax)
	movups	%xmm4, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movl	%ebx, %eax
	cmpl	%r11d, %r10d
	je	.L10
.L8:
	movslq	%r9d, %r12
	movslq	%eax, %rdi
	leaq	(%r12,%r12,2), %r13
	leaq	(%r12,%r13,4), %r13
	leaq	(%r12,%r13,8), %r12
	addq	%r12, %rdi
	movl	$200000000, 45120(%rsp,%rdi,4)
	movl	$200000000, 1008(%rsp,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r8d
	jl	.L10
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%r12, %rdi
	movl	$200000000, 45120(%rsp,%rdi,4)
	movl	$200000000, 1008(%rsp,%rdi,4)
	cmpl	%eax, %r8d
	jl	.L10
	cltq
	addq	%rax, %r12
	movl	$200000000, 45120(%rsp,%r12,4)
	movl	$200000000, 1008(%rsp,%r12,4)
.L10:
	addl	$1, %r9d
	addq	$420, %rcx
	addq	$420, %rdx
	cmpl	%r8d, %r9d
	jle	.L11
.L12:
	testl	%ebp, %ebp
	jle	.L5
	movq	56(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	140(%rsp), %rbx
	leaq	136(%rsp), %r15
	leaq	132(%rsp), %r14
	leaq	128(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rcx
	movq	%r13, %rdx
	leaq	.LC3(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %r9
	movq	%r15, %r8
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_fscanf@PLT
	movslq	132(%rsp), %rax
	movslq	128(%rsp), %rdx
	movl	136(%rsp), %esi
	leaq	(%rax,%rax,2), %rcx
	leaq	(%rdx,%rdx,2), %rdi
	leaq	(%rax,%rcx,4), %rcx
	leaq	(%rdx,%rdi,4), %rdi
	leaq	(%rax,%rcx,8), %rcx
	addq	%rdx, %rcx
	leaq	(%rdx,%rdi,8), %rdx
	addq	%rdx, %rax
	movl	140(%rsp), %edx
	movl	%esi, 1008(%rsp,%rcx,4)
	movl	%esi, 1008(%rsp,%rax,4)
	movl	%edx, 45120(%rsp,%rcx,4)
	movl	%edx, 45120(%rsp,%rax,4)
	cmpl	%ebp, 120(%rsp)
	jg	.L4
.L5:
	movq	56(%rsp), %rdi
	leaq	116(%rsp), %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	116(%rsp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	136(%rsp), %rax
	movl	$0, 44(%rsp)
	leaq	576(%rsp), %r12
	movq	%rax, 80(%rsp)
	leaq	132(%rsp), %rax
	leaq	148(%rsp), %r15
	movq	%rax, 72(%rsp)
	leaq	128(%rsp), %rax
	movq	%rax, 64(%rsp)
	leaq	164(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	152(%rsp), %rax
	movq	%rax, 88(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	80(%rsp), %r8
	movq	72(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rdi
	call	__isoc99_fscanf@PLT
	movl	124(%rsp), %r8d
	movdqa	.LC1(%rip), %xmm4
	leal	-1(%r8), %eax
	testl	%r8d, %r8d
	movl	%eax, 4(%rsp)
	jle	.L21
	cmpl	$2, %eax
	jbe	.L47
	movl	%r8d, %edx
	leaq	148(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	48(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movups	%xmm4, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L19
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L21
.L18:
	movslq	%eax, %rdx
	movl	$200000000, 144(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r8d
	jl	.L21
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$200000000, 144(%rsp,%rdx,4)
	cmpl	%eax, %r8d
	jl	.L21
	cltq
	movl	$200000000, 144(%rsp,%rax,4)
.L21:
	movl	$52, %ecx
	movq	%r12, %rdi
	movl	%r8d, %ebp
	movl	4(%rsp), %edx
	movq	$-1, %rax
	andl	$-4, %ebp
	rep stosq
	movq	88(%rsp), %rcx
	leal	3(%rbp), %ebx
	leal	1(%rbp), %r9d
	movslq	128(%rsp), %rax
	movl	%ebx, 40(%rsp)
	movslq	%r9d, %r9
	movslq	%ebx, %rbx
	leaq	(%rcx,%rdx,4), %r10
	leaq	45120(%rsp), %rcx
	addq	$2, %rdx
	movl	$0, 144(%rsp,%rax,4)
	movl	136(%rsp), %eax
	movq	%rcx, 24(%rsp)
	movl	%eax, 16(%rsp)
	movl	%r8d, %eax
	leaq	4(,%rax,4), %rax
	movl	$-1, (%rdi)
	movq	%rax, 8(%rsp)
	movl	%r8d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leal	2(%rbp), %eax
	movl	%eax, 20(%rsp)
	movslq	%eax, %r11
	leaq	1008(%rsp), %rax
	salq	$4, %rsi
	movq	%rax, 32(%rsp)
	addq	48(%rsp), %rsi
.L17:
	testl	%r8d, %r8d
	jle	.L23
.L82:
	movl	$1, %eax
	movl	$-1, %ecx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpq	%rdx, %rax
	je	.L81
.L25:
	cmpl	$-1, (%r12,%rax,4)
	jne	.L24
	cmpl	$-1, %ecx
	je	.L48
	movslq	%ecx, %rdi
	movl	144(%rsp,%rdi,4), %edi
	cmpl	%edi, 144(%rsp,%rax,4)
	cmovl	%eax, %ecx
	addq	$1, %rax
	cmpq	%rdx, %rax
	jne	.L25
.L81:
	cmpl	$-1, %ecx
	je	.L23
	movl	16(%rsp), %eax
	movslq	%ecx, %rcx
	movl	$0, 576(%rsp,%rcx,4)
	testl	%eax, %eax
	jne	.L33
	leaq	4(,%rcx,4), %rax
	leaq	144(%rsp,%rax), %rdi
	cmpq	%rdi, %r15
	setnb	%dil
	subq	$4, %rax
	cmpq	%rax, 8(%rsp)
	setle	%al
	orb	%al, %dil
	je	.L36
	cmpl	$2, 4(%rsp)
	jbe	.L36
	imulq	$420, %rcx, %rdi
	movq	32(%rsp), %r14
	movq	%r15, %rax
	movd	144(%rsp,%rcx,4), %xmm7
	pshufd	$0, %xmm7, %xmm3
	leaq	4(%r14,%rdi), %rdi
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rdi), %xmm2
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	addq	$16, %rdi
	paddd	%xmm3, %xmm2
	movdqa	%xmm5, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rsi, %rax
	jne	.L30
	cmpl	%ebp, %r8d
	je	.L17
	leaq	(%rcx,%rcx,2), %rax
	movl	144(%rsp,%r9,4), %r13d
	leaq	(%rcx,%rax,4), %rax
	leaq	(%rcx,%rax,8), %rdi
	leaq	(%rdi,%r9), %rax
	movl	1008(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r9,4)
	cmpl	%r8d, 20(%rsp)
	jg	.L17
	movl	144(%rsp,%r11,4), %r13d
	leaq	(%rdi,%r11), %rax
	movl	1008(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r11,4)
	cmpl	40(%rsp), %r8d
	jl	.L17
	addq	%rbx, %rdi
	movl	1008(%rsp,%rdi,4), %eax
.L79:
	addl	144(%rsp,%rcx,4), %eax
	movl	144(%rsp,%rbx,4), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	movl	%eax, 144(%rsp,%rbx,4)
	testl	%r8d, %r8d
	jg	.L82
.L23:
	movslq	132(%rsp), %rax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	movl	$-1, 140(%rsp)
	movl	144(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, 44(%rsp)
	movl	44(%rsp), %eax
	cmpl	%eax, 116(%rsp)
	jg	.L13
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L48:
	movl	%eax, %ecx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L33:
	leaq	0(,%rcx,4), %rax
	leaq	148(%rsp,%rcx,4), %rdi
	cmpq	8(%rsp), %rax
	setge	%al
	cmpq	%rdi, %r15
	setnb	%dil
	orb	%dil, %al
	je	.L37
	cmpl	$2, 4(%rsp)
	jbe	.L37
	imulq	$420, %rcx, %rdi
	movq	24(%rsp), %r14
	movq	%r15, %rax
	movd	144(%rsp,%rcx,4), %xmm7
	pshufd	$0, %xmm7, %xmm3
	leaq	4(%r14,%rdi), %rdi
	.p2align 4,,10
	.p2align 3
.L38:
	movdqu	(%rdi), %xmm2
	movdqu	(%rax), %xmm6
	addq	$16, %rax
	addq	$16, %rdi
	paddd	%xmm3, %xmm2
	movdqa	%xmm6, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rsi, %rax
	jne	.L38
	cmpl	%ebp, %r8d
	je	.L17
	leaq	(%rcx,%rcx,2), %rax
	leaq	(%rcx,%rax,4), %rax
	leaq	(%rcx,%rax,8), %rdi
	movl	144(%rsp,%rcx,4), %eax
	leaq	(%rdi,%r9), %r13
	addl	45120(%rsp,%r13,4), %eax
	movl	144(%rsp,%r9,4), %r13d
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r9,4)
	cmpl	%r8d, 20(%rsp)
	jg	.L17
	movl	144(%rsp,%r11,4), %r13d
	leaq	(%rdi,%r11), %rax
	movl	45120(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r11,4)
	cmpl	40(%rsp), %r8d
	jl	.L17
	addq	%rbx, %rdi
	movl	45120(%rsp,%rdi,4), %eax
	jmp	.L79
.L37:
	imulq	$420, %rcx, %rax
	movq	24(%rsp), %r14
	movq	%r15, %rdi
	leaq	4(%r14,%rax), %r13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rdi), %r14d
	movl	0(%r13), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	addq	$4, %rdi
	addq	$4, %r13
	movl	%eax, -4(%rdi)
	cmpq	%r10, %rdi
	jne	.L40
	jmp	.L17
.L36:
	imulq	$420, %rcx, %rax
	movq	32(%rsp), %r14
	movq	%r15, %rdi
	leaq	4(%r14,%rax), %r13
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rdi), %r14d
	movl	0(%r13), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	addq	$4, %rdi
	addq	$4, %r13
	movl	%eax, -4(%rdi)
	cmpq	%r10, %rdi
	jne	.L28
	jmp	.L17
.L45:
	movl	$1, %eax
	jmp	.L8
.L47:
	movl	$1, %eax
	jmp	.L18
.L2:
	testl	%r8d, %r8d
	je	.L83
	jg	.L3
	jmp	.L5
.L83:
	movq	56(%rsp), %rdi
	call	fclose@PLT
	movq	89224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	addq	$89240, %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
.L84:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	200000000
	.long	200000000
	.long	200000000
	.long	200000000
	.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%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%d%d"
.LC4:
	.string	"%d%d%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3224, %rsp
	.cfi_def_cfa_offset 89296
	movq	%fs:40, %rax
	movq	%rax, 89224(%rsp)
	movq	stdin(%rip), %rax
	movq	%rax, 56(%rsp)
	leaq	124(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 96(%rsp)
.L15:
	movq	104(%rsp), %rcx
	movq	96(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movq	56(%rsp), %rdi
	call	__isoc99_fscanf@PLT
	movl	120(%rsp), %ebp
	movl	124(%rsp), %r8d
	movdqa	.LC1(%rip), %xmm4
	testl	%ebp, %ebp
	je	.L2
	testl	%r8d, %r8d
	jle	.L12
.L3:
	testl	%r8d, %r8d
	movl	$1, %r10d
	leaq	45544(%rsp), %rcx
	movl	$1, %r9d
	cmovg	%r8d, %r10d
	leaq	1432(%rsp), %rdx
	movl	%r10d, %eax
	movl	%r10d, %r11d
	shrl	$2, %eax
	andl	$-4, %r11d
	leal	-1(%rax), %esi
	leal	1(%r11), %ebx
	addq	$1, %rsi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$3, %r8d
	jle	.L45
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movups	%xmm4, (%rcx,%rax)
	movups	%xmm4, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movl	%ebx, %eax
	cmpl	%r11d, %r10d
	je	.L10
.L8:
	movslq	%r9d, %r12
	movslq	%eax, %rdi
	leaq	(%r12,%r12,2), %r13
	leaq	(%r12,%r13,4), %r13
	leaq	(%r12,%r13,8), %r12
	addq	%r12, %rdi
	movl	$200000000, 45120(%rsp,%rdi,4)
	movl	$200000000, 1008(%rsp,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r8d
	jl	.L10
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%r12, %rdi
	movl	$200000000, 45120(%rsp,%rdi,4)
	movl	$200000000, 1008(%rsp,%rdi,4)
	cmpl	%eax, %r8d
	jl	.L10
	cltq
	addq	%rax, %r12
	movl	$200000000, 45120(%rsp,%r12,4)
	movl	$200000000, 1008(%rsp,%r12,4)
.L10:
	addl	$1, %r9d
	addq	$420, %rcx
	addq	$420, %rdx
	cmpl	%r8d, %r9d
	jle	.L11
.L12:
	testl	%ebp, %ebp
	jle	.L5
	movq	56(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	140(%rsp), %rbx
	leaq	136(%rsp), %r15
	leaq	132(%rsp), %r14
	leaq	128(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rcx
	movq	%r13, %rdx
	leaq	.LC3(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %r9
	movq	%r15, %r8
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_fscanf@PLT
	movslq	132(%rsp), %rax
	movslq	128(%rsp), %rdx
	movl	136(%rsp), %esi
	leaq	(%rax,%rax,2), %rcx
	leaq	(%rdx,%rdx,2), %rdi
	leaq	(%rax,%rcx,4), %rcx
	leaq	(%rdx,%rdi,4), %rdi
	leaq	(%rax,%rcx,8), %rcx
	addq	%rdx, %rcx
	leaq	(%rdx,%rdi,8), %rdx
	addq	%rdx, %rax
	movl	140(%rsp), %edx
	movl	%esi, 1008(%rsp,%rcx,4)
	movl	%esi, 1008(%rsp,%rax,4)
	movl	%edx, 45120(%rsp,%rcx,4)
	movl	%edx, 45120(%rsp,%rax,4)
	cmpl	%ebp, 120(%rsp)
	jg	.L4
.L5:
	movq	56(%rsp), %rdi
	leaq	116(%rsp), %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	116(%rsp), %edx
	testl	%edx, %edx
	jle	.L15
	leaq	136(%rsp), %rax
	movl	$0, 44(%rsp)
	leaq	576(%rsp), %r12
	movq	%rax, 80(%rsp)
	leaq	132(%rsp), %rax
	leaq	148(%rsp), %r15
	movq	%rax, 72(%rsp)
	leaq	128(%rsp), %rax
	movq	%rax, 64(%rsp)
	leaq	164(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	152(%rsp), %rax
	movq	%rax, 88(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	80(%rsp), %r8
	movq	72(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rdi
	call	__isoc99_fscanf@PLT
	movl	124(%rsp), %r8d
	movdqa	.LC1(%rip), %xmm4
	leal	-1(%r8), %eax
	testl	%r8d, %r8d
	movl	%eax, 4(%rsp)
	jle	.L21
	cmpl	$2, %eax
	jbe	.L47
	movl	%r8d, %edx
	leaq	148(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	48(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movups	%xmm4, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L19
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L21
.L18:
	movslq	%eax, %rdx
	movl	$200000000, 144(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r8d
	jl	.L21
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$200000000, 144(%rsp,%rdx,4)
	cmpl	%eax, %r8d
	jl	.L21
	cltq
	movl	$200000000, 144(%rsp,%rax,4)
.L21:
	movl	$52, %ecx
	movq	%r12, %rdi
	movl	%r8d, %ebp
	movl	4(%rsp), %edx
	movq	$-1, %rax
	andl	$-4, %ebp
	rep stosq
	movq	88(%rsp), %rcx
	leal	3(%rbp), %ebx
	leal	1(%rbp), %r9d
	movslq	128(%rsp), %rax
	movl	%ebx, 40(%rsp)
	movslq	%r9d, %r9
	movslq	%ebx, %rbx
	leaq	(%rcx,%rdx,4), %r10
	leaq	45120(%rsp), %rcx
	addq	$2, %rdx
	movl	$0, 144(%rsp,%rax,4)
	movl	136(%rsp), %eax
	movq	%rcx, 24(%rsp)
	movl	%eax, 16(%rsp)
	movl	%r8d, %eax
	leaq	4(,%rax,4), %rax
	movl	$-1, (%rdi)
	movq	%rax, 8(%rsp)
	movl	%r8d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leal	2(%rbp), %eax
	movl	%eax, 20(%rsp)
	movslq	%eax, %r11
	leaq	1008(%rsp), %rax
	salq	$4, %rsi
	movq	%rax, 32(%rsp)
	addq	48(%rsp), %rsi
.L17:
	testl	%r8d, %r8d
	jle	.L23
.L82:
	movl	$1, %eax
	movl	$-1, %ecx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rax
	cmpq	%rdx, %rax
	je	.L81
.L25:
	cmpl	$-1, (%r12,%rax,4)
	jne	.L24
	cmpl	$-1, %ecx
	je	.L48
	movslq	%ecx, %rdi
	movl	144(%rsp,%rdi,4), %edi
	cmpl	%edi, 144(%rsp,%rax,4)
	cmovl	%eax, %ecx
	addq	$1, %rax
	cmpq	%rdx, %rax
	jne	.L25
.L81:
	cmpl	$-1, %ecx
	je	.L23
	movl	16(%rsp), %eax
	movslq	%ecx, %rcx
	movl	$0, 576(%rsp,%rcx,4)
	testl	%eax, %eax
	jne	.L33
	leaq	4(,%rcx,4), %rax
	leaq	144(%rsp,%rax), %rdi
	cmpq	%rdi, %r15
	setnb	%dil
	subq	$4, %rax
	cmpq	%rax, 8(%rsp)
	setle	%al
	orb	%al, %dil
	je	.L36
	cmpl	$2, 4(%rsp)
	jbe	.L36
	imulq	$420, %rcx, %rdi
	movq	32(%rsp), %r14
	movq	%r15, %rax
	movd	144(%rsp,%rcx,4), %xmm7
	pshufd	$0, %xmm7, %xmm3
	leaq	4(%r14,%rdi), %rdi
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rdi), %xmm2
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	addq	$16, %rdi
	paddd	%xmm3, %xmm2
	movdqa	%xmm5, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rsi, %rax
	jne	.L30
	cmpl	%ebp, %r8d
	je	.L17
	leaq	(%rcx,%rcx,2), %rax
	movl	144(%rsp,%r9,4), %r13d
	leaq	(%rcx,%rax,4), %rax
	leaq	(%rcx,%rax,8), %rdi
	leaq	(%rdi,%r9), %rax
	movl	1008(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r9,4)
	cmpl	%r8d, 20(%rsp)
	jg	.L17
	movl	144(%rsp,%r11,4), %r13d
	leaq	(%rdi,%r11), %rax
	movl	1008(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r11,4)
	cmpl	40(%rsp), %r8d
	jl	.L17
	addq	%rbx, %rdi
	movl	1008(%rsp,%rdi,4), %eax
.L79:
	addl	144(%rsp,%rcx,4), %eax
	movl	144(%rsp,%rbx,4), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	movl	%eax, 144(%rsp,%rbx,4)
	testl	%r8d, %r8d
	jg	.L82
.L23:
	movslq	132(%rsp), %rax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	movl	$-1, 140(%rsp)
	movl	144(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, 44(%rsp)
	movl	44(%rsp), %eax
	cmpl	%eax, 116(%rsp)
	jg	.L13
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L48:
	movl	%eax, %ecx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L33:
	leaq	0(,%rcx,4), %rax
	leaq	148(%rsp,%rcx,4), %rdi
	cmpq	8(%rsp), %rax
	setge	%al
	cmpq	%rdi, %r15
	setnb	%dil
	orb	%dil, %al
	je	.L37
	cmpl	$2, 4(%rsp)
	jbe	.L37
	imulq	$420, %rcx, %rdi
	movq	24(%rsp), %r14
	movq	%r15, %rax
	movd	144(%rsp,%rcx,4), %xmm7
	pshufd	$0, %xmm7, %xmm3
	leaq	4(%r14,%rdi), %rdi
	.p2align 4,,10
	.p2align 3
.L38:
	movdqu	(%rdi), %xmm2
	movdqu	(%rax), %xmm6
	addq	$16, %rax
	addq	$16, %rdi
	paddd	%xmm3, %xmm2
	movdqa	%xmm6, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rsi, %rax
	jne	.L38
	cmpl	%ebp, %r8d
	je	.L17
	leaq	(%rcx,%rcx,2), %rax
	leaq	(%rcx,%rax,4), %rax
	leaq	(%rcx,%rax,8), %rdi
	movl	144(%rsp,%rcx,4), %eax
	leaq	(%rdi,%r9), %r13
	addl	45120(%rsp,%r13,4), %eax
	movl	144(%rsp,%r9,4), %r13d
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r9,4)
	cmpl	%r8d, 20(%rsp)
	jg	.L17
	movl	144(%rsp,%r11,4), %r13d
	leaq	(%rdi,%r11), %rax
	movl	45120(%rsp,%rax,4), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r13d, %eax
	cmovg	%r13d, %eax
	movl	%eax, 144(%rsp,%r11,4)
	cmpl	40(%rsp), %r8d
	jl	.L17
	addq	%rbx, %rdi
	movl	45120(%rsp,%rdi,4), %eax
	jmp	.L79
.L37:
	imulq	$420, %rcx, %rax
	movq	24(%rsp), %r14
	movq	%r15, %rdi
	leaq	4(%r14,%rax), %r13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rdi), %r14d
	movl	0(%r13), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	addq	$4, %rdi
	addq	$4, %r13
	movl	%eax, -4(%rdi)
	cmpq	%r10, %rdi
	jne	.L40
	jmp	.L17
.L36:
	imulq	$420, %rcx, %rax
	movq	32(%rsp), %r14
	movq	%r15, %rdi
	leaq	4(%r14,%rax), %r13
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rdi), %r14d
	movl	0(%r13), %eax
	addl	144(%rsp,%rcx,4), %eax
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	addq	$4, %rdi
	addq	$4, %r13
	movl	%eax, -4(%rdi)
	cmpq	%r10, %rdi
	jne	.L28
	jmp	.L17
.L45:
	movl	$1, %eax
	jmp	.L8
.L47:
	movl	$1, %eax
	jmp	.L18
.L2:
	testl	%r8d, %r8d
	je	.L83
	jg	.L3
	jmp	.L5
.L83:
	movq	56(%rsp), %rdi
	call	fclose@PLT
	movq	89224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	addq	$89240, %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
.L84:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	200000000
	.long	200000000
	.long	200000000
	.long	200000000
	.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>
#define INF 200000000
#define min(x,y) ((x>y)?y:x)
int main(){
	int i,j,k,n,m,c[105][105],t[105][105],v[105],u[105],a,b,x,y;
	FILE *fp;
	//fp=fopen("test.txt","r");
	fp=stdin;
	while(1){
		fscanf(fp,"%d%d",&n,&m);
		if(n==0 && m==0)break;
		for(i=1;i<=m;i++)for(j=1;j<=m;j++)c[i][j]=t[i][j]=INF;
		for(i=0;i<n;i++){
			fscanf(fp,"%d%d%d%d",&a,&b,&x,&y);
			c[a][b]=c[b][a]=x;
			t[a][b]=t[b][a]=y;
		}
		fscanf(fp,"%d",&k);
		for(i=0;i<k;i++){
			fscanf(fp,"%d%d%d",&a,&b,&x);
			for(j=1;j<=m;j++)v[j]=INF;
			memset(u,-1,sizeof(u));
			v[a]=0;
			while(1){
				y=-1;
				for(j=1;j<=m;j++){
					if(u[j]==-1 && (y==-1 || v[j]<v[y]))y=j;
				}
				if(y==-1)break;
				u[y]=0;
				for(j=1;j<=m;j++){
					if(x==0)v[j]=min(v[j],v[y]+c[y][j]);
					else v[j]=min(v[j],v[y]+t[y][j]);
				}
			}
			printf("%d\n",v[b]);
		}
	}
	fclose(fp);
	return 0;
}
6 5
1 2 200 10
1 4 400 15
1 3 250 25
2 4 100 10
4 5 150 20
3 5 300 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 400 22
1 3 250 25
2 4 100 10
4 5 150 20
3 3 300 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 158 22
1 3 250 25
2 4 100 10
4 5 150 20
3 3 300 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 158 41
1 3 250 22
2 4 100 10
4 5 1 20
3 3 300 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 71 22
1 3 250 25
2 4 100 10
4 5 150 20
3 3 300 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 158 22
2 3 250 25
2 4 100 10
4 5 150 20
3 3 300 30
2
2 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 158 41
1 3 250 22
2 4 100 10
4 5 150 20
3 3 335 30
2
1 5 0
1 2 1
0 0
 6 5
1 2 200 10
1 4 400 15
1 3 250 25
1 4 100 10
4 5 150 20
2 3 95 30
2
1 5 0
1 5 1
0 0
 6 5
1 2 200 10
1 4 158 41
1 3 250 22
2 4 100 10
2 5 150 20
3 3 335 30
2
1 5 0
1 2 1
0 0
 6 5
1 2 200 12
1 4 400 15
1 3 250 25
2 4 100 10
4 5 150 20
3 5 300 21
2
1 5 0
2 5 1
0 0

450
35
 450
40
 308
40
 159
40
 221
40
 250
40
 308
10
 250
30
 350
10
 450
30

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>
#define INF 200000000
#define min(x,y) ((x>y)?y:x)
int main(){
	int i,j,k,n,m,c[105][105],t[105][105],v[105],u[105],a,b,x,y;
	FILE *fp;
	//fp=fopen("test.txt","r");
	fp=stdin;
	while(1){
		fscanf(fp,"%d%d",&n,&m);
		if(n==0 && m==0)break;
		for(i=1;i<=m;i++)for(j=1;j<=m;j++)c[i][j]=t[i][j]=INF;
		for(i=0;i<n;i++){
			fscanf(fp,"%d%d%d%d",&a,&b,&x,&y);
			c[a][b]=c[b][a]=x;
			t[a][b]=t[b][a]=y;
		}
		fscanf(fp,"%d",&k);
		for(i=0;i<k;i++){
			fscanf(fp,"%d%d%d",&a,&b,&x);
			for(j=1;j<=m;j++)v[j]=INF;
			memset(u,-1,sizeof(u));
			v[a]=0;
			while(1){
				y=-1;
				for(j=1;j<=m;j++){
					if(u[j]==-1 && (y==-1 || v[j]<v[y]))y=j;
				}
				if(y==-1)break;
				u[y]=0;
				for(j=1;j<=m;j++){
					if(x==0)v[j]=min(v[j],v[y]+c[y][j]);
					else v[j]=min(v[j],v[y]+t[y][j]);
				}
			}
			printf("%d\n",v[b]);
		}
	}
	fclose(fp);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%d"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3120, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, -89096(%rbp)
.L25:
	leaq	-89124(%rbp), %rcx
	leaq	-89128(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89128(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-89124(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L2:
	movl	$1, -89104(%rbp)
	jmp	.L4
.L7:
	movl	$1, -89100(%rbp)
	jmp	.L5
.L6:
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$200000000, -44112(%rbp,%rax,4)
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movl	-89100(%rbp), %eax
	movslq	%eax, %rsi
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L5:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L6
	addl	$1, -89104(%rbp)
.L4:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jle	.L7
	movl	$0, -89104(%rbp)
	jmp	.L8
.L9:
	leaq	-89108(%rbp), %rdi
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89112(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -88224(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-88224(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89108(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -44112(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -44112(%rbp,%rax,4)
	addl	$1, -89104(%rbp)
.L8:
	movl	-89128(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L9
	leaq	-89132(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -89104(%rbp)
	jmp	.L10
.L24:
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$1, -89100(%rbp)
	jmp	.L11
.L12:
	movl	-89100(%rbp), %eax
	cltq
	movl	$200000000, -89088(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L11:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L12
	leaq	-88656(%rbp), %rax
	movl	$420, %edx
	movl	$-1, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-89120(%rbp), %eax
	cltq
	movl	$0, -89088(%rbp,%rax,4)
.L23:
	movl	$-1, -89108(%rbp)
	movl	$1, -89100(%rbp)
	jmp	.L13
.L16:
	movl	-89100(%rbp), %eax
	cltq
	movl	-88656(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L14
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %edx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L14
.L15:
	movl	-89100(%rbp), %eax
	movl	%eax, -89108(%rbp)
.L14:
	addl	$1, -89100(%rbp)
.L13:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L16
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L31
	movl	-89108(%rbp), %eax
	cltq
	movl	$0, -88656(%rbp,%rax,4)
	movl	$1, -89100(%rbp)
	jmp	.L19
.L22:
	movl	-89112(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-88224(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
	jmp	.L21
.L20:
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-44112(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
.L21:
	addl	$1, -89100(%rbp)
.L19:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L22
	jmp	.L23
.L31:
	nop
	movl	-89116(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -89104(%rbp)
.L10:
	movl	-89132(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L24
	jmp	.L25
.L30:
	nop
	movq	-89096(%rbp), %rax
	movq	%rax, %rdi
	call	fclose@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%d"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3120, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, -89096(%rbp)
.L25:
	leaq	-89124(%rbp), %rcx
	leaq	-89128(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89128(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-89124(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L2:
	movl	$1, -89104(%rbp)
	jmp	.L4
.L7:
	movl	$1, -89100(%rbp)
	jmp	.L5
.L6:
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$200000000, -44112(%rbp,%rax,4)
	movl	-89100(%rbp), %eax
	movslq	%eax, %rcx
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movl	-89100(%rbp), %eax
	movslq	%eax, %rsi
	movl	-89104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L5:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L6
	addl	$1, -89104(%rbp)
.L4:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jle	.L7
	movl	$0, -89104(%rbp)
	jmp	.L8
.L9:
	leaq	-89108(%rbp), %rdi
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89112(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -88224(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-88224(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -88224(%rbp,%rax,4)
	movl	-89116(%rbp), %ecx
	movl	-89120(%rbp), %esi
	movl	-89108(%rbp), %edi
	movslq	%esi, %r8
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%r8, %rax
	movl	%edi, -44112(%rbp,%rax,4)
	movl	-89120(%rbp), %edi
	movl	-89116(%rbp), %r8d
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-44112(%rbp,%rax,4), %ecx
	movslq	%r8d, %rsi
	movslq	%edi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -44112(%rbp,%rax,4)
	addl	$1, -89104(%rbp)
.L8:
	movl	-89128(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L9
	leaq	-89132(%rbp), %rdx
	movq	-89096(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -89104(%rbp)
	jmp	.L10
.L24:
	leaq	-89112(%rbp), %rsi
	leaq	-89116(%rbp), %rcx
	leaq	-89120(%rbp), %rdx
	movq	-89096(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$1, -89100(%rbp)
	jmp	.L11
.L12:
	movl	-89100(%rbp), %eax
	cltq
	movl	$200000000, -89088(%rbp,%rax,4)
	addl	$1, -89100(%rbp)
.L11:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L12
	leaq	-88656(%rbp), %rax
	movl	$420, %edx
	movl	$-1, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-89120(%rbp), %eax
	cltq
	movl	$0, -89088(%rbp,%rax,4)
.L23:
	movl	$-1, -89108(%rbp)
	movl	$1, -89100(%rbp)
	jmp	.L13
.L16:
	movl	-89100(%rbp), %eax
	cltq
	movl	-88656(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L14
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %edx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L14
.L15:
	movl	-89100(%rbp), %eax
	movl	%eax, -89108(%rbp)
.L14:
	addl	$1, -89100(%rbp)
.L13:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L16
	movl	-89108(%rbp), %eax
	cmpl	$-1, %eax
	je	.L31
	movl	-89108(%rbp), %eax
	cltq
	movl	$0, -88656(%rbp,%rax,4)
	movl	$1, -89100(%rbp)
	jmp	.L19
.L22:
	movl	-89112(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-88224(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
	jmp	.L21
.L20:
	movl	-89100(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %ecx
	movl	-89108(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %esi
	movl	-89108(%rbp), %eax
	movl	-89100(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-44112(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	cmovle	%ecx, %eax
	movl	%eax, %edx
	movl	-89100(%rbp), %eax
	cltq
	movl	%edx, -89088(%rbp,%rax,4)
.L21:
	addl	$1, -89100(%rbp)
.L19:
	movl	-89124(%rbp), %eax
	cmpl	%eax, -89100(%rbp)
	jle	.L22
	jmp	.L23
.L31:
	nop
	movl	-89116(%rbp), %eax
	cltq
	movl	-89088(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -89104(%rbp)
.L10:
	movl	-89132(%rbp), %eax
	cmpl	%eax, -89104(%rbp)
	jl	.L24
	jmp	.L25
.L30:
	nop
	movq	-89096(%rbp), %rax
	movq	%rax, %rdi
	call	fclose@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
