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;
	scanf("%d %d", &n, &m);
	int i, j, k;
	int a[10];
	for (i = 0; i < m; i++)
		scanf("%d", &a[i]);
	int c[10] = { 1000000009,2,5,5,4,5,6,3,7,6 };
	int dp[10004][10];
	for (i = 0; i < 10004; i++)
		for (j = 0; j < 10; j++)
			dp[i][j] = 0;
	for (i = 0; i <= n; i++)
		dp[i][0] = -1;
	dp[0][0] = 0;
	int v[10], p;
	for (i = 1; i <= n; i++)
	{
		for (j = 0; j < m; j++)
		{
			if (i >= c[a[j]])
			{
				if (i == 10)
					i = 10;
				if (dp[i-c[a[j]]][0]>=0 && dp[i][0] < dp[i - c[a[j]]][0] + 1)
				{
					for (k = 0; k < 10; k++)
						dp[i][k] = dp[i - c[a[j]]][k];
					dp[i][0]++;
					dp[i][a[j]]++;
				}
				if (dp[i][0] == dp[i - c[a[j]]][0] + 1 && dp[i - c[a[j]]][0] >= 0)
				{
					for (k = 0; k < 10; k++)
						v[k] = dp[i - c[a[j]]][k];
					v[0]++;
					v[a[j]]++;
					p = -1;
					for (k = 9; k > 0; k--)
					{
						if (dp[i][k] > v[k])
							break;
						if (dp[i][k] < v[k])
						{
							p = 1;
							break;
						}
					}
					if (p > 0)
					{
						for (k = 0; k < 10; k++)
							dp[i][k] = v[k];
					}
				}
			}
		}
	}
	for (i = 9; i > 0; i--)
		for (j = 0; j < dp[n][i]; j++)
			printf("%d", i);
	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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400340(%rbp), %rdx
	leaq	-400344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400336(%rbp)
	jmp	.L2
.L3:
	leaq	-400320(%rbp), %rdx
	movl	-400336(%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, -400336(%rbp)
.L2:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L3
	movl	$1000000009, -400272(%rbp)
	movl	$2, -400268(%rbp)
	movl	$5, -400264(%rbp)
	movl	$5, -400260(%rbp)
	movl	$4, -400256(%rbp)
	movl	$5, -400252(%rbp)
	movl	$6, -400248(%rbp)
	movl	$3, -400244(%rbp)
	movl	$7, -400240(%rbp)
	movl	$6, -400236(%rbp)
	movl	$0, -400336(%rbp)
	jmp	.L4
.L7:
	movl	$0, -400332(%rbp)
	jmp	.L5
.L6:
	movl	-400332(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -400176(%rbp,%rax,4)
	addl	$1, -400332(%rbp)
.L5:
	cmpl	$9, -400332(%rbp)
	jle	.L6
	addl	$1, -400336(%rbp)
.L4:
	cmpl	$10003, -400336(%rbp)
	jle	.L7
	movl	$0, -400336(%rbp)
	jmp	.L8
.L9:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	$-1, (%rax)
	addl	$1, -400336(%rbp)
.L8:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L9
	movl	$0, -400176(%rbp)
	movl	$1, -400336(%rbp)
	jmp	.L10
.L27:
	movl	$0, -400332(%rbp)
	jmp	.L11
.L26:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L12
	cmpl	$10, -400336(%rbp)
	jne	.L13
	movl	$10, -400336(%rbp)
.L13:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L14
	movl	$0, -400328(%rbp)
	jmp	.L15
.L16:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L15:
	cmpl	$9, -400328(%rbp)
	jle	.L16
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	%ecx, (%rax)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %edx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-400176(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -400176(%rbp,%rax,4)
.L14:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, %ecx
	jne	.L12
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L12
	movl	$0, -400328(%rbp)
	jmp	.L17
.L18:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L17:
	cmpl	$9, -400328(%rbp)
	jle	.L18
	movl	-400224(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400224(%rbp)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-400224(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	movl	$-1, -400324(%rbp)
	movl	$9, -400328(%rbp)
	jmp	.L19
.L23:
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L34
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L22
	movl	$1, -400324(%rbp)
	jmp	.L21
.L22:
	subl	$1, -400328(%rbp)
.L19:
	cmpl	$0, -400328(%rbp)
	jg	.L23
	jmp	.L21
.L34:
	nop
.L21:
	cmpl	$0, -400324(%rbp)
	jle	.L12
	movl	$0, -400328(%rbp)
	jmp	.L24
.L25:
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L24:
	cmpl	$9, -400328(%rbp)
	jle	.L25
.L12:
	addl	$1, -400332(%rbp)
.L11:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L26
	addl	$1, -400336(%rbp)
.L10:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L27
	movl	$9, -400336(%rbp)
	jmp	.L28
.L31:
	movl	$0, -400332(%rbp)
	jmp	.L29
.L30:
	movl	-400336(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400332(%rbp)
.L29:
	movl	-400344(%rbp), %eax
	movl	-400336(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L30
	subl	$1, -400336(%rbp)
.L28:
	cmpl	$0, -400336(%rbp)
	jg	.L31
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3024, %rsp
	.cfi_def_cfa_offset 400384
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400328(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movdqa	.LC2(%rip), %xmm0
	movq	.LC4(%rip), %rax
	leaq	160(%rsp), %r12
	leaq	400320(%rsp), %rdx
	movq	%r12, %rsi
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movq	%rax, 96(%rsp)
	movq	%r12, %rax
	movaps	%xmm0, 80(%rsp)
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$80, %rax
	movaps	%xmm0, -64(%rax)
	movaps	%xmm0, -48(%rax)
	movaps	%xmm0, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	8(%rsp), %ebp
	testl	%ebp, %ebp
	js	.L41
	movslq	%ebp, %rdx
	leaq	40(%r12), %rax
	leaq	(%rdx,%rdx,4), %rdi
	leaq	(%rax,%rdi,8), %rdi
	jmp	.L10
.L42:
	addq	$40, %rax
.L10:
	movl	$-1, (%rsi)
	movq	%rax, %rsi
	cmpq	%rdi, %rax
	jne	.L42
	movl	$0, 160(%rsp)
	testl	%ebp, %ebp
	jle	.L18
	testl	%ecx, %ecx
	jle	.L18
	leal	-1(%rcx), %eax
	leaq	200(%rsp), %r10
	addl	$1, %ebp
	movl	$1, %r9d
	leaq	16(%rsp), %r13
	leaq	20(%rsp,%rax,4), %r11
.L9:
	movslq	%r9d, %rcx
	movq	%r13, %rax
	leaq	(%rcx,%rcx,4), %rbx
	addq	%rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%rax), %r8
	movl	64(%rsp,%r8,4), %esi
	cmpl	%r9d, %esi
	jg	.L13
	movl	%r9d, %ecx
	subl	%esi, %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,4), %rsi
	salq	$3, %rsi
	movl	160(%rsp,%rsi), %edi
	testl	%edi, %edi
	js	.L13
	movl	(%r10), %r14d
	cmpl	%r14d, %edi
	jge	.L43
.L15:
	leal	1(%rdi), %esi
	testl	%edi, %edi
	js	.L13
	cmpl	%r14d, %esi
	je	.L44
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$4, %rax
	cmpq	%rax, %r11
	jne	.L17
	addl	$1, %r9d
	addq	$40, %r10
	cmpl	%ebp, %r9d
	jne	.L9
.L18:
	movl	$9, %ebp
	leaq	.LC1(%rip), %r13
.L19:
	movslq	%ebp, %r12
	leaq	(%rdx,%rdx,4), %rax
	xorl	%ebx, %ebx
	leaq	(%r12,%rax,2), %rax
	movl	160(%rsp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	8(%rsp), %rdx
	addl	$1, %ebx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%r12,%rax,2), %rax
	cmpl	%ebx, 160(%rsp,%rax,4)
	jg	.L20
.L22:
	subl	$1, %ebp
	jne	.L19
	movl	$10, %edi
	call	putchar@PLT
	movq	400328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$400336, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L43:
	.cfi_restore_state
	movd	184(%rsp,%rsi), %xmm1
	addl	$1, %edi
	movd	188(%rsp,%rsi), %xmm4
	movd	176(%rsp,%rsi), %xmm0
	movd	180(%rsp,%rsi), %xmm5
	punpckldq	%xmm4, %xmm1
	movl	164(%rsp,%rsi), %r14d
	movd	168(%rsp,%rsi), %xmm2
	movd	172(%rsp,%rsi), %xmm3
	punpckldq	%xmm5, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movq	32(%r12,%rsi), %xmm1
	movd	%r14d, %xmm6
	punpckldq	%xmm3, %xmm2
	movups	%xmm0, 16(%r10)
	movq	%xmm1, 32(%r10)
	movd	%edi, %xmm1
	leaq	(%rbx,%r8), %rdi
	punpckldq	%xmm6, %xmm1
	punpcklqdq	%xmm2, %xmm1
	movups	%xmm1, (%r10)
	addl	$1, 160(%rsp,%rdi,4)
	movl	(%r10), %r14d
	movl	160(%rsp,%rsi), %edi
	jmp	.L15
.L44:
	leaq	(%rcx,%rcx,4), %rcx
	movd	%esi, %xmm0
	salq	$3, %rcx
	movd	172(%rsp,%rcx), %xmm7
	movd	168(%rsp,%rcx), %xmm1
	movd	184(%rsp,%rcx), %xmm2
	movd	188(%rsp,%rcx), %xmm3
	movd	180(%rsp,%rcx), %xmm4
	punpckldq	%xmm7, %xmm1
	movd	164(%rsp,%rcx), %xmm7
	punpckldq	%xmm3, %xmm2
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movd	176(%rsp,%rcx), %xmm1
	movq	32(%r12,%rcx), %rcx
	movaps	%xmm0, 112(%rsp)
	punpckldq	%xmm4, %xmm1
	movq	%rcx, 144(%rsp)
	punpcklqdq	%xmm2, %xmm1
	movaps	%xmm1, 128(%rsp)
	addl	$1, 112(%rsp,%r8,4)
	movl	148(%rsp), %edi
	cmpl	%edi, 36(%r10)
	jg	.L13
	movq	144(%rsp), %rsi
	movl	144(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 32(%r10)
	jg	.L13
	movl	140(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 28(%r10)
	jg	.L13
	movl	136(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 24(%r10)
	jg	.L13
	movl	132(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 20(%r10)
	jg	.L13
	movl	128(%rsp), %ecx
	jl	.L16
	cmpl	16(%r10), %ecx
	jl	.L13
	movl	124(%rsp), %ecx
	jg	.L16
	cmpl	%ecx, 12(%r10)
	jg	.L13
	movl	120(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 8(%r10)
	jg	.L13
	movl	116(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 4(%r10)
	jge	.L13
.L16:
	movdqa	112(%rsp), %xmm5
	movq	%rsi, 32(%r10)
	movdqa	128(%rsp), %xmm6
	movups	%xmm5, (%r10)
	movups	%xmm6, 16(%r10)
	jmp	.L13
.L41:
	movl	$0, 160(%rsp)
	movslq	%ebp, %rdx
	jmp	.L18
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000009
	.long	2
	.long	5
	.long	5
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	3
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	7
	.long	6
	.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3024, %rsp
	.cfi_def_cfa_offset 400384
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400328(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movdqa	.LC2(%rip), %xmm0
	movq	.LC4(%rip), %rax
	leaq	160(%rsp), %r12
	leaq	400320(%rsp), %rdx
	movq	%r12, %rsi
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movq	%rax, 96(%rsp)
	movq	%r12, %rax
	movaps	%xmm0, 80(%rsp)
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$80, %rax
	movaps	%xmm0, -64(%rax)
	movaps	%xmm0, -48(%rax)
	movaps	%xmm0, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	8(%rsp), %ebp
	testl	%ebp, %ebp
	js	.L41
	movslq	%ebp, %rdx
	leaq	40(%r12), %rax
	leaq	(%rdx,%rdx,4), %rdi
	leaq	(%rax,%rdi,8), %rdi
	jmp	.L10
.L42:
	addq	$40, %rax
.L10:
	movl	$-1, (%rsi)
	movq	%rax, %rsi
	cmpq	%rdi, %rax
	jne	.L42
	movl	$0, 160(%rsp)
	testl	%ebp, %ebp
	jle	.L18
	testl	%ecx, %ecx
	jle	.L18
	leal	-1(%rcx), %eax
	leaq	200(%rsp), %r10
	addl	$1, %ebp
	movl	$1, %r9d
	leaq	16(%rsp), %r13
	leaq	20(%rsp,%rax,4), %r11
.L9:
	movslq	%r9d, %rcx
	movq	%r13, %rax
	leaq	(%rcx,%rcx,4), %rbx
	addq	%rbx, %rbx
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%rax), %r8
	movl	64(%rsp,%r8,4), %esi
	cmpl	%r9d, %esi
	jg	.L13
	movl	%r9d, %ecx
	subl	%esi, %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,4), %rsi
	salq	$3, %rsi
	movl	160(%rsp,%rsi), %edi
	testl	%edi, %edi
	js	.L13
	movl	(%r10), %r14d
	cmpl	%r14d, %edi
	jge	.L43
.L15:
	leal	1(%rdi), %esi
	testl	%edi, %edi
	js	.L13
	cmpl	%r14d, %esi
	je	.L44
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$4, %rax
	cmpq	%rax, %r11
	jne	.L17
	addl	$1, %r9d
	addq	$40, %r10
	cmpl	%ebp, %r9d
	jne	.L9
.L18:
	movl	$9, %ebp
	leaq	.LC1(%rip), %r13
.L19:
	movslq	%ebp, %r12
	leaq	(%rdx,%rdx,4), %rax
	xorl	%ebx, %ebx
	leaq	(%r12,%rax,2), %rax
	movl	160(%rsp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	8(%rsp), %rdx
	addl	$1, %ebx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%r12,%rax,2), %rax
	cmpl	%ebx, 160(%rsp,%rax,4)
	jg	.L20
.L22:
	subl	$1, %ebp
	jne	.L19
	movl	$10, %edi
	call	putchar@PLT
	movq	400328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$400336, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L43:
	.cfi_restore_state
	movd	184(%rsp,%rsi), %xmm1
	addl	$1, %edi
	movd	188(%rsp,%rsi), %xmm4
	movd	176(%rsp,%rsi), %xmm0
	movd	180(%rsp,%rsi), %xmm5
	punpckldq	%xmm4, %xmm1
	movl	164(%rsp,%rsi), %r14d
	movd	168(%rsp,%rsi), %xmm2
	movd	172(%rsp,%rsi), %xmm3
	punpckldq	%xmm5, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movq	32(%r12,%rsi), %xmm1
	movd	%r14d, %xmm6
	punpckldq	%xmm3, %xmm2
	movups	%xmm0, 16(%r10)
	movq	%xmm1, 32(%r10)
	movd	%edi, %xmm1
	leaq	(%rbx,%r8), %rdi
	punpckldq	%xmm6, %xmm1
	punpcklqdq	%xmm2, %xmm1
	movups	%xmm1, (%r10)
	addl	$1, 160(%rsp,%rdi,4)
	movl	(%r10), %r14d
	movl	160(%rsp,%rsi), %edi
	jmp	.L15
.L44:
	leaq	(%rcx,%rcx,4), %rcx
	movd	%esi, %xmm0
	salq	$3, %rcx
	movd	172(%rsp,%rcx), %xmm7
	movd	168(%rsp,%rcx), %xmm1
	movd	184(%rsp,%rcx), %xmm2
	movd	188(%rsp,%rcx), %xmm3
	movd	180(%rsp,%rcx), %xmm4
	punpckldq	%xmm7, %xmm1
	movd	164(%rsp,%rcx), %xmm7
	punpckldq	%xmm3, %xmm2
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movd	176(%rsp,%rcx), %xmm1
	movq	32(%r12,%rcx), %rcx
	movaps	%xmm0, 112(%rsp)
	punpckldq	%xmm4, %xmm1
	movq	%rcx, 144(%rsp)
	punpcklqdq	%xmm2, %xmm1
	movaps	%xmm1, 128(%rsp)
	addl	$1, 112(%rsp,%r8,4)
	movl	148(%rsp), %edi
	cmpl	%edi, 36(%r10)
	jg	.L13
	movq	144(%rsp), %rsi
	movl	144(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 32(%r10)
	jg	.L13
	movl	140(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 28(%r10)
	jg	.L13
	movl	136(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 24(%r10)
	jg	.L13
	movl	132(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 20(%r10)
	jg	.L13
	movl	128(%rsp), %ecx
	jl	.L16
	cmpl	16(%r10), %ecx
	jl	.L13
	movl	124(%rsp), %ecx
	jg	.L16
	cmpl	%ecx, 12(%r10)
	jg	.L13
	movl	120(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 8(%r10)
	jg	.L13
	movl	116(%rsp), %ecx
	jl	.L16
	cmpl	%ecx, 4(%r10)
	jge	.L13
.L16:
	movdqa	112(%rsp), %xmm5
	movq	%rsi, 32(%r10)
	movdqa	128(%rsp), %xmm6
	movups	%xmm5, (%r10)
	movups	%xmm6, 16(%r10)
	jmp	.L13
.L41:
	movl	$0, 160(%rsp)
	movslq	%ebp, %rdx
	jmp	.L18
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000009
	.long	2
	.long	5
	.long	5
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	3
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	7
	.long	6
	.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;
	scanf("%d %d", &n, &m);
	int i, j, k;
	int a[10];
	for (i = 0; i < m; i++)
		scanf("%d", &a[i]);
	int c[10] = { 1000000009,2,5,5,4,5,6,3,7,6 };
	int dp[10004][10];
	for (i = 0; i < 10004; i++)
		for (j = 0; j < 10; j++)
			dp[i][j] = 0;
	for (i = 0; i <= n; i++)
		dp[i][0] = -1;
	dp[0][0] = 0;
	int v[10], p;
	for (i = 1; i <= n; i++)
	{
		for (j = 0; j < m; j++)
		{
			if (i >= c[a[j]])
			{
				if (i == 10)
					i = 10;
				if (dp[i-c[a[j]]][0]>=0 && dp[i][0] < dp[i - c[a[j]]][0] + 1)
				{
					for (k = 0; k < 10; k++)
						dp[i][k] = dp[i - c[a[j]]][k];
					dp[i][0]++;
					dp[i][a[j]]++;
				}
				if (dp[i][0] == dp[i - c[a[j]]][0] + 1 && dp[i - c[a[j]]][0] >= 0)
				{
					for (k = 0; k < 10; k++)
						v[k] = dp[i - c[a[j]]][k];
					v[0]++;
					v[a[j]]++;
					p = -1;
					for (k = 9; k > 0; k--)
					{
						if (dp[i][k] > v[k])
							break;
						if (dp[i][k] < v[k])
						{
							p = 1;
							break;
						}
					}
					if (p > 0)
					{
						for (k = 0; k < 10; k++)
							dp[i][k] = v[k];
					}
				}
			}
		}
	}
	for (i = 9; i > 0; i--)
		for (j = 0; j < dp[n][i]; j++)
			printf("%d", i);
	printf("\n");
	return 0;
}
101 9
9 8 7 6 5 4 3 1 1
 20 4
3 7 8 7
 15 4
5 4 6
 15 7
5 3 6
 15 6
5 1 6
 12 6
5 1 6
 101 9
9 8 1 6 5 4 3 2 1
 20 4
3 7 8 5
 15 3
5 4 9
 15 7
2 3 6

71111111111111111111111111111111111111111111111111
 777773
 654
 555
 511111
 111111
 5111111111111111111111111111111111111111111111111
 777775
 954
 333

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;
	scanf("%d %d", &n, &m);
	int i, j, k;
	int a[10];
	for (i = 0; i < m; i++)
		scanf("%d", &a[i]);
	int c[10] = { 1000000009,2,5,5,4,5,6,3,7,6 };
	int dp[10004][10];
	for (i = 0; i < 10004; i++)
		for (j = 0; j < 10; j++)
			dp[i][j] = 0;
	for (i = 0; i <= n; i++)
		dp[i][0] = -1;
	dp[0][0] = 0;
	int v[10], p;
	for (i = 1; i <= n; i++)
	{
		for (j = 0; j < m; j++)
		{
			if (i >= c[a[j]])
			{
				if (i == 10)
					i = 10;
				if (dp[i-c[a[j]]][0]>=0 && dp[i][0] < dp[i - c[a[j]]][0] + 1)
				{
					for (k = 0; k < 10; k++)
						dp[i][k] = dp[i - c[a[j]]][k];
					dp[i][0]++;
					dp[i][a[j]]++;
				}
				if (dp[i][0] == dp[i - c[a[j]]][0] + 1 && dp[i - c[a[j]]][0] >= 0)
				{
					for (k = 0; k < 10; k++)
						v[k] = dp[i - c[a[j]]][k];
					v[0]++;
					v[a[j]]++;
					p = -1;
					for (k = 9; k > 0; k--)
					{
						if (dp[i][k] > v[k])
							break;
						if (dp[i][k] < v[k])
						{
							p = 1;
							break;
						}
					}
					if (p > 0)
					{
						for (k = 0; k < 10; k++)
							dp[i][k] = v[k];
					}
				}
			}
		}
	}
	for (i = 9; i > 0; i--)
		for (j = 0; j < dp[n][i]; j++)
			printf("%d", i);
	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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400340(%rbp), %rdx
	leaq	-400344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400336(%rbp)
	jmp	.L2
.L3:
	leaq	-400320(%rbp), %rdx
	movl	-400336(%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, -400336(%rbp)
.L2:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L3
	movl	$1000000009, -400272(%rbp)
	movl	$2, -400268(%rbp)
	movl	$5, -400264(%rbp)
	movl	$5, -400260(%rbp)
	movl	$4, -400256(%rbp)
	movl	$5, -400252(%rbp)
	movl	$6, -400248(%rbp)
	movl	$3, -400244(%rbp)
	movl	$7, -400240(%rbp)
	movl	$6, -400236(%rbp)
	movl	$0, -400336(%rbp)
	jmp	.L4
.L7:
	movl	$0, -400332(%rbp)
	jmp	.L5
.L6:
	movl	-400332(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -400176(%rbp,%rax,4)
	addl	$1, -400332(%rbp)
.L5:
	cmpl	$9, -400332(%rbp)
	jle	.L6
	addl	$1, -400336(%rbp)
.L4:
	cmpl	$10003, -400336(%rbp)
	jle	.L7
	movl	$0, -400336(%rbp)
	jmp	.L8
.L9:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	$-1, (%rax)
	addl	$1, -400336(%rbp)
.L8:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L9
	movl	$0, -400176(%rbp)
	movl	$1, -400336(%rbp)
	jmp	.L10
.L27:
	movl	$0, -400332(%rbp)
	jmp	.L11
.L26:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L12
	cmpl	$10, -400336(%rbp)
	jne	.L13
	movl	$10, -400336(%rbp)
.L13:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L14
	movl	$0, -400328(%rbp)
	jmp	.L15
.L16:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L15:
	cmpl	$9, -400328(%rbp)
	jle	.L16
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	%ecx, (%rax)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %edx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-400176(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -400176(%rbp,%rax,4)
.L14:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, %ecx
	jne	.L12
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L12
	movl	$0, -400328(%rbp)
	jmp	.L17
.L18:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L17:
	cmpl	$9, -400328(%rbp)
	jle	.L18
	movl	-400224(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400224(%rbp)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-400224(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	movl	$-1, -400324(%rbp)
	movl	$9, -400328(%rbp)
	jmp	.L19
.L23:
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L34
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L22
	movl	$1, -400324(%rbp)
	jmp	.L21
.L22:
	subl	$1, -400328(%rbp)
.L19:
	cmpl	$0, -400328(%rbp)
	jg	.L23
	jmp	.L21
.L34:
	nop
.L21:
	cmpl	$0, -400324(%rbp)
	jle	.L12
	movl	$0, -400328(%rbp)
	jmp	.L24
.L25:
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L24:
	cmpl	$9, -400328(%rbp)
	jle	.L25
.L12:
	addl	$1, -400332(%rbp)
.L11:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L26
	addl	$1, -400336(%rbp)
.L10:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L27
	movl	$9, -400336(%rbp)
	jmp	.L28
.L31:
	movl	$0, -400332(%rbp)
	jmp	.L29
.L30:
	movl	-400336(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400332(%rbp)
.L29:
	movl	-400344(%rbp), %eax
	movl	-400336(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L30
	subl	$1, -400336(%rbp)
.L28:
	cmpl	$0, -400336(%rbp)
	jg	.L31
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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.
val
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400340(%rbp), %rdx
	leaq	-400344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400336(%rbp)
	jmp	.L2
.L3:
	leaq	-400320(%rbp), %rdx
	movl	-400336(%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, -400336(%rbp)
.L2:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L3
	movl	$1000000009, -400272(%rbp)
	movl	$2, -400268(%rbp)
	movl	$5, -400264(%rbp)
	movl	$5, -400260(%rbp)
	movl	$4, -400256(%rbp)
	movl	$5, -400252(%rbp)
	movl	$6, -400248(%rbp)
	movl	$3, -400244(%rbp)
	movl	$7, -400240(%rbp)
	movl	$6, -400236(%rbp)
	movl	$0, -400336(%rbp)
	jmp	.L4
.L7:
	movl	$0, -400332(%rbp)
	jmp	.L5
.L6:
	movl	-400332(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -400176(%rbp,%rax,4)
	addl	$1, -400332(%rbp)
.L5:
	cmpl	$9, -400332(%rbp)
	jle	.L6
	addl	$1, -400336(%rbp)
.L4:
	cmpl	$10003, -400336(%rbp)
	jle	.L7
	movl	$0, -400336(%rbp)
	jmp	.L8
.L9:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	$-1, (%rax)
	addl	$1, -400336(%rbp)
.L8:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L9
	movl	$0, -400176(%rbp)
	movl	$1, -400336(%rbp)
	jmp	.L10
.L27:
	movl	$0, -400332(%rbp)
	jmp	.L11
.L26:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %eax
	cmpl	%eax, -400336(%rbp)
	jl	.L12
	cmpl	$10, -400336(%rbp)
	jne	.L13
	movl	$10, -400336(%rbp)
.L13:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L14
	movl	$0, -400328(%rbp)
	jmp	.L15
.L16:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L15:
	cmpl	$9, -400328(%rbp)
	jle	.L16
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	%ecx, (%rax)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %edx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-400176(%rbp,%rax,4), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -400176(%rbp,%rax,4)
.L14:
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %ecx
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, %ecx
	jne	.L12
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %edx
	movl	-400336(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rbp, %rax
	subq	$400176, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L12
	movl	$0, -400328(%rbp)
	jmp	.L17
.L18:
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	cltq
	movl	-400272(%rbp,%rax,4), %ecx
	movl	-400336(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L17:
	cmpl	$9, -400328(%rbp)
	jle	.L18
	movl	-400224(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400224(%rbp)
	movl	-400332(%rbp), %eax
	cltq
	movl	-400320(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-400224(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400224(%rbp,%rax,4)
	movl	$-1, -400324(%rbp)
	movl	$9, -400328(%rbp)
	jmp	.L19
.L23:
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L34
	movl	-400328(%rbp), %eax
	movslq	%eax, %rcx
	movl	-400336(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L22
	movl	$1, -400324(%rbp)
	jmp	.L21
.L22:
	subl	$1, -400328(%rbp)
.L19:
	cmpl	$0, -400328(%rbp)
	jg	.L23
	jmp	.L21
.L34:
	nop
.L21:
	cmpl	$0, -400324(%rbp)
	jle	.L12
	movl	$0, -400328(%rbp)
	jmp	.L24
.L25:
	movl	-400328(%rbp), %eax
	cltq
	movl	-400224(%rbp,%rax,4), %edx
	movl	-400328(%rbp), %eax
	movslq	%eax, %rsi
	movl	-400336(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -400176(%rbp,%rax,4)
	addl	$1, -400328(%rbp)
.L24:
	cmpl	$9, -400328(%rbp)
	jle	.L25
.L12:
	addl	$1, -400332(%rbp)
.L11:
	movl	-400340(%rbp), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L26
	addl	$1, -400336(%rbp)
.L10:
	movl	-400344(%rbp), %eax
	cmpl	%eax, -400336(%rbp)
	jle	.L27
	movl	$9, -400336(%rbp)
	jmp	.L28
.L31:
	movl	$0, -400332(%rbp)
	jmp	.L29
.L30:
	movl	-400336(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400332(%rbp)
.L29:
	movl	-400344(%rbp), %eax
	movl	-400336(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-400176(%rbp,%rax,4), %eax
	cmpl	%eax, -400332(%rbp)
	jl	.L30
	subl	$1, -400336(%rbp)
.L28:
	cmpl	$0, -400336(%rbp)
	jg	.L31
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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:
