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>
#define ll long long
#define Maxn 3005
int n,mo;
ll C[Maxn][Maxn],g[Maxn][Maxn];
ll mi(ll x,ll y,ll mo)
{
	ll ans=1;
	while (y)
	{
		if (y&1) ans=ans*x%mo;
		x=x*x%mo;
		y>>=1;
	}
	return ans;
}
void pre()
{
	C[0][0]=g[0][0]=1;
	for (int i=1;i<=n;i++)
	{
		C[i][0]=g[i][0]=1;
		for (int j=1;j<=i;j++)
		{
			C[i][j]=(C[i-1][j-1]+C[i-1][j])%mo;
			g[i][j]=(g[i-1][j-1]+g[i-1][j]*(j+1)%mo)%mo;
		}
	}
}
int main()
{
	scanf("%d%d",&n,&mo);pre();
	ll ans=0,now=1;
	for (int i=0;i<=n;i++)
	{
		ll x=0,y=1,X=mi(2,n-i,mo);
		for (int j=0;j<=i;j++)
		{
			x=(x+g[i][j]*y%mo)%mo;
			y=y*X%mo;
		}
		ans=(ans+x*C[n][i]*now%mo*mi(2,mi(2,n-i,mo-1),mo)%mo)%mo;
		now=-now;
	}
	printf("%lld\n",(ans+mo)%mo);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	mo
	.align 4
	.type	mo, @object
	.size	mo, 4
mo:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 72240200
C:
	.zero	72240200
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 72240200
g:
	.zero	72240200
	.text
	.globl	mi
	.type	mi, @function
mi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -24(%rbp)
	sarq	-32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mi, .-mi
	.globl	pre
	.type	pre, @function
pre:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, g(%rip)
	movq	g(%rip), %rax
	movq	%rax, C(%rip)
	movl	$1, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	$1, (%rax,%rdx)
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	(%rax,%rdx), %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	C(%rip), %rcx
	movq	%rdx, (%rax,%rcx)
	movl	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rcx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	imulq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	addq	%rsi, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L9
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	pre, .-pre
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	leaq	mo(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	pre
	movq	$0, -56(%rbp)
	movq	$1, -48(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L12
.L15:
	movq	$0, -40(%rbp)
	movq	$1, -32(%rbp)
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rax, -24(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L13
.L14:
	movl	-60(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-32(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -40(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -32(%rbp)
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jle	.L14
	movl	n(%rip), %eax
	movl	-64(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-40(%rbp), %rax
	imulq	-48(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %r12
	movl	mo(%rip), %eax
	movslq	%eax, %rbx
	movl	mo(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rbx, %rdx
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	imulq	%r12, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -56(%rbp)
	negq	-48(%rbp)
	addl	$1, -64(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L15
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	mi
	.type	mi, @function
mi:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movl	$1, %r8d
	testq	%rsi, %rsi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %sil
	je	.L3
	movq	%r8, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r8
.L3:
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	sarq	%rsi
	movq	%rdx, %rdi
	jne	.L4
.L1:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	mi, .-mi
	.p2align 4
	.globl	pre
	.type	pre, @function
pre:
.LFB24:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	movq	$1, g(%rip)
	movq	$1, C(%rip)
	testl	%eax, %eax
	jle	.L19
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	mo(%rip), %rsi
	movl	$3, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leal	3(%rax), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	g(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	24040(%rbp), %r10
	leaq	24040(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	$1, (%r10)
	movq	0(%rbp), %r8
	movl	$2, %ecx
	movq	$1, (%r11)
	movq	(%rbx), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdi, %rax
	movq	-8(%rbx,%rcx,8), %rdi
	movq	%r8, %r13
	movq	-8(%rbp,%rcx,8), %r8
	addq	%rdi, %rax
	cqto
	idivq	%rsi
	movq	%rcx, %rax
	imulq	%r8, %rax
	movq	%rdx, -8(%r11,%rcx,8)
	cqto
	idivq	%rsi
	leaq	(%rdx,%r13), %rax
	cqto
	idivq	%rsi
	movq	%rdx, -8(%r10,%rcx,8)
	addq	$1, %rcx
	cmpq	%r9, %rcx
	jne	.L13
	addq	$1, %r9
	addq	$24040, %rbp
	addq	$24040, %rbx
	addq	$24040, %r11
	addq	$24040, %r10
	cmpq	%r12, %r9
	jne	.L14
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE24:
	.size	pre, .-pre
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	mo(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	pre
	movslq	n(%rip), %rbp
	movslq	mo(%rip), %rcx
	testl	%ebp, %ebp
	js	.L23
	movq	%rcx, %rax
	leaq	-1(%rbp), %r12
	movl	$1, %r14d
	movq	%rbp, %r8
	imulq	$24040, %rbp, %r13
	subl	$1, %eax
	leaq	g(%rip), %r15
	movq	$0, (%rsp)
	movslq	%eax, %r11
	leaq	C(%rip), %rax
	leaq	8(%r15), %rbx
	addq	%rax, %r13
	movq	%r12, %rax
	subq	%rbp, %rax
	movq	%rax, 8(%rsp)
	testq	%rbp, %rbp
	je	.L36
	.p2align 4,,10
	.p2align 3
.L57:
	movq	%rbp, %rdi
	movl	$1, %r10d
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L26:
	testb	$1, %dil
	je	.L25
	movq	%r10, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r10
.L25:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	sarq	%rdi
	movq	%rdx, %rsi
	jne	.L26
.L24:
	movq	%r15, %r9
	movl	$1, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L27:
	movq	(%r9), %rax
	addq	$8, %r9
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	leaq	(%rdx,%rsi), %rax
	cqto
	idivq	%rcx
	movq	%rdi, %rax
	imulq	%r10, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
	cmpq	%r9, %rbx
	jne	.L27
	movq	0(%r13), %rax
	movl	$1, %r10d
	imulq	%rsi, %rax
	imulq	%r14, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r9
	movq	%rdx, %rdi
	testq	%rbp, %rbp
	je	.L28
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L30:
	testb	$1, %r8b
	je	.L29
	movq	%r10, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r11
	movq	%rdx, %r10
.L29:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r11
	sarq	%r8
	movq	%rdx, %rsi
	jne	.L30
	testq	%r10, %r10
	je	.L31
.L28:
	movl	$1, %edi
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L33:
	testb	$1, %r10b
	je	.L32
	movq	%rdi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
.L32:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	sarq	%r10
	movq	%rdx, %rsi
	jne	.L33
	movq	%r9, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
.L31:
	movq	(%rsp), %rax
	negq	%r14
	movq	%r12, %rbp
	addq	$8, %r13
	addq	$24040, %r15
	addq	$24048, %rbx
	addq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, (%rsp)
	cmpq	%r12, 8(%rsp)
	je	.L35
	subq	$1, %r12
	movq	%rbp, %r8
	testq	%rbp, %rbp
	jne	.L57
.L36:
	movl	$1, %r10d
	jmp	.L24
.L23:
	movq	$0, (%rsp)
.L35:
	movq	(%rsp), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	addq	%rcx, %rax
	cqto
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.LFE25:
	.size	main, .-main
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 72240200
g:
	.zero	72240200
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 72240200
C:
	.zero	72240200
	.globl	mo
	.align 4
	.type	mo, @object
	.size	mo, 4
mo:
	.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	mi
	.type	mi, @function
mi:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdx, %rcx
	movl	$1, %r8d
	testq	%rsi, %rsi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %sil
	je	.L3
	movq	%r8, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r8
.L3:
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	sarq	%rsi
	movq	%rdx, %rdi
	jne	.L4
.L1:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	mi, .-mi
	.p2align 4
	.globl	pre
	.type	pre, @function
pre:
.LFB24:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	movq	$1, g(%rip)
	movq	$1, C(%rip)
	testl	%eax, %eax
	jle	.L19
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	mo(%rip), %rsi
	movl	$3, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leal	3(%rax), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	g(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	24040(%rbp), %r10
	leaq	24040(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L14:
	movq	$1, (%r10)
	movq	0(%rbp), %r8
	movl	$2, %ecx
	movq	$1, (%r11)
	movq	(%rbx), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdi, %rax
	movq	-8(%rbx,%rcx,8), %rdi
	movq	%r8, %r13
	movq	-8(%rbp,%rcx,8), %r8
	addq	%rdi, %rax
	cqto
	idivq	%rsi
	movq	%rcx, %rax
	imulq	%r8, %rax
	movq	%rdx, -8(%r11,%rcx,8)
	cqto
	idivq	%rsi
	leaq	(%rdx,%r13), %rax
	cqto
	idivq	%rsi
	movq	%rdx, -8(%r10,%rcx,8)
	addq	$1, %rcx
	cmpq	%r9, %rcx
	jne	.L13
	addq	$1, %r9
	addq	$24040, %rbp
	addq	$24040, %rbx
	addq	$24040, %r11
	addq	$24040, %r10
	cmpq	%r12, %r9
	jne	.L14
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE24:
	.size	pre, .-pre
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	mo(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	pre
	movslq	n(%rip), %rbp
	movslq	mo(%rip), %rcx
	testl	%ebp, %ebp
	js	.L23
	movq	%rcx, %rax
	leaq	-1(%rbp), %r12
	movl	$1, %r14d
	movq	%rbp, %r8
	imulq	$24040, %rbp, %r13
	subl	$1, %eax
	leaq	g(%rip), %r15
	movq	$0, (%rsp)
	movslq	%eax, %r11
	leaq	C(%rip), %rax
	leaq	8(%r15), %rbx
	addq	%rax, %r13
	movq	%r12, %rax
	subq	%rbp, %rax
	movq	%rax, 8(%rsp)
	testq	%rbp, %rbp
	je	.L36
	.p2align 4,,10
	.p2align 3
.L57:
	movq	%rbp, %rdi
	movl	$1, %r10d
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L26:
	testb	$1, %dil
	je	.L25
	movq	%r10, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r10
.L25:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	sarq	%rdi
	movq	%rdx, %rsi
	jne	.L26
.L24:
	movq	%r15, %r9
	movl	$1, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L27:
	movq	(%r9), %rax
	addq	$8, %r9
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	leaq	(%rdx,%rsi), %rax
	cqto
	idivq	%rcx
	movq	%rdi, %rax
	imulq	%r10, %rax
	movq	%rdx, %rsi
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
	cmpq	%r9, %rbx
	jne	.L27
	movq	0(%r13), %rax
	movl	$1, %r10d
	imulq	%rsi, %rax
	imulq	%r14, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %r9
	movq	%rdx, %rdi
	testq	%rbp, %rbp
	je	.L28
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L30:
	testb	$1, %r8b
	je	.L29
	movq	%r10, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r11
	movq	%rdx, %r10
.L29:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r11
	sarq	%r8
	movq	%rdx, %rsi
	jne	.L30
	testq	%r10, %r10
	je	.L31
.L28:
	movl	$1, %edi
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L33:
	testb	$1, %r10b
	je	.L32
	movq	%rdi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
.L32:
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%rcx
	sarq	%r10
	movq	%rdx, %rsi
	jne	.L33
	movq	%r9, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
.L31:
	movq	(%rsp), %rax
	negq	%r14
	movq	%r12, %rbp
	addq	$8, %r13
	addq	$24040, %r15
	addq	$24048, %rbx
	addq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rdx, (%rsp)
	cmpq	%r12, 8(%rsp)
	je	.L35
	subq	$1, %r12
	movq	%rbp, %r8
	testq	%rbp, %rbp
	jne	.L57
.L36:
	movl	$1, %r10d
	jmp	.L24
.L23:
	movq	$0, (%rsp)
.L35:
	movq	(%rsp), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	addq	%rcx, %rax
	cqto
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.LFE25:
	.size	main, .-main
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 72240200
g:
	.zero	72240200
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 72240200
C:
	.zero	72240200
	.globl	mo
	.align 4
	.type	mo, @object
	.size	mo, 4
mo:
	.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>
#define ll long long
#define Maxn 3005
int n,mo;
ll C[Maxn][Maxn],g[Maxn][Maxn];
ll mi(ll x,ll y,ll mo)
{
	ll ans=1;
	while (y)
	{
		if (y&1) ans=ans*x%mo;
		x=x*x%mo;
		y>>=1;
	}
	return ans;
}
void pre()
{
	C[0][0]=g[0][0]=1;
	for (int i=1;i<=n;i++)
	{
		C[i][0]=g[i][0]=1;
		for (int j=1;j<=i;j++)
		{
			C[i][j]=(C[i-1][j-1]+C[i-1][j])%mo;
			g[i][j]=(g[i-1][j-1]+g[i-1][j]*(j+1)%mo)%mo;
		}
	}
}
int main()
{
	scanf("%d%d",&n,&mo);pre();
	ll ans=0,now=1;
	for (int i=0;i<=n;i++)
	{
		ll x=0,y=1,X=mi(2,n-i,mo);
		for (int j=0;j<=i;j++)
		{
			x=(x+g[i][j]*y%mo)%mo;
			y=y*X%mo;
		}
		ans=(ans+x*C[n][i]*now%mo*mi(2,mi(2,n-i,mo-1),mo)%mo)%mo;
		now=-now;
	}
	printf("%lld\n",(ans+mo)%mo);
	return 0;
}

4 1000000007
 5 111111113
 6 111111113
 7 111111113
 8 111111113
 3 937953985
 2 1755323823
 73 111111113
 8 153159299
 1 937953985

58456
 67376176
 6643652
 55159273
 64416350
 118
 2
 64254352
 96802080
 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>
#define ll long long
#define Maxn 3005
int n,mo;
ll C[Maxn][Maxn],g[Maxn][Maxn];
ll mi(ll x,ll y,ll mo)
{
	ll ans=1;
	while (y)
	{
		if (y&1) ans=ans*x%mo;
		x=x*x%mo;
		y>>=1;
	}
	return ans;
}
void pre()
{
	C[0][0]=g[0][0]=1;
	for (int i=1;i<=n;i++)
	{
		C[i][0]=g[i][0]=1;
		for (int j=1;j<=i;j++)
		{
			C[i][j]=(C[i-1][j-1]+C[i-1][j])%mo;
			g[i][j]=(g[i-1][j-1]+g[i-1][j]*(j+1)%mo)%mo;
		}
	}
}
int main()
{
	scanf("%d%d",&n,&mo);pre();
	ll ans=0,now=1;
	for (int i=0;i<=n;i++)
	{
		ll x=0,y=1,X=mi(2,n-i,mo);
		for (int j=0;j<=i;j++)
		{
			x=(x+g[i][j]*y%mo)%mo;
			y=y*X%mo;
		}
		ans=(ans+x*C[n][i]*now%mo*mi(2,mi(2,n-i,mo-1),mo)%mo)%mo;
		now=-now;
	}
	printf("%lld\n",(ans+mo)%mo);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	mo
	.align 4
	.type	mo, @object
	.size	mo, 4
mo:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 72240200
C:
	.zero	72240200
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 72240200
g:
	.zero	72240200
	.text
	.globl	mi
	.type	mi, @function
mi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -24(%rbp)
	sarq	-32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mi, .-mi
	.globl	pre
	.type	pre, @function
pre:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, g(%rip)
	movq	g(%rip), %rax
	movq	%rax, C(%rip)
	movl	$1, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	$1, (%rax,%rdx)
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	(%rax,%rdx), %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	C(%rip), %rcx
	movq	%rdx, (%rax,%rcx)
	movl	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rcx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	imulq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	addq	%rsi, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L9
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	pre, .-pre
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	leaq	mo(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	pre
	movq	$0, -56(%rbp)
	movq	$1, -48(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L12
.L15:
	movq	$0, -40(%rbp)
	movq	$1, -32(%rbp)
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rax, -24(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L13
.L14:
	movl	-60(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-32(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -40(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -32(%rbp)
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jle	.L14
	movl	n(%rip), %eax
	movl	-64(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-40(%rbp), %rax
	imulq	-48(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %r12
	movl	mo(%rip), %eax
	movslq	%eax, %rbx
	movl	mo(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rbx, %rdx
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	imulq	%r12, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -56(%rbp)
	negq	-48(%rbp)
	addl	$1, -64(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L15
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	mo
	.align 4
	.type	mo, @object
	.size	mo, 4
mo:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 72240200
C:
	.zero	72240200
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 72240200
g:
	.zero	72240200
	.text
	.globl	mi
	.type	mi, @function
mi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	$1, -8(%rbp)
	jmp	.L2
.L4:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -8(%rbp)
.L3:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cqto
	idivq	-40(%rbp)
	movq	%rdx, -24(%rbp)
	sarq	-32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mi, .-mi
	.globl	pre
	.type	pre, @function
pre:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	$1, g(%rip)
	movq	g(%rip), %rax
	movq	%rax, C(%rip)
	movl	$1, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	$1, (%rax,%rdx)
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	g(%rip), %rdx
	movq	(%rax,%rdx), %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$24040, %rax, %rax
	leaq	C(%rip), %rcx
	movq	%rdx, (%rax,%rcx)
	movl	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rcx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$3005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	imulq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	addq	%rsi, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L9
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	pre, .-pre
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	leaq	mo(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	pre
	movq	$0, -56(%rbp)
	movq	$1, -48(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L12
.L15:
	movq	$0, -40(%rbp)
	movq	$1, -32(%rbp)
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rax, -24(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L13
.L14:
	movl	-60(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	g(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-32(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -40(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -32(%rbp)
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jle	.L14
	movl	n(%rip), %eax
	movl	-64(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$3005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	C(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-40(%rbp), %rax
	imulq	-48(%rbp), %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %r12
	movl	mo(%rip), %eax
	movslq	%eax, %rbx
	movl	mo(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	n(%rip), %eax
	subl	-64(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	movq	%rbx, %rdx
	movq	%rax, %rsi
	movl	$2, %edi
	call	mi
	imulq	%r12, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -56(%rbp)
	negq	-48(%rbp)
	addl	$1, -64(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L15
	movl	mo(%rip), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	mo(%rip), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
