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

```c
#include <stdio.h>
#include <stdlib.h>
int main(void){
    int n, m;
    int a[50+5], b[50+5];
    int c[50+5], d[50+5];
    scanf("%d %d", &n, &m);
    for(int i=0; i<n; i++)scanf("%d %d", &a[i], &b[i]);
    for(int i=0; i<m; i++)scanf("%d %d", &c[i], &d[i]);
    
    for(int i=0; i<n; i++){
        int min=200000001;
        int mini;
        for(int j=0; j<m; j++){
            int l=abs(a[i]-c[j])+abs(b[i]-d[j]);
            if(min>l){
                min=l;
                mini=j;
            }
        }
        printf("%d\n", mini+1);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$928, %rsp
	.cfi_def_cfa_offset 976
	movq	%fs:40, %rax
	movq	%rax, 920(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	240(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r14,%rbp,4), %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, 8(%rsp)
	jg	.L5
.L6:
	movslq	12(%rsp), %rsi
	leaq	464(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	688(%rsp), %r12
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$1, %rbp
	addq	$4, %r14
	cmpl	%ebp, %esi
	jg	.L7
.L4:
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%esi, %esi
	jle	.L13
	movl	16(%rsp,%r13,4), %r10d
	movl	240(%rsp,%r13,4), %r9d
	xorl	%edx, %edx
	movl	$200000001, %edi
	leaq	464(%rsp), %r8
	leaq	688(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %ecx
	subl	(%r12,%rdx,4), %ecx
	movl	%r10d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r8,%rdx,4), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L10
	movl	%edx, %ebx
	movl	%eax, %edi
.L10:
	addq	$1, %rdx
	cmpq	%rdx, %rsi
	jne	.L11
.L13:
	leal	1(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r13
	cmpl	%r13d, 8(%rsp)
	jle	.L9
	movslq	12(%rsp), %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$928, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$928, %rsp
	.cfi_def_cfa_offset 976
	movq	%fs:40, %rax
	movq	%rax, 920(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	240(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r14,%rbp,4), %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, 8(%rsp)
	jg	.L5
.L6:
	movslq	12(%rsp), %rsi
	leaq	464(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	688(%rsp), %r12
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$1, %rbp
	addq	$4, %r14
	cmpl	%ebp, %esi
	jg	.L7
.L4:
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%esi, %esi
	jle	.L13
	movl	16(%rsp,%r13,4), %r10d
	movl	240(%rsp,%r13,4), %r9d
	xorl	%edx, %edx
	movl	$200000001, %edi
	leaq	464(%rsp), %r8
	leaq	688(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %ecx
	subl	(%r12,%rdx,4), %ecx
	movl	%r10d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r8,%rdx,4), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L10
	movl	%edx, %ebx
	movl	%eax, %edi
.L10:
	addq	$1, %rdx
	cmpq	%rdx, %rsi
	jne	.L11
.L13:
	leal	1(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r13
	cmpl	%r13d, 8(%rsp)
	jle	.L9
	movslq	12(%rsp), %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$928, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.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
```assembly
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$928, %rsp
	.cfi_def_cfa_offset 976
	movq	%fs:40, %rax
	movq	%rax, 920(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	240(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r14,%rbp,4), %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, 8(%rsp)
	jg	.L5
.L6:
	movslq	12(%rsp), %rsi
	leaq	464(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	688(%rsp), %r12
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$1, %rbp
	addq	$4, %r14
	cmpl	%ebp, %esi
	jg	.L7
.L4:
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%esi, %esi
	jle	.L13
	movl	16(%rsp,%r13,4), %r10d
	movl	240(%rsp,%r13,4), %r9d
	xorl	%edx, %edx
	movl	$200000001, %edi
	leaq	464(%rsp), %r8
	leaq	688(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %ecx
	subl	(%r12,%rdx,4), %ecx
	movl	%r10d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r8,%rdx,4), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L10
	movl	%edx, %ebx
	movl	%eax, %edi
.L10:
	addq	$1, %rdx
	cmpq	%rdx, %rsi
	jne	.L11
.L13:
	leal	1(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r13
	cmpl	%r13d, 8(%rsp)
	jle	.L9
	movslq	12(%rsp), %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$928, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
int main(void){
    int n, m;
    int a[50+5], b[50+5];
    int c[50+5], d[50+5];
    scanf("%d %d", &n, &m);
    for(int i=0; i<n; i++)scanf("%d %d", &a[i], &b[i]);
    for(int i=0; i<m; i++)scanf("%d %d", &c[i], &d[i]);
    
    for(int i=0; i<n; i++){
        int min=200000001;
        int mini;
        for(int j=0; j<m; j++){
            int l=abs(a[i]-c[j])+abs(b[i]-d[j]);
            if(min>l){
                min=l;
                mini=j;
            }
        }
        printf("%d\n", mini+1);
    }
    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
int main(void){
    int n, m;
    int a[50+5], b[50+5];
    int c[50+5], d[50+5];
    scanf("%d %d", &n, &m);
    for(int i=0; i<n; i++)scanf("%d %d", &a[i], &b[i]);
    for(int i=0; i<m; i++)scanf("%d %d", &c[i], &d[i]);
    
    for(int i=0; i<n; i++){
        int min=200000001;
        int mini;
        for(int j=0; j<m; j++){
            int l=abs(a[i]-c[j])+abs(b[i]-d[j]);
            if(min>l){
                min=l;
                mini=j;
            }
        }
        printf("%d\n", mini+1);
    }
    return 0;
}
```

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.
Optimized Assembly Code:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
int main(void){
    int n, m;
    int a[50+5], b[50+5];
    int c[50+5], d[50+5];
    scanf("%d %d", &n, &m);
    for(int i=0; i<n; i++)scanf("%d %d", &a[i], &b[i]);
    for(int i=0; i<m; i++)scanf("%d %d", &c[i], &d[i]);
    
    for(int i=0; i<n; i++){
        int min=200000001;
        int mini;
        for(int j=0; j<m; j++){
            int l=abs(a[i]-c[j])+abs(b[i]-d[j]);
            if(min>l){
                min=l;
                mini=j;
            }
        }
        printf("%d\n", mini+1);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$928, %rsp
	.cfi_def_cfa_offset 976
	movq	%fs:40, %rax
	movq	%rax, 920(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	240(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r14,%rbp,4), %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, 8(%rsp)
	jg	.L5
.L6:
	movslq	12(%rsp), %rsi
	leaq	464(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	688(%rsp), %r12
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$1, %rbp
	addq	$4, %r14
	cmpl	%ebp, %esi
	jg	.L7
.L4:
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%esi, %esi
	jle	.L13
	movl	16(%rsp,%r13,4), %r10d
	movl	240(%rsp,%r13,4), %r9d
	xorl	%edx, %edx
	movl	$200000001, %edi
	leaq	464(%rsp), %r8
	leaq	688(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %ecx
	subl	(%r12,%rdx,4), %ecx
	movl	%r10d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r8,%rdx,4), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L10
	movl	%edx, %ebx
	movl	%eax, %edi
.L10:
	addq	$1, %rdx
	cmpq	%rdx, %rsi
	jne	.L11
.L13:
	leal	1(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r13
	cmpl	%r13d, 8(%rsp)
	jle	.L9
	movslq	12(%rsp), %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$928, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$928, %rsp
	.cfi_def_cfa_offset 976
	movq	%fs:40, %rax
	movq	%rax, 920(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	240(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r14,%rbp,4), %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, 8(%rsp)
	jg	.L5
.L6:
	movslq	12(%rsp), %rsi
	leaq	464(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	688(%rsp), %r12
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$1, %rbp
	addq	$4, %r14
	cmpl	%ebp, %esi
	jg	.L7
.L4:
	movl	8(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%esi, %esi
	jle	.L13
	movl	16(%rsp,%r13,4), %r10d
	movl	240(%rsp,%r13,4), %r9d
	xorl	%edx, %edx
	movl	$200000001, %edi
	leaq	464(%rsp), %r8
	leaq	688(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %ecx
	subl	(%r12,%rdx,4), %ecx
	movl	%r10d, %r11d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%r8,%rdx,4), %r11d
	movl	%r11d, %ecx
	negl	%ecx
	cmovs	%r11d, %ecx
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L10
	movl	%edx, %ebx
	movl	%eax, %edi
.L10:
	addq	$1, %rdx
	cmpq	%rdx, %rsi
	jne	.L11
.L13:
	leal	1(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %r13
	cmpl	%r13d, 8(%rsp)
	jle	.L9
	movslq	12(%rsp), %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movq	920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$928, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.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:
```