// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x6756
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x6756
decl %r14d
cmpl $0x3, %r14d
ja 0x4079
movl $0x10, %r12d
leaq 0xd15c(%rip), %rax      # 0x11010
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x1151c(%rip), %rax     # 0x153e0
jmp 0x3f0a
leaq 0x20(%rbx), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x2110
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x2110
leaq 0x118f4(%rip), %rax     # 0x157e0
movq %rax, -0x30(%rbp)
leaq 0x116e9(%rip), %rax     # 0x155e0
movq %rax, -0x38(%rbp)
movl $0x8, %r12d
jmp 0x3f12
leaq 0x116d6(%rip), %rax     # 0x155e0
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
movl %r12d, %eax
shrl %eax
movq -0xa8(%rbp), %rcx
movq %rcx, -0xc0(%rbp)
movq -0xa0(%rbp), %r15
movq -0x88(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq -0x80(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq %rax, -0xb0(%rbp)
leal (,%rax,8), %eax
leaq 0x48(%rax), %rdx
addq $0x40, %rax
shll $0x3, %r12d
movl $0x40, %ecx
movl $0x48, %esi
xorl %edi, %edi
movq %rsi, -0x58(%rbp)
movq %rdx, -0x60(%rbp)
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq %rdi, -0x68(%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 %r14d, %r14d
xorl %ebx, %ebx
cmpq %r13, %r15
jne 0x3ff5
testq %r15, %r15
je 0x3fc3
movq -0xc8(%rbp), %rax
movq (%rax), %rsi
movq -0xc0(%rbp), %rdi
movq %r15, %rdx
callq 0x21f0
testl %eax, %eax
jne 0x3ff5
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq 0x8(%rax,%rbx,4), %rcx
jne 0x3ff5
cmpq $0x0, -0x40(%rbp)
je 0x4032
movq -0x30(%rbp), %rax
movq (%rax,%rbx,4), %rsi
movq -0xb8(%rbp), %rdi
movq -0x40(%rbp), %rdx
callq 0x21f0
testl %eax, %eax
je 0x4032
addq $0x8, %rbx
incl %r14d
cmpq %rbx, %r12
jne 0x3f9c
movq -0x68(%rbp), %rdi
incq %rdi
movq -0x48(%rbp), %rcx
decq %rcx
movq -0x58(%rbp), %rsi
decq %rsi
movq -0x60(%rbp), %rdx
decq %rdx
movq -0x50(%rbp), %rax
decq %rax
cmpq $0x10, %rdi
jne 0x3f68
xorl %ebx, %ebx
jmp 0x406c
movq -0x68(%rbp), %rsi
cmpq $0x8, %rsi
setb %al
movq -0xb0(%rbp), %rdx
cmpl %r14d, %edx
seta %cl
orb %al, %cl
je 0x4069
cmpq $0x8, %rsi
leaq -0x98(%rbp), %r15
leaq -0x78(%rbp), %r13
jae 0x4095
cmpl %r14d, %edx
jbe 0x409a
subl -0x48(%rbp), %ebx
jmp 0x409d
subl -0x60(%rbp), %ebx
leaq -0x98(%rbp), %r15
leaq -0x78(%rbp), %r13
jmp 0x409d
movq 0x10f58(%rip), %rdi     # 0x14fd8
leaq 0xd0f9(%rip), %rsi      # 0x11180
movl $0x23, %edx
callq 0x2210
xorl %ebx, %ebx
jmp 0x409d
subl -0x58(%rbp), %ebx
jmp 0x409d
subl -0x50(%rbp), %ebx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x40b5
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x40d0
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21d0
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x4104
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x4104
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x411f
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2300