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

```c
a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){printf("%d %d\n",w,q);t=0;break;}t=0;}}return 0;} ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800
a:
	.zero	800
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 800
b:
	.zero	800
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 4000
c:
	.zero	4000
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 4000
d:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.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
.L18:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L17:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, w(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, q(%rip)
	movl	$1, j(%rip)
	jmp	.L9
.L14:
	movl	$0, k(%rip)
	jmp	.L10
.L13:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	w(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	q(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	jmp	.L12
.L11:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L13
.L12:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L14
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	q(%rip), %edx
	movl	w(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, t(%rip)
	jmp	.L16
.L15:
	movl	$0, t(%rip)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
.L16:
	jmp	.L18
.L21:
	nop
	movl	$0, %eax
	popq	%rbp
	.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:
.LFB0:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
.L19:
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %ecx
	testl	%ecx, %ecx
	je	.L2
	movl	$0, i(%rip)
	movl	$0, %eax
	leaq	a(%rip), %rbx
	leaq	.LC1(%rip), %r12
	jle	.L6
.L3:
	cltq
	leaq	b(%rip), %rsi
	movq	%r12, %rdi
	salq	$2, %rax
	leaq	(%rsi,%rax), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L3
.L6:
	leaq	m(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	m(%rip), %edx
	xorl	%eax, %eax
	movl	$0, i(%rip)
	leaq	.LC1(%rip), %r12
	leaq	d(%rip), %rbp
	leaq	c(%rip), %rbx
	testl	%edx, %edx
	jle	.L19
.L4:
	cltq
	movq	%r12, %rdi
	salq	$2, %rax
	leaq	(%rbx,%rax), %rsi
	leaq	0(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	movl	m(%rip), %esi
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%esi, %eax
	jl	.L4
	movl	$0, i(%rip)
	testl	%esi, %esi
	jle	.L19
	movl	a(%rip), %eax
	movl	n(%rip), %ecx
	movb	$0, 19(%rsp)
	movl	$1, %r14d
	movl	t(%rip), %r13d
	movl	%eax, 24(%rsp)
	leaq	b(%rip), %rax
	leal	-2(%rcx), %edx
	movl	(%rax), %eax
	movl	%ecx, 20(%rsp)
	movl	%eax, 28(%rsp)
	leal	-1(%rcx), %eax
	movl	%eax, 32(%rsp)
	leal	-1(%rsi), %eax
	movl	%esi, %esi
	addq	$2, %rax
	movq	%rax, 40(%rsp)
	leaq	8+a(%rip), %rax
	leaq	(%rax,%rdx,4), %r12
	xorl	%eax, %eax
.L18:
	leaq	-4+c(%rip), %rcx
	movl	(%rcx,%r14,4), %r11d
	leaq	-4+d(%rip), %rcx
	subl	24(%rsp), %r11d
	movl	(%rcx,%r14,4), %ecx
	movl	%ecx, %r9d
	subl	28(%rsp), %r9d
	cmpl	$1, 20(%rsp)
	movl	%ecx, 12(%rsp)
	jle	.L22
	movzbl	19(%rsp), %eax
	leaq	4+a(%rip), %r10
	leaq	4+b(%rip), %r8
	movb	%al, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%r10), %ecx
	xorl	%eax, %eax
	addl	%r11d, %ecx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	leal	1(%rdx), %r15d
	cmpq	%rsi, %rax
	je	.L10
.L11:
	movl	%eax, %edx
	movl	%eax, %r15d
	cmpl	(%rbx,%rax,4), %ecx
	jne	.L9
	movl	(%r8), %edi
	addl	%r9d, %edi
	cmpl	0(%rbp,%rax,4), %edi
	jne	.L9
	movb	$1, 12(%rsp)
	addl	$1, %r13d
.L10:
	addq	$4, %r10
	addq	$4, %r8
	cmpq	%r12, %r10
	jne	.L12
	movl	20(%rsp), %edx
	movl	$1, %eax
	cmpl	%r13d, 32(%rsp)
	je	.L46
.L13:
	movl	%r14d, 36(%rsp)
	xorl	%r13d, %r13d
	addq	$1, %r14
	movb	$1, 19(%rsp)
	cmpq	40(%rsp), %r14
	jne	.L18
	movl	36(%rsp), %ebx
	movl	%edx, j(%rip)
	movl	%r9d, q(%rip)
	movl	%r11d, w(%rip)
	movl	%ebx, i(%rip)
	movl	$0, t(%rip)
	testb	%al, %al
	je	.L19
	movl	%r15d, k(%rip)
	jmp	.L19
.L22:
	movzbl	19(%rsp), %ecx
	movl	$1, %edx
	movb	%cl, 12(%rsp)
	cmpl	%r13d, 32(%rsp)
	jne	.L13
.L46:
	cmpb	$0, 19(%rsp)
	movl	%edx, j(%rip)
	movl	%r9d, q(%rip)
	movl	%r11d, w(%rip)
	je	.L14
	movl	36(%rsp), %ebx
	movl	%ebx, i(%rip)
.L14:
	cmpb	$0, 12(%rsp)
	je	.L15
	movl	%r13d, t(%rip)
.L15:
	testb	%al, %al
	je	.L16
	movl	%r15d, k(%rip)
.L16:
	movl	%r9d, %edx
	movl	%r11d, %esi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	$0, t(%rip)
	jmp	.L19
.L2:
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	q
	.bss
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 4000
d:
	.zero	4000
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 4000
c:
	.zero	4000
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 800
b:
	.zero	800
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 800
a:
	.zero	800
	.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:
.LFB0:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
.L19:
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %ecx
	testl	%ecx, %ecx
	je	.L2
	movl	$0, i(%rip)
	movl	$0, %eax
	leaq	a(%rip), %rbx
	leaq	.LC1(%rip), %r12
	jle	.L6
.L3:
	cltq
	leaq	b(%rip), %rsi
	movq	%r12, %rdi
	salq	$2, %rax
	leaq	(%rsi,%rax), %rdx
	leaq	(%rbx,%rax), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L3
.L6:
	leaq	m(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	m(%rip), %edx
	xorl	%eax, %eax
	movl	$0, i(%rip)
	leaq	.LC1(%rip), %r12
	leaq	d(%rip), %rbp
	leaq	c(%rip), %rbx
	testl	%edx, %edx
	jle	.L19
.L4:
	cltq
	movq	%r12, %rdi
	salq	$2, %rax
	leaq	(%rbx,%rax), %rsi
	leaq	0(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	movl	m(%rip), %esi
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%esi, %eax
	jl	.L4
	movl	$0, i(%rip)
	testl	%esi, %esi
	jle	.L19
	movl	a(%rip), %eax
	movl	n(%rip), %ecx
	movb	$0, 19(%rsp)
	movl	$1, %r14d
	movl	t(%rip), %r13d
	movl	%eax, 24(%rsp)
	leaq	b(%rip), %rax
	leal	-2(%rcx), %edx
	movl	(%rax), %eax
	movl	%ecx, 20(%rsp)
	movl	%eax, 28(%rsp)
	leal	-1(%rcx), %eax
	movl	%eax, 32(%rsp)
	leal	-1(%rsi), %eax
	movl	%esi, %esi
	addq	$2, %rax
	movq	%rax, 40(%rsp)
	leaq	8+a(%rip), %rax
	leaq	(%rax,%rdx,4), %r12
	xorl	%eax, %eax
.L18:
	leaq	-4+c(%rip), %rcx
	movl	(%rcx,%r14,4), %r11d
	leaq	-4+d(%rip), %rcx
	subl	24(%rsp), %r11d
	movl	(%rcx,%r14,4), %ecx
	movl	%ecx, %r9d
	subl	28(%rsp), %r9d
	cmpl	$1, 20(%rsp)
	movl	%ecx, 12(%rsp)
	jle	.L22
	movzbl	19(%rsp), %eax
	leaq	4+a(%rip), %r10
	leaq	4+b(%rip), %r8
	movb	%al, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%r10), %ecx
	xorl	%eax, %eax
	addl	%r11d, %ecx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	leal	1(%rdx), %r15d
	cmpq	%rsi, %rax
	je	.L10
.L11:
	movl	%eax, %edx
	movl	%eax, %r15d
	cmpl	(%rbx,%rax,4), %ecx
	jne	.L9
	movl	(%r8), %edi
	addl	%r9d, %edi
	cmpl	0(%rbp,%rax,4), %edi
	jne	.L9
	movb	$1, 12(%rsp)
	addl	$1, %r13d
.L10:
	addq	$4, %r10
	addq	$4, %r8
	cmpq	%r12, %r10
	jne	.L12
	movl	20(%rsp), %edx
	movl	$1, %eax
	cmpl	%r13d, 32(%rsp)
	je	.L46
.L13:
	movl	%r14d, 36(%rsp)
	xorl	%r13d, %r13d
	addq	$1, %r14
	movb	$1, 19(%rsp)
	cmpq	40(%rsp), %r14
	jne	.L18
	movl	36(%rsp), %ebx
	movl	%edx, j(%rip)
	movl	%r9d, q(%rip)
	movl	%r11d, w(%rip)
	movl	%ebx, i(%rip)
	movl	$0, t(%rip)
	testb	%al, %al
	je	.L19
	movl	%r15d, k(%rip)
	jmp	.L19
.L22:
	movzbl	19(%rsp), %ecx
	movl	$1, %edx
	movb	%cl, 12(%rsp)
	cmpl	%r13d, 32(%rsp)
	jne	.L13
.L46:
	cmpb	$0, 19(%rsp)
	movl	%edx, j(%rip)
	movl	%r9d, q(%rip)
	movl	%r11d, w(%rip)
	je	.L14
	movl	36(%rsp), %ebx
	movl	%ebx, i(%rip)
.L14:
	cmpb	$0, 12(%rsp)
	je	.L15
	movl	%r13d, t(%rip)
.L15:
	testb	%al, %al
	je	.L16
	movl	%r15d, k(%rip)
.L16:
	movl	%r9d, %edx
	movl	%r11d, %esi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	$0, t(%rip)
	jmp	.L19
.L2:
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	q
	.bss
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 4000
d:
	.zero	4000
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 4000
c:
	.zero	4000
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 800
b:
	.zero	800
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 800
a:
	.zero	800
	.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:

a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){printf("%d %d\n",w,q);t=0;break;}t=0;}}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
a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){printf("%d %d\n",w,q);t=0;break;}t=0;}}return 0;} ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800
a:
	.zero	800
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 800
b:
	.zero	800
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 4000
c:
	.zero	4000
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 4000
d:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.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
.L18:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L17:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, w(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, q(%rip)
	movl	$1, j(%rip)
	jmp	.L9
.L14:
	movl	$0, k(%rip)
	jmp	.L10
.L13:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	w(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	q(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	jmp	.L12
.L11:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L13
.L12:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L14
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	q(%rip), %edx
	movl	w(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, t(%rip)
	jmp	.L16
.L15:
	movl	$0, t(%rip)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
.L16:
	jmp	.L18
.L21:
	nop
	movl	$0, %eax
	popq	%rbp
	.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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800
a:
	.zero	800
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 800
b:
	.zero	800
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 4000
c:
	.zero	4000
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 4000
d:
	.zero	4000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.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
.L18:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rax, %rdx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L17:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, w(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	b(%rip), %edx
	subl	%edx, %eax
	movl	%eax, q(%rip)
	movl	$1, j(%rip)
	jmp	.L9
.L14:
	movl	$0, k(%rip)
	jmp	.L10
.L13:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	w(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	q(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	k(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L11
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	jmp	.L12
.L11:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L13
.L12:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L14
	movl	n(%rip), %eax
	leal	-1(%rax), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	q(%rip), %edx
	movl	w(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, t(%rip)
	jmp	.L16
.L15:
	movl	$0, t(%rip)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
.L16:
	jmp	.L18
.L21:
	nop
	movl	$0, %eax
	popq	%rbp
	.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:
