// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
movl %esi, %r12d
movq %rdi, %rbx
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x2250
leaq 0x20(%rbx), %r14
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x2250
decl %r12d
cmpl $0x3, %r12d
ja 0x3a27
pushq $0x10
popq %r15
leaq 0x970e(%rip), %rax      # 0xd010
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xdace(%rip), %rax      # 0x113e0
jmp 0x3952
leaq -0x98(%rbp), %rdi
movq %r14, %rsi
callq 0x2120
leaq -0x78(%rbp), %rdi
movq %rbx, %rsi
callq 0x2120
leaq 0xdeaa(%rip), %rax      # 0x117e0
movq %rax, -0x30(%rbp)
leaq 0xdc9f(%rip), %rax      # 0x115e0
movq %rax, -0x38(%rbp)
pushq $0x8
popq %r15
jmp 0x395a
leaq 0xdc8e(%rip), %rax      # 0x115e0
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
movl %r15d, %eax
shrl %eax
movq %rax, -0x58(%rbp)
leal (,%rax,8), %eax
negb %al
movzbl %al, %eax
shll $0x3, %r15d
movl $0xc0, %ecx
xorl %r12d, %r12d
xorl %ebx, %ebx
cmpq $0x10, %r12
je 0x3a54
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq %r12, -0x50(%rbp)
shlq $0x5, %r12
addq -0x38(%rbp), %r12
movq -0x30(%rbp), %r13
xorl %r14d, %r14d
movq %r15, %rax
addq %r14, %rax
je 0x39d9
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
callq 0x5aa9
testb %al, %al
je 0x39cd
leaq -0x78(%rbp), %rdi
movq %r13, %rsi
callq 0x5aa9
testb %al, %al
jne 0x39f0
addq $-0x8, %r14
incl %ebx
addq $0x20, %r13
jmp 0x39a2
movq -0x50(%rbp), %r12
incq %r12
movq -0x40(%rbp), %rcx
incq %rcx
movq -0x48(%rbp), %rax
incq %rax
jmp 0x397b
movq -0x50(%rbp), %rsi
cmpq $0x8, %rsi
setb %al
movq -0x58(%rbp), %rdx
cmpl %ebx, %edx
seta %cl
orb %al, %cl
je 0x3a1b
cmpq $0x8, %rsi
jae 0x3a3e
cmpl %ebx, %edx
jbe 0x3a4a
movq -0x40(%rbp), %rbx
subl %r14d, %ebx
jmp 0x3a54
movq -0x48(%rbp), %rbx
subl %r14d, %ebx
addb $-0x48, %bl
jmp 0x3a54
movq 0xd5aa(%rip), %rdi      # 0x10fd8
leaq 0x974b(%rip), %rsi      # 0xd180
callq 0x21b0
xorl %ebx, %ebx
jmp 0x3a54
movq -0x40(%rbp), %rbx
subl %r14d, %ebx
addb $-0x8, %bl
jmp 0x3a54
movq -0x48(%rbp), %rbx
subl %r14d, %ebx
addb $-0x40, %bl
leaq -0x78(%rbp), %rdi
callq 0x2358
leaq -0x98(%rbp), %rdi
callq 0x2358
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2358
jmp 0x3a8b
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x2358
movq %rbx, %rdi
callq 0x2300