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>
typedef unsigned u;
u D[444][444];
int main()
{
	u q,i,j,k,x,y,a,b,c,r=9999;
	for(i=-1;++i<444;)
	for(j=-1;++j<444;)D[i][j]=r;
	scanf("%u%u%u",&q,&x,&y);
	for(D[0][0]=0;q--;)
	{
		scanf("%u%u%u",&a,&b,&c);
		for(i=444;i-->a;)for(j=444;j-->b;)
		{
			k=D[i-a][j-b]+c;
			if(D[i][j]>k)D[i][j]=k;
		}
	}
	for(i=x,j=y;i<444&&j<444;i+=x,j+=y)
	{
		if(D[i][j]<r)r=D[i][j];
	}
	printf(r>=9999?"-1\n":"%u\n",r);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 788544
D:
	.zero	788544
	.section	.rodata
.LC0:
	.string	"%u%u%u"
.LC1:
	.string	"-1\n"
.LC2:
	.string	"%u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$9999, -16(%rbp)
	movl	$-1, -24(%rbp)
	jmp	.L2
.L5:
	movl	$-1, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L3:
	addl	$1, -20(%rbp)
	cmpl	$443, -20(%rbp)
	jbe	.L4
.L2:
	addl	$1, -24(%rbp)
	cmpl	$443, -24(%rbp)
	jbe	.L5
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, D(%rip)
	jmp	.L6
.L11:
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$444, -24(%rbp)
	jmp	.L7
.L10:
	movl	$444, -20(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%ecx, %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jnb	.L8
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-32(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L9
.L7:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-36(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L10
.L6:
	movl	-48(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -48(%rbp)
	testl	%eax, %eax
	jne	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jbe	.L13
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
.L13:
	movl	-44(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -20(%rbp)
.L12:
	cmpl	$443, -24(%rbp)
	ja	.L14
	cmpl	$443, -20(%rbp)
	jbe	.L15
.L14:
	cmpl	$9998, -16(%rbp)
	jbe	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.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	"-1\n"
.LC1:
	.string	"%u\n"
.LC3:
	.string	"%u%u%u"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	D(%rip), %rbx
	leaq	1776(%rbx), %rdx
	movq	%rbx, %rcx
	leaq	788544(%rdx), %rsi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L3
	leaq	1776(%rax), %rdx
	addq	$1776, %rcx
	cmpq	%rsi, %rdx
	jne	.L2
	leaq	4(%rsp), %rdx
	leaq	8(%rsp), %rcx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	movl	$443, %ebp
	leaq	.LC3(%rip), %r12
	leaq	12(%rsp), %r13
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	$0, D(%rip)
	leal	-1(%rax), %edx
	movl	%edx, (%rsp)
	testl	%eax, %eax
	je	.L14
.L5:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$443, %eax
	ja	.L9
	movl	16(%rsp), %r10d
	movl	20(%rsp), %edi
	cmpl	$443, %r10d
	ja	.L9
	movl	%ebp, %r8d
	leaq	788540+D(%rip), %r9
	subl	%eax, %r8d
.L11:
	movl	%r8d, %esi
	movl	%ebp, %eax
	movq	%r9, %rcx
	imulq	$444, %rsi, %rsi
	subl	%r10d, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %edx
	addq	%rsi, %rdx
	movl	(%rbx,%rdx,4), %r11d
	addl	%edi, %r11d
	cmpl	%r11d, (%rcx)
	jbe	.L12
	movl	%r11d, (%rcx)
.L12:
	subl	$1, %eax
	subq	$4, %rcx
	cmpl	$-1, %eax
	jne	.L13
	subq	$1776, %r9
	subl	$1, %r8d
	jnb	.L11
.L9:
	movl	(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, (%rsp)
	testl	%eax, %eax
	jne	.L5
.L14:
	movl	8(%rsp), %eax
	movl	4(%rsp), %ecx
	cmpl	$443, %eax
	ja	.L23
	cmpl	$443, %ecx
	ja	.L23
	movl	%ecx, %edi
	movl	$9999, %edx
	cmpl	$1, %eax
	je	.L15
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L46:
	cmpl	$443, %edi
	ja	.L18
.L15:
	movl	%edi, %esi
	movl	%eax, %r8d
	imulq	$444, %rsi, %rsi
	addq	%r8, %rsi
	movl	(%rbx,%rsi,4), %esi
	cmpl	%esi, %edx
	cmova	%esi, %edx
	addl	$1, %eax
	addl	%ecx, %edi
	cmpl	$443, %eax
	jbe	.L46
.L18:
	cmpl	$9999, %edx
	leaq	.LC1(%rip), %rsi
	leaq	.LC0(%rip), %rax
	cmove	%rax, %rsi
.L8:
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	movl	$9999, %edx
	leaq	.LC0(%rip), %rsi
	jmp	.L8
.L45:
	movl	%eax, %r8d
	jmp	.L16
.L48:
	cmpl	$443, %r8d
	ja	.L18
.L16:
	movl	%edi, %esi
	movl	%r8d, %r9d
	imulq	$444, %rsi, %rsi
	addq	%r9, %rsi
	movl	(%rbx,%rsi,4), %esi
	cmpl	%esi, %edx
	cmova	%esi, %edx
	addl	%ecx, %edi
	addl	%eax, %r8d
	cmpl	$443, %edi
	jbe	.L48
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 788544
D:
	.zero	788544
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	9999
	.long	9999
	.long	9999
	.long	9999
	.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	"-1\n"
.LC1:
	.string	"%u\n"
.LC3:
	.string	"%u%u%u"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	D(%rip), %rbx
	leaq	1776(%rbx), %rdx
	movq	%rbx, %rcx
	leaq	788544(%rdx), %rsi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L3
	leaq	1776(%rax), %rdx
	addq	$1776, %rcx
	cmpq	%rsi, %rdx
	jne	.L2
	leaq	4(%rsp), %rdx
	leaq	8(%rsp), %rcx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	movl	$443, %ebp
	leaq	.LC3(%rip), %r12
	leaq	12(%rsp), %r13
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	$0, D(%rip)
	leal	-1(%rax), %edx
	movl	%edx, (%rsp)
	testl	%eax, %eax
	je	.L14
.L5:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$443, %eax
	ja	.L9
	movl	16(%rsp), %r10d
	movl	20(%rsp), %edi
	cmpl	$443, %r10d
	ja	.L9
	movl	%ebp, %r8d
	leaq	788540+D(%rip), %r9
	subl	%eax, %r8d
.L11:
	movl	%r8d, %esi
	movl	%ebp, %eax
	movq	%r9, %rcx
	imulq	$444, %rsi, %rsi
	subl	%r10d, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%eax, %edx
	addq	%rsi, %rdx
	movl	(%rbx,%rdx,4), %r11d
	addl	%edi, %r11d
	cmpl	%r11d, (%rcx)
	jbe	.L12
	movl	%r11d, (%rcx)
.L12:
	subl	$1, %eax
	subq	$4, %rcx
	cmpl	$-1, %eax
	jne	.L13
	subq	$1776, %r9
	subl	$1, %r8d
	jnb	.L11
.L9:
	movl	(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, (%rsp)
	testl	%eax, %eax
	jne	.L5
.L14:
	movl	8(%rsp), %eax
	movl	4(%rsp), %ecx
	cmpl	$443, %eax
	ja	.L23
	cmpl	$443, %ecx
	ja	.L23
	movl	%ecx, %edi
	movl	$9999, %edx
	cmpl	$1, %eax
	je	.L15
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L46:
	cmpl	$443, %edi
	ja	.L18
.L15:
	movl	%edi, %esi
	movl	%eax, %r8d
	imulq	$444, %rsi, %rsi
	addq	%r8, %rsi
	movl	(%rbx,%rsi,4), %esi
	cmpl	%esi, %edx
	cmova	%esi, %edx
	addl	$1, %eax
	addl	%ecx, %edi
	cmpl	$443, %eax
	jbe	.L46
.L18:
	cmpl	$9999, %edx
	leaq	.LC1(%rip), %rsi
	leaq	.LC0(%rip), %rax
	cmove	%rax, %rsi
.L8:
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	movl	$9999, %edx
	leaq	.LC0(%rip), %rsi
	jmp	.L8
.L45:
	movl	%eax, %r8d
	jmp	.L16
.L48:
	cmpl	$443, %r8d
	ja	.L18
.L16:
	movl	%edi, %esi
	movl	%r8d, %r9d
	imulq	$444, %rsi, %rsi
	addq	%r9, %rsi
	movl	(%rbx,%rsi,4), %esi
	cmpl	%esi, %edx
	cmova	%esi, %edx
	addl	%ecx, %edi
	addl	%eax, %r8d
	cmpl	$443, %edi
	jbe	.L48
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 788544
D:
	.zero	788544
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	9999
	.long	9999
	.long	9999
	.long	9999
	.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>
typedef unsigned u;
u D[444][444];
int main()
{
	u q,i,j,k,x,y,a,b,c,r=9999;
	for(i=-1;++i<444;)
	for(j=-1;++j<444;)D[i][j]=r;
	scanf("%u%u%u",&q,&x,&y);
	for(D[0][0]=0;q--;)
	{
		scanf("%u%u%u",&a,&b,&c);
		for(i=444;i-->a;)for(j=444;j-->b;)
		{
			k=D[i-a][j-b]+c;
			if(D[i][j]>k)D[i][j]=k;
		}
	}
	for(i=x,j=y;i<444&&j<444;i+=x,j+=y)
	{
		if(D[i][j]<r)r=D[i][j];
	}
	printf(r>=9999?"-1\n":"%u\n",r);
	return 0;
}
1 0 10
10 10 10
 3 1 1
1 2 2
2 1 2
3 3 10
 3 1 1
1 2 2
2 1 4
0 3 16
 3 1 1
1 2 1
2 0 2
3 3 10
 3 1 2
0 2 2
2 1 2
0 3 16
 3 1 1
1 2 2
2 1 5
0 3 16
 3 1 1
1 2 1
2 0 2
3 5 10
 3 2 1
1 2 4
2 1 2
3 3 10
 3 1 1
2 0 2
2 1 2
0 3 10
 3 1 1
1 2 1
3 0 2
3 5 10

-1
 4
 6
 10
 18
 7
 12
 2
 14
 13

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>
typedef unsigned u;
u D[444][444];
int main()
{
	u q,i,j,k,x,y,a,b,c,r=9999;
	for(i=-1;++i<444;)
	for(j=-1;++j<444;)D[i][j]=r;
	scanf("%u%u%u",&q,&x,&y);
	for(D[0][0]=0;q--;)
	{
		scanf("%u%u%u",&a,&b,&c);
		for(i=444;i-->a;)for(j=444;j-->b;)
		{
			k=D[i-a][j-b]+c;
			if(D[i][j]>k)D[i][j]=k;
		}
	}
	for(i=x,j=y;i<444&&j<444;i+=x,j+=y)
	{
		if(D[i][j]<r)r=D[i][j];
	}
	printf(r>=9999?"-1\n":"%u\n",r);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 788544
D:
	.zero	788544
	.section	.rodata
.LC0:
	.string	"%u%u%u"
.LC1:
	.string	"-1\n"
.LC2:
	.string	"%u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$9999, -16(%rbp)
	movl	$-1, -24(%rbp)
	jmp	.L2
.L5:
	movl	$-1, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L3:
	addl	$1, -20(%rbp)
	cmpl	$443, -20(%rbp)
	jbe	.L4
.L2:
	addl	$1, -24(%rbp)
	cmpl	$443, -24(%rbp)
	jbe	.L5
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, D(%rip)
	jmp	.L6
.L11:
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$444, -24(%rbp)
	jmp	.L7
.L10:
	movl	$444, -20(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%ecx, %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jnb	.L8
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-32(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L9
.L7:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-36(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L10
.L6:
	movl	-48(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -48(%rbp)
	testl	%eax, %eax
	jne	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jbe	.L13
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
.L13:
	movl	-44(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -20(%rbp)
.L12:
	cmpl	$443, -24(%rbp)
	ja	.L14
	cmpl	$443, -20(%rbp)
	jbe	.L15
.L14:
	cmpl	$9998, -16(%rbp)
	jbe	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.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
	.globl	D
	.bss
	.align 32
	.type	D, @object
	.size	D, 788544
D:
	.zero	788544
	.section	.rodata
.LC0:
	.string	"%u%u%u"
.LC1:
	.string	"-1\n"
.LC2:
	.string	"%u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$9999, -16(%rbp)
	movl	$-1, -24(%rbp)
	jmp	.L2
.L5:
	movl	$-1, -20(%rbp)
	jmp	.L3
.L4:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L3:
	addl	$1, -20(%rbp)
	cmpl	$443, -20(%rbp)
	jbe	.L4
.L2:
	addl	$1, -24(%rbp)
	cmpl	$443, -24(%rbp)
	jbe	.L5
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, D(%rip)
	jmp	.L6
.L11:
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$444, -24(%rbp)
	jmp	.L7
.L10:
	movl	$444, -20(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%ecx, %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jnb	.L8
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	D(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-32(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L9
.L7:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-36(%rbp), %edx
	cmpl	%edx, %eax
	ja	.L10
.L6:
	movl	-48(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -48(%rbp)
	testl	%eax, %eax
	jne	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L12
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jbe	.L13
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
.L13:
	movl	-44(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	addl	%eax, -20(%rbp)
.L12:
	cmpl	$443, -24(%rbp)
	ja	.L14
	cmpl	$443, -20(%rbp)
	jbe	.L15
.L14:
	cmpl	$9998, -16(%rbp)
	jbe	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.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:
