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>
int main(void){
	int m,n,i,j,k,sx,sy;
	int mx[200],my[200];
	int nx[1000],ny[1000];

	while(1){
		scanf("%d",&m);
		if(!m)break;
		for(i=0;i<m;i++){
			scanf("%d%d",&mx[i],&my[i]);
		}
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d%d",&nx[i],&ny[i]);
		}
		for(i=0;i<n;i++){
			sx=nx[i]-mx[0];
			sy=ny[i]-my[0];
			for(j=1;j<m;j++){
				for(k=0;k<n;k++){
					if(mx[j]+sx==nx[k] && my[j]+sy==ny[k]){
						break;
					}
				}
				if(k==n)break;
			}
			if(j==m){
				printf("%d %d\n",sx,sy);
				break;
			}
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1456, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-9644(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-9644(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	$0, -9636(%rbp)
	jmp	.L4
.L5:
	leaq	-8816(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-9616(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L4:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L5
	leaq	-9640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -9636(%rbp)
	jmp	.L6
.L7:
	leaq	-4016(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L6:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L7
	movl	$0, -9636(%rbp)
	jmp	.L8
.L19:
	movl	-9636(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	-9616(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9624(%rbp)
	movl	-9636(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	movl	-8816(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9620(%rbp)
	movl	$1, -9632(%rbp)
	jmp	.L9
.L16:
	movl	$0, -9628(%rbp)
	jmp	.L10
.L13:
	movl	-9632(%rbp), %eax
	cltq
	movl	-9616(%rbp,%rax,4), %edx
	movl	-9624(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-9632(%rbp), %eax
	cltq
	movl	-8816(%rbp,%rax,4), %edx
	movl	-9620(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L25
.L11:
	addl	$1, -9628(%rbp)
.L10:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	jl	.L13
	jmp	.L12
.L25:
	nop
.L12:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	je	.L26
	addl	$1, -9632(%rbp)
.L9:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jl	.L16
	jmp	.L15
.L26:
	nop
.L15:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jne	.L17
	movl	-9620(%rbp), %edx
	movl	-9624(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	addl	$1, -9636(%rbp)
.L8:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L19
.L18:
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1480, %rsp
	.cfi_def_cfa_offset 9728
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 9656(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
.L16:
	leaq	48(%rsp), %r12
.L2:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L3
	movq	%r12, %rbp
	movl	$0, %ebx
	leaq	848(%rsp), %r13
	jle	.L8
.L7:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 40(%rsp)
	jg	.L7
.L8:
	leaq	44(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	1648(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	5648(%rsp), %rbp
	movq	%rbx, %r14
.L9:
	leaq	0(%rbp,%r13,4), %rdx
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %r9d
	addq	$1, %r13
	addq	$4, %r14
	cmpl	%r13d, %r9d
	jg	.L9
	testl	%r9d, %r9d
	jle	.L2
	movl	48(%rsp), %eax
	movl	%r9d, %edi
	xorl	%r11d, %r11d
	leal	1(%r9), %esi
	movq	%rdi, 16(%rsp)
	movl	%eax, 8(%rsp)
	movl	848(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	40(%rsp), %eax
	movl	%eax, 4(%rsp)
	leal	1(%rax), %r10d
.L17:
	movl	(%rbx,%r11,4), %r13d
	movl	0(%rbp,%r11,4), %r14d
	subl	8(%rsp), %r13d
	subl	12(%rsp), %r14d
	cmpl	$1, 4(%rsp)
	jle	.L19
	leaq	852(%rsp), %rdi
	movl	$2, %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	-4(%r12,%r8,4), %edx
	movl	$1, %eax
	addl	%r13d, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%eax, %ecx
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L30
.L14:
	cmpl	-4(%rbx,%rax,4), %edx
	jne	.L12
	movl	(%rdi), %ecx
	addl	%r14d, %ecx
	cmpl	-4(%rbp,%rax,4), %ecx
	jne	.L12
	movl	%r8d, %eax
	addq	$1, %r8
	addq	$4, %rdi
	cmpq	%r8, %r10
	jne	.L11
.L10:
	cmpl	%eax, 4(%rsp)
	je	.L31
.L15:
	addq	$1, %r11
	cmpq	16(%rsp), %r11
	jne	.L17
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%ecx, %r9d
	je	.L15
	movl	%r8d, %eax
	addq	$1, %r8
	addq	$4, %rdi
	cmpq	%r8, %r10
	jne	.L11
	jmp	.L10
.L19:
	movl	$1, %eax
	cmpl	%eax, 4(%rsp)
	jne	.L15
.L31:
	movl	%r14d, %ecx
	movl	%r13d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L16
.L3:
	movq	9656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$9672, %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
.L32:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1480, %rsp
	.cfi_def_cfa_offset 9728
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 9656(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
.L16:
	leaq	48(%rsp), %r12
.L2:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L3
	movq	%r12, %rbp
	movl	$0, %ebx
	leaq	848(%rsp), %r13
	jle	.L8
.L7:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, 40(%rsp)
	jg	.L7
.L8:
	leaq	44(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	1648(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	5648(%rsp), %rbp
	movq	%rbx, %r14
.L9:
	leaq	0(%rbp,%r13,4), %rdx
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %r9d
	addq	$1, %r13
	addq	$4, %r14
	cmpl	%r13d, %r9d
	jg	.L9
	testl	%r9d, %r9d
	jle	.L2
	movl	48(%rsp), %eax
	movl	%r9d, %edi
	xorl	%r11d, %r11d
	leal	1(%r9), %esi
	movq	%rdi, 16(%rsp)
	movl	%eax, 8(%rsp)
	movl	848(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	40(%rsp), %eax
	movl	%eax, 4(%rsp)
	leal	1(%rax), %r10d
.L17:
	movl	(%rbx,%r11,4), %r13d
	movl	0(%rbp,%r11,4), %r14d
	subl	8(%rsp), %r13d
	subl	12(%rsp), %r14d
	cmpl	$1, 4(%rsp)
	jle	.L19
	leaq	852(%rsp), %rdi
	movl	$2, %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	-4(%r12,%r8,4), %edx
	movl	$1, %eax
	addl	%r13d, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%eax, %ecx
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L30
.L14:
	cmpl	-4(%rbx,%rax,4), %edx
	jne	.L12
	movl	(%rdi), %ecx
	addl	%r14d, %ecx
	cmpl	-4(%rbp,%rax,4), %ecx
	jne	.L12
	movl	%r8d, %eax
	addq	$1, %r8
	addq	$4, %rdi
	cmpq	%r8, %r10
	jne	.L11
.L10:
	cmpl	%eax, 4(%rsp)
	je	.L31
.L15:
	addq	$1, %r11
	cmpq	16(%rsp), %r11
	jne	.L17
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%ecx, %r9d
	je	.L15
	movl	%r8d, %eax
	addq	$1, %r8
	addq	$4, %rdi
	cmpq	%r8, %r10
	jne	.L11
	jmp	.L10
.L19:
	movl	$1, %eax
	cmpl	%eax, 4(%rsp)
	jne	.L15
.L31:
	movl	%r14d, %ecx
	movl	%r13d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L16
.L3:
	movq	9656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$9672, %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
.L32:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>
int main(void){
	int m,n,i,j,k,sx,sy;
	int mx[200],my[200];
	int nx[1000],ny[1000];

	while(1){
		scanf("%d",&m);
		if(!m)break;
		for(i=0;i<m;i++){
			scanf("%d%d",&mx[i],&my[i]);
		}
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d%d",&nx[i],&ny[i]);
		}
		for(i=0;i<n;i++){
			sx=nx[i]-mx[0];
			sy=ny[i]-my[0];
			for(j=1;j<m;j++){
				for(k=0;k<n;k++){
					if(mx[j]+sx==nx[k] && my[j]+sy==ny[k]){
						break;
					}
				}
				if(k==n)break;
			}
			if(j==m){
				printf("%d %d\n",sx,sy);
				break;
			}
		}
	}
	return 0;
}
5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
9 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
919396 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
9 7
8 10
10 2
1 2
8 1
6 7
6 0
0 0
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
1244032 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
1244032 646221
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 8
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 499
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
8 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0

-384281 179674
 2 -3
 2 -3
-384281 179674
 -384281 179674
 -384281 179674
 -384281 179674
 -384281 179674
 -384281 179674
 -384281 179674
 -384281 179674

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>
int main(void){
	int m,n,i,j,k,sx,sy;
	int mx[200],my[200];
	int nx[1000],ny[1000];

	while(1){
		scanf("%d",&m);
		if(!m)break;
		for(i=0;i<m;i++){
			scanf("%d%d",&mx[i],&my[i]);
		}
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d%d",&nx[i],&ny[i]);
		}
		for(i=0;i<n;i++){
			sx=nx[i]-mx[0];
			sy=ny[i]-my[0];
			for(j=1;j<m;j++){
				for(k=0;k<n;k++){
					if(mx[j]+sx==nx[k] && my[j]+sy==ny[k]){
						break;
					}
				}
				if(k==n)break;
			}
			if(j==m){
				printf("%d %d\n",sx,sy);
				break;
			}
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1456, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-9644(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-9644(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	$0, -9636(%rbp)
	jmp	.L4
.L5:
	leaq	-8816(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-9616(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L4:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L5
	leaq	-9640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -9636(%rbp)
	jmp	.L6
.L7:
	leaq	-4016(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L6:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L7
	movl	$0, -9636(%rbp)
	jmp	.L8
.L19:
	movl	-9636(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	-9616(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9624(%rbp)
	movl	-9636(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	movl	-8816(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9620(%rbp)
	movl	$1, -9632(%rbp)
	jmp	.L9
.L16:
	movl	$0, -9628(%rbp)
	jmp	.L10
.L13:
	movl	-9632(%rbp), %eax
	cltq
	movl	-9616(%rbp,%rax,4), %edx
	movl	-9624(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-9632(%rbp), %eax
	cltq
	movl	-8816(%rbp,%rax,4), %edx
	movl	-9620(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L25
.L11:
	addl	$1, -9628(%rbp)
.L10:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	jl	.L13
	jmp	.L12
.L25:
	nop
.L12:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	je	.L26
	addl	$1, -9632(%rbp)
.L9:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jl	.L16
	jmp	.L15
.L26:
	nop
.L15:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jne	.L17
	movl	-9620(%rbp), %edx
	movl	-9624(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	addl	$1, -9636(%rbp)
.L8:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L19
.L18:
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1456, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-9644(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-9644(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	$0, -9636(%rbp)
	jmp	.L4
.L5:
	leaq	-8816(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-9616(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L4:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L5
	leaq	-9640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -9636(%rbp)
	jmp	.L6
.L7:
	leaq	-4016(%rbp), %rdx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-9636(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -9636(%rbp)
.L6:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L7
	movl	$0, -9636(%rbp)
	jmp	.L8
.L19:
	movl	-9636(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	-9616(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9624(%rbp)
	movl	-9636(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	movl	-8816(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -9620(%rbp)
	movl	$1, -9632(%rbp)
	jmp	.L9
.L16:
	movl	$0, -9628(%rbp)
	jmp	.L10
.L13:
	movl	-9632(%rbp), %eax
	cltq
	movl	-9616(%rbp,%rax,4), %edx
	movl	-9624(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L11
	movl	-9632(%rbp), %eax
	cltq
	movl	-8816(%rbp,%rax,4), %edx
	movl	-9620(%rbp), %eax
	addl	%eax, %edx
	movl	-9628(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L25
.L11:
	addl	$1, -9628(%rbp)
.L10:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	jl	.L13
	jmp	.L12
.L25:
	nop
.L12:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9628(%rbp)
	je	.L26
	addl	$1, -9632(%rbp)
.L9:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jl	.L16
	jmp	.L15
.L26:
	nop
.L15:
	movl	-9644(%rbp), %eax
	cmpl	%eax, -9632(%rbp)
	jne	.L17
	movl	-9620(%rbp), %edx
	movl	-9624(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L17:
	addl	$1, -9636(%rbp)
.L8:
	movl	-9640(%rbp), %eax
	cmpl	%eax, -9636(%rbp)
	jl	.L19
.L18:
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
