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>
#include <memory.h>
int main(void){
	int a,b,n,x,y,i,j,map[17][17];
	while(1){
		scanf("%d %d",&a,&b);
		if(!a) break;
		memset(map,0,sizeof(map));
		map[1][1]=1;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d",&x,&y);
			map[x][y]=-1;
		}
		for(i=1;i<=a;i++){
			for(j=1;j<=b;j++){
				if(map[i][j]!=-1){
					if(map[i-1][j]==-1)
						map[i][j]+=map[i][j-1];
					else if(map[i][j-1]==-1)
						map[i][j]+=map[i-1][j];
					else
						map[i][j]+=map[i-1][j]+map[i][j-1];
				}
			}
		}
		printf("%d\n",map[a][b]);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%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	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-1192(%rbp), %rdx
	leaq	-1196(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1196(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	leaq	-1168(%rbp), %rax
	movl	$1156, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -1096(%rbp)
	leaq	-1188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1176(%rbp)
	jmp	.L4
.L5:
	leaq	-1180(%rbp), %rdx
	leaq	-1184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1184(%rbp), %eax
	movl	-1180(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, -1168(%rbp,%rax,4)
	addl	$1, -1176(%rbp)
.L4:
	movl	-1188(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jl	.L5
	movl	$1, -1176(%rbp)
	jmp	.L6
.L12:
	movl	$1, -1172(%rbp)
	jmp	.L7
.L11:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L8
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L9
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L9:
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L10:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %esi
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
.L8:
	addl	$1, -1172(%rbp)
.L7:
	movl	-1192(%rbp), %eax
	cmpl	%eax, -1172(%rbp)
	jle	.L11
	addl	$1, -1176(%rbp)
.L6:
	movl	-1196(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jle	.L12
	movl	-1196(%rbp), %eax
	movl	-1192(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$1224, %rsp
	.cfi_def_cfa_offset 1280
	movq	%fs:40, %rax
	movq	%rax, 1208(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %r13
	movq	%rax, (%rsp)
	leaq	48(%rsp), %rax
	leaq	116(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movq	(%rsp), %rsi
	movq	%r13, %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	movq	8(%rsp), %rdi
	xorl	%eax, %eax
	movl	$144, %ecx
	xorl	%r12d, %r12d
	leaq	36(%rsp), %rsi
	leaq	44(%rsp), %r15
	rep stosq
	movl	$1, 120(%rsp)
	leaq	40(%rsp), %r14
	movl	$0, (%rdi)
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	40(%rsp), %rdx
	movslq	44(%rsp), %rcx
	addl	$1, %r12d
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, 48(%rsp,%rax,4)
	cmpl	%r12d, 36(%rsp)
	jg	.L3
.L7:
	movslq	28(%rsp), %r14
	movslq	32(%rsp), %r15
	testl	%r14d, %r14d
	jle	.L4
	testl	%r15d, %r15d
	jle	.L4
	movq	%r14, %r11
	leal	16(%r15), %eax
	xorl	%r9d, %r9d
	movq	$-68, %r10
	salq	$4, %r11
	leaq	52(%rsp,%rax,4), %r8
	addq	%r14, %r11
	salq	$2, %r11
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	0(%rbp,%r9), %rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	leal	(%rcx,%rsi), %edi
	addl	%edx, %edi
	addl	%ecx, %edx
	cmpl	$-1, %esi
	cmovne	%edi, %edx
	movl	%edx, 4(%rax)
.L8:
	addq	$4, %rax
	cmpq	%r8, %rax
	je	.L30
.L11:
	movl	4(%rax), %edx
	cmpl	$-1, %edx
	je	.L8
	leaq	(%rax,%r10), %rcx
	movl	(%rax), %esi
	movl	4(%rcx,%r9), %ecx
	cmpl	$-1, %ecx
	jne	.L9
	addl	%esi, %edx
	addq	$4, %rax
	movl	%edx, (%rax)
	cmpq	%r8, %rax
	jne	.L11
.L30:
	addq	$68, %r9
	addq	$68, %r8
	subq	$68, %r10
	cmpq	%r11, %r9
	jne	.L6
.L4:
	movq	%r14, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	salq	$4, %rax
	addq	%r14, %rax
	addq	%r15, %rax
	movl	48(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L2:
	movq	1208(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1224, %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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$1224, %rsp
	.cfi_def_cfa_offset 1280
	movq	%fs:40, %rax
	movq	%rax, 1208(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %r13
	movq	%rax, (%rsp)
	leaq	48(%rsp), %rax
	leaq	116(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movq	(%rsp), %rsi
	movq	%r13, %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	movq	8(%rsp), %rdi
	xorl	%eax, %eax
	movl	$144, %ecx
	xorl	%r12d, %r12d
	leaq	36(%rsp), %rsi
	leaq	44(%rsp), %r15
	rep stosq
	movl	$1, 120(%rsp)
	leaq	40(%rsp), %r14
	movl	$0, (%rdi)
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	40(%rsp), %rdx
	movslq	44(%rsp), %rcx
	addl	$1, %r12d
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, 48(%rsp,%rax,4)
	cmpl	%r12d, 36(%rsp)
	jg	.L3
.L7:
	movslq	28(%rsp), %r14
	movslq	32(%rsp), %r15
	testl	%r14d, %r14d
	jle	.L4
	testl	%r15d, %r15d
	jle	.L4
	movq	%r14, %r11
	leal	16(%r15), %eax
	xorl	%r9d, %r9d
	movq	$-68, %r10
	salq	$4, %r11
	leaq	52(%rsp,%rax,4), %r8
	addq	%r14, %r11
	salq	$2, %r11
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	0(%rbp,%r9), %rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	leal	(%rcx,%rsi), %edi
	addl	%edx, %edi
	addl	%ecx, %edx
	cmpl	$-1, %esi
	cmovne	%edi, %edx
	movl	%edx, 4(%rax)
.L8:
	addq	$4, %rax
	cmpq	%r8, %rax
	je	.L30
.L11:
	movl	4(%rax), %edx
	cmpl	$-1, %edx
	je	.L8
	leaq	(%rax,%r10), %rcx
	movl	(%rax), %esi
	movl	4(%rcx,%r9), %ecx
	cmpl	$-1, %ecx
	jne	.L9
	addl	%esi, %edx
	addq	$4, %rax
	movl	%edx, (%rax)
	cmpq	%r8, %rax
	jne	.L11
.L30:
	addq	$68, %r9
	addq	$68, %r8
	subq	$68, %r10
	cmpq	%r11, %r9
	jne	.L6
.L4:
	movq	%r14, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	salq	$4, %rax
	addq	%r14, %rax
	addq	%r15, %rax
	movl	48(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L2:
	movq	1208(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1224, %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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include <memory.h>
int main(void){
	int a,b,n,x,y,i,j,map[17][17];
	while(1){
		scanf("%d %d",&a,&b);
		if(!a) break;
		memset(map,0,sizeof(map));
		map[1][1]=1;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d",&x,&y);
			map[x][y]=-1;
		}
		for(i=1;i<=a;i++){
			for(j=1;j<=b;j++){
				if(map[i][j]!=-1){
					if(map[i-1][j]==-1)
						map[i][j]+=map[i][j-1];
					else if(map[i][j-1]==-1)
						map[i][j]+=map[i-1][j];
					else
						map[i][j]+=map[i-1][j]+map[i][j-1];
				}
			}
		}
		printf("%d\n",map[a][b]);
	}
	return 0;
}
5 4
3
2 2
2 3
4 2
5 4
3
2 2
2 3
4 2
0 0

5
5

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>
#include <memory.h>
int main(void){
	int a,b,n,x,y,i,j,map[17][17];
	while(1){
		scanf("%d %d",&a,&b);
		if(!a) break;
		memset(map,0,sizeof(map));
		map[1][1]=1;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d",&x,&y);
			map[x][y]=-1;
		}
		for(i=1;i<=a;i++){
			for(j=1;j<=b;j++){
				if(map[i][j]!=-1){
					if(map[i-1][j]==-1)
						map[i][j]+=map[i][j-1];
					else if(map[i][j-1]==-1)
						map[i][j]+=map[i-1][j];
					else
						map[i][j]+=map[i-1][j]+map[i][j-1];
				}
			}
		}
		printf("%d\n",map[a][b]);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%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	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-1192(%rbp), %rdx
	leaq	-1196(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1196(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	leaq	-1168(%rbp), %rax
	movl	$1156, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -1096(%rbp)
	leaq	-1188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1176(%rbp)
	jmp	.L4
.L5:
	leaq	-1180(%rbp), %rdx
	leaq	-1184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1184(%rbp), %eax
	movl	-1180(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, -1168(%rbp,%rax,4)
	addl	$1, -1176(%rbp)
.L4:
	movl	-1188(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jl	.L5
	movl	$1, -1176(%rbp)
	jmp	.L6
.L12:
	movl	$1, -1172(%rbp)
	jmp	.L7
.L11:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L8
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L9
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L9:
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L10:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %esi
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
.L8:
	addl	$1, -1172(%rbp)
.L7:
	movl	-1192(%rbp), %eax
	cmpl	%eax, -1172(%rbp)
	jle	.L11
	addl	$1, -1176(%rbp)
.L6:
	movl	-1196(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jle	.L12
	movl	-1196(%rbp), %eax
	movl	-1192(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"%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	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-1192(%rbp), %rdx
	leaq	-1196(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1196(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	leaq	-1168(%rbp), %rax
	movl	$1156, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -1096(%rbp)
	leaq	-1188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1176(%rbp)
	jmp	.L4
.L5:
	leaq	-1180(%rbp), %rdx
	leaq	-1184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1184(%rbp), %eax
	movl	-1180(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, -1168(%rbp,%rax,4)
	addl	$1, -1176(%rbp)
.L4:
	movl	-1188(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jl	.L5
	movl	$1, -1176(%rbp)
	jmp	.L6
.L12:
	movl	$1, -1172(%rbp)
	jmp	.L7
.L11:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L8
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L9
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L9:
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
	jmp	.L8
.L10:
	movl	-1172(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %ecx
	movl	-1176(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-1168(%rbp,%rax,4), %esi
	movl	-1172(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-1168(%rbp,%rax,4), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-1172(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1176(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -1168(%rbp,%rax,4)
.L8:
	addl	$1, -1172(%rbp)
.L7:
	movl	-1192(%rbp), %eax
	cmpl	%eax, -1172(%rbp)
	jle	.L11
	addl	$1, -1176(%rbp)
.L6:
	movl	-1196(%rbp), %eax
	cmpl	%eax, -1176(%rbp)
	jle	.L12
	movl	-1196(%rbp), %eax
	movl	-1192(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-1168(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
