Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

#define WIDTH 3001
#define HEIGHT 51

int dp[HEIGHT * WIDTH];

int main(void)
{
	int i, j, k;
	int n, m, s;
	while(scanf("%d%d%d", &n, &m, &s), n){
		n *= n;
		dp[0] = 1;
		for(i=1; i<WIDTH*HEIGHT; ++i)
			dp[i] = 0;

		for(i=1; i<=m; ++i){
			for(j=n; j>=0; --j){
				for(k=s; k>=0; --k){
					if(j && i <= k){
						dp[j*WIDTH + k] = (dp[j*WIDTH + k] + dp[(j-1)*WIDTH + k-i]) % 100000;
					}
				}
			}
		}

		printf("%d\n", dp[n*WIDTH + s]);
	}

	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 32(%rsp)
.L2:
	movq	24(%rsp), %rcx
	movq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L19
	imull	%eax, %eax
	movl	$612200, %edx
	xorl	%esi, %esi
	movl	$1, dp(%rip)
	leaq	4+dp(%rip), %rdi
	movl	%eax, 12(%rsp)
	movl	%eax, 60(%rsp)
	call	memset@PLT
	movl	64(%rsp), %eax
	movl	68(%rsp), %r15d
	testl	%eax, %eax
	jle	.L11
	testl	%r15d, %r15d
	js	.L11
	addl	$1, %eax
	movl	$-6003, %r13d
	movl	$1, %r8d
	movl	%eax, 16(%rsp)
	imull	$3001, 12(%rsp), %eax
	subl	$3001, %eax
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movl	20(%rsp), %ebp
	movl	12(%rsp), %r12d
	leal	3001(%r8), %r14d
	subl	%r8d, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%r12d, %r12d
	leal	1(%rbp,%r14), %r10d
	leal	1(%rbp), %r9d
	movl	%r15d, %edx
	setne	%dil
.L9:
	cmpl	%edx, %r8d
	setle	%al
	subl	$1, %edx
	testb	%dil, %al
	je	.L5
.L20:
	leal	(%r10,%rdx), %esi
	leal	(%r9,%rdx), %eax
	movslq	%esi, %rsi
	cltq
	movl	(%rbx,%rsi,4), %ecx
	addl	(%rbx,%rax,4), %ecx
	movslq	%ecx, %rax
	movl	%ecx, %r11d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r11d
	sarq	$45, %rax
	subl	%r11d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %ecx
	cmpl	%edx, %r8d
	setle	%al
	movl	%ecx, (%rbx,%rsi,4)
	subl	$1, %edx
	testb	%dil, %al
	jne	.L20
.L5:
	testl	%edx, %edx
	jns	.L9
	subl	$3001, %ebp
	subl	$1, %r12d
	cmpl	%ebp, %r13d
	jne	.L7
	addl	$1, %r8d
	subl	$1, %r13d
	cmpl	%r8d, 16(%rsp)
	jne	.L10
.L11:
	imull	$3001, 12(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	addl	%r15d, %eax
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L19:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$88, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 612204
dp:
	.zero	612204
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 32(%rsp)
.L2:
	movq	24(%rsp), %rcx
	movq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L19
	imull	%eax, %eax
	movl	$612200, %edx
	xorl	%esi, %esi
	movl	$1, dp(%rip)
	leaq	4+dp(%rip), %rdi
	movl	%eax, 12(%rsp)
	movl	%eax, 60(%rsp)
	call	memset@PLT
	movl	64(%rsp), %eax
	movl	68(%rsp), %r15d
	testl	%eax, %eax
	jle	.L11
	testl	%r15d, %r15d
	js	.L11
	addl	$1, %eax
	movl	$-6003, %r13d
	movl	$1, %r8d
	movl	%eax, 16(%rsp)
	imull	$3001, 12(%rsp), %eax
	subl	$3001, %eax
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movl	20(%rsp), %ebp
	movl	12(%rsp), %r12d
	leal	3001(%r8), %r14d
	subl	%r8d, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%r12d, %r12d
	leal	1(%rbp,%r14), %r10d
	leal	1(%rbp), %r9d
	movl	%r15d, %edx
	setne	%dil
.L9:
	cmpl	%edx, %r8d
	setle	%al
	subl	$1, %edx
	testb	%dil, %al
	je	.L5
.L20:
	leal	(%r10,%rdx), %esi
	leal	(%r9,%rdx), %eax
	movslq	%esi, %rsi
	cltq
	movl	(%rbx,%rsi,4), %ecx
	addl	(%rbx,%rax,4), %ecx
	movslq	%ecx, %rax
	movl	%ecx, %r11d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r11d
	sarq	$45, %rax
	subl	%r11d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %ecx
	cmpl	%edx, %r8d
	setle	%al
	movl	%ecx, (%rbx,%rsi,4)
	subl	$1, %edx
	testb	%dil, %al
	jne	.L20
.L5:
	testl	%edx, %edx
	jns	.L9
	subl	$3001, %ebp
	subl	$1, %r12d
	cmpl	%ebp, %r13d
	jne	.L7
	addl	$1, %r8d
	subl	$1, %r13d
	cmpl	%r8d, 16(%rsp)
	jne	.L10
.L11:
	imull	$3001, 12(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	addl	%r15d, %eax
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L19:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$88, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 612204
dp:
	.zero	612204
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 32(%rsp)
.L2:
	movq	24(%rsp), %rcx
	movq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L19
	imull	%eax, %eax
	movl	$612200, %edx
	xorl	%esi, %esi
	movl	$1, dp(%rip)
	leaq	4+dp(%rip), %rdi
	movl	%eax, 12(%rsp)
	movl	%eax, 60(%rsp)
	call	memset@PLT
	movl	64(%rsp), %eax
	movl	68(%rsp), %r15d
	testl	%eax, %eax
	jle	.L11
	testl	%r15d, %r15d
	js	.L11
	addl	$1, %eax
	movl	$-6003, %r13d
	movl	$1, %r8d
	movl	%eax, 16(%rsp)
	imull	$3001, 12(%rsp), %eax
	subl	$3001, %eax
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movl	20(%rsp), %ebp
	movl	12(%rsp), %r12d
	leal	3001(%r8), %r14d
	subl	%r8d, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%r12d, %r12d
	leal	1(%rbp,%r14), %r10d
	leal	1(%rbp), %r9d
	movl	%r15d, %edx
	setne	%dil
.L9:
	cmpl	%edx, %r8d
	setle	%al
	subl	$1, %edx
	testb	%dil, %al
	je	.L5
.L20:
	leal	(%r10,%rdx), %esi
	leal	(%r9,%rdx), %eax
	movslq	%esi, %rsi
	cltq
	movl	(%rbx,%rsi,4), %ecx
	addl	(%rbx,%rax,4), %ecx
	movslq	%ecx, %rax
	movl	%ecx, %r11d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r11d
	sarq	$45, %rax
	subl	%r11d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %ecx
	cmpl	%edx, %r8d
	setle	%al
	movl	%ecx, (%rbx,%rsi,4)
	subl	$1, %edx
	testb	%dil, %al
	jne	.L20
.L5:
	testl	%edx, %edx
	jns	.L9
	subl	$3001, %ebp
	subl	$1, %r12d
	cmpl	%ebp, %r13d
	jne	.L7
	addl	$1, %r8d
	subl	$1, %r13d
	cmpl	%r8d, 16(%rsp)
	jne	.L10
.L11:
	imull	$3001, 12(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	addl	%r15d, %eax
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L19:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$88, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 612204
dp:
	.zero	612204
	.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:
```
```c
#include <stdio.h>
#include <string.h>

#define WIDTH 3001
#define HEIGHT 51

int dp[HEIGHT * WIDTH];

int main(void)
{
	int i, j, k;
	int n, m, s;
	while(scanf("%d%d%d", &n, &m, &s), n){
		n *= n;
		dp[0] = 1;
		for(i=1; i<WIDTH*HEIGHT; ++i)
			dp[i] = 0;

		for(i=1; i<=m; ++i){
			for(j=n; j>=0; --j){
				for(k=s; k>=0; --k){
					if(j && i <= k){
						dp[j*WIDTH + k] = (dp[j*WIDTH + k] + dp[(j-1)*WIDTH + k-i]) % 100000;
					}
				}
			}
		}

		printf("%d\n", dp[n*WIDTH + s]);
	}

	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

#define WIDTH 3001
#define HEIGHT 51

int dp[HEIGHT * WIDTH];

int main(void)
{
	int i, j, k;
	int n, m, s;
	while(scanf("%d%d%d", &n, &m, &s), n){
		n *= n;
		dp[0] = 1;
		for(i=1; i<WIDTH*HEIGHT; ++i)
			dp[i] = 0;

		for(i=1; i<=m; ++i){
			for(j=n; j>=0; --j){
				for(k=s; k>=0; --k){
					if(j && i <= k){
						dp[j*WIDTH + k] = (dp[j*WIDTH + k] + dp[(j-1)*WIDTH + k-i]) % 100000;
					}
				}
			}
		}

		printf("%d\n", dp[n*WIDTH + s]);
	}

	return 0;
}```

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.
Optimized Assembly Code:

3 9 45
3 100 50
5 50 308
0 0 0
 3 12 45
3 100 75
5 50 308
0 0 0
 3 12 45
3 100 69
5 50 308
0 0 0
 3 12 45
3 100 69
5 90 548
0 0 0
 3 12 45
3 100 50
5 50 331
0 0 0
 3 3 45
3 100 69
5 50 308
0 0 0
 3 12 60
3 100 69
5 90 308
0 0 0
 3 3 45
3 100 85
5 50 308
0 0 0
 3 12 45
3 100 34
5 50 331
0 0 1
 3 12 60
5 100 69
5 90 308
0 0 -1

1
7
0
 1
3060
0
 1
1076
0
 1
1076
3141
 1
7
11
 0
1076
0
 15
1076
0
 0
13338
0
 1
0
11
 15
0
0

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>

#define WIDTH 3001
#define HEIGHT 51

int dp[HEIGHT * WIDTH];

int main(void)
{
	int i, j, k;
	int n, m, s;
	while(scanf("%d%d%d", &n, &m, &s), n){
		n *= n;
		dp[0] = 1;
		for(i=1; i<WIDTH*HEIGHT; ++i)
			dp[i] = 0;

		for(i=1; i<=m; ++i){
			for(j=n; j>=0; --j){
				for(k=s; k>=0; --k){
					if(j && i <= k){
						dp[j*WIDTH + k] = (dp[j*WIDTH + k] + dp[(j-1)*WIDTH + k-i]) % 100000;
					}
				}
			}
		}

		printf("%d\n", dp[n*WIDTH + s]);
	}

	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 32(%rsp)
.L2:
	movq	24(%rsp), %rcx
	movq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L19
	imull	%eax, %eax
	movl	$612200, %edx
	xorl	%esi, %esi
	movl	$1, dp(%rip)
	leaq	4+dp(%rip), %rdi
	movl	%eax, 12(%rsp)
	movl	%eax, 60(%rsp)
	call	memset@PLT
	movl	64(%rsp), %eax
	movl	68(%rsp), %r15d
	testl	%eax, %eax
	jle	.L11
	testl	%r15d, %r15d
	js	.L11
	addl	$1, %eax
	movl	$-6003, %r13d
	movl	$1, %r8d
	movl	%eax, 16(%rsp)
	imull	$3001, 12(%rsp), %eax
	subl	$3001, %eax
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movl	20(%rsp), %ebp
	movl	12(%rsp), %r12d
	leal	3001(%r8), %r14d
	subl	%r8d, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%r12d, %r12d
	leal	1(%rbp,%r14), %r10d
	leal	1(%rbp), %r9d
	movl	%r15d, %edx
	setne	%dil
.L9:
	cmpl	%edx, %r8d
	setle	%al
	subl	$1, %edx
	testb	%dil, %al
	je	.L5
.L20:
	leal	(%r10,%rdx), %esi
	leal	(%r9,%rdx), %eax
	movslq	%esi, %rsi
	cltq
	movl	(%rbx,%rsi,4), %ecx
	addl	(%rbx,%rax,4), %ecx
	movslq	%ecx, %rax
	movl	%ecx, %r11d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r11d
	sarq	$45, %rax
	subl	%r11d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %ecx
	cmpl	%edx, %r8d
	setle	%al
	movl	%ecx, (%rbx,%rsi,4)
	subl	$1, %edx
	testb	%dil, %al
	jne	.L20
.L5:
	testl	%edx, %edx
	jns	.L9
	subl	$3001, %ebp
	subl	$1, %r12d
	cmpl	%ebp, %r13d
	jne	.L7
	addl	$1, %r8d
	subl	$1, %r13d
	cmpl	%r8d, 16(%rsp)
	jne	.L10
.L11:
	imull	$3001, 12(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	addl	%r15d, %eax
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L19:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$88, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 612204
dp:
	.zero	612204
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 32(%rsp)
.L2:
	movq	24(%rsp), %rcx
	movq	40(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L19
	imull	%eax, %eax
	movl	$612200, %edx
	xorl	%esi, %esi
	movl	$1, dp(%rip)
	leaq	4+dp(%rip), %rdi
	movl	%eax, 12(%rsp)
	movl	%eax, 60(%rsp)
	call	memset@PLT
	movl	64(%rsp), %eax
	movl	68(%rsp), %r15d
	testl	%eax, %eax
	jle	.L11
	testl	%r15d, %r15d
	js	.L11
	addl	$1, %eax
	movl	$-6003, %r13d
	movl	$1, %r8d
	movl	%eax, 16(%rsp)
	imull	$3001, 12(%rsp), %eax
	subl	$3001, %eax
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movl	20(%rsp), %ebp
	movl	12(%rsp), %r12d
	leal	3001(%r8), %r14d
	subl	%r8d, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%r12d, %r12d
	leal	1(%rbp,%r14), %r10d
	leal	1(%rbp), %r9d
	movl	%r15d, %edx
	setne	%dil
.L9:
	cmpl	%edx, %r8d
	setle	%al
	subl	$1, %edx
	testb	%dil, %al
	je	.L5
.L20:
	leal	(%r10,%rdx), %esi
	leal	(%r9,%rdx), %eax
	movslq	%esi, %rsi
	cltq
	movl	(%rbx,%rsi,4), %ecx
	addl	(%rbx,%rax,4), %ecx
	movslq	%ecx, %rax
	movl	%ecx, %r11d
	imulq	$351843721, %rax, %rax
	sarl	$31, %r11d
	sarq	$45, %rax
	subl	%r11d, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %ecx
	cmpl	%edx, %r8d
	setle	%al
	movl	%ecx, (%rbx,%rsi,4)
	subl	$1, %edx
	testb	%dil, %al
	jne	.L20
.L5:
	testl	%edx, %edx
	jns	.L9
	subl	$3001, %ebp
	subl	$1, %r12d
	cmpl	%ebp, %r13d
	jne	.L7
	addl	$1, %r8d
	subl	$1, %r13d
	cmpl	%r8d, 16(%rsp)
	jne	.L10
.L11:
	imull	$3001, 12(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	addl	%r15d, %eax
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L19:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$88, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 612204
dp:
	.zero	612204
	.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:
```