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 <stdlib.h>

int main()
{
	int i, H, W, N, a[10001];
	scanf("%d %d", &H, &W);
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%d", &(a[i]));
	
	int j, color[100][100] = {}, cur = 1;
	for (i = 0; i < H; i++) {
		if (i % 2 == 0) {
			for (j = 0; j < W; j++) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		} else {
			for (j = W - 1; j >= 0; j--) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		}
	}
	
	for (i = 0; i < H; i++) {
		for (j = 0; j < W; j++) printf("%d ", color[i][j]);
		printf("\n");
	}
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80036(%rbp), %rdx
	leaq	-80040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -80028(%rbp)
	jmp	.L2
.L3:
	leaq	-40016(%rbp), %rdx
	movl	-80028(%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
	addl	$1, -80028(%rbp)
.L2:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jle	.L3
	leaq	-80016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -80020(%rbp)
	movl	$0, -80028(%rbp)
	jmp	.L4
.L13:
	movl	-80028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, -80024(%rbp)
	jmp	.L6
.L8:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L7
	addl	$1, -80020(%rbp)
.L7:
	addl	$1, -80024(%rbp)
.L6:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	-80036(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -80024(%rbp)
	jmp	.L10
.L12:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L11
	addl	$1, -80020(%rbp)
.L11:
	subl	$1, -80024(%rbp)
.L10:
	cmpl	$0, -80024(%rbp)
	jns	.L12
.L9:
	addl	$1, -80028(%rbp)
.L4:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L13
	movl	$0, -80028(%rbp)
	jmp	.L14
.L17:
	movl	$0, -80024(%rbp)
	jmp	.L15
.L16:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80024(%rbp)
.L15:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -80028(%rbp)
.L14:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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 "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77864
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80080
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r12
	movl	$1, %ebx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	40020(%rsp), %rbp
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 12(%rsp)
	jge	.L5
.L6:
	leaq	16(%rsp), %rbp
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movl	4(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L4
	movl	8(%rsp), %r10d
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	leal	-1(%r10), %eax
	movq	%rax, %rbx
	leaq	20(%rsp,%rax,4), %r8
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %r9b
	jne	.L7
	testl	%r10d, %r10d
	jle	.L8
	movq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%eax, %rsi
	movl	%eax, (%rcx)
	movl	40016(%rsp,%rsi,4), %edx
	subl	$1, %edx
	cmpl	$1, %edx
	movl	%edx, 40016(%rsp,%rsi,4)
	adcl	$0, %eax
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L10
.L8:
	addl	$1, %r9d
	addq	$400, %rdi
	addq	$400, %r8
	cmpl	%r11d, %r9d
	jne	.L13
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%ebx, %ebx
	testl	%r10d, %r10d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$400, %rbp
	call	putchar@PLT
	cmpl	%r13d, 4(%rsp)
	jle	.L4
	movl	8(%rsp), %r10d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ebx, %ebx
	js	.L8
	movslq	%ebx, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rsi
	movl	%eax, (%rdi,%rcx,4)
	movl	40016(%rsp,%rsi,4), %edx
	subl	$1, %edx
	cmpl	$1, %edx
	movl	%edx, 40016(%rsp,%rsi,4)
	adcl	$0, %eax
	subq	$1, %rcx
	testl	%ecx, %ecx
	jns	.L12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$80040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77864
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80080
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r12
	movl	$1, %ebx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	40020(%rsp), %rbp
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 12(%rsp)
	jge	.L5
.L6:
	leaq	16(%rsp), %rbp
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movl	4(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L4
	movl	8(%rsp), %r10d
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	leal	-1(%r10), %eax
	movq	%rax, %rbx
	leaq	20(%rsp,%rax,4), %r8
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %r9b
	jne	.L7
	testl	%r10d, %r10d
	jle	.L8
	movq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%eax, %rsi
	movl	%eax, (%rcx)
	movl	40016(%rsp,%rsi,4), %edx
	subl	$1, %edx
	cmpl	$1, %edx
	movl	%edx, 40016(%rsp,%rsi,4)
	adcl	$0, %eax
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L10
.L8:
	addl	$1, %r9d
	addq	$400, %rdi
	addq	$400, %r8
	cmpl	%r11d, %r9d
	jne	.L13
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%ebx, %ebx
	testl	%r10d, %r10d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$400, %rbp
	call	putchar@PLT
	cmpl	%r13d, 4(%rsp)
	jle	.L4
	movl	8(%rsp), %r10d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ebx, %ebx
	js	.L8
	movslq	%ebx, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rsi
	movl	%eax, (%rdi,%rcx,4)
	movl	40016(%rsp,%rsi,4), %edx
	subl	$1, %edx
	cmpl	$1, %edx
	movl	%edx, 40016(%rsp,%rsi,4)
	adcl	$0, %eax
	subq	$1, %rcx
	testl	%ecx, %ecx
	jns	.L12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$80040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>

int main()
{
	int i, H, W, N, a[10001];
	scanf("%d %d", &H, &W);
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%d", &(a[i]));
	
	int j, color[100][100] = {}, cur = 1;
	for (i = 0; i < H; i++) {
		if (i % 2 == 0) {
			for (j = 0; j < W; j++) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		} else {
			for (j = W - 1; j >= 0; j--) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		}
	}
	
	for (i = 0; i < H; i++) {
		for (j = 0; j < W; j++) printf("%d ", color[i][j]);
		printf("\n");
	}
	fflush(stdout);
	return 0;
}
2 2
2
3 1 1
 2 1
1
2
 1 2
1
2
 2 2
3
1 1 2
 3 5
5
1 2 5 4 3
 1 4
2
3 1 0
 2 2
3
1 2 1
 2 2
2
2 2 1
 1 4
3
2 2 0
 3 5
5
1 2 6 4 2

1 1 
2 1 
 1 
1 
 1 1 
 1 2 
3 3 
 1 2 2 3 3 
4 4 3 3 3 
4 4 5 5 5 
 1 1 1 2 
 1 2 
3 2 
 1 1 
2 2 
 1 1 2 2 
 1 2 2 3 3 
4 3 3 3 3 
4 4 4 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 <stdlib.h>

int main()
{
	int i, H, W, N, a[10001];
	scanf("%d %d", &H, &W);
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%d", &(a[i]));
	
	int j, color[100][100] = {}, cur = 1;
	for (i = 0; i < H; i++) {
		if (i % 2 == 0) {
			for (j = 0; j < W; j++) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		} else {
			for (j = W - 1; j >= 0; j--) {
				color[i][j] = cur;
				a[cur]--;
				if (a[cur] == 0) cur++;
			}
		}
	}
	
	for (i = 0; i < H; i++) {
		for (j = 0; j < W; j++) printf("%d ", color[i][j]);
		printf("\n");
	}
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80036(%rbp), %rdx
	leaq	-80040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -80028(%rbp)
	jmp	.L2
.L3:
	leaq	-40016(%rbp), %rdx
	movl	-80028(%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
	addl	$1, -80028(%rbp)
.L2:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jle	.L3
	leaq	-80016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -80020(%rbp)
	movl	$0, -80028(%rbp)
	jmp	.L4
.L13:
	movl	-80028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, -80024(%rbp)
	jmp	.L6
.L8:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L7
	addl	$1, -80020(%rbp)
.L7:
	addl	$1, -80024(%rbp)
.L6:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	-80036(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -80024(%rbp)
	jmp	.L10
.L12:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L11
	addl	$1, -80020(%rbp)
.L11:
	subl	$1, -80024(%rbp)
.L10:
	cmpl	$0, -80024(%rbp)
	jns	.L12
.L9:
	addl	$1, -80028(%rbp)
.L4:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L13
	movl	$0, -80028(%rbp)
	jmp	.L14
.L17:
	movl	$0, -80024(%rbp)
	jmp	.L15
.L16:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80024(%rbp)
.L15:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -80028(%rbp)
.L14:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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 "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80036(%rbp), %rdx
	leaq	-80040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -80028(%rbp)
	jmp	.L2
.L3:
	leaq	-40016(%rbp), %rdx
	movl	-80028(%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
	addl	$1, -80028(%rbp)
.L2:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jle	.L3
	leaq	-80016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -80020(%rbp)
	movl	$0, -80028(%rbp)
	jmp	.L4
.L13:
	movl	-80028(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, -80024(%rbp)
	jmp	.L6
.L8:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L7
	addl	$1, -80020(%rbp)
.L7:
	addl	$1, -80024(%rbp)
.L6:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L8
	jmp	.L9
.L5:
	movl	-80036(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -80024(%rbp)
	jmp	.L10
.L12:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-80020(%rbp), %eax
	movl	%eax, -80016(%rbp,%rdx,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-80020(%rbp), %eax
	cltq
	movl	%edx, -40016(%rbp,%rax,4)
	movl	-80020(%rbp), %eax
	cltq
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L11
	addl	$1, -80020(%rbp)
.L11:
	subl	$1, -80024(%rbp)
.L10:
	cmpl	$0, -80024(%rbp)
	jns	.L12
.L9:
	addl	$1, -80028(%rbp)
.L4:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L13
	movl	$0, -80028(%rbp)
	jmp	.L14
.L17:
	movl	$0, -80024(%rbp)
	jmp	.L15
.L16:
	movl	-80024(%rbp), %eax
	movslq	%eax, %rcx
	movl	-80028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80024(%rbp)
.L15:
	movl	-80036(%rbp), %eax
	cmpl	%eax, -80024(%rbp)
	jl	.L16
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -80028(%rbp)
.L14:
	movl	-80040(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L17
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
