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() {

	int n, m, i=1, j, k, l = 0, sumt = 0, sumh = 0;
	int taro[101], hanako[101], co1[101], co2[101], ans[202];

	for (i = 0; i < 202; i++) {
		ans[i] = 101;
	}

	while (i) {

		scanf("%d %d", &n, &m);

		if (n == 0 && m == 0)
			break;

		for (i = 0; i < n; i++) {
			scanf("%d", &taro[i]);
			co1[i] = taro[i];
		}

		for (i = 0; i < m; i++) {
			scanf("%d", &hanako[i]);
			co2[i] = hanako[i];
		}

		for (i = 0; i < n; i++) {

			for (j = 0; j < m; j++) {

				co1[i] = hanako[j];
				co2[j] = taro[i];

				for (k = 0; k < n; k++)
					sumt += co1[k];
				for (k = 0; k < m; k++)
					sumh += co2[k];

				if (sumt == sumh && ((co1[i] + co2[j]) < (ans[l] + ans[l + 1]))) {
					ans[l] = taro[i];
					ans[l + 1] = hanako[j];
				}
				sumt = 0;
				sumh = 0;

				for (k = 0; k < n; k++)
					co1[k] = taro[k];
				for (k = 0; k < m; k++)
					co2[k] = hanako[k];
			}
		}
		l = l + 2;
         }

	for (i = 0; i < l; i = i + 2) {
		if (ans[i] == 101 && ans[i+1] == 101)
			printf("-1\n");
		else
			printf("%d %d\n", ans[i], ans[i + 1]);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
.LC3:
	.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	$2512, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2504(%rbp)
	movl	$0, -2492(%rbp)
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2504(%rbp)
	jmp	.L2
.L3:
	movl	-2504(%rbp), %eax
	cltq
	movl	$101, -816(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L2:
	cmpl	$201, -2504(%rbp)
	jle	.L3
	jmp	.L4
.L24:
	leaq	-2508(%rbp), %rdx
	leaq	-2512(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2512(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-2508(%rbp), %eax
	testl	%eax, %eax
	je	.L31
.L5:
	movl	$0, -2504(%rbp)
	jmp	.L7
.L8:
	leaq	-2480(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L7:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L8
	movl	$0, -2504(%rbp)
	jmp	.L9
.L10:
	leaq	-2064(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L9:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L10
	movl	$0, -2504(%rbp)
	jmp	.L11
.L23:
	movl	$0, -2500(%rbp)
	jmp	.L12
.L22:
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	movl	$0, -2496(%rbp)
	jmp	.L13
.L14:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %eax
	addl	%eax, -2488(%rbp)
	addl	$1, -2496(%rbp)
.L13:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L14
	movl	$0, -2496(%rbp)
	jmp	.L15
.L16:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, -2484(%rbp)
	addl	$1, -2496(%rbp)
.L15:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L16
	movl	-2488(%rbp), %eax
	cmpl	-2484(%rbp), %eax
	jne	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-2492(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-2492(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2496(%rbp)
	jmp	.L18
.L19:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L18:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L19
	movl	$0, -2496(%rbp)
	jmp	.L20
.L21:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L20:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L21
	addl	$1, -2500(%rbp)
.L12:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2500(%rbp)
	jl	.L22
	addl	$1, -2504(%rbp)
.L11:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L23
	addl	$2, -2492(%rbp)
.L4:
	cmpl	$0, -2504(%rbp)
	jne	.L24
	jmp	.L6
.L31:
	nop
.L6:
	movl	$0, -2504(%rbp)
	jmp	.L25
.L28:
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L27:
	addl	$2, -2504(%rbp)
.L25:
	movl	-2504(%rbp), %eax
	cmpl	-2492(%rbp), %eax
	jl	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d"
.LC4:
	.string	"-1"
.LC5:
	.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	$2616, %rsp
	.cfi_def_cfa_offset 2672
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 2600(%rsp)
	xorl	%eax, %eax
	leaq	1792(%rsp), %rax
	leaq	2592(%rsp), %rdx
	movq	%rax, 88(%rsp)
	movq	%rax, 64(%rsp)
.L2:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L2
	movq	.LC1(%rip), %rax
	movl	$0, 84(%rsp)
	leaq	544(%rsp), %r15
	leaq	1376(%rsp), %r13
	movq	%rax, 2592(%rsp)
	leaq	124(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 96(%rsp)
.L28:
	movq	104(%rsp), %rdx
	movq	96(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	120(%rsp), %eax
	testl	%eax, %eax
	jne	.L57
	movl	124(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	jle	.L8
.L7:
	movq	%r15, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movl	124(%rsp), %r8d
	movl	%eax, 0(%r13,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jg	.L12
	movl	120(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L8
	testl	%r8d, %r8d
	jle	.L13
	leaq	128(%rsp), %rax
	movl	%r8d, (%rsp)
	leaq	960(%rsp), %r14
	movq	%rax, 40(%rsp)
	movq	%r14, %r11
	movq	%rax, 56(%rsp)
	leal	-1(%r10), %eax
	movl	%eax, 48(%rsp)
	leaq	132(%rsp,%rax,4), %rax
	movq	%rax, 72(%rsp)
	movl	%r10d, %eax
	shrl	$2, %eax
	movl	%r10d, 4(%rsp)
	subl	$1, %eax
	movq	%r14, 8(%rsp)
	movq	%r13, %r14
	movq	%r15, %r13
	salq	$4, %rax
	leaq	976(%rsp,%rax), %rbp
	movl	%r10d, %eax
	andl	$-4, %eax
	movl	%eax, 80(%rsp)
	leal	-1(%r8), %eax
	movl	%eax, 28(%rsp)
	movl	%r8d, %eax
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	1392(%rsp,%rax), %rbx
	movl	%r8d, %eax
	andl	$-4, %eax
	movl	%eax, 52(%rsp)
	movl	%r10d, %eax
	salq	$2, %rax
	movq	%rax, 32(%rsp)
	movl	%r8d, %eax
	movq	%rax, 16(%rsp)
	leaq	0(,%rax,4), %r9
	movq	%r9, %r15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	56(%rsp), %rax
	xorl	%r12d, %r12d
	movl	(%rax), %eax
	movl	%eax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	0(%r13,%r12,4), %ecx
	movl	24(%rsp), %eax
	movq	8(%rsp), %rdx
	cmpl	$2, 48(%rsp)
	movd	%eax, %xmm2
	movd	%ecx, %xmm3
	movl	%eax, (%r14,%r12,4)
	movl	%ecx, (%rdx)
	punpckldq	%xmm3, %xmm2
	jbe	.L34
	movq	%r11, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L16:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rbp, %rax
	jne	.L16
	movdqa	%xmm0, %xmm1
	movl	4(%rsp), %esi
	movl	80(%rsp), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movl	%esi, %edi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%esi, %eax
	je	.L17
.L15:
	movslq	%eax, %rsi
	addl	960(%rsp,%rsi,4), %edx
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	jle	.L17
	movslq	%esi, %rsi
	addl	$2, %eax
	addl	960(%rsp,%rsi,4), %edx
	cmpl	%eax, %edi
	jle	.L17
	cltq
	addl	960(%rsp,%rax,4), %edx
.L17:
	cmpl	$2, 28(%rsp)
	jbe	.L35
	movq	%r14, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L19:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rax, %rbx
	jne	.L19
	movdqa	%xmm0, %xmm1
	movl	52(%rsp), %edi
	movl	(%rsp), %esi
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %edi
	je	.L20
	movl	%edi, %esi
.L18:
	movslq	%esi, %rdi
	movl	(%rsp), %r9d
	addl	1376(%rsp,%rdi,4), %eax
	leal	1(%rsi), %edi
	cmpl	%edi, %r9d
	jle	.L20
	movslq	%edi, %rdi
	addl	$2, %esi
	addl	1376(%rsp,%rdi,4), %eax
	cmpl	%esi, %r9d
	jle	.L20
	movslq	%esi, %rsi
	addl	1376(%rsp,%rsi,4), %eax
.L20:
	cmpl	%edx, %eax
	je	.L58
.L21:
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdx
	movq	%r11, %rdi
	call	memcpy@PLT
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rax, %r11
	cmpl	$8, %r15d
	jb	.L22
	movl	%r15d, %ecx
	shrl	$3, %ecx
	rep movsq
.L22:
	testb	$4, %r15b
	je	.L25
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
.L25:
	addq	$1, %r12
	cmpq	%r12, 16(%rsp)
	jne	.L26
	addq	$4, 56(%rsp)
	movq	56(%rsp), %rax
	addq	$4, 8(%rsp)
	cmpq	72(%rsp), %rax
	jne	.L14
	movq	%r13, %r15
	movq	%r14, %r13
.L13:
	addl	$2, 84(%rsp)
	addq	$8, 64(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L58:
	movq	64(%rsp), %rdx
	addl	24(%rsp), %ecx
	movl	4(%rdx), %eax
	addl	(%rdx), %eax
	cmpl	%eax, %ecx
	jge	.L21
	movq	%xmm2, (%rdx)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%rsp), %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L15
.L57:
	jle	.L52
	leaq	128(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	960(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movl	%eax, (%r14,%rbx,4)
	movl	120(%rsp), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L9
.L52:
	movl	124(%rsp), %edx
	testl	%edx, %edx
	jg	.L7
	testl	%eax, %eax
	jg	.L13
.L8:
	addl	$2, 84(%rsp)
.L27:
	movq	88(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC5(%rip), %r12
	leaq	.LC4(%rip), %rbp
.L31:
	movl	0(%r13,%rbx,4), %edx
	movl	4(%r13,%rbx,4), %ecx
	cmpl	$101, %edx
	jne	.L29
	cmpl	$101, %ecx
	je	.L59
.L29:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L30:
	addq	$2, %rbx
	cmpl	%ebx, 84(%rsp)
	jg	.L31
.L32:
	movq	2600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L60
	addq	$2616, %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
.L59:
	.cfi_restore_state
	movq	%rbp, %rdi
	call	puts@PLT
	jmp	.L30
.L6:
	cmpl	$0, 84(%rsp)
	je	.L32
	jmp	.L27
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	101
	.long	101
	.long	101
	.long	101
	.set	.LC1,.LC0
	.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
.LC2:
	.string	"%d %d"
.LC3:
	.string	"%d"
.LC4:
	.string	"-1"
.LC5:
	.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	$2616, %rsp
	.cfi_def_cfa_offset 2672
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 2600(%rsp)
	xorl	%eax, %eax
	leaq	1792(%rsp), %rax
	leaq	2592(%rsp), %rdx
	movq	%rax, 88(%rsp)
	movq	%rax, 64(%rsp)
.L2:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L2
	movq	.LC1(%rip), %rax
	movl	$0, 84(%rsp)
	leaq	544(%rsp), %r15
	leaq	1376(%rsp), %r13
	movq	%rax, 2592(%rsp)
	leaq	124(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	120(%rsp), %rax
	movq	%rax, 96(%rsp)
.L28:
	movq	104(%rsp), %rdx
	movq	96(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	120(%rsp), %eax
	testl	%eax, %eax
	jne	.L57
	movl	124(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	jle	.L8
.L7:
	movq	%r15, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movl	124(%rsp), %r8d
	movl	%eax, 0(%r13,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jg	.L12
	movl	120(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L8
	testl	%r8d, %r8d
	jle	.L13
	leaq	128(%rsp), %rax
	movl	%r8d, (%rsp)
	leaq	960(%rsp), %r14
	movq	%rax, 40(%rsp)
	movq	%r14, %r11
	movq	%rax, 56(%rsp)
	leal	-1(%r10), %eax
	movl	%eax, 48(%rsp)
	leaq	132(%rsp,%rax,4), %rax
	movq	%rax, 72(%rsp)
	movl	%r10d, %eax
	shrl	$2, %eax
	movl	%r10d, 4(%rsp)
	subl	$1, %eax
	movq	%r14, 8(%rsp)
	movq	%r13, %r14
	movq	%r15, %r13
	salq	$4, %rax
	leaq	976(%rsp,%rax), %rbp
	movl	%r10d, %eax
	andl	$-4, %eax
	movl	%eax, 80(%rsp)
	leal	-1(%r8), %eax
	movl	%eax, 28(%rsp)
	movl	%r8d, %eax
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	1392(%rsp,%rax), %rbx
	movl	%r8d, %eax
	andl	$-4, %eax
	movl	%eax, 52(%rsp)
	movl	%r10d, %eax
	salq	$2, %rax
	movq	%rax, 32(%rsp)
	movl	%r8d, %eax
	movq	%rax, 16(%rsp)
	leaq	0(,%rax,4), %r9
	movq	%r9, %r15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	56(%rsp), %rax
	xorl	%r12d, %r12d
	movl	(%rax), %eax
	movl	%eax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	0(%r13,%r12,4), %ecx
	movl	24(%rsp), %eax
	movq	8(%rsp), %rdx
	cmpl	$2, 48(%rsp)
	movd	%eax, %xmm2
	movd	%ecx, %xmm3
	movl	%eax, (%r14,%r12,4)
	movl	%ecx, (%rdx)
	punpckldq	%xmm3, %xmm2
	jbe	.L34
	movq	%r11, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L16:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rbp, %rax
	jne	.L16
	movdqa	%xmm0, %xmm1
	movl	4(%rsp), %esi
	movl	80(%rsp), %eax
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movl	%esi, %edi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%esi, %eax
	je	.L17
.L15:
	movslq	%eax, %rsi
	addl	960(%rsp,%rsi,4), %edx
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	jle	.L17
	movslq	%esi, %rsi
	addl	$2, %eax
	addl	960(%rsp,%rsi,4), %edx
	cmpl	%eax, %edi
	jle	.L17
	cltq
	addl	960(%rsp,%rax,4), %edx
.L17:
	cmpl	$2, 28(%rsp)
	jbe	.L35
	movq	%r14, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L19:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rax, %rbx
	jne	.L19
	movdqa	%xmm0, %xmm1
	movl	52(%rsp), %edi
	movl	(%rsp), %esi
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %edi
	je	.L20
	movl	%edi, %esi
.L18:
	movslq	%esi, %rdi
	movl	(%rsp), %r9d
	addl	1376(%rsp,%rdi,4), %eax
	leal	1(%rsi), %edi
	cmpl	%edi, %r9d
	jle	.L20
	movslq	%edi, %rdi
	addl	$2, %esi
	addl	1376(%rsp,%rdi,4), %eax
	cmpl	%esi, %r9d
	jle	.L20
	movslq	%esi, %rsi
	addl	1376(%rsp,%rsi,4), %eax
.L20:
	cmpl	%edx, %eax
	je	.L58
.L21:
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdx
	movq	%r11, %rdi
	call	memcpy@PLT
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rax, %r11
	cmpl	$8, %r15d
	jb	.L22
	movl	%r15d, %ecx
	shrl	$3, %ecx
	rep movsq
.L22:
	testb	$4, %r15b
	je	.L25
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
.L25:
	addq	$1, %r12
	cmpq	%r12, 16(%rsp)
	jne	.L26
	addq	$4, 56(%rsp)
	movq	56(%rsp), %rax
	addq	$4, 8(%rsp)
	cmpq	72(%rsp), %rax
	jne	.L14
	movq	%r13, %r15
	movq	%r14, %r13
.L13:
	addl	$2, 84(%rsp)
	addq	$8, 64(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L58:
	movq	64(%rsp), %rdx
	addl	24(%rsp), %ecx
	movl	4(%rdx), %eax
	addl	(%rdx), %eax
	cmpl	%eax, %ecx
	jge	.L21
	movq	%xmm2, (%rdx)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%rsp), %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L15
.L57:
	jle	.L52
	leaq	128(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	960(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movl	%eax, (%r14,%rbx,4)
	movl	120(%rsp), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L9
.L52:
	movl	124(%rsp), %edx
	testl	%edx, %edx
	jg	.L7
	testl	%eax, %eax
	jg	.L13
.L8:
	addl	$2, 84(%rsp)
.L27:
	movq	88(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC5(%rip), %r12
	leaq	.LC4(%rip), %rbp
.L31:
	movl	0(%r13,%rbx,4), %edx
	movl	4(%r13,%rbx,4), %ecx
	cmpl	$101, %edx
	jne	.L29
	cmpl	$101, %ecx
	je	.L59
.L29:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L30:
	addq	$2, %rbx
	cmpl	%ebx, 84(%rsp)
	jg	.L31
.L32:
	movq	2600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L60
	addq	$2616, %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
.L59:
	.cfi_restore_state
	movq	%rbp, %rdi
	call	puts@PLT
	jmp	.L30
.L6:
	cmpl	$0, 84(%rsp)
	je	.L32
	jmp	.L27
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	101
	.long	101
	.long	101
	.long	101
	.set	.LC1,.LC0
	.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() {

	int n, m, i=1, j, k, l = 0, sumt = 0, sumh = 0;
	int taro[101], hanako[101], co1[101], co2[101], ans[202];

	for (i = 0; i < 202; i++) {
		ans[i] = 101;
	}

	while (i) {

		scanf("%d %d", &n, &m);

		if (n == 0 && m == 0)
			break;

		for (i = 0; i < n; i++) {
			scanf("%d", &taro[i]);
			co1[i] = taro[i];
		}

		for (i = 0; i < m; i++) {
			scanf("%d", &hanako[i]);
			co2[i] = hanako[i];
		}

		for (i = 0; i < n; i++) {

			for (j = 0; j < m; j++) {

				co1[i] = hanako[j];
				co2[j] = taro[i];

				for (k = 0; k < n; k++)
					sumt += co1[k];
				for (k = 0; k < m; k++)
					sumh += co2[k];

				if (sumt == sumh && ((co1[i] + co2[j]) < (ans[l] + ans[l + 1]))) {
					ans[l] = taro[i];
					ans[l + 1] = hanako[j];
				}
				sumt = 0;
				sumh = 0;

				for (k = 0; k < n; k++)
					co1[k] = taro[k];
				for (k = 0; k < m; k++)
					co2[k] = hanako[k];
			}
		}
		l = l + 2;
         }

	for (i = 0; i < l; i = i + 2) {
		if (ans[i] == 101 && ans[i+1] == 101)
			printf("-1\n");
		else
			printf("%d %d\n", ans[i], ans[i + 1]);
	}
	
	return 0;
}
2 2
1
5
4
7
6 5
3
9
5
2
3
3
12
2
7
3
5
4 5
10
0
3
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
3
2 3
1
1
2
2
2
0 0
 2 2
1
5
4
7
6 5
3
9
5
2
3
3
12
2
7
3
5
4 5
10
0
3
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
4
7
6 5
3
9
7
2
3
3
12
2
7
3
5
4 5
10
0
3
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
4
7
6 5
3
9
7
2
3
3
12
2
7
3
5
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
7
7
6 5
2
9
7
2
3
3
12
2
7
3
5
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
4
7
6 5
3
9
5
2
3
3
11
2
7
3
5
4 5
10
0
3
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
3
7
6 5
2
9
7
2
3
3
24
2
7
3
5
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
3
7
6 5
2
9
7
2
3
3
24
2
7
3
5
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
2
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
11
7
6 5
2
9
7
2
3
3
24
2
7
3
1
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
0
1
6
2
3
4
6
2 3
1
1
2
2
2
0 0
 2 2
1
5
3
7
6 5
2
9
7
2
3
3
24
2
7
3
5
4 5
10
0
2
8
1
9
6
0
6
7 4
1
1
2
1
2
1
4
2
2
4
6
2 3
1
1
4
2
2
0 0

-1
3 5
-1
2 2
-1
 -1
3 5
-1
-1
-1
 -1
2 3
-1
-1
-1
 -1
2 3
0 1
-1
-1
 -1
-1
0 1
-1
-1
 -1
-1
-1
-1
-1
 1 3
-1
0 1
-1
-1
 1 3
-1
0 1
1 2
-1
 1 7
-1
0 1
-1
-1
 1 3
-1
0 1
1 2
1 4

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() {

	int n, m, i=1, j, k, l = 0, sumt = 0, sumh = 0;
	int taro[101], hanako[101], co1[101], co2[101], ans[202];

	for (i = 0; i < 202; i++) {
		ans[i] = 101;
	}

	while (i) {

		scanf("%d %d", &n, &m);

		if (n == 0 && m == 0)
			break;

		for (i = 0; i < n; i++) {
			scanf("%d", &taro[i]);
			co1[i] = taro[i];
		}

		for (i = 0; i < m; i++) {
			scanf("%d", &hanako[i]);
			co2[i] = hanako[i];
		}

		for (i = 0; i < n; i++) {

			for (j = 0; j < m; j++) {

				co1[i] = hanako[j];
				co2[j] = taro[i];

				for (k = 0; k < n; k++)
					sumt += co1[k];
				for (k = 0; k < m; k++)
					sumh += co2[k];

				if (sumt == sumh && ((co1[i] + co2[j]) < (ans[l] + ans[l + 1]))) {
					ans[l] = taro[i];
					ans[l + 1] = hanako[j];
				}
				sumt = 0;
				sumh = 0;

				for (k = 0; k < n; k++)
					co1[k] = taro[k];
				for (k = 0; k < m; k++)
					co2[k] = hanako[k];
			}
		}
		l = l + 2;
         }

	for (i = 0; i < l; i = i + 2) {
		if (ans[i] == 101 && ans[i+1] == 101)
			printf("-1\n");
		else
			printf("%d %d\n", ans[i], ans[i + 1]);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
.LC3:
	.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	$2512, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2504(%rbp)
	movl	$0, -2492(%rbp)
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2504(%rbp)
	jmp	.L2
.L3:
	movl	-2504(%rbp), %eax
	cltq
	movl	$101, -816(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L2:
	cmpl	$201, -2504(%rbp)
	jle	.L3
	jmp	.L4
.L24:
	leaq	-2508(%rbp), %rdx
	leaq	-2512(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2512(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-2508(%rbp), %eax
	testl	%eax, %eax
	je	.L31
.L5:
	movl	$0, -2504(%rbp)
	jmp	.L7
.L8:
	leaq	-2480(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L7:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L8
	movl	$0, -2504(%rbp)
	jmp	.L9
.L10:
	leaq	-2064(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L9:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L10
	movl	$0, -2504(%rbp)
	jmp	.L11
.L23:
	movl	$0, -2500(%rbp)
	jmp	.L12
.L22:
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	movl	$0, -2496(%rbp)
	jmp	.L13
.L14:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %eax
	addl	%eax, -2488(%rbp)
	addl	$1, -2496(%rbp)
.L13:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L14
	movl	$0, -2496(%rbp)
	jmp	.L15
.L16:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, -2484(%rbp)
	addl	$1, -2496(%rbp)
.L15:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L16
	movl	-2488(%rbp), %eax
	cmpl	-2484(%rbp), %eax
	jne	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-2492(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-2492(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2496(%rbp)
	jmp	.L18
.L19:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L18:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L19
	movl	$0, -2496(%rbp)
	jmp	.L20
.L21:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L20:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L21
	addl	$1, -2500(%rbp)
.L12:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2500(%rbp)
	jl	.L22
	addl	$1, -2504(%rbp)
.L11:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L23
	addl	$2, -2492(%rbp)
.L4:
	cmpl	$0, -2504(%rbp)
	jne	.L24
	jmp	.L6
.L31:
	nop
.L6:
	movl	$0, -2504(%rbp)
	jmp	.L25
.L28:
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L27:
	addl	$2, -2504(%rbp)
.L25:
	movl	-2504(%rbp), %eax
	cmpl	-2492(%rbp), %eax
	jl	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"-1"
.LC3:
	.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	$2512, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2504(%rbp)
	movl	$0, -2492(%rbp)
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2504(%rbp)
	jmp	.L2
.L3:
	movl	-2504(%rbp), %eax
	cltq
	movl	$101, -816(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L2:
	cmpl	$201, -2504(%rbp)
	jle	.L3
	jmp	.L4
.L24:
	leaq	-2508(%rbp), %rdx
	leaq	-2512(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2512(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-2508(%rbp), %eax
	testl	%eax, %eax
	je	.L31
.L5:
	movl	$0, -2504(%rbp)
	jmp	.L7
.L8:
	leaq	-2480(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L7:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L8
	movl	$0, -2504(%rbp)
	jmp	.L9
.L10:
	leaq	-2064(%rbp), %rdx
	movl	-2504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2504(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2504(%rbp)
.L9:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L10
	movl	$0, -2504(%rbp)
	jmp	.L11
.L23:
	movl	$0, -2500(%rbp)
	jmp	.L12
.L22:
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	movl	$0, -2496(%rbp)
	jmp	.L13
.L14:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %eax
	addl	%eax, -2488(%rbp)
	addl	$1, -2496(%rbp)
.L13:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L14
	movl	$0, -2496(%rbp)
	jmp	.L15
.L16:
	movl	-2496(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, -2484(%rbp)
	addl	$1, -2496(%rbp)
.L15:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L16
	movl	-2488(%rbp), %eax
	cmpl	-2484(%rbp), %eax
	jne	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-1648(%rbp,%rax,4), %edx
	movl	-2500(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-2492(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2504(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2492(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-2492(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2500(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	movl	$0, -2488(%rbp)
	movl	$0, -2484(%rbp)
	movl	$0, -2496(%rbp)
	jmp	.L18
.L19:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2480(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1648(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L18:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L19
	movl	$0, -2496(%rbp)
	jmp	.L20
.L21:
	movl	-2496(%rbp), %eax
	cltq
	movl	-2064(%rbp,%rax,4), %edx
	movl	-2496(%rbp), %eax
	cltq
	movl	%edx, -1232(%rbp,%rax,4)
	addl	$1, -2496(%rbp)
.L20:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2496(%rbp)
	jl	.L21
	addl	$1, -2500(%rbp)
.L12:
	movl	-2508(%rbp), %eax
	cmpl	%eax, -2500(%rbp)
	jl	.L22
	addl	$1, -2504(%rbp)
.L11:
	movl	-2512(%rbp), %eax
	cmpl	%eax, -2504(%rbp)
	jl	.L23
	addl	$2, -2492(%rbp)
.L4:
	cmpl	$0, -2504(%rbp)
	jne	.L24
	jmp	.L6
.L31:
	nop
.L6:
	movl	$0, -2504(%rbp)
	jmp	.L25
.L28:
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$101, %eax
	jne	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	movl	-2504(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2504(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L27:
	addl	$2, -2504(%rbp)
.L25:
	movl	-2504(%rbp), %eax
	cmpl	-2492(%rbp), %eax
	jl	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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:
