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>

#define REP(i,n) for(i=0; i<(int)(n); i++)
#define rep(i,s,n) for(i=(s); i<(int)(n); i++)

typedef unsigned int uint;

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

#define MOD 100000

int n,m,s;

int memo[50][3001];

int main(){
  int i,j,k,x,y;
  while(1){
    n = getInt();
    m = getInt();
    s = getInt();

    if(n+m+s == 0) break;

    REP(i,n*n) REP(j,s+1) memo[i][j] = 0;

    rep(i,1,m+1){
      for(j=n*n-2; j>=0; j--){
	for(k=1; k<s; k++){
	  if(!memo[j][k]) continue;
	  if(k+i > s) break;
	  memo[j+1][i+k] = (memo[j+1][i+k] + memo[j][k]) % MOD;
	}
      }
      memo[0][i] = 1;
    }

    printf("%d\n",memo[n*n-1][s]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L3
	jmp	.L4
.L5:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L5
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 600200
memo:
	.zero	600200
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L24:
	movl	$0, %eax
	call	getInt
	movl	%eax, n(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, m(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, s(%rip)
	movl	n(%rip), %edx
	movl	m(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, -12(%rbp)
	jmp	.L10
.L13:
	movl	$0, -8(%rbp)
	jmp	.L11
.L12:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L11:
	movl	s(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L12
	addl	$1, -12(%rbp)
.L10:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	$1, -12(%rbp)
	jmp	.L14
.L23:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	subl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L15
.L22:
	movl	$1, -4(%rbp)
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L28
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	cmpl	%eax, %edx
	jg	.L29
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %esi
	movl	-4(%rbp), %eax
	addl	%eax, %esi
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	imull	$100000, %eax, %edi
	movl	%edx, %eax
	subl	%edi, %eax
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	memo(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L18
.L28:
	nop
.L18:
	addl	$1, -4(%rbp)
.L16:
	movl	s(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	jmp	.L20
.L29:
	nop
.L20:
	subl	$1, -8(%rbp)
.L15:
	cmpl	$0, -8(%rbp)
	jns	.L22
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L14:
	movl	m(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L23
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	leal	-1(%rax), %edx
	movl	s(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L24
.L27:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	.p2align 4,,10
	.p2align 3
.L9:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L9
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	leaq	memo(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	.p2align 4,,10
	.p2align 3
.L31:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L31
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L14
	movl	%ebx, n(%rip)
	.p2align 4,,10
	.p2align 3
.L53:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L53
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L17
	movl	%ebx, m(%rip)
	.p2align 4,,10
	.p2align 3
.L54:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L54
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L20
	movl	n(%rip), %r12d
	movl	m(%rip), %r15d
	movl	%ebx, s(%rip)
	leal	(%r12,%r15), %eax
	addl	%ebx, %eax
	je	.L35
	imull	%r12d, %r12d
	testl	%r12d, %r12d
	je	.L55
	leal	-1(%r12), %r13d
	leaq	memo(%rip), %rcx
	movl	%r13d, 12(%rsp)
	imulq	$12004, %r13, %r13
	leaq	12004(%rcx), %rax
	addq	%rax, %r13
	movslq	%ebx, %rax
	movq	%rax, 24(%rsp)
	leaq	4(,%rax,4), %r14
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rcx, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$12004, %rcx
	cmpq	%rcx, %r13
	jne	.L23
.L22:
	testl	%r15d, %r15d
	jle	.L24
	subl	$2, %r12d
	leal	2(%r15), %r8d
	leal	1(%rbx), %r10d
	movl	$2, %r15d
	movslq	%r12d, %rax
	imulq	$12004, %rax, %rax
	leaq	4(%rbp,%rax), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%r12d, %r12d
	js	.L25
	cmpl	$1, %ebx
	jle	.L25
	movl	12(%rsp), %r13d
	movq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%r13d, %r9
	movl	%r15d, %ecx
	movq	%r14, %rdi
	imulq	$3001, %r9, %r9
	.p2align 4,,10
	.p2align 3
.L29:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L27
	cmpl	%ebx, %ecx
	jg	.L28
	movslq	%ecx, %rsi
	addq	%r9, %rsi
	addl	0(%rbp,%rsi,4), %eax
	movslq	%eax, %rdx
	movl	%eax, %r11d
	imulq	$351843721, %rdx, %rdx
	sarl	$31, %r11d
	sarq	$45, %rdx
	subl	%r11d, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, 0(%rbp,%rsi,4)
.L27:
	addl	$1, %ecx
	addq	$4, %rdi
	cmpl	%r10d, %ecx
	jne	.L29
.L28:
	subq	$12004, %r14
	subl	$1, %r13d
	jne	.L26
.L25:
	leaq	-4+memo(%rip), %rax
	addl	$1, %r10d
	movl	$1, (%rax,%r15,4)
	addq	$1, %r15
	cmpq	%r15, %r8
	jne	.L30
.L24:
	movslq	12(%rsp), %rax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, %rax, %rax
	addq	24(%rsp), %rax
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L31
.L55:
	movslq	%ebx, %rax
	movl	$-1, 12(%rsp)
	movq	%rax, 24(%rsp)
	jmp	.L22
.L35:
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	memo
	.bss
	.align 32
	.type	memo, @object
	.size	memo, 600200
memo:
	.zero	600200
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	.p2align 4,,10
	.p2align 3
.L9:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L9
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	leaq	memo(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	.p2align 4,,10
	.p2align 3
.L31:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L31
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L14
	movl	%ebx, n(%rip)
	.p2align 4,,10
	.p2align 3
.L53:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L53
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L17
	movl	%ebx, m(%rip)
	.p2align 4,,10
	.p2align 3
.L54:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L54
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	leal	(%rbx,%rbx,4), %edx
	leal	(%rax,%rdx,2), %ebx
	call	getc@PLT
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L20
	movl	n(%rip), %r12d
	movl	m(%rip), %r15d
	movl	%ebx, s(%rip)
	leal	(%r12,%r15), %eax
	addl	%ebx, %eax
	je	.L35
	imull	%r12d, %r12d
	testl	%r12d, %r12d
	je	.L55
	leal	-1(%r12), %r13d
	leaq	memo(%rip), %rcx
	movl	%r13d, 12(%rsp)
	imulq	$12004, %r13, %r13
	leaq	12004(%rcx), %rax
	addq	%rax, %r13
	movslq	%ebx, %rax
	movq	%rax, 24(%rsp)
	leaq	4(,%rax,4), %r14
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rcx, %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$12004, %rcx
	cmpq	%rcx, %r13
	jne	.L23
.L22:
	testl	%r15d, %r15d
	jle	.L24
	subl	$2, %r12d
	leal	2(%r15), %r8d
	leal	1(%rbx), %r10d
	movl	$2, %r15d
	movslq	%r12d, %rax
	imulq	$12004, %rax, %rax
	leaq	4(%rbp,%rax), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%r12d, %r12d
	js	.L25
	cmpl	$1, %ebx
	jle	.L25
	movl	12(%rsp), %r13d
	movq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%r13d, %r9
	movl	%r15d, %ecx
	movq	%r14, %rdi
	imulq	$3001, %r9, %r9
	.p2align 4,,10
	.p2align 3
.L29:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L27
	cmpl	%ebx, %ecx
	jg	.L28
	movslq	%ecx, %rsi
	addq	%r9, %rsi
	addl	0(%rbp,%rsi,4), %eax
	movslq	%eax, %rdx
	movl	%eax, %r11d
	imulq	$351843721, %rdx, %rdx
	sarl	$31, %r11d
	sarq	$45, %rdx
	subl	%r11d, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, 0(%rbp,%rsi,4)
.L27:
	addl	$1, %ecx
	addq	$4, %rdi
	cmpl	%r10d, %ecx
	jne	.L29
.L28:
	subq	$12004, %r14
	subl	$1, %r13d
	jne	.L26
.L25:
	leaq	-4+memo(%rip), %rax
	addl	$1, %r10d
	movl	$1, (%rax,%r15,4)
	addq	$1, %r15
	cmpq	%r15, %r8
	jne	.L30
.L24:
	movslq	12(%rsp), %rax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	imulq	$3001, %rax, %rax
	addq	24(%rsp), %rax
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L31
.L55:
	movslq	%ebx, %rax
	movl	$-1, 12(%rsp)
	movq	%rax, 24(%rsp)
	jmp	.L22
.L35:
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	memo
	.bss
	.align 32
	.type	memo, @object
	.size	memo, 600200
memo:
	.zero	600200
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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>

#define REP(i,n) for(i=0; i<(int)(n); i++)
#define rep(i,s,n) for(i=(s); i<(int)(n); i++)

typedef unsigned int uint;

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

#define MOD 100000

int n,m,s;

int memo[50][3001];

int main(){
  int i,j,k,x,y;
  while(1){
    n = getInt();
    m = getInt();
    s = getInt();

    if(n+m+s == 0) break;

    REP(i,n*n) REP(j,s+1) memo[i][j] = 0;

    rep(i,1,m+1){
      for(j=n*n-2; j>=0; j--){
	for(k=1; k<s; k++){
	  if(!memo[j][k]) continue;
	  if(k+i > s) break;
	  memo[j+1][i+k] = (memo[j+1][i+k] + memo[j][k]) % MOD;
	}
      }
      memo[0][i] = 1;
    }

    printf("%d\n",memo[n*n-1][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>

#define REP(i,n) for(i=0; i<(int)(n); i++)
#define rep(i,s,n) for(i=(s); i<(int)(n); i++)

typedef unsigned int uint;

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

#define MOD 100000

int n,m,s;

int memo[50][3001];

int main(){
  int i,j,k,x,y;
  while(1){
    n = getInt();
    m = getInt();
    s = getInt();

    if(n+m+s == 0) break;

    REP(i,n*n) REP(j,s+1) memo[i][j] = 0;

    rep(i,1,m+1){
      for(j=n*n-2; j>=0; j--){
	for(k=1; k<s; k++){
	  if(!memo[j][k]) continue;
	  if(k+i > s) break;
	  memo[j+1][i+k] = (memo[j+1][i+k] + memo[j][k]) % MOD;
	}
      }
      memo[0][i] = 1;
    }

    printf("%d\n",memo[n*n-1][s]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L3
	jmp	.L4
.L5:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L5
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 600200
memo:
	.zero	600200
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L24:
	movl	$0, %eax
	call	getInt
	movl	%eax, n(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, m(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, s(%rip)
	movl	n(%rip), %edx
	movl	m(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, -12(%rbp)
	jmp	.L10
.L13:
	movl	$0, -8(%rbp)
	jmp	.L11
.L12:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L11:
	movl	s(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L12
	addl	$1, -12(%rbp)
.L10:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	$1, -12(%rbp)
	jmp	.L14
.L23:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	subl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L15
.L22:
	movl	$1, -4(%rbp)
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L28
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	cmpl	%eax, %edx
	jg	.L29
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %esi
	movl	-4(%rbp), %eax
	addl	%eax, %esi
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	imull	$100000, %eax, %edi
	movl	%edx, %eax
	subl	%edi, %eax
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	memo(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L18
.L28:
	nop
.L18:
	addl	$1, -4(%rbp)
.L16:
	movl	s(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	jmp	.L20
.L29:
	nop
.L20:
	subl	$1, -8(%rbp)
.L15:
	cmpl	$0, -8(%rbp)
	jns	.L22
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L14:
	movl	m(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L23
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	leal	-1(%rax), %edx
	movl	s(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L24
.L27:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	ja	.L3
	jmp	.L4
.L5:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	subl	$48, %eax
	cmpl	$9, %eax
	jbe	.L5
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 600200
memo:
	.zero	600200
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L24:
	movl	$0, %eax
	call	getInt
	movl	%eax, n(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, m(%rip)
	movl	$0, %eax
	call	getInt
	movl	%eax, s(%rip)
	movl	n(%rip), %edx
	movl	m(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, -12(%rbp)
	jmp	.L10
.L13:
	movl	$0, -8(%rbp)
	jmp	.L11
.L12:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L11:
	movl	s(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L12
	addl	$1, -12(%rbp)
.L10:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	$1, -12(%rbp)
	jmp	.L14
.L23:
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	subl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L15
.L22:
	movl	$1, -4(%rbp)
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L28
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	cmpl	%eax, %edx
	jg	.L29
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %esi
	movl	-4(%rbp), %eax
	addl	%eax, %esi
	movslq	%edx, %rax
	imulq	$351843721, %rax, %rax
	shrq	$32, %rax
	sarl	$13, %eax
	movl	%edx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	imull	$100000, %eax, %edi
	movl	%edx, %eax
	subl	%edi, %eax
	movslq	%esi, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	memo(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L18
.L28:
	nop
.L18:
	addl	$1, -4(%rbp)
.L16:
	movl	s(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	jmp	.L20
.L29:
	nop
.L20:
	subl	$1, -8(%rbp)
.L15:
	cmpl	$0, -8(%rbp)
	jns	.L22
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L14:
	movl	m(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L23
	movl	n(%rip), %edx
	movl	n(%rip), %eax
	imull	%edx, %eax
	leal	-1(%rax), %edx
	movl	s(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L24
.L27:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
