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()
{
	int i, N, M, a[51], b[51], c[51], d[51];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= N; i++) scanf("%d %d", &(a[i]), &(b[i]));
	for (i = 1; i <= M; i++) scanf("%d %d", &(c[i]), &(d[i]));
	
	int j, min, argmin[51];
	for (i = 1; i <= N; i++) {
		min = 1 << 30;
		for (j = 1; j <= M; j++) {
			if (abs(a[i] - c[j]) + abs(b[i] - d[j]) < min) {
				min = abs(a[i] - c[j]) + abs(b[i] - d[j]);
				argmin[i] = j;
			}
		}
	}
	
	for (i = 1; i <= N; i++) printf("%d\n", argmin[i]);
	fflush(stdout);
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	16(%rsp), %r12
	leaq	224(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	0(%r13,%rbx), %rdx
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 8(%rsp)
	jge	.L2
.L5:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	movl	$4, %r12d
	movl	$1, %r13d
	leaq	640(%rsp), %rbx
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12), %rdx
	leaq	0(%rbp,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	testl	%eax, %eax
	jle	.L7
	leal	1(%rdx), %r14d
	leaq	852(%rsp), %r10
	movl	$1, %r11d
	leaq	224(%rsp), %r13
	leaq	16(%rsp), %r12
	leal	1(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12,%r11,4), %r8d
	movl	0(%r13,%r11,4), %edi
	movl	$1, %edx
	movl	$1073741824, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %ecx
	subl	0(%rbp,%rdx,4), %ecx
	movl	%edi, %r15d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%rbx,%rdx,4), %r15d
	movl	%r15d, %ecx
	negl	%ecx
	cmovs	%r15d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L9
	movl	%edx, (%r10)
	movl	%eax, %esi
.L9:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L10
	addq	$1, %r11
	addq	$4, %r10
	cmpq	%r11, %r14
	jne	.L8
.L7:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L11
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$1080, %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
.L23:
	.cfi_restore_state
	cmpl	$0, 8(%rsp)
	jg	.L7
	jmp	.L6
.L24:
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	16(%rsp), %r12
	leaq	224(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	0(%r13,%rbx), %rdx
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 8(%rsp)
	jge	.L2
.L5:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	movl	$4, %r12d
	movl	$1, %r13d
	leaq	640(%rsp), %rbx
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12), %rdx
	leaq	0(%rbp,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	testl	%eax, %eax
	jle	.L7
	leal	1(%rdx), %r14d
	leaq	852(%rsp), %r10
	movl	$1, %r11d
	leaq	224(%rsp), %r13
	leaq	16(%rsp), %r12
	leal	1(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12,%r11,4), %r8d
	movl	0(%r13,%r11,4), %edi
	movl	$1, %edx
	movl	$1073741824, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %ecx
	subl	0(%rbp,%rdx,4), %ecx
	movl	%edi, %r15d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%rbx,%rdx,4), %r15d
	movl	%r15d, %ecx
	negl	%ecx
	cmovs	%r15d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L9
	movl	%edx, (%r10)
	movl	%eax, %esi
.L9:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L10
	addq	$1, %r11
	addq	$4, %r10
	cmpq	%r11, %r14
	jne	.L8
.L7:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L11
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$1080, %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
.L23:
	.cfi_restore_state
	cmpl	$0, 8(%rsp)
	jg	.L7
	jmp	.L6
.L24:
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	16(%rsp), %r12
	leaq	224(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	0(%r13,%rbx), %rdx
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 8(%rsp)
	jge	.L2
.L5:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	movl	$4, %r12d
	movl	$1, %r13d
	leaq	640(%rsp), %rbx
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12), %rdx
	leaq	0(%rbp,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	testl	%eax, %eax
	jle	.L7
	leal	1(%rdx), %r14d
	leaq	852(%rsp), %r10
	movl	$1, %r11d
	leaq	224(%rsp), %r13
	leaq	16(%rsp), %r12
	leal	1(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12,%r11,4), %r8d
	movl	0(%r13,%r11,4), %edi
	movl	$1, %edx
	movl	$1073741824, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %ecx
	subl	0(%rbp,%rdx,4), %ecx
	movl	%edi, %r15d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%rbx,%rdx,4), %r15d
	movl	%r15d, %ecx
	negl	%ecx
	cmovs	%r15d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L9
	movl	%edx, (%r10)
	movl	%eax, %esi
.L9:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L10
	addq	$1, %r11
	addq	$4, %r10
	cmpq	%r11, %r14
	jne	.L8
.L7:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L11
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$1080, %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
.L23:
	.cfi_restore_state
	cmpl	$0, 8(%rsp)
	jg	.L7
	jmp	.L6
.L24:
	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()
{
	int i, N, M, a[51], b[51], c[51], d[51];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= N; i++) scanf("%d %d", &(a[i]), &(b[i]));
	for (i = 1; i <= M; i++) scanf("%d %d", &(c[i]), &(d[i]));
	
	int j, min, argmin[51];
	for (i = 1; i <= N; i++) {
		min = 1 << 30;
		for (j = 1; j <= M; j++) {
			if (abs(a[i] - c[j]) + abs(b[i] - d[j]) < min) {
				min = abs(a[i] - c[j]) + abs(b[i] - d[j]);
				argmin[i] = j;
			}
		}
	}
	
	for (i = 1; i <= N; i++) printf("%d\n", argmin[i]);
	fflush(stdout);
	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()
{
	int i, N, M, a[51], b[51], c[51], d[51];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= N; i++) scanf("%d %d", &(a[i]), &(b[i]));
	for (i = 1; i <= M; i++) scanf("%d %d", &(c[i]), &(d[i]));
	
	int j, min, argmin[51];
	for (i = 1; i <= N; i++) {
		min = 1 << 30;
		for (j = 1; j <= M; j++) {
			if (abs(a[i] - c[j]) + abs(b[i] - d[j]) < min) {
				min = abs(a[i] - c[j]) + abs(b[i] - d[j]);
				argmin[i] = j;
			}
		}
	}
	
	for (i = 1; i <= N; i++) printf("%d\n", argmin[i]);
	fflush(stdout);
	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()
{
	int i, N, M, a[51], b[51], c[51], d[51];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= N; i++) scanf("%d %d", &(a[i]), &(b[i]));
	for (i = 1; i <= M; i++) scanf("%d %d", &(c[i]), &(d[i]));
	
	int j, min, argmin[51];
	for (i = 1; i <= N; i++) {
		min = 1 << 30;
		for (j = 1; j <= M; j++) {
			if (abs(a[i] - c[j]) + abs(b[i] - d[j]) < min) {
				min = abs(a[i] - c[j]) + abs(b[i] - d[j]);
				argmin[i] = j;
			}
		}
	}
	
	for (i = 1; i <= N; i++) printf("%d\n", argmin[i]);
	fflush(stdout);
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	16(%rsp), %r12
	leaq	224(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	0(%r13,%rbx), %rdx
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 8(%rsp)
	jge	.L2
.L5:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	movl	$4, %r12d
	movl	$1, %r13d
	leaq	640(%rsp), %rbx
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12), %rdx
	leaq	0(%rbp,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	testl	%eax, %eax
	jle	.L7
	leal	1(%rdx), %r14d
	leaq	852(%rsp), %r10
	movl	$1, %r11d
	leaq	224(%rsp), %r13
	leaq	16(%rsp), %r12
	leal	1(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12,%r11,4), %r8d
	movl	0(%r13,%r11,4), %edi
	movl	$1, %edx
	movl	$1073741824, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %ecx
	subl	0(%rbp,%rdx,4), %ecx
	movl	%edi, %r15d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%rbx,%rdx,4), %r15d
	movl	%r15d, %ecx
	negl	%ecx
	cmovs	%r15d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L9
	movl	%edx, (%r10)
	movl	%eax, %esi
.L9:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L10
	addq	$1, %r11
	addq	$4, %r10
	cmpq	%r11, %r14
	jne	.L8
.L7:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L11
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$1080, %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
.L23:
	.cfi_restore_state
	cmpl	$0, 8(%rsp)
	jg	.L7
	jmp	.L6
.L24:
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	16(%rsp), %r12
	leaq	224(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	0(%r13,%rbx), %rdx
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 8(%rsp)
	jge	.L2
.L5:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	movl	$4, %r12d
	movl	$1, %r13d
	leaq	640(%rsp), %rbx
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12), %rdx
	leaq	0(%rbp,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %r12
	cmpl	%r13d, %eax
	jge	.L3
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	testl	%eax, %eax
	jle	.L7
	leal	1(%rdx), %r14d
	leaq	852(%rsp), %r10
	movl	$1, %r11d
	leaq	224(%rsp), %r13
	leaq	16(%rsp), %r12
	leal	1(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r12,%r11,4), %r8d
	movl	0(%r13,%r11,4), %edi
	movl	$1, %edx
	movl	$1073741824, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %ecx
	subl	0(%rbp,%rdx,4), %ecx
	movl	%edi, %r15d
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	subl	(%rbx,%rdx,4), %r15d
	movl	%r15d, %ecx
	negl	%ecx
	cmovs	%r15d, %ecx
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jge	.L9
	movl	%edx, (%r10)
	movl	%eax, %esi
.L9:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L10
	addq	$1, %r11
	addq	$4, %r10
	cmpq	%r11, %r14
	jne	.L8
.L7:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L11
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$1080, %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
.L23:
	.cfi_restore_state
	cmpl	$0, 8(%rsp)
	jg	.L7
	jmp	.L6
.L24:
	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:
```