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>
#include <string.h>
#include <limits.h>

int main() {

    int n, m, a, b, c, d;
    scanf("%d %d", &n, &m);

    int student[n][2];
    int point[m][2];

    for (int i = 0; i < n; i++) {
        scanf("%d %d", &a, &b);
        student[i][0] = a;
        student[i][1] = b;
    }

    for (int j = 0; j < m; j++) {
        scanf("%d %d", &c, &d);
        point[j][0] = c;
        point[j][1] = d;
    }


    for (int k = 0; k < n; k++) {
        int mysum = INT_MAX;
        int checkpoint = -1;

        for (int l = 0; l < m; l++) {
            //printf("%d %d %d %d\n", student[k][0], student[k][1], point[l][0], point[l][1]);
            int temp = abs(student[k][0] - point[l][0]) + abs(student[k][1] - point[l][1]);
            //printf("temp=%d %d\n",temp,checkpoint);
            if (temp < mysum) {
                mysum = temp;
                checkpoint = l + 1;
            }

        }
        printf("%d\n", checkpoint);


    }

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\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	$136, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	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
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L8
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-128(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -116(%rbp)
.L8:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L9
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -112(%rbp)
.L10:
	movl	-136(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	$0, -108(%rbp)
	jmp	.L12
.L16:
	movl	$2147483647, -104(%rbp)
	movl	$-1, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jge	.L14
	movl	-92(%rbp), %eax
	movl	%eax, -104(%rbp)
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-136(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	-100(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -108(%rbp)
.L12:
	movl	-140(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L16
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	-76(%rbp), %rdx
	leaq	-80(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$56, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-80(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L35:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L35
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L36
.L4:
	movslq	-76(%rbp), %rdx
	movq	%rsp, %rdi
	movq	%rsp, %rbx
	movq	%rdx, %rax
	leaq	15(,%rdx,8), %rdx
	movq	%rdx, %rsi
	andq	$-4096, %rdx
	andq	$-16, %rsi
	subq	%rdx, %rdi
.L5:
	cmpq	%rdi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L36:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L37
.L7:
	movq	%rsp, %r13
	testl	%ecx, %ecx
	jle	.L11
	leaq	-72(%rbp), %rax
	xorl	%r14d, %r14d
	leaq	-68(%rbp), %r15
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	-88(%rbp), %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	-72(%rbp), %xmm0
	movd	-68(%rbp), %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rbx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, -80(%rbp)
	jg	.L8
	movl	-76(%rbp), %eax
.L11:
	leaq	-64(%rbp), %rdi
	xorl	%r14d, %r14d
	leaq	-60(%rbp), %r15
	movq	%rdi, -88(%rbp)
	testl	%eax, %eax
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	-88(%rbp), %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	-64(%rbp), %xmm0
	movd	-60(%rbp), %xmm2
	movl	-76(%rbp), %eax
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, 0(%r13,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L9
.L10:
	movl	-80(%rbp), %edx
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r12
	testl	%edx, %edx
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	movl	$-1, %r10d
	testl	%eax, %eax
	jle	.L17
	movl	(%rbx,%r14,8), %r9d
	movl	4(%rbx,%r14,8), %r8d
	leal	1(%rax), %edi
	movl	$1, %edx
	movl	$-1, %r10d
	movl	$2147483647, %esi
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, %ecx
	subl	-4(%r13,%rdx,8), %ecx
	movl	%r9d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	-8(%r13,%rdx,8), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L14
	movl	%edx, %r10d
	movl	%eax, %esi
.L14:
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	jne	.L15
.L17:
	movl	%r10d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r14
	cmpl	%r14d, -80(%rbp)
	jle	.L13
	movl	-76(%rbp), %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	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
.L37:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rsi)
	jmp	.L7
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	-76(%rbp), %rdx
	leaq	-80(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$56, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-80(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L35:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L35
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L36
.L4:
	movslq	-76(%rbp), %rdx
	movq	%rsp, %rdi
	movq	%rsp, %rbx
	movq	%rdx, %rax
	leaq	15(,%rdx,8), %rdx
	movq	%rdx, %rsi
	andq	$-4096, %rdx
	andq	$-16, %rsi
	subq	%rdx, %rdi
.L5:
	cmpq	%rdi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L36:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L37
.L7:
	movq	%rsp, %r13
	testl	%ecx, %ecx
	jle	.L11
	leaq	-72(%rbp), %rax
	xorl	%r14d, %r14d
	leaq	-68(%rbp), %r15
	movq	%rax, -88(%rbp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	-88(%rbp), %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	-72(%rbp), %xmm0
	movd	-68(%rbp), %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rbx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, -80(%rbp)
	jg	.L8
	movl	-76(%rbp), %eax
.L11:
	leaq	-64(%rbp), %rdi
	xorl	%r14d, %r14d
	leaq	-60(%rbp), %r15
	movq	%rdi, -88(%rbp)
	testl	%eax, %eax
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	-88(%rbp), %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	-64(%rbp), %xmm0
	movd	-60(%rbp), %xmm2
	movl	-76(%rbp), %eax
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, 0(%r13,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L9
.L10:
	movl	-80(%rbp), %edx
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r12
	testl	%edx, %edx
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	movl	$-1, %r10d
	testl	%eax, %eax
	jle	.L17
	movl	(%rbx,%r14,8), %r9d
	movl	4(%rbx,%r14,8), %r8d
	leal	1(%rax), %edi
	movl	$1, %edx
	movl	$-1, %r10d
	movl	$2147483647, %esi
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, %ecx
	subl	-4(%r13,%rdx,8), %ecx
	movl	%r9d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	-8(%r13,%rdx,8), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L14
	movl	%edx, %r10d
	movl	%eax, %esi
.L14:
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	jne	.L15
.L17:
	movl	%r10d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r14
	cmpl	%r14d, -80(%rbp)
	jle	.L13
	movl	-76(%rbp), %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	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
.L37:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rsi)
	jmp	.L7
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include <string.h>
#include <limits.h>

int main() {

    int n, m, a, b, c, d;
    scanf("%d %d", &n, &m);

    int student[n][2];
    int point[m][2];

    for (int i = 0; i < n; i++) {
        scanf("%d %d", &a, &b);
        student[i][0] = a;
        student[i][1] = b;
    }

    for (int j = 0; j < m; j++) {
        scanf("%d %d", &c, &d);
        point[j][0] = c;
        point[j][1] = d;
    }


    for (int k = 0; k < n; k++) {
        int mysum = INT_MAX;
        int checkpoint = -1;

        for (int l = 0; l < m; l++) {
            //printf("%d %d %d %d\n", student[k][0], student[k][1], point[l][0], point[l][1]);
            int temp = abs(student[k][0] - point[l][0]) + abs(student[k][1] - point[l][1]);
            //printf("temp=%d %d\n",temp,checkpoint);
            if (temp < mysum) {
                mysum = temp;
                checkpoint = l + 1;
            }

        }
        printf("%d\n", checkpoint);


    }

    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>
#include <string.h>
#include <limits.h>

int main() {

    int n, m, a, b, c, d;
    scanf("%d %d", &n, &m);

    int student[n][2];
    int point[m][2];

    for (int i = 0; i < n; i++) {
        scanf("%d %d", &a, &b);
        student[i][0] = a;
        student[i][1] = b;
    }

    for (int j = 0; j < m; j++) {
        scanf("%d %d", &c, &d);
        point[j][0] = c;
        point[j][1] = d;
    }


    for (int k = 0; k < n; k++) {
        int mysum = INT_MAX;
        int checkpoint = -1;

        for (int l = 0; l < m; l++) {
            //printf("%d %d %d %d\n", student[k][0], student[k][1], point[l][0], point[l][1]);
            int temp = abs(student[k][0] - point[l][0]) + abs(student[k][1] - point[l][1]);
            //printf("temp=%d %d\n",temp,checkpoint);
            if (temp < mysum) {
                mysum = temp;
                checkpoint = l + 1;
            }

        }
        printf("%d\n", checkpoint);


    }

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\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	$136, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	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
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L8
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-128(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -116(%rbp)
.L8:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L9
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -112(%rbp)
.L10:
	movl	-136(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	$0, -108(%rbp)
	jmp	.L12
.L16:
	movl	$2147483647, -104(%rbp)
	movl	$-1, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jge	.L14
	movl	-92(%rbp), %eax
	movl	%eax, -104(%rbp)
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-136(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	-100(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -108(%rbp)
.L12:
	movl	-140(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L16
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"%d %d"
.LC1:
	.string	"%d\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	$136, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	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
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L8
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-128(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -116(%rbp)
.L8:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L9
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
	movl	-120(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
	addl	$1, -112(%rbp)
.L10:
	movl	-136(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	$0, -108(%rbp)
	jmp	.L12
.L16:
	movl	$2147483647, -104(%rbp)
	movl	$-1, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %ecx
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jge	.L14
	movl	-92(%rbp), %eax
	movl	%eax, -104(%rbp)
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-136(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	-100(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -108(%rbp)
.L12:
	movl	-140(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L16
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
