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>

#define MOD_BY 1000000007

int add(int a,int b) {
	int r=a+b;
	if(r>=MOD_BY)r-=MOD_BY;
	return r;
}

/*
int mul(int a,int b) {
	return (int)(((long long)a*(long long)b)%MOD_BY);
}
*/

int N,M;
int existPos;
char A[10240];
char B[10240];
char C[512];

int memo[10002][502][2][2];
int numberOfNumber[10002][2][2];

int getNumberOfNumber(int pos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;
	if(pos>=N)return 1;
	if(numberOfNumber[pos][ueFlag][sitaFlag]>0)return numberOfNumber[pos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		ret=add(ret,getNumberOfNumber(pos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
	}

	numberOfNumber[pos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int search(int pos,int seqPos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;

	if(seqPos>=M)return getNumberOfNumber(pos,ueFlag,sitaFlag);
	if(pos>=N)return 0;
	if(memo[pos][seqPos][ueFlag][sitaFlag]>0)return memo[pos][seqPos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		if(seqPos==0) {
			ret=add(ret,search(pos+1,0,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
		if((!sitaFlag || i!=imin || existPos<=pos) && seqPos<M && C[seqPos]==i) {
			ret=add(ret,search(pos+1,seqPos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
	}

	memo[pos][seqPos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int main(void) {
	int Alen,Blen;
	int i;
	if(scanf("%s%s%s",A,B,C)!=3)return 1;
	Alen=strlen(A);
	Blen=strlen(B);
	if(Alen<Blen) {
		for(i=0;i<Alen;i++)A[Blen-i-1]=A[Alen-i-1];
		for(i=0;i<Blen-Alen;i++)A[i]='0';
	}
	N=Blen;
	M=strlen(C);
	existPos=Blen-Alen;
	for(i=0;i<N;i++) {
		A[i]-='0';
		B[i]-='0';
	}
	for(i=0;i<M;i++)C[i]-='0';
	printf("%d\n",search(0,0,1,1));
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$1000000006, -4(%rbp)
	jle	.L2
	subl	$1000000007, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	add, .-add
	.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	existPos
	.align 4
	.type	existPos, @object
	.size	existPos, 4
existPos:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10240
A:
	.zero	10240
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 10240
B:
	.zero	10240
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 512
C:
	.zero	512
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 80336064
memo:
	.zero	80336064
	.globl	numberOfNumber
	.align 32
	.type	numberOfNumber, @object
	.size	numberOfNumber, 160032
numberOfNumber:
	.zero	160032
	.text
	.globl	getNumberOfNumber
	.type	getNumberOfNumber, @function
getNumberOfNumber:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -16(%rbp)
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$1, %eax
	jmp	.L6
.L5:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L6
.L7:
	cmpl	$0, -28(%rbp)
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movl	%eax, -8(%rbp)
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L11
.L10:
	movl	$9, %eax
.L11:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L17:
	cmpl	$0, -28(%rbp)
	je	.L13
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L13
	movl	$1, %edx
	jmp	.L14
.L13:
	movl	$0, %edx
.L14:
	cmpl	$0, -24(%rbp)
	je	.L15
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L15
	movl	$1, %ecx
	jmp	.L16
.L15:
	movl	$0, %ecx
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
	addl	$1, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L17
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getNumberOfNumber, .-getNumberOfNumber
	.globl	search
	.type	search, @function
search:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	$0, -16(%rbp)
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	jmp	.L20
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L21
	movl	$0, %eax
	jmp	.L20
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L22
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L20
.L22:
	cmpl	$0, -32(%rbp)
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	movl	%eax, -8(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L26
.L25:
	movl	$9, %eax
.L26:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L27
.L39:
	cmpl	$0, -24(%rbp)
	jne	.L28
	cmpl	$0, -32(%rbp)
	je	.L29
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L29
	movl	$1, %ecx
	jmp	.L30
.L29:
	movl	$0, %ecx
.L30:
	cmpl	$0, -28(%rbp)
	je	.L31
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L31
	movl	$1, %edx
	jmp	.L32
.L31:
	movl	$0, %edx
.L32:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L28:
	cmpl	$0, -32(%rbp)
	je	.L33
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L33
	movl	existPos(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L34
.L33:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, -12(%rbp)
	jne	.L34
	cmpl	$0, -32(%rbp)
	je	.L35
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L35
	movl	$1, %ecx
	jmp	.L36
.L35:
	movl	$0, %ecx
.L36:
	cmpl	$0, -28(%rbp)
	je	.L37
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L37
	movl	$1, %edx
	jmp	.L38
.L37:
	movl	$0, %edx
.L38:
	movl	-24(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L34:
	addl	$1, -12(%rbp)
.L27:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L39
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%s%s%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	leaq	C(%rip), %rax
	movq	%rax, %rcx
	leaq	B(%rip), %rax
	movq	%rax, %rdx
	leaq	A(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L41
	movl	$1, %eax
	jmp	.L42
.L41:
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8(%rbp)
	leaq	B(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L43
	movl	$0, -12(%rbp)
	jmp	.L44
.L45:
	movl	-8(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -12(%rbp)
.L44:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L45
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$48, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L46:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
.L43:
	movl	-4(%rbp), %eax
	movl	%eax, N(%rip)
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, M(%rip)
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, existPos(%rip)
	movl	$0, -12(%rbp)
	jmp	.L48
.L49:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L48:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L49
	movl	$0, -12(%rbp)
	jmp	.L50
.L51:
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L50:
	movl	M(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L51
	movl	$1, %ecx
	movl	$1, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	search
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.type	getNumberOfNumber.part.0, @function
getNumberOfNumber.part.0:
.LFB39:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %rcx
	movslq	%esi, %r15
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	testl	%ecx, %ecx
	je	.L2
	movslq	%edi, %r11
	leaq	A(%rip), %rax
	movl	$9, %r13d
	movsbl	(%rax,%r11), %r8d
	testl	%r15d, %r15d
	jne	.L12
	cmpl	%r8d, %r13d
	jl	.L15
.L13:
	leal	1(%rdi), %ebp
	testl	%ecx, %ecx
	leaq	numberOfNumber(%rip), %r9
	movl	%r8d, %ebx
	movslq	%ebp, %rax
	setne	%r10b
	testl	%r15d, %r15d
	movl	%ebp, %edi
	setne	16(%rsp)
	addq	%rax, %rax
	xorl	%r12d, %r12d
	movl	%r8d, %ebp
	movq	%rax, 8(%rsp)
.L9:
	movl	N(%rip), %r14d
	movl	$1, %eax
	cmpl	%edi, %r14d
	jle	.L5
	xorl	%edx, %edx
	cmpl	%ebp, %ebx
	sete	%dl
	xorl	%esi, %esi
	andl	%r10d, %edx
	cmpl	%r13d, %ebx
	sete	%sil
	andl	16(%rsp), %esi
	movslq	%edx, %r8
	movslq	%esi, %rax
	addq	8(%rsp), %rax
	leaq	(%r8,%rax,2), %rax
	movl	(%r9,%rax,4), %eax
	testl	%eax, %eax
	jg	.L26
	movq	%r11, 40(%rsp)
	movq	%r9, 32(%rsp)
	movl	%ecx, 28(%rsp)
	movb	%r10b, 27(%rsp)
	movl	%edi, 20(%rsp)
	call	getNumberOfNumber.part.0
	movq	40(%rsp), %r11
	movq	32(%rsp), %r9
	movslq	28(%rsp), %rcx
	movzbl	27(%rsp), %r10d
	movl	20(%rsp), %edi
.L5:
	addl	%eax, %r12d
	cmpl	$1000000006, %r12d
	leal	-1000000007(%r12), %eax
	cmovg	%eax, %r12d
	addl	$1, %ebx
	cmpl	%r13d, %ebx
	jg	.L8
	cmpl	%edi, %r14d
	jg	.L9
.L11:
	leal	1(%r12), %eax
	subl	$1000000006, %r12d
	cmpl	$1000000006, %eax
	cmovle	%eax, %r12d
	addl	$1, %ebx
	cmpl	%r13d, %ebx
	jle	.L11
.L8:
	leal	1(%r12), %edx
.L4:
	leaq	(%r15,%r11,2), %rax
	leaq	(%rcx,%rax,2), %rax
	movl	%edx, (%r9,%rax,4)
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xorl	%r8d, %r8d
	testl	%r15d, %r15d
	je	.L27
	movslq	%edi, %r11
.L12:
	leaq	B(%rip), %rax
	movsbl	(%rax,%r11), %r13d
	cmpl	%r8d, %r13d
	jge	.L13
.L15:
	movl	$1, %edx
	xorl	%r12d, %r12d
	leaq	numberOfNumber(%rip), %r9
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$1, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$9, %r13d
	movslq	%edi, %r11
	jmp	.L13
	.cfi_endproc
.LFE39:
	.size	getNumberOfNumber.part.0, .-getNumberOfNumber.part.0
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB35:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	add, .-add
	.p2align 4
	.globl	getNumberOfNumber
	.type	getNumberOfNumber, @function
getNumberOfNumber:
.LFB36:
	.cfi_startproc
	endbr64
	cmpl	%edi, N(%rip)
	jle	.L33
	movslq	%edi, %rcx
	movslq	%esi, %r8
	movslq	%edx, %rax
	leaq	(%r8,%rcx,2), %rcx
	leaq	(%rax,%rcx,2), %rcx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rax,%rcx,4), %eax
	testl	%eax, %eax
	jg	.L34
	jmp	getNumberOfNumber.part.0
	.p2align 4,,10
	.p2align 3
.L34:
	subl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	getNumberOfNumber, .-getNumberOfNumber
	.p2align 4
	.globl	search
	.type	search, @function
search:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%esi, M(%rip)
	movl	N(%rip), %eax
	jle	.L58
	xorl	%r12d, %r12d
	cmpl	%eax, %edi
	jge	.L35
	movslq	%edi, %r8
	movl	%esi, %ebx
	movslq	%edx, %rdi
	movslq	%ecx, %rsi
	imulq	$502, %r8, %rax
	movslq	%ebx, %r11
	movq	%rsi, 16(%rsp)
	leaq	memo(%rip), %rcx
	movq	%rdi, 8(%rsp)
	addq	%r11, %rax
	leaq	(%rdi,%rax,2), %rax
	leaq	(%rsi,%rax,2), %rax
	movl	(%rcx,%rax,4), %r12d
	testl	%r12d, %r12d
	jg	.L57
	testl	%r14d, %r14d
	jne	.L59
	xorl	%r9d, %r9d
	movl	$9, %r10d
	testl	%edx, %edx
	je	.L48
.L47:
	leaq	B(%rip), %rax
	movsbl	(%rax,%r8), %r10d
.L41:
	cmpl	%r9d, %r10d
	jl	.L52
.L48:
	movq	%r8, 40(%rsp)
	testl	%r14d, %r14d
	movl	%r9d, %ebp
	movl	%r15d, 32(%rsp)
	movl	%r13d, %r15d
	movl	%r9d, %r13d
	movl	%r14d, 36(%rsp)
	movl	%r10d, %r14d
	sete	7(%rsp)
	xorl	%r12d, %r12d
.L46:
	testl	%ebx, %ebx
	je	.L60
.L43:
	cmpl	%ebp, %r13d
	jne	.L44
	cmpb	$0, 7(%rsp)
	jne	.L44
	cmpl	existPos(%rip), %r15d
	jl	.L45
.L44:
	cmpl	M(%rip), %ebx
	jge	.L45
	leaq	C(%rip), %rax
	movsbl	(%rax,%r11), %eax
	cmpl	%ebp, %eax
	je	.L61
.L45:
	addl	$1, %ebp
	cmpl	%r14d, %ebp
	jle	.L46
	movq	40(%rsp), %r8
	leal	1(%r12), %edx
.L42:
	imulq	$502, %r8, %r8
	movq	8(%rsp), %rax
	movq	16(%rsp), %rbx
	addq	%r11, %r8
	leaq	(%rax,%r8,2), %rax
	leaq	(%rbx,%rax,2), %rax
	leaq	memo(%rip), %rbx
	movl	%edx, (%rbx,%rax,4)
.L35:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	subl	$1, %r12d
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L58:
	cmpl	%eax, %edi
	jge	.L49
	movslq	%ecx, %rax
	movslq	%edi, %rdx
	movslq	%r15d, %rcx
	leaq	(%rcx,%rdx,2), %rdx
	leaq	(%rax,%rdx,2), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rax,%rdx,4), %r12d
	testl	%r12d, %r12d
	jg	.L57
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r14d, %edx
	movl	%r15d, %esi
	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
	jmp	getNumberOfNumber.part.0
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	leaq	A(%rip), %rax
	movl	$9, %r10d
	movsbl	(%rax,%r8), %r9d
	testl	%edx, %edx
	jne	.L47
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L49:
	movl	$1, %r12d
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L60:
	movl	36(%rsp), %ecx
	movl	32(%rsp), %esi
	leal	1(%r15), %edi
	movq	%r11, 24(%rsp)
	testl	%ecx, %ecx
	setne	%al
	xorl	%ecx, %ecx
	cmpl	%ebp, %r13d
	sete	%cl
	andl	%eax, %ecx
	testl	%esi, %esi
	setne	%al
	xorl	%edx, %edx
	cmpl	%r14d, %ebp
	sete	%dl
	xorl	%esi, %esi
	andl	%eax, %edx
	call	search
	movq	24(%rsp), %r11
	addl	%eax, %r12d
	leal	-1000000007(%r12), %eax
	cmpl	$1000000006, %r12d
	cmovg	%eax, %r12d
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L61:
	movl	36(%rsp), %eax
	movl	32(%rsp), %edx
	leal	1(%rbx), %esi
	leal	1(%r15), %edi
	movq	%r11, 24(%rsp)
	testl	%eax, %eax
	setne	%al
	xorl	%ecx, %ecx
	cmpl	%ebp, %r13d
	sete	%cl
	andl	%eax, %ecx
	testl	%edx, %edx
	setne	%al
	xorl	%edx, %edx
	cmpl	%r14d, %ebp
	sete	%dl
	andl	%eax, %edx
	call	search
	movq	24(%rsp), %r11
	addl	%eax, %r12d
	leal	-1000000007(%r12), %eax
	cmpl	$1000000006, %r12d
	cmovg	%eax, %r12d
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L52:
	movl	$1, %edx
	xorl	%r12d, %r12d
	jmp	.L42
	.cfi_endproc
.LFE37:
	.size	search, .-search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%s%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	B(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	C(%rip), %r12
	movq	%r13, %rdx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L62
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r13, %rdi
	movq	%rax, %r15
	call	strlen@PLT
	movl	%eax, %r14d
	movq	%rax, %rbp
	movslq	%eax, %rdi
	subl	%r15d, %r14d
	cmpl	%eax, %r15d
	jge	.L64
	testl	%r15d, %r15d
	je	.L69
	movslq	%r15d, %r8
	leaq	-1+A(%rip), %rsi
	leal	-1(%r15), %edx
	addq	%r8, %rsi
	leaq	(%rbx,%r8), %rax
	subq	%rdx, %rsi
	.p2align 4,,10
	.p2align 3
.L68:
	movzbl	-1(%rax), %ecx
	movq	%rax, %rdx
	subq	$1, %rax
	subq	%r8, %rdx
	movb	%cl, -1(%rdx,%rdi)
	cmpq	%rsi, %rax
	jne	.L68
.L69:
	testl	%r14d, %r14d
	jle	.L67
	movslq	%r14d, %rdx
	movl	$48, %esi
	movq	%rbx, %rdi
	call	memset@PLT
.L67:
	movq	%r12, %rdi
	movl	%ebp, N(%rip)
	call	strlen@PLT
	movl	%r14d, existPos(%rip)
	movl	%eax, M(%rip)
	movl	%eax, %ecx
.L84:
	testl	%ebp, %ebp
	movl	$1, %esi
	leal	-1(%rbp), %eax
	cmovg	%ebp, %esi
	cmpl	$14, %eax
	jbe	.L86
	testl	%ebp, %ebp
	jle	.L86
	movl	%esi, %edi
	leaq	A(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	leaq	B(%rip), %rdx
	shrl	$4, %edi
	leaq	16(%rax), %r8
	subl	$1, %edi
	salq	$4, %rdi
	addq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L72:
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	addq	$16, %rdx
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rax)
	movdqa	-16(%rdx), %xmm1
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rdx)
	cmpq	%rax, %rdi
	jne	.L72
	movl	%esi, %eax
	andl	$-16, %eax
	movl	%eax, %edx
	cmpl	%eax, %esi
	je	.L70
.L71:
	movl	%esi, %edi
	subl	$1, %esi
	subl	%eax, %esi
	subl	%eax, %edi
	cmpl	$6, %esi
	jbe	.L74
	movq	.LC2(%rip), %xmm1
	leaq	(%rbx,%rax), %rsi
	addq	%r13, %rax
	movq	(%rsi), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rsi)
	movq	(%rax), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rax)
	movl	%edi, %eax
	andl	$-8, %eax
	addl	%eax, %edx
	cmpl	%eax, %edi
	je	.L70
.L74:
	movslq	%edx, %rax
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	1(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	2(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	3(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	4(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	5(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	addl	$6, %edx
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	cmpl	%edx, %ebp
	jle	.L70
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	subb	$48, 0(%r13,%rdx)
.L70:
	testl	%ecx, %ecx
	je	.L80
	leal	-1(%rcx), %eax
	cmpl	$14, %eax
	jbe	.L87
	movl	%ecx, %edx
	leaq	C(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	shrl	$4, %edx
	leaq	16(%rax), %rsi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L78:
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L78
	movl	%ecx, %eax
	andl	$-16, %eax
	movl	%eax, %edx
	cmpl	%eax, %ecx
	je	.L80
.L77:
	movl	%ecx, %esi
	subl	%eax, %esi
	leal	-1(%rsi), %edi
	cmpl	$6, %edi
	jbe	.L82
	movq	.LC2(%rip), %xmm1
	addq	%r12, %rax
	movq	(%rax), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rax)
	movl	%esi, %eax
	andl	$-8, %eax
	addl	%eax, %edx
	cmpl	%eax, %esi
	je	.L80
.L82:
	movslq	%edx, %rax
	subb	$48, (%r12,%rax)
	leal	1(%rdx), %eax
	cmpl	%ecx, %eax
	jge	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	2(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	3(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	4(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	5(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	addl	$6, %edx
	subb	$48, (%r12,%rax)
	cmpl	%edx, %ecx
	jle	.L80
	movslq	%edx, %rdx
	subb	$48, (%r12,%rdx)
.L80:
	movl	$1, %ecx
	movl	$1, %edx
	xorl	%esi, %esi
	xorl	%edi, %edi
	call	search
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L62:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L64:
	.cfi_restore_state
	movq	%r12, %rdi
	movl	%eax, N(%rip)
	call	strlen@PLT
	movl	%r14d, existPos(%rip)
	movl	%eax, M(%rip)
	movl	%eax, %ecx
	testl	%ebp, %ebp
	jne	.L84
	jmp	.L70
.L87:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L77
.L86:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L71
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	numberOfNumber
	.bss
	.align 32
	.type	numberOfNumber, @object
	.size	numberOfNumber, 160032
numberOfNumber:
	.zero	160032
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 80336064
memo:
	.zero	80336064
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 512
C:
	.zero	512
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 10240
B:
	.zero	10240
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10240
A:
	.zero	10240
	.globl	existPos
	.align 4
	.type	existPos, @object
	.size	existPos, 4
existPos:
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.set	.LC2,.LC1
	.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
	.type	getNumberOfNumber.part.0, @function
getNumberOfNumber.part.0:
.LFB39:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %rcx
	movslq	%esi, %r15
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	testl	%ecx, %ecx
	je	.L2
	movslq	%edi, %r11
	leaq	A(%rip), %rax
	movl	$9, %r13d
	movsbl	(%rax,%r11), %r8d
	testl	%r15d, %r15d
	jne	.L12
	cmpl	%r8d, %r13d
	jl	.L15
.L13:
	leal	1(%rdi), %ebp
	testl	%ecx, %ecx
	leaq	numberOfNumber(%rip), %r9
	movl	%r8d, %ebx
	movslq	%ebp, %rax
	setne	%r10b
	testl	%r15d, %r15d
	movl	%ebp, %edi
	setne	16(%rsp)
	addq	%rax, %rax
	xorl	%r12d, %r12d
	movl	%r8d, %ebp
	movq	%rax, 8(%rsp)
.L9:
	movl	N(%rip), %r14d
	movl	$1, %eax
	cmpl	%edi, %r14d
	jle	.L5
	xorl	%edx, %edx
	cmpl	%ebp, %ebx
	sete	%dl
	xorl	%esi, %esi
	andl	%r10d, %edx
	cmpl	%r13d, %ebx
	sete	%sil
	andl	16(%rsp), %esi
	movslq	%edx, %r8
	movslq	%esi, %rax
	addq	8(%rsp), %rax
	leaq	(%r8,%rax,2), %rax
	movl	(%r9,%rax,4), %eax
	testl	%eax, %eax
	jg	.L26
	movq	%r11, 40(%rsp)
	movq	%r9, 32(%rsp)
	movl	%ecx, 28(%rsp)
	movb	%r10b, 27(%rsp)
	movl	%edi, 20(%rsp)
	call	getNumberOfNumber.part.0
	movq	40(%rsp), %r11
	movq	32(%rsp), %r9
	movslq	28(%rsp), %rcx
	movzbl	27(%rsp), %r10d
	movl	20(%rsp), %edi
.L5:
	addl	%eax, %r12d
	cmpl	$1000000006, %r12d
	leal	-1000000007(%r12), %eax
	cmovg	%eax, %r12d
	addl	$1, %ebx
	cmpl	%r13d, %ebx
	jg	.L8
	cmpl	%edi, %r14d
	jg	.L9
.L11:
	leal	1(%r12), %eax
	subl	$1000000006, %r12d
	cmpl	$1000000006, %eax
	cmovle	%eax, %r12d
	addl	$1, %ebx
	cmpl	%r13d, %ebx
	jle	.L11
.L8:
	leal	1(%r12), %edx
.L4:
	leaq	(%r15,%r11,2), %rax
	leaq	(%rcx,%rax,2), %rax
	movl	%edx, (%r9,%rax,4)
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xorl	%r8d, %r8d
	testl	%r15d, %r15d
	je	.L27
	movslq	%edi, %r11
.L12:
	leaq	B(%rip), %rax
	movsbl	(%rax,%r11), %r13d
	cmpl	%r8d, %r13d
	jge	.L13
.L15:
	movl	$1, %edx
	xorl	%r12d, %r12d
	leaq	numberOfNumber(%rip), %r9
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$1, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$9, %r13d
	movslq	%edi, %r11
	jmp	.L13
	.cfi_endproc
.LFE39:
	.size	getNumberOfNumber.part.0, .-getNumberOfNumber.part.0
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB35:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	add, .-add
	.p2align 4
	.globl	getNumberOfNumber
	.type	getNumberOfNumber, @function
getNumberOfNumber:
.LFB36:
	.cfi_startproc
	endbr64
	cmpl	%edi, N(%rip)
	jle	.L33
	movslq	%edi, %rcx
	movslq	%esi, %r8
	movslq	%edx, %rax
	leaq	(%r8,%rcx,2), %rcx
	leaq	(%rax,%rcx,2), %rcx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rax,%rcx,4), %eax
	testl	%eax, %eax
	jg	.L34
	jmp	getNumberOfNumber.part.0
	.p2align 4,,10
	.p2align 3
.L34:
	subl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	getNumberOfNumber, .-getNumberOfNumber
	.p2align 4
	.globl	search
	.type	search, @function
search:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%esi, M(%rip)
	movl	N(%rip), %eax
	jle	.L58
	xorl	%r12d, %r12d
	cmpl	%eax, %edi
	jge	.L35
	movslq	%edi, %r8
	movl	%esi, %ebx
	movslq	%edx, %rdi
	movslq	%ecx, %rsi
	imulq	$502, %r8, %rax
	movslq	%ebx, %r11
	movq	%rsi, 16(%rsp)
	leaq	memo(%rip), %rcx
	movq	%rdi, 8(%rsp)
	addq	%r11, %rax
	leaq	(%rdi,%rax,2), %rax
	leaq	(%rsi,%rax,2), %rax
	movl	(%rcx,%rax,4), %r12d
	testl	%r12d, %r12d
	jg	.L57
	testl	%r14d, %r14d
	jne	.L59
	xorl	%r9d, %r9d
	movl	$9, %r10d
	testl	%edx, %edx
	je	.L48
.L47:
	leaq	B(%rip), %rax
	movsbl	(%rax,%r8), %r10d
.L41:
	cmpl	%r9d, %r10d
	jl	.L52
.L48:
	movq	%r8, 40(%rsp)
	testl	%r14d, %r14d
	movl	%r9d, %ebp
	movl	%r15d, 32(%rsp)
	movl	%r13d, %r15d
	movl	%r9d, %r13d
	movl	%r14d, 36(%rsp)
	movl	%r10d, %r14d
	sete	7(%rsp)
	xorl	%r12d, %r12d
.L46:
	testl	%ebx, %ebx
	je	.L60
.L43:
	cmpl	%ebp, %r13d
	jne	.L44
	cmpb	$0, 7(%rsp)
	jne	.L44
	cmpl	existPos(%rip), %r15d
	jl	.L45
.L44:
	cmpl	M(%rip), %ebx
	jge	.L45
	leaq	C(%rip), %rax
	movsbl	(%rax,%r11), %eax
	cmpl	%ebp, %eax
	je	.L61
.L45:
	addl	$1, %ebp
	cmpl	%r14d, %ebp
	jle	.L46
	movq	40(%rsp), %r8
	leal	1(%r12), %edx
.L42:
	imulq	$502, %r8, %r8
	movq	8(%rsp), %rax
	movq	16(%rsp), %rbx
	addq	%r11, %r8
	leaq	(%rax,%r8,2), %rax
	leaq	(%rbx,%rax,2), %rax
	leaq	memo(%rip), %rbx
	movl	%edx, (%rbx,%rax,4)
.L35:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	subl	$1, %r12d
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L58:
	cmpl	%eax, %edi
	jge	.L49
	movslq	%ecx, %rax
	movslq	%edi, %rdx
	movslq	%r15d, %rcx
	leaq	(%rcx,%rdx,2), %rdx
	leaq	(%rax,%rdx,2), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rax,%rdx,4), %r12d
	testl	%r12d, %r12d
	jg	.L57
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r14d, %edx
	movl	%r15d, %esi
	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
	jmp	getNumberOfNumber.part.0
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	leaq	A(%rip), %rax
	movl	$9, %r10d
	movsbl	(%rax,%r8), %r9d
	testl	%edx, %edx
	jne	.L47
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L49:
	movl	$1, %r12d
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L60:
	movl	36(%rsp), %ecx
	movl	32(%rsp), %esi
	leal	1(%r15), %edi
	movq	%r11, 24(%rsp)
	testl	%ecx, %ecx
	setne	%al
	xorl	%ecx, %ecx
	cmpl	%ebp, %r13d
	sete	%cl
	andl	%eax, %ecx
	testl	%esi, %esi
	setne	%al
	xorl	%edx, %edx
	cmpl	%r14d, %ebp
	sete	%dl
	xorl	%esi, %esi
	andl	%eax, %edx
	call	search
	movq	24(%rsp), %r11
	addl	%eax, %r12d
	leal	-1000000007(%r12), %eax
	cmpl	$1000000006, %r12d
	cmovg	%eax, %r12d
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L61:
	movl	36(%rsp), %eax
	movl	32(%rsp), %edx
	leal	1(%rbx), %esi
	leal	1(%r15), %edi
	movq	%r11, 24(%rsp)
	testl	%eax, %eax
	setne	%al
	xorl	%ecx, %ecx
	cmpl	%ebp, %r13d
	sete	%cl
	andl	%eax, %ecx
	testl	%edx, %edx
	setne	%al
	xorl	%edx, %edx
	cmpl	%r14d, %ebp
	sete	%dl
	andl	%eax, %edx
	call	search
	movq	24(%rsp), %r11
	addl	%eax, %r12d
	leal	-1000000007(%r12), %eax
	cmpl	$1000000006, %r12d
	cmovg	%eax, %r12d
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L52:
	movl	$1, %edx
	xorl	%r12d, %r12d
	jmp	.L42
	.cfi_endproc
.LFE37:
	.size	search, .-search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%s%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	B(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	C(%rip), %r12
	movq	%r13, %rdx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L62
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r13, %rdi
	movq	%rax, %r15
	call	strlen@PLT
	movl	%eax, %r14d
	movq	%rax, %rbp
	movslq	%eax, %rdi
	subl	%r15d, %r14d
	cmpl	%eax, %r15d
	jge	.L64
	testl	%r15d, %r15d
	je	.L69
	movslq	%r15d, %r8
	leaq	-1+A(%rip), %rsi
	leal	-1(%r15), %edx
	addq	%r8, %rsi
	leaq	(%rbx,%r8), %rax
	subq	%rdx, %rsi
	.p2align 4,,10
	.p2align 3
.L68:
	movzbl	-1(%rax), %ecx
	movq	%rax, %rdx
	subq	$1, %rax
	subq	%r8, %rdx
	movb	%cl, -1(%rdx,%rdi)
	cmpq	%rsi, %rax
	jne	.L68
.L69:
	testl	%r14d, %r14d
	jle	.L67
	movslq	%r14d, %rdx
	movl	$48, %esi
	movq	%rbx, %rdi
	call	memset@PLT
.L67:
	movq	%r12, %rdi
	movl	%ebp, N(%rip)
	call	strlen@PLT
	movl	%r14d, existPos(%rip)
	movl	%eax, M(%rip)
	movl	%eax, %ecx
.L84:
	testl	%ebp, %ebp
	movl	$1, %esi
	leal	-1(%rbp), %eax
	cmovg	%ebp, %esi
	cmpl	$14, %eax
	jbe	.L86
	testl	%ebp, %ebp
	jle	.L86
	movl	%esi, %edi
	leaq	A(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	leaq	B(%rip), %rdx
	shrl	$4, %edi
	leaq	16(%rax), %r8
	subl	$1, %edi
	salq	$4, %rdi
	addq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L72:
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	addq	$16, %rdx
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rax)
	movdqa	-16(%rdx), %xmm1
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rdx)
	cmpq	%rax, %rdi
	jne	.L72
	movl	%esi, %eax
	andl	$-16, %eax
	movl	%eax, %edx
	cmpl	%eax, %esi
	je	.L70
.L71:
	movl	%esi, %edi
	subl	$1, %esi
	subl	%eax, %esi
	subl	%eax, %edi
	cmpl	$6, %esi
	jbe	.L74
	movq	.LC2(%rip), %xmm1
	leaq	(%rbx,%rax), %rsi
	addq	%r13, %rax
	movq	(%rsi), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rsi)
	movq	(%rax), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rax)
	movl	%edi, %eax
	andl	$-8, %eax
	addl	%eax, %edx
	cmpl	%eax, %edi
	je	.L70
.L74:
	movslq	%edx, %rax
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	1(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	2(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	3(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	4(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	leal	5(%rdx), %eax
	cmpl	%eax, %ebp
	jle	.L70
	cltq
	addl	$6, %edx
	subb	$48, (%rbx,%rax)
	subb	$48, 0(%r13,%rax)
	cmpl	%edx, %ebp
	jle	.L70
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	subb	$48, 0(%r13,%rdx)
.L70:
	testl	%ecx, %ecx
	je	.L80
	leal	-1(%rcx), %eax
	cmpl	$14, %eax
	jbe	.L87
	movl	%ecx, %edx
	leaq	C(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	shrl	$4, %edx
	leaq	16(%rax), %rsi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L78:
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	paddb	%xmm0, %xmm1
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L78
	movl	%ecx, %eax
	andl	$-16, %eax
	movl	%eax, %edx
	cmpl	%eax, %ecx
	je	.L80
.L77:
	movl	%ecx, %esi
	subl	%eax, %esi
	leal	-1(%rsi), %edi
	cmpl	$6, %edi
	jbe	.L82
	movq	.LC2(%rip), %xmm1
	addq	%r12, %rax
	movq	(%rax), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rax)
	movl	%esi, %eax
	andl	$-8, %eax
	addl	%eax, %edx
	cmpl	%eax, %esi
	je	.L80
.L82:
	movslq	%edx, %rax
	subb	$48, (%r12,%rax)
	leal	1(%rdx), %eax
	cmpl	%ecx, %eax
	jge	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	2(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	3(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	4(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	subb	$48, (%r12,%rax)
	leal	5(%rdx), %eax
	cmpl	%eax, %ecx
	jle	.L80
	cltq
	addl	$6, %edx
	subb	$48, (%r12,%rax)
	cmpl	%edx, %ecx
	jle	.L80
	movslq	%edx, %rdx
	subb	$48, (%r12,%rdx)
.L80:
	movl	$1, %ecx
	movl	$1, %edx
	xorl	%esi, %esi
	xorl	%edi, %edi
	call	search
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L62:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L64:
	.cfi_restore_state
	movq	%r12, %rdi
	movl	%eax, N(%rip)
	call	strlen@PLT
	movl	%r14d, existPos(%rip)
	movl	%eax, M(%rip)
	movl	%eax, %ecx
	testl	%ebp, %ebp
	jne	.L84
	jmp	.L70
.L87:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L77
.L86:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L71
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	numberOfNumber
	.bss
	.align 32
	.type	numberOfNumber, @object
	.size	numberOfNumber, 160032
numberOfNumber:
	.zero	160032
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 80336064
memo:
	.zero	80336064
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 512
C:
	.zero	512
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 10240
B:
	.zero	10240
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10240
A:
	.zero	10240
	.globl	existPos
	.align 4
	.type	existPos, @object
	.size	existPos, 4
existPos:
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.set	.LC2,.LC1
	.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>

#define MOD_BY 1000000007

int add(int a,int b) {
	int r=a+b;
	if(r>=MOD_BY)r-=MOD_BY;
	return r;
}

/*
int mul(int a,int b) {
	return (int)(((long long)a*(long long)b)%MOD_BY);
}
*/

int N,M;
int existPos;
char A[10240];
char B[10240];
char C[512];

int memo[10002][502][2][2];
int numberOfNumber[10002][2][2];

int getNumberOfNumber(int pos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;
	if(pos>=N)return 1;
	if(numberOfNumber[pos][ueFlag][sitaFlag]>0)return numberOfNumber[pos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		ret=add(ret,getNumberOfNumber(pos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
	}

	numberOfNumber[pos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int search(int pos,int seqPos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;

	if(seqPos>=M)return getNumberOfNumber(pos,ueFlag,sitaFlag);
	if(pos>=N)return 0;
	if(memo[pos][seqPos][ueFlag][sitaFlag]>0)return memo[pos][seqPos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		if(seqPos==0) {
			ret=add(ret,search(pos+1,0,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
		if((!sitaFlag || i!=imin || existPos<=pos) && seqPos<M && C[seqPos]==i) {
			ret=add(ret,search(pos+1,seqPos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
	}

	memo[pos][seqPos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int main(void) {
	int Alen,Blen;
	int i;
	if(scanf("%s%s%s",A,B,C)!=3)return 1;
	Alen=strlen(A);
	Blen=strlen(B);
	if(Alen<Blen) {
		for(i=0;i<Alen;i++)A[Blen-i-1]=A[Alen-i-1];
		for(i=0;i<Blen-Alen;i++)A[i]='0';
	}
	N=Blen;
	M=strlen(C);
	existPos=Blen-Alen;
	for(i=0;i<N;i++) {
		A[i]-='0';
		B[i]-='0';
	}
	for(i=0;i<M;i++)C[i]-='0';
	printf("%d\n",search(0,0,1,1));
	return 0;
}
1 3 2

1

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>

#define MOD_BY 1000000007

int add(int a,int b) {
	int r=a+b;
	if(r>=MOD_BY)r-=MOD_BY;
	return r;
}

/*
int mul(int a,int b) {
	return (int)(((long long)a*(long long)b)%MOD_BY);
}
*/

int N,M;
int existPos;
char A[10240];
char B[10240];
char C[512];

int memo[10002][502][2][2];
int numberOfNumber[10002][2][2];

int getNumberOfNumber(int pos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;
	if(pos>=N)return 1;
	if(numberOfNumber[pos][ueFlag][sitaFlag]>0)return numberOfNumber[pos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		ret=add(ret,getNumberOfNumber(pos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
	}

	numberOfNumber[pos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int search(int pos,int seqPos,int ueFlag,int sitaFlag) {
	int ret=0;
	int i;
	int imin,imax;

	if(seqPos>=M)return getNumberOfNumber(pos,ueFlag,sitaFlag);
	if(pos>=N)return 0;
	if(memo[pos][seqPos][ueFlag][sitaFlag]>0)return memo[pos][seqPos][ueFlag][sitaFlag]-1;

	imin=sitaFlag?A[pos]:0;
	imax=ueFlag?B[pos]:9;
	for(i=imin;i<=imax;i++) {
		if(seqPos==0) {
			ret=add(ret,search(pos+1,0,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
		if((!sitaFlag || i!=imin || existPos<=pos) && seqPos<M && C[seqPos]==i) {
			ret=add(ret,search(pos+1,seqPos+1,ueFlag&&(i==imax),sitaFlag&&(i==imin)));
		}
	}

	memo[pos][seqPos][ueFlag][sitaFlag]=ret+1;
	return ret;
}

int main(void) {
	int Alen,Blen;
	int i;
	if(scanf("%s%s%s",A,B,C)!=3)return 1;
	Alen=strlen(A);
	Blen=strlen(B);
	if(Alen<Blen) {
		for(i=0;i<Alen;i++)A[Blen-i-1]=A[Alen-i-1];
		for(i=0;i<Blen-Alen;i++)A[i]='0';
	}
	N=Blen;
	M=strlen(C);
	existPos=Blen-Alen;
	for(i=0;i<N;i++) {
		A[i]-='0';
		B[i]-='0';
	}
	for(i=0;i<M;i++)C[i]-='0';
	printf("%d\n",search(0,0,1,1));
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$1000000006, -4(%rbp)
	jle	.L2
	subl	$1000000007, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	add, .-add
	.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	existPos
	.align 4
	.type	existPos, @object
	.size	existPos, 4
existPos:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10240
A:
	.zero	10240
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 10240
B:
	.zero	10240
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 512
C:
	.zero	512
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 80336064
memo:
	.zero	80336064
	.globl	numberOfNumber
	.align 32
	.type	numberOfNumber, @object
	.size	numberOfNumber, 160032
numberOfNumber:
	.zero	160032
	.text
	.globl	getNumberOfNumber
	.type	getNumberOfNumber, @function
getNumberOfNumber:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -16(%rbp)
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$1, %eax
	jmp	.L6
.L5:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L6
.L7:
	cmpl	$0, -28(%rbp)
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movl	%eax, -8(%rbp)
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L11
.L10:
	movl	$9, %eax
.L11:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L17:
	cmpl	$0, -28(%rbp)
	je	.L13
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L13
	movl	$1, %edx
	jmp	.L14
.L13:
	movl	$0, %edx
.L14:
	cmpl	$0, -24(%rbp)
	je	.L15
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L15
	movl	$1, %ecx
	jmp	.L16
.L15:
	movl	$0, %ecx
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
	addl	$1, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L17
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getNumberOfNumber, .-getNumberOfNumber
	.globl	search
	.type	search, @function
search:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	$0, -16(%rbp)
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	jmp	.L20
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L21
	movl	$0, %eax
	jmp	.L20
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L22
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L20
.L22:
	cmpl	$0, -32(%rbp)
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	movl	%eax, -8(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L26
.L25:
	movl	$9, %eax
.L26:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L27
.L39:
	cmpl	$0, -24(%rbp)
	jne	.L28
	cmpl	$0, -32(%rbp)
	je	.L29
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L29
	movl	$1, %ecx
	jmp	.L30
.L29:
	movl	$0, %ecx
.L30:
	cmpl	$0, -28(%rbp)
	je	.L31
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L31
	movl	$1, %edx
	jmp	.L32
.L31:
	movl	$0, %edx
.L32:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L28:
	cmpl	$0, -32(%rbp)
	je	.L33
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L33
	movl	existPos(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L34
.L33:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, -12(%rbp)
	jne	.L34
	cmpl	$0, -32(%rbp)
	je	.L35
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L35
	movl	$1, %ecx
	jmp	.L36
.L35:
	movl	$0, %ecx
.L36:
	cmpl	$0, -28(%rbp)
	je	.L37
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L37
	movl	$1, %edx
	jmp	.L38
.L37:
	movl	$0, %edx
.L38:
	movl	-24(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L34:
	addl	$1, -12(%rbp)
.L27:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L39
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%s%s%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	leaq	C(%rip), %rax
	movq	%rax, %rcx
	leaq	B(%rip), %rax
	movq	%rax, %rdx
	leaq	A(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L41
	movl	$1, %eax
	jmp	.L42
.L41:
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8(%rbp)
	leaq	B(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L43
	movl	$0, -12(%rbp)
	jmp	.L44
.L45:
	movl	-8(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -12(%rbp)
.L44:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L45
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$48, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L46:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
.L43:
	movl	-4(%rbp), %eax
	movl	%eax, N(%rip)
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, M(%rip)
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, existPos(%rip)
	movl	$0, -12(%rbp)
	jmp	.L48
.L49:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L48:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L49
	movl	$0, -12(%rbp)
	jmp	.L50
.L51:
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L50:
	movl	M(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L51
	movl	$1, %ecx
	movl	$1, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	search
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	add
	.type	add, @function
add:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$1000000006, -4(%rbp)
	jle	.L2
	subl	$1000000007, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	add, .-add
	.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	existPos
	.align 4
	.type	existPos, @object
	.size	existPos, 4
existPos:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10240
A:
	.zero	10240
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 10240
B:
	.zero	10240
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 512
C:
	.zero	512
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 80336064
memo:
	.zero	80336064
	.globl	numberOfNumber
	.align 32
	.type	numberOfNumber, @object
	.size	numberOfNumber, 160032
numberOfNumber:
	.zero	160032
	.text
	.globl	getNumberOfNumber
	.type	getNumberOfNumber, @function
getNumberOfNumber:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -16(%rbp)
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$1, %eax
	jmp	.L6
.L5:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L6
.L7:
	cmpl	$0, -28(%rbp)
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	movl	%eax, -8(%rbp)
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L11
.L10:
	movl	$9, %eax
.L11:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L12
.L17:
	cmpl	$0, -28(%rbp)
	je	.L13
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L13
	movl	$1, %edx
	jmp	.L14
.L13:
	movl	$0, %edx
.L14:
	cmpl	$0, -24(%rbp)
	je	.L15
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L15
	movl	$1, %ecx
	jmp	.L16
.L15:
	movl	$0, %ecx
.L16:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
	addl	$1, -12(%rbp)
.L12:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L17
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	numberOfNumber(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getNumberOfNumber, .-getNumberOfNumber
	.globl	search
	.type	search, @function
search:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	$0, -16(%rbp)
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	getNumberOfNumber
	jmp	.L20
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L21
	movl	$0, %eax
	jmp	.L20
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L22
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L20
.L22:
	cmpl	$0, -32(%rbp)
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L24
.L23:
	movl	$0, %eax
.L24:
	movl	%eax, -8(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	jmp	.L26
.L25:
	movl	$9, %eax
.L26:
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L27
.L39:
	cmpl	$0, -24(%rbp)
	jne	.L28
	cmpl	$0, -32(%rbp)
	je	.L29
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L29
	movl	$1, %ecx
	jmp	.L30
.L29:
	movl	$0, %ecx
.L30:
	cmpl	$0, -28(%rbp)
	je	.L31
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L31
	movl	$1, %edx
	jmp	.L32
.L31:
	movl	$0, %edx
.L32:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L28:
	cmpl	$0, -32(%rbp)
	je	.L33
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L33
	movl	existPos(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L34
.L33:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L34
	movl	-24(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, -12(%rbp)
	jne	.L34
	cmpl	$0, -32(%rbp)
	je	.L35
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L35
	movl	$1, %ecx
	jmp	.L36
.L35:
	movl	$0, %ecx
.L36:
	cmpl	$0, -28(%rbp)
	je	.L37
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L37
	movl	$1, %edx
	jmp	.L38
.L37:
	movl	$0, %edx
.L38:
	movl	-24(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	search
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -16(%rbp)
.L34:
	addl	$1, -12(%rbp)
.L27:
	movl	-12(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L39
	movl	-16(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$502, %rax, %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	addq	%rdx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%s%s%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	leaq	C(%rip), %rax
	movq	%rax, %rcx
	leaq	B(%rip), %rax
	movq	%rax, %rdx
	leaq	A(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L41
	movl	$1, %eax
	jmp	.L42
.L41:
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8(%rbp)
	leaq	B(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L43
	movl	$0, -12(%rbp)
	jmp	.L44
.L45:
	movl	-8(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movslq	%edx, %rax
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -12(%rbp)
.L44:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L45
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$48, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L46:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
.L43:
	movl	-4(%rbp), %eax
	movl	%eax, N(%rip)
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, M(%rip)
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, existPos(%rip)
	movl	$0, -12(%rbp)
	jmp	.L48
.L49:
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	B(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L48:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L49
	movl	$0, -12(%rbp)
	jmp	.L50
.L51:
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	C(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -12(%rbp)
.L50:
	movl	M(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L51
	movl	$1, %ecx
	movl	$1, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	search
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
