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 H,W;
	scanf("%d%d",&H,&W);
	int N;
	scanf("%d",&N);
	int a[N];
	int sum[N+1];
	sum[0]=0;
	for(int i=0;i<N;i++){
		scanf("%d",&a[i]);
		sum[i+1]=sum[i]+a[i];
	}
	int ans[H][W];
	int count=0;
	int color=1;
	for(count=0;count<H*W;count++){
		int h,w;
		h=count/W;
		w=count%W;
		if(h%2!=0)w=W-w-1;
		if(count<sum[color])ans[h][w]=color;
		else{
			color++;
			ans[h][w]=color;
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			printf("%d",ans[i][j]);
			if(j<W-1)printf(" ");
		}
		printf("\n");
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$248, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -280(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%edx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	-144(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%edx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%edx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -88(%rbp)
	movq	-88(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -140(%rbp)
	jmp	.L8
.L9:
	movl	-140(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-104(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-104(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-140(%rbp), %eax
	leal	1(%rax), %edx
	addl	%esi, %ecx
	movq	-88(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -140(%rbp)
.L8:
	movl	-144(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	-176(%rbp), %r8
	movq	-168(%rbp), %r9
	movq	%r9, %rdx
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -136(%rbp)
	movl	$1, -132(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L13
.L17:
	movl	-148(%rbp), %edi
	movl	-136(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -116(%rbp)
	movl	-148(%rbp), %ecx
	movl	-136(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, -128(%rbp)
	movl	-116(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	-148(%rbp), %eax
	subl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
.L14:
	movq	-88(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -136(%rbp)
	jge	.L15
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	jmp	.L16
.L15:
	addl	$1, -132(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L16:
	addl	$1, -136(%rbp)
.L13:
	movl	-152(%rbp), %edx
	movl	-148(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -136(%rbp)
	jl	.L17
	movl	$0, -124(%rbp)
	jmp	.L18
.L22:
	movl	$0, -120(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-148(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jge	.L20
	movl	$32, %edi
	call	putchar@PLT
.L20:
	addl	$1, -120(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L21
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -124(%rbp)
.L18:
	movl	-152(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L22
	movl	$0, %eax
	movq	-280(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-68(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC1(%rip), %r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	-60(%rbp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rdi
	movq	%rax, %rsi
	salq	$2, %rax
	leaq	15(%rax), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L47:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L47
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L48
.L4:
	addq	$19, %rax
	movq	%rsp, %rcx
	movq	%rsp, %r14
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L48:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L7:
	leaq	3(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rax
	andq	$-4, %rbx
	shrq	$2, %rax
	movl	$0, 0(,%rax,4)
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__isoc99_scanf@PLT
	movl	-4(%r14), %eax
	addl	(%rbx,%r12,4), %eax
	movl	%eax, 4(%rbx,%r12,4)
	addq	$1, %r12
	cmpl	%r12d, -60(%rbp)
	jg	.L14
.L15:
	movslq	-64(%rbp), %rdx
	movslq	-68(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %r8
	imulq	%rdx, %rax
	movq	%rdx, %rsi
	leaq	0(,%rdx,4), %r15
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L10
.L50:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L50
.L10:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L11
	orq	$0, -8(%rsp,%rdx)
.L11:
	movl	%esi, %r10d
	movq	%rsp, %r12
	imull	%r8d, %r10d
	testl	%r10d, %r10d
	jle	.L13
	movq	%r15, %r9
	movl	$1, %edi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	shrq	$2, %r9
	xorl	%edx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ecx, %eax
	movl	%esi, %r11d
	cltd
	idivl	%esi
	subl	%edx, %r11d
	subl	$1, %r11d
	testb	$1, %al
	cmovne	%r11d, %edx
.L26:
	movslq	%edi, %r11
	cmpl	%ecx, (%rbx,%r11,4)
	jg	.L19
	addl	$1, %edi
.L19:
	cltq
	movslq	%edx, %rdx
	addl	$1, %ecx
	imulq	%r9, %rax
	addq	%rdx, %rax
	movl	%edi, (%r12,%rax,4)
	cmpl	%r10d, %ecx
	jne	.L20
.L13:
	xorl	%r14d, %r14d
	testl	%r8d, %r8d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%ebx, %ebx
	testl	%esi, %esi
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%r12,%rbx,4), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-64(%rbp), %eax
	leal	-1(%rax), %edx
	cmpl	%ebx, %edx
	jg	.L51
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L25
.L24:
	movl	$10, %edi
	addl	$1, %r14d
	addq	%r15, %r12
	call	putchar@PLT
	cmpl	%r14d, -68(%rbp)
	jle	.L17
	movl	-64(%rbp), %esi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	movl	$32, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, -64(%rbp)
	jg	.L25
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L52
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L49:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-68(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC1(%rip), %r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	-60(%rbp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rdi
	movq	%rax, %rsi
	salq	$2, %rax
	leaq	15(%rax), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L47:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L47
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L48
.L4:
	addq	$19, %rax
	movq	%rsp, %rcx
	movq	%rsp, %r14
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L48:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L7:
	leaq	3(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rax
	andq	$-4, %rbx
	shrq	$2, %rax
	movl	$0, 0(,%rax,4)
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__isoc99_scanf@PLT
	movl	-4(%r14), %eax
	addl	(%rbx,%r12,4), %eax
	movl	%eax, 4(%rbx,%r12,4)
	addq	$1, %r12
	cmpl	%r12d, -60(%rbp)
	jg	.L14
.L15:
	movslq	-64(%rbp), %rdx
	movslq	-68(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %r8
	imulq	%rdx, %rax
	movq	%rdx, %rsi
	leaq	0(,%rdx,4), %r15
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L10
.L50:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L50
.L10:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L11
	orq	$0, -8(%rsp,%rdx)
.L11:
	movl	%esi, %r10d
	movq	%rsp, %r12
	imull	%r8d, %r10d
	testl	%r10d, %r10d
	jle	.L13
	movq	%r15, %r9
	movl	$1, %edi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	shrq	$2, %r9
	xorl	%edx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ecx, %eax
	movl	%esi, %r11d
	cltd
	idivl	%esi
	subl	%edx, %r11d
	subl	$1, %r11d
	testb	$1, %al
	cmovne	%r11d, %edx
.L26:
	movslq	%edi, %r11
	cmpl	%ecx, (%rbx,%r11,4)
	jg	.L19
	addl	$1, %edi
.L19:
	cltq
	movslq	%edx, %rdx
	addl	$1, %ecx
	imulq	%r9, %rax
	addq	%rdx, %rax
	movl	%edi, (%r12,%rax,4)
	cmpl	%r10d, %ecx
	jne	.L20
.L13:
	xorl	%r14d, %r14d
	testl	%r8d, %r8d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%ebx, %ebx
	testl	%esi, %esi
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%r12,%rbx,4), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-64(%rbp), %eax
	leal	-1(%rax), %edx
	cmpl	%ebx, %edx
	jg	.L51
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L25
.L24:
	movl	$10, %edi
	addl	$1, %r14d
	addq	%r15, %r12
	call	putchar@PLT
	cmpl	%r14d, -68(%rbp)
	jle	.L17
	movl	-64(%rbp), %esi
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	movl	$32, %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, -64(%rbp)
	jg	.L25
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L52
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L49:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

int main(){
	int H,W;
	scanf("%d%d",&H,&W);
	int N;
	scanf("%d",&N);
	int a[N];
	int sum[N+1];
	sum[0]=0;
	for(int i=0;i<N;i++){
		scanf("%d",&a[i]);
		sum[i+1]=sum[i]+a[i];
	}
	int ans[H][W];
	int count=0;
	int color=1;
	for(count=0;count<H*W;count++){
		int h,w;
		h=count/W;
		w=count%W;
		if(h%2!=0)w=W-w-1;
		if(count<sum[color])ans[h][w]=color;
		else{
			color++;
			ans[h][w]=color;
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			printf("%d",ans[i][j]);
			if(j<W-1)printf(" ");
		}
		printf("\n");
	}
	
	return 0;
}
2 2
3
2 1 1

1 1
3 2

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 H,W;
	scanf("%d%d",&H,&W);
	int N;
	scanf("%d",&N);
	int a[N];
	int sum[N+1];
	sum[0]=0;
	for(int i=0;i<N;i++){
		scanf("%d",&a[i]);
		sum[i+1]=sum[i]+a[i];
	}
	int ans[H][W];
	int count=0;
	int color=1;
	for(count=0;count<H*W;count++){
		int h,w;
		h=count/W;
		w=count%W;
		if(h%2!=0)w=W-w-1;
		if(count<sum[color])ans[h][w]=color;
		else{
			color++;
			ans[h][w]=color;
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			printf("%d",ans[i][j]);
			if(j<W-1)printf(" ");
		}
		printf("\n");
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$248, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -280(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%edx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	-144(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%edx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%edx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -88(%rbp)
	movq	-88(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -140(%rbp)
	jmp	.L8
.L9:
	movl	-140(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-104(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-104(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-140(%rbp), %eax
	leal	1(%rax), %edx
	addl	%esi, %ecx
	movq	-88(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -140(%rbp)
.L8:
	movl	-144(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	-176(%rbp), %r8
	movq	-168(%rbp), %r9
	movq	%r9, %rdx
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -136(%rbp)
	movl	$1, -132(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L13
.L17:
	movl	-148(%rbp), %edi
	movl	-136(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -116(%rbp)
	movl	-148(%rbp), %ecx
	movl	-136(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, -128(%rbp)
	movl	-116(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	-148(%rbp), %eax
	subl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
.L14:
	movq	-88(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -136(%rbp)
	jge	.L15
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	jmp	.L16
.L15:
	addl	$1, -132(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L16:
	addl	$1, -136(%rbp)
.L13:
	movl	-152(%rbp), %edx
	movl	-148(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -136(%rbp)
	jl	.L17
	movl	$0, -124(%rbp)
	jmp	.L18
.L22:
	movl	$0, -120(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-148(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jge	.L20
	movl	$32, %edi
	call	putchar@PLT
.L20:
	addl	$1, -120(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L21
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -124(%rbp)
.L18:
	movl	-152(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L22
	movl	$0, %eax
	movq	-280(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$248, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -280(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-144(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%edx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	-144(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%edx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%edx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -88(%rbp)
	movq	-88(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -140(%rbp)
	jmp	.L8
.L9:
	movl	-140(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-104(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-104(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-140(%rbp), %eax
	leal	1(%rax), %edx
	addl	%esi, %ecx
	movq	-88(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -140(%rbp)
.L8:
	movl	-144(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	-176(%rbp), %r8
	movq	-168(%rbp), %r9
	movq	%r9, %rdx
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -136(%rbp)
	movl	$1, -132(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L13
.L17:
	movl	-148(%rbp), %edi
	movl	-136(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -116(%rbp)
	movl	-148(%rbp), %ecx
	movl	-136(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, -128(%rbp)
	movl	-116(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L14
	movl	-148(%rbp), %eax
	subl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
.L14:
	movq	-88(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -136(%rbp)
	jge	.L15
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	jmp	.L16
.L15:
	addl	$1, -132(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rsi
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-132(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L16:
	addl	$1, -136(%rbp)
.L13:
	movl	-152(%rbp), %edx
	movl	-148(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, -136(%rbp)
	jl	.L17
	movl	$0, -124(%rbp)
	jmp	.L18
.L22:
	movl	$0, -120(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-148(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -120(%rbp)
	jge	.L20
	movl	$32, %edi
	call	putchar@PLT
.L20:
	addl	$1, -120(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L21
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -124(%rbp)
.L18:
	movl	-152(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L22
	movl	$0, %eax
	movq	-280(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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:
