// File: /workspace/github_cpp_makefile_star2_O3/lindorx[P]train/HelpInsPro.cpp
// Function: TwoRegBin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int)
unsigned char TwoRegBin(std::string *ch, int n)
{
	using namespace std;
	int i, j;
	int num1=16, num2=16;//����������С
	int a, b;
	const string *m1,*m2;
	string ch0 = ch[0];
	string ch1 = ch[1];
	if (n == 1 ){
		m1 = reg_1;
		m2 = reg_1;
	}
	else if (n == 2){
		m1 = reg2;
		m2 = reg2;
	}
	else if (n == 3){
		num2 = 8;
		m1 = reg2;
		m2 = reg3;
	}
	else if (n == 4){
		ch0 = ch[1];
		ch1 = ch[0];
		num2 = 8;
		m1 = reg2;
		m2 = reg3;
	}
	else{
		std::cout << "TwoRegBin��������������error-002��\n";
		return 0;
	}
	a = num1 / 2 - 1;
	b = num2 / 2 - 1;
	for (i = 0; i<num1; i++)
	for (j = 0; j<num2; j++){
		if (ch0 == m1[i] && ch1 == m2[j]){
			if (i>a && j>b)return 0xc0 + i - a - 1 + (j - b - 1) * 8;
			if (i > a)return 0xc0 + (i - a - 1) + j * 8;
			if (j > b)return 0xc0 + i + (j - b - 1) * 8;
			return 0xc0 + i+j*8;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %esi, %r14d
movq %rdi, %r15
leaq -0xa0(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x65f6
leaq -0x80(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x65f6
decl %r14d
cmpl $0x3, %r14d
ja 0x4063
movl $0x10, %ebx
leaq 0xd178(%rip), %rax      # 0x11010
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x11538(%rip), %rax     # 0x153e0
jmp 0x3eed
leaq 0x20(%r15), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x2110
leaq -0x90(%rbp), %rdi
movq %r15, %rsi
callq 0x2110
leaq 0x11910(%rip), %rax     # 0x157e0
movq %rax, -0x30(%rbp)
leaq 0x11705(%rip), %rax     # 0x155e0
movq %rax, -0x38(%rbp)
movl $0x8, %ebx
jmp 0x3ef5
leaq 0x116f3(%rip), %rax     # 0x155e0
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
movl %ebx, %ecx
shrl %ecx
movq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xa8(%rbp), %r12
movq -0x90(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rcx, -0xb8(%rbp)
leal (,%rcx,8), %eax
leaq 0x48(%rax), %rdx
addq $0x40, %rax
shll $0x3, %ebx
movl $0x40, %ecx
movl $0x48, %esi
xorl %edi, %edi
movq %rsi, -0x60(%rbp)
movq %rdx, -0x68(%rbp)
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
shlq $0x5, %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, -0xc8(%rbp)
movq 0x8(%rcx,%rax), %r13
xorl %r15d, %r15d
xorl %r14d, %r14d
cmpq %r13, %r12
jne 0x3fd4
testq %r12, %r12
je 0x3fa5
movq -0xc8(%rbp), %rax
movq (%rax), %rsi
movq -0xc0(%rbp), %rdi
movq %r12, %rdx
callq 0x21f0
testl %eax, %eax
jne 0x3fd4
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpq 0x8(%rax,%r14,4), %rcx
jne 0x3fd4
cmpq $0x0, -0x48(%rbp)
je 0x4012
movq -0x30(%rbp), %rax
movq (%rax,%r14,4), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
callq 0x21f0
testl %eax, %eax
je 0x4012
addq $0x8, %r14
incl %r15d
cmpq %r14, %rbx
jne 0x3f7e
movq -0x70(%rbp), %rdi
incq %rdi
movq -0x50(%rbp), %rcx
decq %rcx
movq -0x60(%rbp), %rsi
decq %rsi
movq -0x68(%rbp), %rdx
decq %rdx
movq -0x58(%rbp), %rax
decq %rax
cmpq $0x10, %rdi
jne 0x3f49
xorl %r14d, %r14d
jmp 0x4052
movq -0x70(%rbp), %rsi
cmpq $0x8, %rsi
setb %al
movq -0xb8(%rbp), %rdx
cmpl %r15d, %edx
seta %cl
orb %al, %cl
je 0x404e
cmpq $0x8, %rsi
leaq -0xa0(%rbp), %r12
leaq -0x80(%rbp), %r13
movq -0x40(%rbp), %rdi
jae 0x4087
cmpl %r15d, %edx
jbe 0x408d
subl -0x50(%rbp), %r14d
jmp 0x4091
subl -0x68(%rbp), %r14d
leaq -0xa0(%rbp), %r12
leaq -0x80(%rbp), %r13
movq -0x40(%rbp), %rdi
jmp 0x4091
movq 0x10f6e(%rip), %rdi     # 0x14fd8
leaq 0xd10f(%rip), %rsi      # 0x11180
movl $0x23, %edx
callq 0x2210
movq -0x90(%rbp), %rdi
xorl %r14d, %r14d
jmp 0x4091
subl -0x60(%rbp), %r14d
jmp 0x4091
subl -0x58(%rbp), %r14d
cmpq %r13, %rdi
je 0x40a2
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x40bd
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21d0
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x40f2
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x40f2
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x410d
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2300