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>

/*óÔÔê*/
int status_no[20000];
int status_no_max;
/*[xÀW][yÀW][óÔÔ][¼OªJ©]*/
int memo[20][20][20000][2];

/*üÍîñ*/
char flag[20][21];
int width,height;

/*óÔðñ·é*/
void enum_status(void) {
	int current_number;
	int pos;
	int i;
	status_no[0]=0;
	status_no[1]=1;
	pos=2;
	for(current_number=2;current_number<(1<<19);current_number<<=1) {
		for(i=0;status_no[i]<(current_number>>1);i++) {
			status_no[pos]=current_number | status_no[i];
			pos++;
		}
	}
	status_no_max=pos-1;
}

/*óÔÔðæ¾·é*/
int get_status_num(int status) {
	int left=0;
	int right=status_no_max;
	int mid;
	while(left<=right) {
		mid=(left+right)/2;
		if(status==status_no[mid])return mid;
		else if(status<status_no[mid])right=mid-1;
		else left=mid+1;
	}
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj);

int main(void) {
	int i;
	int all_flags;
	int bad_flags;
	int x,y;
	scanf("%d %d",&height,&width);
	for(i=0;i<height;i++)scanf("%s",flag[i]);
	enum_status();
	/*SÄÌøÌíÞðæ¾*/
	all_flags=1;
	for(y=0;y<height;y++) {
		for(x=0;x<width;x++) {
			if(flag[y][x]=='?') {
				all_flags=(all_flags*3)%100000;
			}
		}
	}
	/*¢¢øÅÈ¢øÌíÞðæ¾*/
	bad_flags=search_flags(width,height,0,0,0,0);
	/*¢¢øÌíÞðoÍ*/
	if(all_flags<bad_flags)all_flags+=100000;
	printf("%d\n",all_flags-bad_flags);
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj) {
	int result=0;
	int stat2;
	if(y>=h)return 1;
	else if(x>=w)return search_flags(w,h,0,y+1,stat,0);
	if(memo[x][y][get_status_num(stat)][maeisj]>0) {
		return memo[x][y][get_status_num(stat)][maeisj]-1;
	}
	if(flag[y][x]!='?') {
		if(flag[y][x]=='J') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result=search_flags(w,h,x+1,y,stat2,1);
		} else if(flag[y][x]=='O') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			if(maeisj)stat2|=1;
			result=search_flags(w,h,x+1,y,stat2,0);
		} else if(flag[y][x]=='I') {
			if(!(stat & (1<<(w-2)))) {
				/*ãÉJOª³¢ê*/
				stat2=(stat<<1) & ((1<<(w-1))-1);
				result=search_flags(w,h,x+1,y,stat2,0);
			}
		}
	} else {
		/*JðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		result=search_flags(w,h,x+1,y,stat2,1);
		/*OðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		if(maeisj)stat2|=1;
		result+=search_flags(w,h,x+1,y,stat2,0);
		/*IðÄÍßé*/
		if(!(stat & (1<<(w-2)))) {
			/*ãÉJOª³¢ê*/
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result+=search_flags(w,h,x+1,y,stat2,0);
		}
	}
	result%=100000;
	memo[x][y][get_status_num(stat)][maeisj]=result+1;
	return result;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	status_no
	.bss
	.align 32
	.type	status_no, @object
	.size	status_no, 80000
status_no:
	.zero	80000
	.globl	status_no_max
	.align 4
	.type	status_no_max, @object
	.size	status_no_max, 4
status_no_max:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 64000000
memo:
	.zero	64000000
	.globl	flag
	.align 32
	.type	flag, @object
	.size	flag, 420
flag:
	.zero	420
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.text
	.globl	enum_status
	.type	enum_status, @function
enum_status:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, status_no(%rip)
	movl	$1, 4+status_no(%rip)
	movl	$2, -8(%rbp)
	movl	$2, -12(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	orl	-12(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	status_no(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	sarl	%edx
	cmpl	%edx, %eax
	jl	.L4
	sall	-12(%rbp)
.L2:
	cmpl	$524287, -12(%rbp)
	jle	.L5
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movl	%eax, status_no_max(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	enum_status, .-enum_status
	.globl	get_status_num
	.type	get_status_num, @function
get_status_num:
.LFB1:
	.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	$0, -12(%rbp)
	movl	status_no_max(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L8
	movl	-4(%rbp), %eax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L10
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_status_num, .-get_status_num
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	subq	$32, %rsp
	leaq	width(%rip), %rax
	movq	%rax, %rdx
	leaq	height(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	flag(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L13:
	movl	height(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	call	enum_status
	movl	$1, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L15
.L19:
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	jne	.L17
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	addl	$1, -8(%rbp)
.L15:
	movl	height(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L19
	movl	height(%rip), %esi
	movl	width(%rip), %eax
	movl	$0, %r9d
	movl	$0, %r8d
	movl	$0, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L20
	addl	$100000, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	search_flags
	.type	search_flags, @function
search_flags:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	$0, -8(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	-32(%rbp), %eax
	leal	1(%rax), %edx
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	jmp	.L24
.L25:
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L26
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L24
.L26:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	je	.L27
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$74, %al
	jne	.L28
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L28:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$79, %al
	jne	.L30
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L31
	orl	$1, -4(%rbp)
.L31:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L30:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$73, %al
	jne	.L29
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L27:
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L32
	orl	$1, -4(%rbp)
.L32:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
.L29:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-8(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-40(%rbp), %edx
	movslq	%edx, %rdi
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rsi, %rsi
	imulq	$400000, %rdx, %rdx
	addq	%rsi, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	search_flags, .-search_flags
	.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	enum_status
	.type	enum_status, @function
enum_status:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$18, %r10d
	movl	$2, %ecx
	movq	.LC0(%rip), %rax
	movl	$2, %edi
	leaq	status_no(%rip), %r11
	movq	%rax, status_no(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	%ecx, %rsi
	movl	%edi, %r8d
	xorl	%eax, %eax
	salq	$2, %rsi
	sarl	%r8d
	leaq	(%r11,%rsi), %rdx
	negq	%rsi
	.p2align 4,,10
	.p2align 3
.L3:
	orl	%edi, %eax
	addq	$4, %rdx
	movl	%ecx, %r9d
	addl	$1, %ecx
	movl	%eax, -4(%rdx)
	movl	(%rdx,%rsi), %eax
	cmpl	%r8d, %eax
	jl	.L3
	addl	%edi, %edi
	subl	$1, %r10d
	jne	.L2
	movl	%r9d, status_no_max(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	enum_status, .-enum_status
	.p2align 4
	.globl	get_status_num
	.type	get_status_num, @function
get_status_num:
.LFB24:
	.cfi_startproc
	endbr64
	movl	status_no_max(%rip), %edx
	testl	%edx, %edx
	js	.L13
	xorl	%ecx, %ecx
	leaq	status_no(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	je	.L7
	jle	.L9
	leal	-1(%rax), %edx
	cmpl	%ecx, %edx
	jge	.L11
.L13:
	xorl	%eax, %eax
.L7:
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rax), %ecx
	cmpl	%edx, %ecx
	jle	.L11
	xorl	%eax, %eax
	jmp	.L7
	.cfi_endproc
.LFE24:
	.size	get_status_num, .-get_status_num
	.p2align 4
	.globl	search_flags
	.type	search_flags, @function
search_flags:
.LFB26:
	.cfi_startproc
	endbr64
	cmpl	%esi, %ecx
	jge	.L40
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r9d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%ecx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%r8d, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%edi, %edx
	jl	.L16
	movl	$1, %r9d
	testl	%edi, %edi
	jg	.L61
.L14:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r9d, %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
.L61:
	.cfi_restore_state
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L14
	xorl	%r13d, %r13d
	xorl	%edx, %edx
.L16:
	movl	status_no_max(%rip), %r8d
	testl	%r8d, %r8d
	js	.L17
	movl	%r8d, %r10d
	xorl	%r9d, %r9d
	leaq	status_no(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%r10,%r9), %eax
	sarl	%eax
	movslq	%eax, %r11
	cmpl	(%rcx,%r11,4), %ebx
	je	.L18
	jge	.L19
	leal	-1(%rax), %r10d
	cmpl	%r9d, %r10d
	jge	.L21
.L43:
	xorl	%r11d, %r11d
.L18:
	movslq	%r12d, %rbp
	movslq	%edx, %r14
	leaq	memo(%rip), %r15
	movslq	%r13d, %r10
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r9
	addq	%r9, %rax
	addq	%r11, %rax
	leaq	(%r10,%rax,2), %rax
	movl	(%r15,%rax,4), %eax
	testl	%eax, %eax
	jg	.L62
.L39:
	leaq	0(%rbp,%rbp,4), %rax
	leaq	0(%rbp,%rax,4), %rcx
	leaq	flag(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax,%r14), %eax
	cmpb	$63, %al
	je	.L28
	cmpb	$74, %al
	je	.L63
	cmpb	$79, %al
	je	.L64
	movl	$1, %r11d
	xorl	%r9d, %r9d
	cmpb	$73, %al
	je	.L65
.L30:
	testl	%r8d, %r8d
	js	.L48
	xorl	%edx, %edx
	leaq	status_no(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L38:
	leal	(%r8,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	je	.L35
	jge	.L36
	leal	-1(%rax), %r8d
	cmpl	%edx, %r8d
	jge	.L38
.L48:
	xorl	%esi, %esi
.L35:
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r14
	addq	%r14, %rax
	addq	%rsi, %rax
	leaq	(%r10,%rax,2), %rax
	movl	%r11d, (%r15,%rax,4)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	leal	1(%rax), %r9d
	cmpl	%r10d, %r9d
	jle	.L21
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L36:
	leal	1(%rax), %edx
	cmpl	%r8d, %edx
	jle	.L38
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L62:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L26:
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	je	.L22
.L66:
	jge	.L23
	leal	-1(%rax), %r8d
	cmpl	%edx, %r8d
	jge	.L26
.L25:
	imulq	$800000, %r14, %rax
	imulq	$40000, %rbp, %rbp
	addq	%rbp, %rax
	addq	%r10, %rax
	movl	(%r15,%rax,4), %r9d
.L27:
	subl	$1, %r9d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L23:
	leal	1(%rax), %edx
	cmpl	%r8d, %edx
	jg	.L25
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	jne	.L66
.L22:
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r14
	addq	%r14, %rax
	addq	%rsi, %rax
	leaq	(%r10,%rax,2), %rax
	movl	(%r15,%rax,4), %r9d
	jmp	.L27
.L64:
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	sall	%cl, %eax
	leal	-1(%rax), %r8d
	leal	(%rbx,%rbx), %eax
	andl	%eax, %r8d
	movl	%r8d, %eax
	orl	$1, %eax
	testl	%r13d, %r13d
	cmovne	%eax, %r8d
	addl	$1, %edx
	xorl	%r9d, %r9d
.L59:
	movl	%r12d, %ecx
	call	search_flags
	movl	status_no_max(%rip), %r8d
	movq	(%rsp), %r10
	movslq	%eax, %r9
	cltd
	imulq	$351843721, %r9, %r9
	sarq	$45, %r9
	subl	%edx, %r9d
	imull	$100000, %r9d, %edx
	subl	%edx, %eax
	movl	%eax, %r9d
	leal	1(%rax), %r11d
	jmp	.L30
.L28:
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	addl	$1, %edx
	movq	%r10, 24(%rsp)
	sall	%cl, %eax
	movl	$1, %r9d
	movl	%r12d, %ecx
	movl	%edx, 16(%rsp)
	leal	-1(%rax), %r11d
	leal	(%rbx,%rbx), %eax
	movl	%esi, 12(%rsp)
	andl	%eax, %r11d
	movl	%edi, 8(%rsp)
	movl	%r11d, %r8d
	movl	%r11d, 20(%rsp)
	call	search_flags
	movl	20(%rsp), %r11d
	xorl	%r9d, %r9d
	movl	%r12d, %ecx
	movl	16(%rsp), %edx
	movl	12(%rsp), %esi
	movl	%eax, (%rsp)
	movl	%r11d, %r8d
	movl	8(%rsp), %edi
	orl	$1, %r8d
	testl	%r13d, %r13d
	cmove	%r11d, %r8d
	call	search_flags
	movl	(%rsp), %r13d
	movl	8(%rsp), %edi
	movl	12(%rsp), %esi
	movl	16(%rsp), %edx
	addl	%eax, %r13d
	leal	-2(%rdi), %eax
	movl	20(%rsp), %r11d
	movq	24(%rsp), %r10
	btl	%eax, %ebx
	jnc	.L34
	movslq	%r13d, %r9
	movl	%r13d, %eax
	movl	status_no_max(%rip), %r8d
	imulq	$351843721, %r9, %r9
	sarl	$31, %eax
	sarq	$45, %r9
	subl	%eax, %r9d
	imull	$100000, %r9d, %eax
	movl	%r13d, %r9d
	subl	%eax, %r9d
	leal	1(%r9), %r11d
	jmp	.L30
.L40:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
.L63:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	leal	(%rbx,%rbx), %r8d
	sall	%cl, %eax
	addl	$1, %edx
	movl	$1, %r9d
	subl	$1, %eax
.L58:
	andl	%eax, %r8d
	jmp	.L59
.L34:
	movl	%r11d, %r8d
	xorl	%r9d, %r9d
	movl	%r12d, %ecx
	movq	%r10, (%rsp)
	call	search_flags
	movl	status_no_max(%rip), %r8d
	movq	(%rsp), %r10
	addl	%eax, %r13d
	movslq	%r13d, %r9
	movl	%r13d, %eax
	imulq	$351843721, %r9, %r9
	sarl	$31, %eax
	sarq	$45, %r9
	subl	%eax, %r9d
	imull	$100000, %r9d, %eax
	movl	%r13d, %r9d
	subl	%eax, %r9d
	leal	1(%r9), %r11d
	jmp	.L30
.L65:
	leal	-2(%rdi), %ecx
	movl	%ebx, %r11d
	sarl	%cl, %r11d
	andl	$1, %r11d
	jne	.L30
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	leal	(%rbx,%rbx), %r8d
	sall	%cl, %eax
	addl	$1, %edx
	subl	$1, %eax
	jmp	.L58
.L17:
	movslq	%edx, %r14
	movslq	%r12d, %rbp
	leaq	memo(%rip), %r15
	movslq	%r13d, %r10
	imulq	$800000, %r14, %rax
	imulq	$40000, %rbp, %rcx
	addq	%rcx, %rax
	addq	%r10, %rax
	movl	(%r15,%rax,4), %r9d
	testl	%r9d, %r9d
	jle	.L39
	jmp	.L27
	.cfi_endproc
.LFE26:
	.size	search_flags, .-search_flags
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	width(%rip), %rdx
	leaq	height(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC1(%rip), %rdi
	leaq	flag(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %r12
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	height(%rip), %eax
	testl	%eax, %eax
	jle	.L72
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$21, %rbp
	cmpl	%ebx, height(%rip)
	jg	.L71
.L72:
	call	enum_status
	movl	height(%rip), %r10d
	testl	%r10d, %r10d
	jle	.L87
	movl	width(%rip), %edi
	leal	-1(%r10), %eax
	leaq	22+flag(%rip), %r8
	movl	$1, %ebx
	leaq	(%rax,%rax,4), %rcx
	leaq	1+flag(%rip), %rdx
	leal	-1(%rdi), %r9d
	leaq	(%rax,%rcx,4), %rax
	addq	%r9, %r8
	addq	%r9, %rdx
	addq	%rax, %r8
	.p2align 4,,10
	.p2align 3
.L73:
	movq	%rdx, %rax
	subq	%r9, %rax
	subq	$1, %rax
	testl	%edi, %edi
	jle	.L78
	.p2align 4,,10
	.p2align 3
.L75:
	cmpb	$63, (%rax)
	jne	.L74
	leal	(%rbx,%rbx,2), %ecx
	movslq	%ecx, %rbx
	movl	%ecx, %esi
	imulq	$351843721, %rbx, %rbx
	sarl	$31, %esi
	sarq	$45, %rbx
	subl	%esi, %ebx
	imull	$100000, %ebx, %esi
	subl	%esi, %ecx
	movl	%ecx, %ebx
.L74:
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L75
.L78:
	addq	$21, %rdx
	cmpq	%r8, %rdx
	jne	.L73
.L76:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	movl	%r10d, %esi
	call	search_flags
	leal	100000(%rbx), %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	cmpl	%ebx, %eax
	cmovg	%edx, %ebx
	movl	%ebx, %edx
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L87:
	.cfi_restore_state
	movl	width(%rip), %edi
	movl	$1, %ebx
	jmp	.L76
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	height
	.bss
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	flag
	.align 32
	.type	flag, @object
	.size	flag, 420
flag:
	.zero	420
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 64000000
memo:
	.zero	64000000
	.globl	status_no_max
	.align 4
	.type	status_no_max, @object
	.size	status_no_max, 4
status_no_max:
	.zero	4
	.globl	status_no
	.align 32
	.type	status_no, @object
	.size	status_no, 80000
status_no:
	.zero	80000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1
	.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	enum_status
	.type	enum_status, @function
enum_status:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$18, %r10d
	movl	$2, %ecx
	movq	.LC0(%rip), %rax
	movl	$2, %edi
	leaq	status_no(%rip), %r11
	movq	%rax, status_no(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	%ecx, %rsi
	movl	%edi, %r8d
	xorl	%eax, %eax
	salq	$2, %rsi
	sarl	%r8d
	leaq	(%r11,%rsi), %rdx
	negq	%rsi
	.p2align 4,,10
	.p2align 3
.L3:
	orl	%edi, %eax
	addq	$4, %rdx
	movl	%ecx, %r9d
	addl	$1, %ecx
	movl	%eax, -4(%rdx)
	movl	(%rdx,%rsi), %eax
	cmpl	%r8d, %eax
	jl	.L3
	addl	%edi, %edi
	subl	$1, %r10d
	jne	.L2
	movl	%r9d, status_no_max(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	enum_status, .-enum_status
	.p2align 4
	.globl	get_status_num
	.type	get_status_num, @function
get_status_num:
.LFB24:
	.cfi_startproc
	endbr64
	movl	status_no_max(%rip), %edx
	testl	%edx, %edx
	js	.L13
	xorl	%ecx, %ecx
	leaq	status_no(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	je	.L7
	jle	.L9
	leal	-1(%rax), %edx
	cmpl	%ecx, %edx
	jge	.L11
.L13:
	xorl	%eax, %eax
.L7:
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rax), %ecx
	cmpl	%edx, %ecx
	jle	.L11
	xorl	%eax, %eax
	jmp	.L7
	.cfi_endproc
.LFE24:
	.size	get_status_num, .-get_status_num
	.p2align 4
	.globl	search_flags
	.type	search_flags, @function
search_flags:
.LFB26:
	.cfi_startproc
	endbr64
	cmpl	%esi, %ecx
	jge	.L40
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r9d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%ecx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%r8d, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%edi, %edx
	jl	.L16
	movl	$1, %r9d
	testl	%edi, %edi
	jg	.L61
.L14:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r9d, %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
.L61:
	.cfi_restore_state
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L14
	xorl	%r13d, %r13d
	xorl	%edx, %edx
.L16:
	movl	status_no_max(%rip), %r8d
	testl	%r8d, %r8d
	js	.L17
	movl	%r8d, %r10d
	xorl	%r9d, %r9d
	leaq	status_no(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%r10,%r9), %eax
	sarl	%eax
	movslq	%eax, %r11
	cmpl	(%rcx,%r11,4), %ebx
	je	.L18
	jge	.L19
	leal	-1(%rax), %r10d
	cmpl	%r9d, %r10d
	jge	.L21
.L43:
	xorl	%r11d, %r11d
.L18:
	movslq	%r12d, %rbp
	movslq	%edx, %r14
	leaq	memo(%rip), %r15
	movslq	%r13d, %r10
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r9
	addq	%r9, %rax
	addq	%r11, %rax
	leaq	(%r10,%rax,2), %rax
	movl	(%r15,%rax,4), %eax
	testl	%eax, %eax
	jg	.L62
.L39:
	leaq	0(%rbp,%rbp,4), %rax
	leaq	0(%rbp,%rax,4), %rcx
	leaq	flag(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax,%r14), %eax
	cmpb	$63, %al
	je	.L28
	cmpb	$74, %al
	je	.L63
	cmpb	$79, %al
	je	.L64
	movl	$1, %r11d
	xorl	%r9d, %r9d
	cmpb	$73, %al
	je	.L65
.L30:
	testl	%r8d, %r8d
	js	.L48
	xorl	%edx, %edx
	leaq	status_no(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L38:
	leal	(%r8,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	je	.L35
	jge	.L36
	leal	-1(%rax), %r8d
	cmpl	%edx, %r8d
	jge	.L38
.L48:
	xorl	%esi, %esi
.L35:
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r14
	addq	%r14, %rax
	addq	%rsi, %rax
	leaq	(%r10,%rax,2), %rax
	movl	%r11d, (%r15,%rax,4)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	leal	1(%rax), %r9d
	cmpl	%r10d, %r9d
	jle	.L21
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L36:
	leal	1(%rax), %edx
	cmpl	%r8d, %edx
	jle	.L38
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L62:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L26:
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	je	.L22
.L66:
	jge	.L23
	leal	-1(%rax), %r8d
	cmpl	%edx, %r8d
	jge	.L26
.L25:
	imulq	$800000, %r14, %rax
	imulq	$40000, %rbp, %rbp
	addq	%rbp, %rax
	addq	%r10, %rax
	movl	(%r15,%rax,4), %r9d
.L27:
	subl	$1, %r9d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L23:
	leal	1(%rax), %edx
	cmpl	%r8d, %edx
	jg	.L25
	leal	(%rdx,%r8), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %ebx
	jne	.L66
.L22:
	imulq	$20000, %rbp, %rax
	imulq	$400000, %r14, %r14
	addq	%r14, %rax
	addq	%rsi, %rax
	leaq	(%r10,%rax,2), %rax
	movl	(%r15,%rax,4), %r9d
	jmp	.L27
.L64:
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	sall	%cl, %eax
	leal	-1(%rax), %r8d
	leal	(%rbx,%rbx), %eax
	andl	%eax, %r8d
	movl	%r8d, %eax
	orl	$1, %eax
	testl	%r13d, %r13d
	cmovne	%eax, %r8d
	addl	$1, %edx
	xorl	%r9d, %r9d
.L59:
	movl	%r12d, %ecx
	call	search_flags
	movl	status_no_max(%rip), %r8d
	movq	(%rsp), %r10
	movslq	%eax, %r9
	cltd
	imulq	$351843721, %r9, %r9
	sarq	$45, %r9
	subl	%edx, %r9d
	imull	$100000, %r9d, %edx
	subl	%edx, %eax
	movl	%eax, %r9d
	leal	1(%rax), %r11d
	jmp	.L30
.L28:
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	addl	$1, %edx
	movq	%r10, 24(%rsp)
	sall	%cl, %eax
	movl	$1, %r9d
	movl	%r12d, %ecx
	movl	%edx, 16(%rsp)
	leal	-1(%rax), %r11d
	leal	(%rbx,%rbx), %eax
	movl	%esi, 12(%rsp)
	andl	%eax, %r11d
	movl	%edi, 8(%rsp)
	movl	%r11d, %r8d
	movl	%r11d, 20(%rsp)
	call	search_flags
	movl	20(%rsp), %r11d
	xorl	%r9d, %r9d
	movl	%r12d, %ecx
	movl	16(%rsp), %edx
	movl	12(%rsp), %esi
	movl	%eax, (%rsp)
	movl	%r11d, %r8d
	movl	8(%rsp), %edi
	orl	$1, %r8d
	testl	%r13d, %r13d
	cmove	%r11d, %r8d
	call	search_flags
	movl	(%rsp), %r13d
	movl	8(%rsp), %edi
	movl	12(%rsp), %esi
	movl	16(%rsp), %edx
	addl	%eax, %r13d
	leal	-2(%rdi), %eax
	movl	20(%rsp), %r11d
	movq	24(%rsp), %r10
	btl	%eax, %ebx
	jnc	.L34
	movslq	%r13d, %r9
	movl	%r13d, %eax
	movl	status_no_max(%rip), %r8d
	imulq	$351843721, %r9, %r9
	sarl	$31, %eax
	sarq	$45, %r9
	subl	%eax, %r9d
	imull	$100000, %r9d, %eax
	movl	%r13d, %r9d
	subl	%eax, %r9d
	leal	1(%r9), %r11d
	jmp	.L30
.L40:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
.L63:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	leal	(%rbx,%rbx), %r8d
	sall	%cl, %eax
	addl	$1, %edx
	movl	$1, %r9d
	subl	$1, %eax
.L58:
	andl	%eax, %r8d
	jmp	.L59
.L34:
	movl	%r11d, %r8d
	xorl	%r9d, %r9d
	movl	%r12d, %ecx
	movq	%r10, (%rsp)
	call	search_flags
	movl	status_no_max(%rip), %r8d
	movq	(%rsp), %r10
	addl	%eax, %r13d
	movslq	%r13d, %r9
	movl	%r13d, %eax
	imulq	$351843721, %r9, %r9
	sarl	$31, %eax
	sarq	$45, %r9
	subl	%eax, %r9d
	imull	$100000, %r9d, %eax
	movl	%r13d, %r9d
	subl	%eax, %r9d
	leal	1(%r9), %r11d
	jmp	.L30
.L65:
	leal	-2(%rdi), %ecx
	movl	%ebx, %r11d
	sarl	%cl, %r11d
	andl	$1, %r11d
	jne	.L30
	leal	-1(%rdi), %ecx
	movl	$1, %eax
	movq	%r10, (%rsp)
	leal	(%rbx,%rbx), %r8d
	sall	%cl, %eax
	addl	$1, %edx
	subl	$1, %eax
	jmp	.L58
.L17:
	movslq	%edx, %r14
	movslq	%r12d, %rbp
	leaq	memo(%rip), %r15
	movslq	%r13d, %r10
	imulq	$800000, %r14, %rax
	imulq	$40000, %rbp, %rcx
	addq	%rcx, %rax
	addq	%r10, %rax
	movl	(%r15,%rax,4), %r9d
	testl	%r9d, %r9d
	jle	.L39
	jmp	.L27
	.cfi_endproc
.LFE26:
	.size	search_flags, .-search_flags
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	width(%rip), %rdx
	leaq	height(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC1(%rip), %rdi
	leaq	flag(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %r12
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	height(%rip), %eax
	testl	%eax, %eax
	jle	.L72
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$21, %rbp
	cmpl	%ebx, height(%rip)
	jg	.L71
.L72:
	call	enum_status
	movl	height(%rip), %r10d
	testl	%r10d, %r10d
	jle	.L87
	movl	width(%rip), %edi
	leal	-1(%r10), %eax
	leaq	22+flag(%rip), %r8
	movl	$1, %ebx
	leaq	(%rax,%rax,4), %rcx
	leaq	1+flag(%rip), %rdx
	leal	-1(%rdi), %r9d
	leaq	(%rax,%rcx,4), %rax
	addq	%r9, %r8
	addq	%r9, %rdx
	addq	%rax, %r8
	.p2align 4,,10
	.p2align 3
.L73:
	movq	%rdx, %rax
	subq	%r9, %rax
	subq	$1, %rax
	testl	%edi, %edi
	jle	.L78
	.p2align 4,,10
	.p2align 3
.L75:
	cmpb	$63, (%rax)
	jne	.L74
	leal	(%rbx,%rbx,2), %ecx
	movslq	%ecx, %rbx
	movl	%ecx, %esi
	imulq	$351843721, %rbx, %rbx
	sarl	$31, %esi
	sarq	$45, %rbx
	subl	%esi, %ebx
	imull	$100000, %ebx, %esi
	subl	%esi, %ecx
	movl	%ecx, %ebx
.L74:
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L75
.L78:
	addq	$21, %rdx
	cmpq	%r8, %rdx
	jne	.L73
.L76:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	movl	%r10d, %esi
	call	search_flags
	leal	100000(%rbx), %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	cmpl	%ebx, %eax
	cmovg	%edx, %ebx
	movl	%ebx, %edx
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L87:
	.cfi_restore_state
	movl	width(%rip), %edi
	movl	$1, %ebx
	jmp	.L76
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	height
	.bss
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	flag
	.align 32
	.type	flag, @object
	.size	flag, 420
flag:
	.zero	420
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 64000000
memo:
	.zero	64000000
	.globl	status_no_max
	.align 4
	.type	status_no_max, @object
	.size	status_no_max, 4
status_no_max:
	.zero	4
	.globl	status_no
	.align 32
	.type	status_no, @object
	.size	status_no, 80000
status_no:
	.zero	80000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1
	.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>

/*óÔÔê*/
int status_no[20000];
int status_no_max;
/*[xÀW][yÀW][óÔÔ][¼OªJ©]*/
int memo[20][20][20000][2];

/*üÍîñ*/
char flag[20][21];
int width,height;

/*óÔðñ·é*/
void enum_status(void) {
	int current_number;
	int pos;
	int i;
	status_no[0]=0;
	status_no[1]=1;
	pos=2;
	for(current_number=2;current_number<(1<<19);current_number<<=1) {
		for(i=0;status_no[i]<(current_number>>1);i++) {
			status_no[pos]=current_number | status_no[i];
			pos++;
		}
	}
	status_no_max=pos-1;
}

/*óÔÔðæ¾·é*/
int get_status_num(int status) {
	int left=0;
	int right=status_no_max;
	int mid;
	while(left<=right) {
		mid=(left+right)/2;
		if(status==status_no[mid])return mid;
		else if(status<status_no[mid])right=mid-1;
		else left=mid+1;
	}
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj);

int main(void) {
	int i;
	int all_flags;
	int bad_flags;
	int x,y;
	scanf("%d %d",&height,&width);
	for(i=0;i<height;i++)scanf("%s",flag[i]);
	enum_status();
	/*SÄÌøÌíÞðæ¾*/
	all_flags=1;
	for(y=0;y<height;y++) {
		for(x=0;x<width;x++) {
			if(flag[y][x]=='?') {
				all_flags=(all_flags*3)%100000;
			}
		}
	}
	/*¢¢øÅÈ¢øÌíÞðæ¾*/
	bad_flags=search_flags(width,height,0,0,0,0);
	/*¢¢øÌíÞðoÍ*/
	if(all_flags<bad_flags)all_flags+=100000;
	printf("%d\n",all_flags-bad_flags);
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj) {
	int result=0;
	int stat2;
	if(y>=h)return 1;
	else if(x>=w)return search_flags(w,h,0,y+1,stat,0);
	if(memo[x][y][get_status_num(stat)][maeisj]>0) {
		return memo[x][y][get_status_num(stat)][maeisj]-1;
	}
	if(flag[y][x]!='?') {
		if(flag[y][x]=='J') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result=search_flags(w,h,x+1,y,stat2,1);
		} else if(flag[y][x]=='O') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			if(maeisj)stat2|=1;
			result=search_flags(w,h,x+1,y,stat2,0);
		} else if(flag[y][x]=='I') {
			if(!(stat & (1<<(w-2)))) {
				/*ãÉJOª³¢ê*/
				stat2=(stat<<1) & ((1<<(w-1))-1);
				result=search_flags(w,h,x+1,y,stat2,0);
			}
		}
	} else {
		/*JðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		result=search_flags(w,h,x+1,y,stat2,1);
		/*OðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		if(maeisj)stat2|=1;
		result+=search_flags(w,h,x+1,y,stat2,0);
		/*IðÄÍßé*/
		if(!(stat & (1<<(w-2)))) {
			/*ãÉJOª³¢ê*/
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result+=search_flags(w,h,x+1,y,stat2,0);
		}
	}
	result%=100000;
	memo[x][y][get_status_num(stat)][maeisj]=result+1;
	return result;
}
2 3
??O
IIJ

4

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>

/*óÔÔê*/
int status_no[20000];
int status_no_max;
/*[xÀW][yÀW][óÔÔ][¼OªJ©]*/
int memo[20][20][20000][2];

/*üÍîñ*/
char flag[20][21];
int width,height;

/*óÔðñ·é*/
void enum_status(void) {
	int current_number;
	int pos;
	int i;
	status_no[0]=0;
	status_no[1]=1;
	pos=2;
	for(current_number=2;current_number<(1<<19);current_number<<=1) {
		for(i=0;status_no[i]<(current_number>>1);i++) {
			status_no[pos]=current_number | status_no[i];
			pos++;
		}
	}
	status_no_max=pos-1;
}

/*óÔÔðæ¾·é*/
int get_status_num(int status) {
	int left=0;
	int right=status_no_max;
	int mid;
	while(left<=right) {
		mid=(left+right)/2;
		if(status==status_no[mid])return mid;
		else if(status<status_no[mid])right=mid-1;
		else left=mid+1;
	}
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj);

int main(void) {
	int i;
	int all_flags;
	int bad_flags;
	int x,y;
	scanf("%d %d",&height,&width);
	for(i=0;i<height;i++)scanf("%s",flag[i]);
	enum_status();
	/*SÄÌøÌíÞðæ¾*/
	all_flags=1;
	for(y=0;y<height;y++) {
		for(x=0;x<width;x++) {
			if(flag[y][x]=='?') {
				all_flags=(all_flags*3)%100000;
			}
		}
	}
	/*¢¢øÅÈ¢øÌíÞðæ¾*/
	bad_flags=search_flags(width,height,0,0,0,0);
	/*¢¢øÌíÞðoÍ*/
	if(all_flags<bad_flags)all_flags+=100000;
	printf("%d\n",all_flags-bad_flags);
	return 0;
}

int search_flags(int w,int h,int x,int y,int stat,int maeisj) {
	int result=0;
	int stat2;
	if(y>=h)return 1;
	else if(x>=w)return search_flags(w,h,0,y+1,stat,0);
	if(memo[x][y][get_status_num(stat)][maeisj]>0) {
		return memo[x][y][get_status_num(stat)][maeisj]-1;
	}
	if(flag[y][x]!='?') {
		if(flag[y][x]=='J') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result=search_flags(w,h,x+1,y,stat2,1);
		} else if(flag[y][x]=='O') {
			stat2=(stat<<1) & ((1<<(w-1))-1);
			if(maeisj)stat2|=1;
			result=search_flags(w,h,x+1,y,stat2,0);
		} else if(flag[y][x]=='I') {
			if(!(stat & (1<<(w-2)))) {
				/*ãÉJOª³¢ê*/
				stat2=(stat<<1) & ((1<<(w-1))-1);
				result=search_flags(w,h,x+1,y,stat2,0);
			}
		}
	} else {
		/*JðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		result=search_flags(w,h,x+1,y,stat2,1);
		/*OðÄÍßé*/
		stat2=(stat<<1) & ((1<<(w-1))-1);
		if(maeisj)stat2|=1;
		result+=search_flags(w,h,x+1,y,stat2,0);
		/*IðÄÍßé*/
		if(!(stat & (1<<(w-2)))) {
			/*ãÉJOª³¢ê*/
			stat2=(stat<<1) & ((1<<(w-1))-1);
			result+=search_flags(w,h,x+1,y,stat2,0);
		}
	}
	result%=100000;
	memo[x][y][get_status_num(stat)][maeisj]=result+1;
	return result;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	status_no
	.bss
	.align 32
	.type	status_no, @object
	.size	status_no, 80000
status_no:
	.zero	80000
	.globl	status_no_max
	.align 4
	.type	status_no_max, @object
	.size	status_no_max, 4
status_no_max:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 64000000
memo:
	.zero	64000000
	.globl	flag
	.align 32
	.type	flag, @object
	.size	flag, 420
flag:
	.zero	420
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.text
	.globl	enum_status
	.type	enum_status, @function
enum_status:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, status_no(%rip)
	movl	$1, 4+status_no(%rip)
	movl	$2, -8(%rbp)
	movl	$2, -12(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	orl	-12(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	status_no(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	sarl	%edx
	cmpl	%edx, %eax
	jl	.L4
	sall	-12(%rbp)
.L2:
	cmpl	$524287, -12(%rbp)
	jle	.L5
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movl	%eax, status_no_max(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	enum_status, .-enum_status
	.globl	get_status_num
	.type	get_status_num, @function
get_status_num:
.LFB1:
	.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	$0, -12(%rbp)
	movl	status_no_max(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L8
	movl	-4(%rbp), %eax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L10
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_status_num, .-get_status_num
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	subq	$32, %rsp
	leaq	width(%rip), %rax
	movq	%rax, %rdx
	leaq	height(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	flag(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L13:
	movl	height(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	call	enum_status
	movl	$1, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L15
.L19:
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	jne	.L17
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	addl	$1, -8(%rbp)
.L15:
	movl	height(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L19
	movl	height(%rip), %esi
	movl	width(%rip), %eax
	movl	$0, %r9d
	movl	$0, %r8d
	movl	$0, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L20
	addl	$100000, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	search_flags
	.type	search_flags, @function
search_flags:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	$0, -8(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	-32(%rbp), %eax
	leal	1(%rax), %edx
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	jmp	.L24
.L25:
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L26
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L24
.L26:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	je	.L27
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$74, %al
	jne	.L28
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L28:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$79, %al
	jne	.L30
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L31
	orl	$1, -4(%rbp)
.L31:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L30:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$73, %al
	jne	.L29
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L27:
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L32
	orl	$1, -4(%rbp)
.L32:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
.L29:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-8(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-40(%rbp), %edx
	movslq	%edx, %rdi
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rsi, %rsi
	imulq	$400000, %rdx, %rdx
	addq	%rsi, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	search_flags, .-search_flags
	.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	status_no
	.bss
	.align 32
	.type	status_no, @object
	.size	status_no, 80000
status_no:
	.zero	80000
	.globl	status_no_max
	.align 4
	.type	status_no_max, @object
	.size	status_no_max, 4
status_no_max:
	.zero	4
	.globl	memo
	.align 32
	.type	memo, @object
	.size	memo, 64000000
memo:
	.zero	64000000
	.globl	flag
	.align 32
	.type	flag, @object
	.size	flag, 420
flag:
	.zero	420
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.text
	.globl	enum_status
	.type	enum_status, @function
enum_status:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, status_no(%rip)
	movl	$1, 4+status_no(%rip)
	movl	$2, -8(%rbp)
	movl	$2, -12(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	orl	-12(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	status_no(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	sarl	%edx
	cmpl	%edx, %eax
	jl	.L4
	sall	-12(%rbp)
.L2:
	cmpl	$524287, -12(%rbp)
	jle	.L5
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movl	%eax, status_no_max(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	enum_status, .-enum_status
	.globl	get_status_num
	.type	get_status_num, @function
get_status_num:
.LFB1:
	.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	$0, -12(%rbp)
	movl	status_no_max(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L8
	movl	-4(%rbp), %eax
	jmp	.L9
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	status_no(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L10
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_status_num, .-get_status_num
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	subq	$32, %rsp
	leaq	width(%rip), %rax
	movq	%rax, %rdx
	leaq	height(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	flag(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L13:
	movl	height(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	call	enum_status
	movl	$1, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L15
.L19:
	movl	$0, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	jne	.L17
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -16(%rbp)
	movl	-16(%rbp), %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
.L17:
	addl	$1, -12(%rbp)
.L16:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L18
	addl	$1, -8(%rbp)
.L15:
	movl	height(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L19
	movl	height(%rip), %esi
	movl	width(%rip), %eax
	movl	$0, %r9d
	movl	$0, %r8d
	movl	$0, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L20
	addl	$100000, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	search_flags
	.type	search_flags, @function
search_flags:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	$0, -8(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, %eax
	jmp	.L24
.L23:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	movl	-32(%rbp), %eax
	leal	1(%rax), %edx
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	$0, %edx
	movl	%eax, %edi
	call	search_flags
	jmp	.L24
.L25:
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L26
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-40(%rbp), %edx
	movslq	%edx, %rsi
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rcx, %rcx
	imulq	$400000, %rdx, %rdx
	addq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	$1, %eax
	jmp	.L24
.L26:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$63, %al
	je	.L27
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$74, %al
	jne	.L28
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L28:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$79, %al
	jne	.L30
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L31
	orl	$1, -4(%rbp)
.L31:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L30:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	flag(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$73, %al
	jne	.L29
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	jmp	.L29
.L27:
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -40(%rbp)
	je	.L32
	orl	$1, -4(%rbp)
.L32:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	-36(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-36(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	subl	$1, %eax
	andl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	-4(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$0, %r9d
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	search_flags
	addl	%eax, -8(%rbp)
.L29:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$351843721, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$13, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, %edi
	call	get_status_num
	movl	-8(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-40(%rbp), %edx
	movslq	%edx, %rdi
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$20000, %rsi, %rsi
	imulq	$400000, %rdx, %rdx
	addq	%rsi, %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	memo(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	search_flags, .-search_flags
	.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:
