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 <stdlib.h>
#include <string.h>

/* constant */

#define MOD     (100000)

/* typedef */

/* global variables */

static int dp[50][3001];

/* subroutines */

/* main */

int main(int argc, char **argv) {
  int i, j, k, m, n, nn, s;

  for (;;) {
    scanf("%d%d%d", &n, &m, &s);
    if ((n | m | s) == 0) break;

    nn = n * n;

    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;

    for (i = 1; i <= m; i++)
      for (j = nn; j >= 1; j--)
        for (k = i; k <= s; k++)
          dp[j][k] = (dp[j][k] + dp[j - 1][k - i]) % MOD;

    printf("%d\n", dp[nn][s]);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.local	dp
	.comm	dp,600200,32
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L10:
	leaq	-28(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	orl	%eax, %edx
	movl	-28(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	-32(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$600200, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, dp(%rip)
	movl	$1, -24(%rbp)
	jmp	.L4
.L9:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L5
.L8:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-16(%rbp), %eax
	subl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$100000, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L7
	subl	$1, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	jg	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L9
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L10
.L14:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm4, %xmm4
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movdqa	%xmm4, %xmm5
	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
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movdqa	.LC1(%rip), %xmm3
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	180(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	172(%rsp), %rax
	pcmpgtd	%xmm3, %xmm5
	movq	%rax, 120(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 128(%rsp)
	movaps	%xmm5, 144(%rsp)
.L17:
	movq	120(%rsp), %rdx
	movq	136(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	128(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	176(%rsp), %eax
	movl	172(%rsp), %ebx
	movl	180(%rsp), %r14d
	movl	%eax, %edx
	orl	%ebx, %edx
	orl	%r14d, %edx
	je	.L2
	imull	%eax, %eax
	leaq	dp(%rip), %r15
	xorl	%esi, %esi
	movl	$600200, %edx
	movq	%r15, %rdi
	movl	%eax, 72(%rsp)
	call	memset@PLT
	testl	%ebx, %ebx
	pxor	%xmm4, %xmm4
	movl	$1, dp(%rip)
	movdqa	.LC1(%rip), %xmm3
	jle	.L33
	movl	72(%rsp), %eax
	testl	%eax, %eax
	je	.L35
	testl	%r14d, %r14d
	jle	.L33
	movslq	72(%rsp), %rsi
	cmpl	%r14d, %ebx
	movl	%r14d, 68(%rsp)
	movq	$4, 56(%rsp)
	cmovg	%r14d, %ebx
	movdqa	144(%rsp), %xmm5
	imulq	$12004, %rsi, %rax
	movq	%rsi, 88(%rsp)
	movl	%ebx, 76(%rsp)
	movq	$1, 48(%rsp)
	leaq	-12004(%rax), %rdx
	negq	%rax
	movq	%rdx, 112(%rsp)
	addq	%r15, %rdx
	movq	%rdx, 80(%rsp)
	leal	-1(%rsi), %edx
	movq	%rax, 104(%rsp)
	movq	%rsi, %rax
	subq	%rdx, %rax
	imulq	$12004, %rax, %rax
	subq	$24008, %rax
	movq	%rax, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	48(%rsp), %rsi
	movl	%r14d, %edx
	subl	%esi, %edx
	movl	%esi, %eax
	movl	%esi, %r10d
	cmpl	$2, %edx
	jbe	.L16
	cmpl	%esi, %r14d
	jl	.L16
	cmpl	%eax, %r14d
	movl	$1, %ebp
	cmovge	68(%rsp), %ebp
	movq	56(%rsp), %r11
	movl	72(%rsp), %r9d
	movl	%ebp, %ebx
	movl	%ebp, %esi
	leaq	12004(%r11), %r12
	andl	$-4, %ebx
	shrl	$2, %esi
	leal	(%rax,%rbx), %edi
	salq	$4, %rsi
	leal	2(%rdi), %r10d
	leal	1(%rdi), %r13d
	movslq	%edi, %rdi
	movq	%rdi, (%rsp)
	movl	%r13d, %ecx
	movslq	%ebx, %rdi
	movl	%r10d, %edx
	subl	%eax, %ecx
	movq	%rdi, 8(%rsp)
	movslq	%r13d, %rdi
	subl	%eax, %edx
	movq	%rdi, 16(%rsp)
	movslq	%ecx, %rdi
	movslq	%edx, %rdx
	movq	80(%rsp), %rax
	movq	%rdi, 24(%rsp)
	movslq	%r10d, %rdi
	movl	%r10d, 64(%rsp)
	movq	%rdi, 32(%rsp)
	movq	%rdx, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rdx
	leaq	(%r12,%rax), %rdi
	subl	$1, %r9d
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax,%rcx), %xmm7
	movdqu	(%rdi,%rcx), %xmm2
	movdqa	%xmm4, %xmm6
	paddd	%xmm7, %xmm2
	movdqa	%xmm5, %xmm7
	movdqa	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm0
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm0, %xmm7
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm3, %xmm1
	movdqa	%xmm2, %xmm0
	punpckhdq	%xmm2, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	movdqa	%xmm5, %xmm7
	psllq	$32, %xmm6
	pmuludq	%xmm0, %xmm7
	paddq	%xmm6, %xmm1
	movdqa	%xmm4, %xmm6
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	psllq	$32, %xmm6
	paddq	%xmm6, %xmm0
	shufps	$221, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrad	$13, %xmm1
	psrad	$31, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm6
	pslld	$6, %xmm6
	paddd	%xmm6, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$5, %xmm0
	psubd	%xmm0, %xmm2
	movups	%xmm2, (%rdi,%rcx)
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L7
	cmpl	%ebx, %ebp
	je	.L8
	imulq	$3001, %rdx, %rdx
	movq	(%rsp), %rdi
	movslq	%r9d, %r8
	imulq	$3001, %r8, %r8
	leaq	(%rdx,%rdi), %r10
	movq	8(%rsp), %rdi
	leaq	(%r8,%rdi), %rcx
	movl	(%r15,%rcx,4), %edi
	addl	(%r15,%r10,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r11d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r11d
	sarq	$45, %rcx
	subl	%r11d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%r10,4)
	cmpl	%r13d, %r14d
	jl	.L8
	movq	16(%rsp), %rdi
	leaq	(%rdx,%rdi), %r10
	movq	24(%rsp), %rdi
	leaq	(%r8,%rdi), %rcx
	movl	(%r15,%rcx,4), %edi
	addl	(%r15,%r10,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r11d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r11d
	sarq	$45, %rcx
	subl	%r11d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%r10,4)
	cmpl	64(%rsp), %r14d
	jl	.L8
	addq	32(%rsp), %rdx
	addq	40(%rsp), %r8
	movl	(%r15,%r8,4), %edi
	addl	(%r15,%rdx,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r8d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r8d
	sarq	$45, %rcx
	subl	%r8d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%rdx,4)
.L8:
	subq	$12004, %rax
	testl	%r9d, %r9d
	jne	.L9
.L10:
	addq	$1, 48(%rsp)
	movq	48(%rsp), %rax
	subl	$1, 68(%rsp)
	addq	$4, 56(%rsp)
	cmpl	%eax, 76(%rsp)
	jge	.L13
.L3:
	movslq	%r14d, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, 88(%rsp), %rdx
	addq	%rdx, %rax
	movl	(%r15,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L16:
	movq	48(%rsp), %rax
	movq	112(%rsp), %r8
	movq	96(%rsp), %rdi
	movq	104(%rsp), %r9
	leaq	12004(%r15,%rax,4), %r11
	subq	56(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%r11,%r8), %rcx
	movl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	(%rcx,%r9), %rax
	movl	(%rcx), %edx
	addl	$1, %esi
	addq	$4, %rcx
	addl	(%rax,%r8), %edx
	movslq	%edx, %rax
	movl	%edx, %ebx
	imulq	$351843721, %rax, %rax
	sarl	$31, %ebx
	sarq	$45, %rax
	subl	%ebx, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %edx
	movl	%edx, -4(%rcx)
	cmpl	%esi, %r14d
	jge	.L11
	subq	$12004, %r8
	addq	$12004, %r9
	cmpq	%rdi, %r8
	jne	.L12
	jmp	.L10
.L33:
	movslq	72(%rsp), %rax
	movq	%rax, 88(%rsp)
	jmp	.L3
.L35:
	movq	$0, 88(%rsp)
	jmp	.L3
.L2:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$200, %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
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.local	dp
	.comm	dp,600200,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	351843721
	.long	351843721
	.long	351843721
	.long	351843721
	.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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm4, %xmm4
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movdqa	%xmm4, %xmm5
	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
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movdqa	.LC1(%rip), %xmm3
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	180(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	172(%rsp), %rax
	pcmpgtd	%xmm3, %xmm5
	movq	%rax, 120(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 128(%rsp)
	movaps	%xmm5, 144(%rsp)
.L17:
	movq	120(%rsp), %rdx
	movq	136(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	128(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	176(%rsp), %eax
	movl	172(%rsp), %ebx
	movl	180(%rsp), %r14d
	movl	%eax, %edx
	orl	%ebx, %edx
	orl	%r14d, %edx
	je	.L2
	imull	%eax, %eax
	leaq	dp(%rip), %r15
	xorl	%esi, %esi
	movl	$600200, %edx
	movq	%r15, %rdi
	movl	%eax, 72(%rsp)
	call	memset@PLT
	testl	%ebx, %ebx
	pxor	%xmm4, %xmm4
	movl	$1, dp(%rip)
	movdqa	.LC1(%rip), %xmm3
	jle	.L33
	movl	72(%rsp), %eax
	testl	%eax, %eax
	je	.L35
	testl	%r14d, %r14d
	jle	.L33
	movslq	72(%rsp), %rsi
	cmpl	%r14d, %ebx
	movl	%r14d, 68(%rsp)
	movq	$4, 56(%rsp)
	cmovg	%r14d, %ebx
	movdqa	144(%rsp), %xmm5
	imulq	$12004, %rsi, %rax
	movq	%rsi, 88(%rsp)
	movl	%ebx, 76(%rsp)
	movq	$1, 48(%rsp)
	leaq	-12004(%rax), %rdx
	negq	%rax
	movq	%rdx, 112(%rsp)
	addq	%r15, %rdx
	movq	%rdx, 80(%rsp)
	leal	-1(%rsi), %edx
	movq	%rax, 104(%rsp)
	movq	%rsi, %rax
	subq	%rdx, %rax
	imulq	$12004, %rax, %rax
	subq	$24008, %rax
	movq	%rax, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	48(%rsp), %rsi
	movl	%r14d, %edx
	subl	%esi, %edx
	movl	%esi, %eax
	movl	%esi, %r10d
	cmpl	$2, %edx
	jbe	.L16
	cmpl	%esi, %r14d
	jl	.L16
	cmpl	%eax, %r14d
	movl	$1, %ebp
	cmovge	68(%rsp), %ebp
	movq	56(%rsp), %r11
	movl	72(%rsp), %r9d
	movl	%ebp, %ebx
	movl	%ebp, %esi
	leaq	12004(%r11), %r12
	andl	$-4, %ebx
	shrl	$2, %esi
	leal	(%rax,%rbx), %edi
	salq	$4, %rsi
	leal	2(%rdi), %r10d
	leal	1(%rdi), %r13d
	movslq	%edi, %rdi
	movq	%rdi, (%rsp)
	movl	%r13d, %ecx
	movslq	%ebx, %rdi
	movl	%r10d, %edx
	subl	%eax, %ecx
	movq	%rdi, 8(%rsp)
	movslq	%r13d, %rdi
	subl	%eax, %edx
	movq	%rdi, 16(%rsp)
	movslq	%ecx, %rdi
	movslq	%edx, %rdx
	movq	80(%rsp), %rax
	movq	%rdi, 24(%rsp)
	movslq	%r10d, %rdi
	movl	%r10d, 64(%rsp)
	movq	%rdi, 32(%rsp)
	movq	%rdx, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rdx
	leaq	(%r12,%rax), %rdi
	subl	$1, %r9d
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax,%rcx), %xmm7
	movdqu	(%rdi,%rcx), %xmm2
	movdqa	%xmm4, %xmm6
	paddd	%xmm7, %xmm2
	movdqa	%xmm5, %xmm7
	movdqa	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm0
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm0, %xmm7
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm3, %xmm1
	movdqa	%xmm2, %xmm0
	punpckhdq	%xmm2, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	movdqa	%xmm5, %xmm7
	psllq	$32, %xmm6
	pmuludq	%xmm0, %xmm7
	paddq	%xmm6, %xmm1
	movdqa	%xmm4, %xmm6
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	psllq	$32, %xmm6
	paddq	%xmm6, %xmm0
	shufps	$221, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrad	$13, %xmm1
	psrad	$31, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm6
	pslld	$6, %xmm6
	paddd	%xmm6, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$5, %xmm0
	psubd	%xmm0, %xmm2
	movups	%xmm2, (%rdi,%rcx)
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L7
	cmpl	%ebx, %ebp
	je	.L8
	imulq	$3001, %rdx, %rdx
	movq	(%rsp), %rdi
	movslq	%r9d, %r8
	imulq	$3001, %r8, %r8
	leaq	(%rdx,%rdi), %r10
	movq	8(%rsp), %rdi
	leaq	(%r8,%rdi), %rcx
	movl	(%r15,%rcx,4), %edi
	addl	(%r15,%r10,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r11d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r11d
	sarq	$45, %rcx
	subl	%r11d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%r10,4)
	cmpl	%r13d, %r14d
	jl	.L8
	movq	16(%rsp), %rdi
	leaq	(%rdx,%rdi), %r10
	movq	24(%rsp), %rdi
	leaq	(%r8,%rdi), %rcx
	movl	(%r15,%rcx,4), %edi
	addl	(%r15,%r10,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r11d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r11d
	sarq	$45, %rcx
	subl	%r11d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%r10,4)
	cmpl	64(%rsp), %r14d
	jl	.L8
	addq	32(%rsp), %rdx
	addq	40(%rsp), %r8
	movl	(%r15,%r8,4), %edi
	addl	(%r15,%rdx,4), %edi
	movslq	%edi, %rcx
	movl	%edi, %r8d
	imulq	$351843721, %rcx, %rcx
	sarl	$31, %r8d
	sarq	$45, %rcx
	subl	%r8d, %ecx
	imull	$100000, %ecx, %ecx
	subl	%ecx, %edi
	movl	%edi, (%r15,%rdx,4)
.L8:
	subq	$12004, %rax
	testl	%r9d, %r9d
	jne	.L9
.L10:
	addq	$1, 48(%rsp)
	movq	48(%rsp), %rax
	subl	$1, 68(%rsp)
	addq	$4, 56(%rsp)
	cmpl	%eax, 76(%rsp)
	jge	.L13
.L3:
	movslq	%r14d, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, 88(%rsp), %rdx
	addq	%rdx, %rax
	movl	(%r15,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
.L16:
	movq	48(%rsp), %rax
	movq	112(%rsp), %r8
	movq	96(%rsp), %rdi
	movq	104(%rsp), %r9
	leaq	12004(%r15,%rax,4), %r11
	subq	56(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%r11,%r8), %rcx
	movl	%r10d, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	(%rcx,%r9), %rax
	movl	(%rcx), %edx
	addl	$1, %esi
	addq	$4, %rcx
	addl	(%rax,%r8), %edx
	movslq	%edx, %rax
	movl	%edx, %ebx
	imulq	$351843721, %rax, %rax
	sarl	$31, %ebx
	sarq	$45, %rax
	subl	%ebx, %eax
	imull	$100000, %eax, %eax
	subl	%eax, %edx
	movl	%edx, -4(%rcx)
	cmpl	%esi, %r14d
	jge	.L11
	subq	$12004, %r8
	addq	$12004, %r9
	cmpq	%rdi, %r8
	jne	.L12
	jmp	.L10
.L33:
	movslq	72(%rsp), %rax
	movq	%rax, 88(%rsp)
	jmp	.L3
.L35:
	movq	$0, 88(%rsp)
	jmp	.L3
.L2:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$200, %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
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.local	dp
	.comm	dp,600200,32
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	351843721
	.long	351843721
	.long	351843721
	.long	351843721
	.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 <stdlib.h>
#include <string.h>

/* constant */

#define MOD     (100000)

/* typedef */

/* global variables */

static int dp[50][3001];

/* subroutines */

/* main */

int main(int argc, char **argv) {
  int i, j, k, m, n, nn, s;

  for (;;) {
    scanf("%d%d%d", &n, &m, &s);
    if ((n | m | s) == 0) break;

    nn = n * n;

    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;

    for (i = 1; i <= m; i++)
      for (j = nn; j >= 1; j--)
        for (k = i; k <= s; k++)
          dp[j][k] = (dp[j][k] + dp[j - 1][k - i]) % MOD;

    printf("%d\n", dp[nn][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 <stdlib.h>
#include <string.h>

/* constant */

#define MOD     (100000)

/* typedef */

/* global variables */

static int dp[50][3001];

/* subroutines */

/* main */

int main(int argc, char **argv) {
  int i, j, k, m, n, nn, s;

  for (;;) {
    scanf("%d%d%d", &n, &m, &s);
    if ((n | m | s) == 0) break;

    nn = n * n;

    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;

    for (i = 1; i <= m; i++)
      for (j = nn; j >= 1; j--)
        for (k = i; k <= s; k++)
          dp[j][k] = (dp[j][k] + dp[j - 1][k - i]) % MOD;

    printf("%d\n", dp[nn][s]);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.local	dp
	.comm	dp,600200,32
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L10:
	leaq	-28(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	orl	%eax, %edx
	movl	-28(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	-32(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$600200, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, dp(%rip)
	movl	$1, -24(%rbp)
	jmp	.L4
.L9:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L5
.L8:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-16(%rbp), %eax
	subl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$100000, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L7
	subl	$1, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	jg	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L9
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L10
.L14:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.local	dp
	.comm	dp,600200,32
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L10:
	leaq	-28(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	orl	%eax, %edx
	movl	-28(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	-32(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$600200, %edx
	movl	$0, %esi
	leaq	dp(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, dp(%rip)
	movl	$1, -24(%rbp)
	jmp	.L4
.L9:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L5
.L8:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-16(%rbp), %eax
	subl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$100000, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L7
	subl	$1, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	jg	.L8
	addl	$1, -24(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L9
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L10
.L14:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
