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<stdlib.h>
int main()
{
long long int n,m,i,j;
  scanf("%lld %lld",&n,&m);
  
long long int a[n],b[n],c[m],d[m],max[n],ans[n],temp;
  for(i=0;i<n;++i)
  {scanf("%lld %lld",&a[i],&b[i]);}
  
  for(i=0;i<m;++i)
  {scanf("%lld %lld",&c[i],&d[i]);}

  for(i=0;i<n;++i)
  {
  max[i]=abs(a[i]-c[0])+abs(b[i]-d[0]);
    ans[i]=1;
    for(j=1;j<m;j++) {
     temp=abs(a[i]-c[j])+abs(b[i]-d[j]);
    if(temp<max[i]) {max[i]=temp;
                    ans[i]=j+1;
                    }
    }
  printf("%lld\n",ans[i]);
  }
  
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-184(%rbp), %rdx
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -160(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -152(%rbp)
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -144(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -136(%rbp)
	movq	-184(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L8:
	cmpq	%rcx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L10
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-184(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -112(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -176(%rbp)
	jmp	.L20
.L21:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-136(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-152(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L20:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L21
	movq	$0, -176(%rbp)
	jmp	.L22
.L23:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L22:
	movq	-184(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L23
	movq	$0, -176(%rbp)
	jmp	.L24
.L28:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-104(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	$1, (%rax,%rdx,8)
	movq	$1, -168(%rbp)
	jmp	.L25
.L27:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %ecx
	movq	-120(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %esi
	movq	-104(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	cltq
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -64(%rbp)
	jge	.L26
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	-64(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
.L26:
	addq	$1, -168(%rbp)
.L25:
	movq	-184(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L27
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -176(%rbp)
.L24:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L56:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L56
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L57
.L4:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L57:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L58
.L7:
	movq	-64(%rbp), %rsi
	movq	%rsp, -96(%rbp)
	movq	%rsp, %r8
	leaq	15(,%rsi,8), %rdx
	movq	%rdx, %r9
	movq	%rdx, %rdi
	andq	$-4096, %r9
	andq	$-16, %rdi
	subq	%r9, %r8
.L8:
	cmpq	%r8, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L58:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L10
	orq	$0, -8(%rsp,%rdi)
.L10:
	movq	%rdx, %rdi
	movq	%rsp, %r8
	andq	$-4096, %rdx
	movq	%rsp, %r14
	andq	$-16, %rdi
	subq	%rdx, %r8
.L11:
	cmpq	%r8, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L13
	orq	$0, -8(%rsp,%rdi)
.L13:
	movq	%rax, %r8
	movq	%rax, %rdx
	movq	%rsp, %rdi
	movq	%rsp, %r15
	andq	$-4096, %r8
	andq	$-16, %rdx
	subq	%r8, %rdi
.L14:
	cmpq	%rdi, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L16
	orq	$0, -8(%rsp,%rdx)
.L16:
	movq	%rax, %rdx
	movq	%rsp, %rdi
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rdi
.L17:
	cmpq	%rdi, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L19
	orq	$0, -8(%rsp,%rax)
.L19:
	movq	%rsp, -120(%rbp)
	testq	%rcx, %rcx
	jle	.L20
	movq	-96(%rbp), %rdx
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movq	%r12, -88(%rbp)
	movq	%r14, -104(%rbp)
	movq	%rsi, %r14
	movq	%rbx, -112(%rbp)
	movq	%rdx, %r12
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$8, %r14
	addq	$8, %r12
	cmpq	%rbx, -72(%rbp)
	jg	.L21
	movq	-64(%rbp), %r9
	movq	-88(%rbp), %r12
	movq	-104(%rbp), %r14
	movq	-112(%rbp), %rbx
	testq	%r9, %r9
	jle	.L22
.L29:
	movq	%r14, -104(%rbp)
	xorl	%ecx, %ecx
	movq	%r12, -88(%rbp)
	movq	%r15, %r12
	movq	%rbx, -112(%rbp)
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r9
	addq	$1, %rbx
	addq	$8, %r14
	addq	$8, %r12
	cmpq	%rbx, %r9
	jg	.L23
	movq	-88(%rbp), %r12
	movq	-104(%rbp), %r14
	movq	-112(%rbp), %rbx
.L22:
	cmpq	$0, -72(%rbp)
	jle	.L24
	movq	-120(%rbp), %r8
	movq	%rbx, %rax
	xorl	%r13d, %r13d
	movq	%r8, %rbx
	movq	%r12, %r8
	movq	%rax, %r12
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%r8,%r13,8), %rdx
	movq	-96(%rbp), %rax
	movq	$1, (%rbx)
	movl	%edx, %r10d
	subl	(%r14), %edx
	movq	(%rax,%r13,8), %rax
	movl	%edx, %edi
	negl	%edi
	movl	%eax, %r11d
	cmovs	%edx, %edi
	subl	(%r15), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	$1, %edx
	addl	%eax, %edi
	movslq	%edi, %rdi
	movq	%rdi, (%r12,%r13,8)
	cmpq	$1, %r9
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r10d, %ecx
	subl	(%r14,%rdx,8), %ecx
	movl	%r11d, %esi
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r15,%rdx,8), %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	addq	$1, %rdx
	addl	%ecx, %eax
	cltq
	cmpq	%rdi, %rax
	jge	.L26
	movq	%rax, (%r12,%r13,8)
	movq	%rax, %rdi
	movq	%rdx, (%rbx)
.L26:
	cmpq	%rdx, %r9
	jne	.L27
	movq	(%rbx), %rdx
.L25:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r8, -88(%rbp)
	addq	$1, %r13
	leaq	.LC1(%rip), %rsi
	addq	$8, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, -72(%rbp)
	jle	.L24
	movq	-64(%rbp), %r9
	movq	-88(%rbp), %r8
	jmp	.L28
.L20:
	testq	%rsi, %rsi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L24:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L59
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L59:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L56:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L56
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L57
.L4:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L57:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L58
.L7:
	movq	-64(%rbp), %rsi
	movq	%rsp, -96(%rbp)
	movq	%rsp, %r8
	leaq	15(,%rsi,8), %rdx
	movq	%rdx, %r9
	movq	%rdx, %rdi
	andq	$-4096, %r9
	andq	$-16, %rdi
	subq	%r9, %r8
.L8:
	cmpq	%r8, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L58:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L10
	orq	$0, -8(%rsp,%rdi)
.L10:
	movq	%rdx, %rdi
	movq	%rsp, %r8
	andq	$-4096, %rdx
	movq	%rsp, %r14
	andq	$-16, %rdi
	subq	%rdx, %r8
.L11:
	cmpq	%r8, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	andl	$4095, %edi
	subq	%rdi, %rsp
	testq	%rdi, %rdi
	je	.L13
	orq	$0, -8(%rsp,%rdi)
.L13:
	movq	%rax, %r8
	movq	%rax, %rdx
	movq	%rsp, %rdi
	movq	%rsp, %r15
	andq	$-4096, %r8
	andq	$-16, %rdx
	subq	%r8, %rdi
.L14:
	cmpq	%rdi, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L16
	orq	$0, -8(%rsp,%rdx)
.L16:
	movq	%rax, %rdx
	movq	%rsp, %rdi
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rdi
.L17:
	cmpq	%rdi, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L19
	orq	$0, -8(%rsp,%rax)
.L19:
	movq	%rsp, -120(%rbp)
	testq	%rcx, %rcx
	jle	.L20
	movq	-96(%rbp), %rdx
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movq	%r12, -88(%rbp)
	movq	%r14, -104(%rbp)
	movq	%rsi, %r14
	movq	%rbx, -112(%rbp)
	movq	%rdx, %r12
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$8, %r14
	addq	$8, %r12
	cmpq	%rbx, -72(%rbp)
	jg	.L21
	movq	-64(%rbp), %r9
	movq	-88(%rbp), %r12
	movq	-104(%rbp), %r14
	movq	-112(%rbp), %rbx
	testq	%r9, %r9
	jle	.L22
.L29:
	movq	%r14, -104(%rbp)
	xorl	%ecx, %ecx
	movq	%r12, -88(%rbp)
	movq	%r15, %r12
	movq	%rbx, -112(%rbp)
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%r12, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r9
	addq	$1, %rbx
	addq	$8, %r14
	addq	$8, %r12
	cmpq	%rbx, %r9
	jg	.L23
	movq	-88(%rbp), %r12
	movq	-104(%rbp), %r14
	movq	-112(%rbp), %rbx
.L22:
	cmpq	$0, -72(%rbp)
	jle	.L24
	movq	-120(%rbp), %r8
	movq	%rbx, %rax
	xorl	%r13d, %r13d
	movq	%r8, %rbx
	movq	%r12, %r8
	movq	%rax, %r12
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%r8,%r13,8), %rdx
	movq	-96(%rbp), %rax
	movq	$1, (%rbx)
	movl	%edx, %r10d
	subl	(%r14), %edx
	movq	(%rax,%r13,8), %rax
	movl	%edx, %edi
	negl	%edi
	movl	%eax, %r11d
	cmovs	%edx, %edi
	subl	(%r15), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	$1, %edx
	addl	%eax, %edi
	movslq	%edi, %rdi
	movq	%rdi, (%r12,%r13,8)
	cmpq	$1, %r9
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r10d, %ecx
	subl	(%r14,%rdx,8), %ecx
	movl	%r11d, %esi
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r15,%rdx,8), %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	addq	$1, %rdx
	addl	%ecx, %eax
	cltq
	cmpq	%rdi, %rax
	jge	.L26
	movq	%rax, (%r12,%r13,8)
	movq	%rax, %rdi
	movq	%rdx, (%rbx)
.L26:
	cmpq	%rdx, %r9
	jne	.L27
	movq	(%rbx), %rdx
.L25:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r8, -88(%rbp)
	addq	$1, %r13
	leaq	.LC1(%rip), %rsi
	addq	$8, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, -72(%rbp)
	jle	.L24
	movq	-64(%rbp), %r9
	movq	-88(%rbp), %r8
	jmp	.L28
.L20:
	testq	%rsi, %rsi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L24:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L59
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L59:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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<stdlib.h>
int main()
{
long long int n,m,i,j;
  scanf("%lld %lld",&n,&m);
  
long long int a[n],b[n],c[m],d[m],max[n],ans[n],temp;
  for(i=0;i<n;++i)
  {scanf("%lld %lld",&a[i],&b[i]);}
  
  for(i=0;i<m;++i)
  {scanf("%lld %lld",&c[i],&d[i]);}

  for(i=0;i<n;++i)
  {
  max[i]=abs(a[i]-c[0])+abs(b[i]-d[0]);
    ans[i]=1;
    for(j=1;j<m;j++) {
     temp=abs(a[i]-c[j])+abs(b[i]-d[j]);
    if(temp<max[i]) {max[i]=temp;
                    ans[i]=j+1;
                    }
    }
  printf("%lld\n",ans[i]);
  }
  
return 0;
}
3 4
10 10
-10 -10
3 3
1 2
2 3
3 5
3 10
 2 2
2 0
0 0
-1 -1
1 0
 3 4
10 10
-10 -10
3 3
1 4
2 3
3 5
3 5
 2 2
2 0
0 -1
-1 0
1 0
 5 5
-100000000 -100000000
-100000000 100000000
100000000 -100000000
100000000 100000000
0 0
0 0
100000000 100000000
100000000 -100000000
-100000000 100000000
-100000000 -20979428
 2 2
2 0
0 -1
0 0
1 1
 3 4
10 10
-10 -10
3 4
0 4
2 3
3 9
3 5
 3 1
10 10
-10 -10
5 6
0 4
2 3
3 9
3 5
 5 5
-136146578 -100000000
-100000000 100000000
100010000 -44291970
000001000 100010000
0 3
0 0
100000000 100000000
100000001 -100000000
-8995723 100000000
-100000000 -9510226
 5 5
-78895993 -100000000
-100000000 100000000
100010000 -44291970
000001000 000010000
0 3
0 0
100000000 100000000
100000001 -110988549
-8995723 100000000
-100000000 -15120325

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

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<stdlib.h>
int main()
{
long long int n,m,i,j;
  scanf("%lld %lld",&n,&m);
  
long long int a[n],b[n],c[m],d[m],max[n],ans[n],temp;
  for(i=0;i<n;++i)
  {scanf("%lld %lld",&a[i],&b[i]);}
  
  for(i=0;i<m;++i)
  {scanf("%lld %lld",&c[i],&d[i]);}

  for(i=0;i<n;++i)
  {
  max[i]=abs(a[i]-c[0])+abs(b[i]-d[0]);
    ans[i]=1;
    for(j=1;j<m;j++) {
     temp=abs(a[i]-c[j])+abs(b[i]-d[j]);
    if(temp<max[i]) {max[i]=temp;
                    ans[i]=j+1;
                    }
    }
  printf("%lld\n",ans[i]);
  }
  
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-184(%rbp), %rdx
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -160(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -152(%rbp)
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -144(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -136(%rbp)
	movq	-184(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L8:
	cmpq	%rcx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L10
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-184(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -112(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -176(%rbp)
	jmp	.L20
.L21:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-136(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-152(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L20:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L21
	movq	$0, -176(%rbp)
	jmp	.L22
.L23:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L22:
	movq	-184(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L23
	movq	$0, -176(%rbp)
	jmp	.L24
.L28:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-104(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	$1, (%rax,%rdx,8)
	movq	$1, -168(%rbp)
	jmp	.L25
.L27:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %ecx
	movq	-120(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %esi
	movq	-104(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	cltq
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -64(%rbp)
	jge	.L26
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	-64(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
.L26:
	addq	$1, -168(%rbp)
.L25:
	movq	-184(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L27
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -176(%rbp)
.L24:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-184(%rbp), %rdx
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -160(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -152(%rbp)
	movq	-192(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -144(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -136(%rbp)
	movq	-184(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L8:
	cmpq	%rcx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L10
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-184(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -112(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-192(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -176(%rbp)
	jmp	.L20
.L21:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-136(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-152(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L20:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L21
	movq	$0, -176(%rbp)
	jmp	.L22
.L23:
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	addq	%rax, %rdx
	movq	-176(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -176(%rbp)
.L22:
	movq	-184(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L23
	movq	$0, -176(%rbp)
	jmp	.L24
.L28:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movq	-104(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	$1, (%rax,%rdx,8)
	movq	$1, -168(%rbp)
	jmp	.L25
.L27:
	movq	-152(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %ecx
	movq	-120(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movq	-136(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %esi
	movq	-104(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	cltq
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -64(%rbp)
	jge	.L26
	movq	-88(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	-64(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
.L26:
	addq	$1, -168(%rbp)
.L25:
	movq	-184(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L27
	movq	-72(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -176(%rbp)
.L24:
	movq	-192(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
