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

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

int main(void)
{
	int dp[50][3001];
	int i, j, k;
	int n, m, s;
	
	while (1){
		scanf("%d%d%d", &n, &m, &s);
		
		if (n + m + s == 0){
			break;
		}

		memset(dp, 0, sizeof(dp));
		dp[0][0] = 1;
		for (i = 1; i <= m; i++){
			for (j = n * n; j >= 1; j--){
				for (k = i; k <= s; k++){
					dp[j][k] += dp[j - 1][k - i];
					if (dp[j][k] >= 100000){
						dp[j][k] -= 100000;
					}
				}
			}
		}
	
		printf("%d\n", dp[n * n][s]);
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\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
	leaq	-598016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L11:
	leaq	-600224(%rbp), %rcx
	leaq	-600228(%rbp), %rdx
	leaq	-600232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-600232(%rbp), %edx
	movl	-600228(%rbp), %eax
	addl	%eax, %edx
	movl	-600224(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L15
	leaq	-600208(%rbp), %rax
	movl	$600200, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -600208(%rbp)
	movl	$1, -600220(%rbp)
	jmp	.L4
.L10:
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -600216(%rbp)
	jmp	.L5
.L9:
	movl	-600220(%rbp), %eax
	movl	%eax, -600212(%rbp)
	jmp	.L6
.L8:
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %ecx
	movl	-600216(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-600212(%rbp), %eax
	subl	-600220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	cmpl	$99999, %eax
	jle	.L7
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	-100000(%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
.L7:
	addl	$1, -600212(%rbp)
.L6:
	movl	-600224(%rbp), %eax
	cmpl	%eax, -600212(%rbp)
	jle	.L8
	subl	$1, -600216(%rbp)
.L5:
	cmpl	$0, -600216(%rbp)
	jg	.L9
	addl	$1, -600220(%rbp)
.L4:
	movl	-600228(%rbp), %eax
	cmpl	%eax, -600220(%rbp)
	jle	.L10
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	-600224(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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%d"
.LC1:
	.string	"%d\n"
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2360, %rsp
	.cfi_def_cfa_offset 600432
	movq	%fs:40, %rax
	movq	%rax, 600360(%rsp)
	xorl	%eax, %eax
	leaq	156(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	152(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	148(%rsp), %rax
	movq	%rax, 120(%rsp)
	jmp	.L4
.L46:
	movslq	64(%rsp), %rax
	movq	%rax, 80(%rsp)
.L26:
	movslq	%r14d, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, 80(%rsp), %rax
	addq	%rdx, %rax
	movl	160(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	136(%rsp), %rcx
	movq	120(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	128(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	148(%rsp), %ebp
	movl	152(%rsp), %ebx
	movl	156(%rsp), %r14d
	leal	0(%rbp,%rbx), %eax
	addl	%r14d, %eax
	je	.L2
	leaq	160(%rsp), %rax
	xorl	%esi, %esi
	movl	$600200, %edx
	imull	%ebp, %ebp
	movq	%rax, %rdi
	movq	%rax, 88(%rsp)
	call	memset@PLT
	testl	%ebx, %ebx
	movl	$1, 160(%rsp)
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	movl	%ebp, 64(%rsp)
	jle	.L44
	movl	64(%rsp), %eax
	testl	%eax, %eax
	je	.L45
	testl	%r14d, %r14d
	jle	.L46
	cmpl	%r14d, %ebx
	movq	88(%rsp), %rdx
	movl	$1, %r13d
	movl	%r14d, 52(%rsp)
	movq	$4, 40(%rsp)
	cmovg	%r14d, %ebx
	movl	%r13d, %r9d
	movl	%ebx, 68(%rsp)
	movslq	%ebp, %rbx
	imulq	$12004, %rbx, %rax
	movq	%rbx, 80(%rsp)
	leaq	-12004(%rax), %rcx
	negq	%rax
	addq	%rcx, %rdx
	movq	%rax, 104(%rsp)
	movq	%rbx, %rax
	movq	%rdx, 72(%rsp)
	leal	-1(%rbp), %edx
	subq	%rdx, %rax
	movl	%r14d, %edx
	movq	%rcx, 112(%rsp)
	imulq	$12004, %rax, %rax
	subl	%r13d, %edx
	subq	$24008, %rax
	movq	%rax, 96(%rsp)
	cmpl	$2, %edx
	jbe	.L9
	.p2align 4,,10
	.p2align 3
.L47:
	cmpl	%r13d, %r14d
	jl	.L9
	cmpl	%r13d, %r14d
	movl	$1, %r11d
	cmovge	52(%rsp), %r11d
	movq	40(%rsp), %r9
	movq	72(%rsp), %rax
	movl	64(%rsp), %edi
	movq	%r13, 56(%rsp)
	movl	%r11d, %r10d
	movl	%r11d, %ecx
	leaq	12004(%r9), %rbp
	andl	$-4, %r10d
	shrl	$2, %ecx
	leal	0(%r13,%r10), %ebx
	movslq	%r10d, %r9
	salq	$4, %rcx
	leal	1(%rbx), %r12d
	leal	2(%rbx), %r15d
	movslq	%ebx, %rbx
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r15d, 48(%rsp)
	subl	%r13d, %esi
	subl	%r13d, %edx
	movq	%r9, %r13
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	movq	%rsi, 8(%rsp)
	movslq	%r12d, %rsi
	movq	%rsi, 16(%rsp)
	movslq	%r15d, %rsi
	movq	%rsi, 24(%rsp)
	movq	%rdx, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L20:
	movslq	%edi, %rdx
	leaq	0(%rbp,%rax), %r8
	subl	$1, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%r8,%rsi), %xmm1
	movdqu	(%rax,%rsi), %xmm5
	paddd	%xmm5, %xmm1
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpgtd	%xmm4, %xmm0
	paddd	%xmm3, %xmm2
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movups	%xmm0, (%r8,%rsi)
	addq	$16, %rsi
	cmpq	%rcx, %rsi
	jne	.L11
	cmpl	%r10d, %r11d
	je	.L12
	movslq	%edi, %rsi
	imulq	$3001, %rdx, %rdx
	imulq	$3001, %rsi, %rsi
	leaq	(%rdx,%rbx), %r15
	leaq	(%rsi,%r13), %r8
	movl	160(%rsp,%r8,4), %r8d
	addl	160(%rsp,%r15,4), %r8d
	leal	-100000(%r8), %r9d
	cmpl	$99999, %r8d
	cmovle	%r8d, %r9d
	movl	%r9d, 160(%rsp,%r15,4)
	cmpl	%r12d, %r14d
	jl	.L12
	movq	8(%rsp), %r15
	leaq	(%rsi,%r15), %r8
	movq	16(%rsp), %r15
	addq	%rdx, %r15
	movl	160(%rsp,%r15,4), %r9d
	addl	160(%rsp,%r8,4), %r9d
	movl	%r9d, %r8d
	leal	-100000(%r9), %r9d
	cmpl	$99999, %r8d
	cmovle	%r8d, %r9d
	movl	%r9d, 160(%rsp,%r15,4)
	cmpl	48(%rsp), %r14d
	jl	.L12
	addq	24(%rsp), %rdx
	addq	32(%rsp), %rsi
	movl	160(%rsp,%rsi,4), %esi
	addl	160(%rsp,%rdx,4), %esi
	leal	-100000(%rsi), %r8d
	cmpl	$100000, %esi
	cmovge	%r8d, %esi
	movl	%esi, 160(%rsp,%rdx,4)
.L12:
	subq	$12004, %rax
	testl	%edi, %edi
	jne	.L20
	movq	56(%rsp), %r13
.L21:
	subl	$1, 52(%rsp)
	addq	$1, %r13
	addq	$4, 40(%rsp)
	cmpl	%r13d, 68(%rsp)
	jl	.L26
	movl	%r14d, %edx
	movl	%r13d, %r9d
	subl	%r13d, %edx
	cmpl	$2, %edx
	ja	.L47
.L9:
	movq	88(%rsp), %rax
	movq	112(%rsp), %rdi
	movq	96(%rsp), %r11
	movq	104(%rsp), %r8
	leaq	12004(%rax,%r13,4), %r10
	subq	40(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	(%r10,%rdi), %rdx
	movl	%r9d, %ecx
	.p2align 4,,10
	.p2align 3
.L24:
	leaq	(%rdx,%r8), %rsi
	movl	(%rdx), %eax
	addl	(%rsi,%rdi), %eax
	cmpl	$100000, %eax
	leal	-100000(%rax), %esi
	cmovge	%esi, %eax
	addl	$1, %ecx
	addq	$4, %rdx
	movl	%eax, -4(%rdx)
	cmpl	%ecx, %r14d
	jge	.L24
	subq	$12004, %rdi
	addq	$12004, %r8
	cmpq	%rdi, %r11
	jne	.L25
	jmp	.L21
.L45:
	movq	$0, 80(%rsp)
	jmp	.L26
.L44:
	movslq	%ebp, %rax
	movq	%rax, 80(%rsp)
	jmp	.L26
.L2:
	movq	600360(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$600376, %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
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	99999
	.long	99999
	.long	99999
	.long	99999
	.align 16
.LC3:
	.long	-100000
	.long	-100000
	.long	-100000
	.long	-100000
	.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%d"
.LC1:
	.string	"%d\n"
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2360, %rsp
	.cfi_def_cfa_offset 600432
	movq	%fs:40, %rax
	movq	%rax, 600360(%rsp)
	xorl	%eax, %eax
	leaq	156(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	152(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	148(%rsp), %rax
	movq	%rax, 120(%rsp)
	jmp	.L4
.L46:
	movslq	64(%rsp), %rax
	movq	%rax, 80(%rsp)
.L26:
	movslq	%r14d, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, 80(%rsp), %rax
	addq	%rdx, %rax
	movl	160(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	136(%rsp), %rcx
	movq	120(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	128(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	148(%rsp), %ebp
	movl	152(%rsp), %ebx
	movl	156(%rsp), %r14d
	leal	0(%rbp,%rbx), %eax
	addl	%r14d, %eax
	je	.L2
	leaq	160(%rsp), %rax
	xorl	%esi, %esi
	movl	$600200, %edx
	imull	%ebp, %ebp
	movq	%rax, %rdi
	movq	%rax, 88(%rsp)
	call	memset@PLT
	testl	%ebx, %ebx
	movl	$1, 160(%rsp)
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	movl	%ebp, 64(%rsp)
	jle	.L44
	movl	64(%rsp), %eax
	testl	%eax, %eax
	je	.L45
	testl	%r14d, %r14d
	jle	.L46
	cmpl	%r14d, %ebx
	movq	88(%rsp), %rdx
	movl	$1, %r13d
	movl	%r14d, 52(%rsp)
	movq	$4, 40(%rsp)
	cmovg	%r14d, %ebx
	movl	%r13d, %r9d
	movl	%ebx, 68(%rsp)
	movslq	%ebp, %rbx
	imulq	$12004, %rbx, %rax
	movq	%rbx, 80(%rsp)
	leaq	-12004(%rax), %rcx
	negq	%rax
	addq	%rcx, %rdx
	movq	%rax, 104(%rsp)
	movq	%rbx, %rax
	movq	%rdx, 72(%rsp)
	leal	-1(%rbp), %edx
	subq	%rdx, %rax
	movl	%r14d, %edx
	movq	%rcx, 112(%rsp)
	imulq	$12004, %rax, %rax
	subl	%r13d, %edx
	subq	$24008, %rax
	movq	%rax, 96(%rsp)
	cmpl	$2, %edx
	jbe	.L9
	.p2align 4,,10
	.p2align 3
.L47:
	cmpl	%r13d, %r14d
	jl	.L9
	cmpl	%r13d, %r14d
	movl	$1, %r11d
	cmovge	52(%rsp), %r11d
	movq	40(%rsp), %r9
	movq	72(%rsp), %rax
	movl	64(%rsp), %edi
	movq	%r13, 56(%rsp)
	movl	%r11d, %r10d
	movl	%r11d, %ecx
	leaq	12004(%r9), %rbp
	andl	$-4, %r10d
	shrl	$2, %ecx
	leal	0(%r13,%r10), %ebx
	movslq	%r10d, %r9
	salq	$4, %rcx
	leal	1(%rbx), %r12d
	leal	2(%rbx), %r15d
	movslq	%ebx, %rbx
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r15d, 48(%rsp)
	subl	%r13d, %esi
	subl	%r13d, %edx
	movq	%r9, %r13
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	movq	%rsi, 8(%rsp)
	movslq	%r12d, %rsi
	movq	%rsi, 16(%rsp)
	movslq	%r15d, %rsi
	movq	%rsi, 24(%rsp)
	movq	%rdx, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L20:
	movslq	%edi, %rdx
	leaq	0(%rbp,%rax), %r8
	subl	$1, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%r8,%rsi), %xmm1
	movdqu	(%rax,%rsi), %xmm5
	paddd	%xmm5, %xmm1
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpgtd	%xmm4, %xmm0
	paddd	%xmm3, %xmm2
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movups	%xmm0, (%r8,%rsi)
	addq	$16, %rsi
	cmpq	%rcx, %rsi
	jne	.L11
	cmpl	%r10d, %r11d
	je	.L12
	movslq	%edi, %rsi
	imulq	$3001, %rdx, %rdx
	imulq	$3001, %rsi, %rsi
	leaq	(%rdx,%rbx), %r15
	leaq	(%rsi,%r13), %r8
	movl	160(%rsp,%r8,4), %r8d
	addl	160(%rsp,%r15,4), %r8d
	leal	-100000(%r8), %r9d
	cmpl	$99999, %r8d
	cmovle	%r8d, %r9d
	movl	%r9d, 160(%rsp,%r15,4)
	cmpl	%r12d, %r14d
	jl	.L12
	movq	8(%rsp), %r15
	leaq	(%rsi,%r15), %r8
	movq	16(%rsp), %r15
	addq	%rdx, %r15
	movl	160(%rsp,%r15,4), %r9d
	addl	160(%rsp,%r8,4), %r9d
	movl	%r9d, %r8d
	leal	-100000(%r9), %r9d
	cmpl	$99999, %r8d
	cmovle	%r8d, %r9d
	movl	%r9d, 160(%rsp,%r15,4)
	cmpl	48(%rsp), %r14d
	jl	.L12
	addq	24(%rsp), %rdx
	addq	32(%rsp), %rsi
	movl	160(%rsp,%rsi,4), %esi
	addl	160(%rsp,%rdx,4), %esi
	leal	-100000(%rsi), %r8d
	cmpl	$100000, %esi
	cmovge	%r8d, %esi
	movl	%esi, 160(%rsp,%rdx,4)
.L12:
	subq	$12004, %rax
	testl	%edi, %edi
	jne	.L20
	movq	56(%rsp), %r13
.L21:
	subl	$1, 52(%rsp)
	addq	$1, %r13
	addq	$4, 40(%rsp)
	cmpl	%r13d, 68(%rsp)
	jl	.L26
	movl	%r14d, %edx
	movl	%r13d, %r9d
	subl	%r13d, %edx
	cmpl	$2, %edx
	ja	.L47
.L9:
	movq	88(%rsp), %rax
	movq	112(%rsp), %rdi
	movq	96(%rsp), %r11
	movq	104(%rsp), %r8
	leaq	12004(%rax,%r13,4), %r10
	subq	40(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	(%r10,%rdi), %rdx
	movl	%r9d, %ecx
	.p2align 4,,10
	.p2align 3
.L24:
	leaq	(%rdx,%r8), %rsi
	movl	(%rdx), %eax
	addl	(%rsi,%rdi), %eax
	cmpl	$100000, %eax
	leal	-100000(%rax), %esi
	cmovge	%esi, %eax
	addl	$1, %ecx
	addq	$4, %rdx
	movl	%eax, -4(%rdx)
	cmpl	%ecx, %r14d
	jge	.L24
	subq	$12004, %rdi
	addq	$12004, %r8
	cmpq	%rdi, %r11
	jne	.L25
	jmp	.L21
.L45:
	movq	$0, 80(%rsp)
	jmp	.L26
.L44:
	movslq	%ebp, %rax
	movq	%rax, 80(%rsp)
	jmp	.L26
.L2:
	movq	600360(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$600376, %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
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	99999
	.long	99999
	.long	99999
	.long	99999
	.align 16
.LC3:
	.long	-100000
	.long	-100000
	.long	-100000
	.long	-100000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

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

int main(void)
{
	int dp[50][3001];
	int i, j, k;
	int n, m, s;
	
	while (1){
		scanf("%d%d%d", &n, &m, &s);
		
		if (n + m + s == 0){
			break;
		}

		memset(dp, 0, sizeof(dp));
		dp[0][0] = 1;
		for (i = 1; i <= m; i++){
			for (j = n * n; j >= 1; j--){
				for (k = i; k <= s; k++){
					dp[j][k] += dp[j - 1][k - i];
					if (dp[j][k] >= 100000){
						dp[j][k] -= 100000;
					}
				}
			}
		}
	
		printf("%d\n", dp[n * n][s]);
	}
	
	return (0);
}
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

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

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

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

int main(void)
{
	int dp[50][3001];
	int i, j, k;
	int n, m, s;
	
	while (1){
		scanf("%d%d%d", &n, &m, &s);
		
		if (n + m + s == 0){
			break;
		}

		memset(dp, 0, sizeof(dp));
		dp[0][0] = 1;
		for (i = 1; i <= m; i++){
			for (j = n * n; j >= 1; j--){
				for (k = i; k <= s; k++){
					dp[j][k] += dp[j - 1][k - i];
					if (dp[j][k] >= 100000){
						dp[j][k] -= 100000;
					}
				}
			}
		}
	
		printf("%d\n", dp[n * n][s]);
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\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
	leaq	-598016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L11:
	leaq	-600224(%rbp), %rcx
	leaq	-600228(%rbp), %rdx
	leaq	-600232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-600232(%rbp), %edx
	movl	-600228(%rbp), %eax
	addl	%eax, %edx
	movl	-600224(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L15
	leaq	-600208(%rbp), %rax
	movl	$600200, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -600208(%rbp)
	movl	$1, -600220(%rbp)
	jmp	.L4
.L10:
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -600216(%rbp)
	jmp	.L5
.L9:
	movl	-600220(%rbp), %eax
	movl	%eax, -600212(%rbp)
	jmp	.L6
.L8:
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %ecx
	movl	-600216(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-600212(%rbp), %eax
	subl	-600220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	cmpl	$99999, %eax
	jle	.L7
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	-100000(%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
.L7:
	addl	$1, -600212(%rbp)
.L6:
	movl	-600224(%rbp), %eax
	cmpl	%eax, -600212(%rbp)
	jle	.L8
	subl	$1, -600216(%rbp)
.L5:
	cmpl	$0, -600216(%rbp)
	jg	.L9
	addl	$1, -600220(%rbp)
.L4:
	movl	-600228(%rbp), %eax
	cmpl	%eax, -600220(%rbp)
	jle	.L10
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	-600224(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\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
	leaq	-598016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L11:
	leaq	-600224(%rbp), %rcx
	leaq	-600228(%rbp), %rdx
	leaq	-600232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-600232(%rbp), %edx
	movl	-600228(%rbp), %eax
	addl	%eax, %edx
	movl	-600224(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L15
	leaq	-600208(%rbp), %rax
	movl	$600200, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -600208(%rbp)
	movl	$1, -600220(%rbp)
	jmp	.L4
.L10:
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -600216(%rbp)
	jmp	.L5
.L9:
	movl	-600220(%rbp), %eax
	movl	%eax, -600212(%rbp)
	jmp	.L6
.L8:
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %ecx
	movl	-600216(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-600212(%rbp), %eax
	subl	-600220(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	cmpl	$99999, %eax
	jle	.L7
	movl	-600212(%rbp), %eax
	movslq	%eax, %rdx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	leal	-100000(%rax), %edx
	movl	-600212(%rbp), %eax
	movslq	%eax, %rcx
	movl	-600216(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -600208(%rbp,%rax,4)
.L7:
	addl	$1, -600212(%rbp)
.L6:
	movl	-600224(%rbp), %eax
	cmpl	%eax, -600212(%rbp)
	jle	.L8
	subl	$1, -600216(%rbp)
.L5:
	cmpl	$0, -600216(%rbp)
	jg	.L9
	addl	$1, -600220(%rbp)
.L4:
	movl	-600228(%rbp), %eax
	cmpl	%eax, -600220(%rbp)
	jle	.L10
	movl	-600232(%rbp), %edx
	movl	-600232(%rbp), %eax
	imull	%edx, %eax
	movl	-600224(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	movl	-600208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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:
