// File: lindorx[P]train/HelpInsPro.cpp
// Function: regsub(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
unsigned char regsub(const std::string& str, int num)
{
	if (num == 2){
		if (str == "CX")return CX_SUB;
		if (str == "DX")return DX_SUB;
		if (str == "BX")return BX_SUB;
		if (str == "SP")return SP_SUB;
		if (str == "BP")return BP_SUB;
		if (str == "SI")return SI_SUB;
		if (str == "DI")return DI_SUB;

		if (str == "cx")return CX_SUB;
		if (str == "dx")return DX_SUB;
		if (str == "bx")return BX_SUB;
		if (str == "sp")return SP_SUB;
		if (str == "bp")return BP_SUB;
		if (str == "si")return SI_SUB;
		if (str == "di")return DI_SUB;
	}
	else if (num == 1){
		if (str == "cl")return CL_SUB;
		if (str == "dl")return DL_SUB;
		if (str == "bl")return BL_SUB;
		if (str == "ah")return AH_SUB;
		if (str == "ch")return CH_SUB;
		if (str == "dh")return DH_SUB;
		if (str == "bh")return BH_SUB;

		if (str == "CL")return CL_SUB;
		if (str == "DL")return DL_SUB;
		if (str == "BL")return BL_SUB;
		if (str == "AH")return AH_SUB;
		if (str == "CH")return CH_SUB;
		if (str == "DH")return DH_SUB;
		if (str == "BH")return BH_SUB;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jne 0x8380
movq -0x10(%rbp), %rdi
leaq 0x12fd7(%rip), %rsi     # 0x1b1ab
callq 0xa8a0
testb $0x1, %al
jne 0x81df
jmp 0x81e8
movb $-0x17, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12fbb(%rip), %rsi     # 0x1b1ae
callq 0xa8a0
testb $0x1, %al
jne 0x81fe
jmp 0x8207
movb $-0x16, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f9f(%rip), %rsi     # 0x1b1b1
callq 0xa8a0
testb $0x1, %al
jne 0x821d
jmp 0x8226
movb $-0x15, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f83(%rip), %rsi     # 0x1b1b4
callq 0xa8a0
testb $0x1, %al
jne 0x823c
jmp 0x8245
movb $-0x14, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f67(%rip), %rsi     # 0x1b1b7
callq 0xa8a0
testb $0x1, %al
jne 0x825b
jmp 0x8264
movb $-0x13, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f4b(%rip), %rsi     # 0x1b1ba
callq 0xa8a0
testb $0x1, %al
jne 0x827a
jmp 0x8283
movb $-0x12, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f2f(%rip), %rsi     # 0x1b1bd
callq 0xa8a0
testb $0x1, %al
jne 0x8299
jmp 0x82a2
movb $-0x11, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12f16(%rip), %rsi     # 0x1b1c3
callq 0xa8a0
testb $0x1, %al
jne 0x82b8
jmp 0x82c1
movb $-0x17, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12efa(%rip), %rsi     # 0x1b1c6
callq 0xa8a0
testb $0x1, %al
jne 0x82d7
jmp 0x82e0
movb $-0x16, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12ede(%rip), %rsi     # 0x1b1c9
callq 0xa8a0
testb $0x1, %al
jne 0x82f6
jmp 0x82ff
movb $-0x15, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12ec2(%rip), %rsi     # 0x1b1cc
callq 0xa8a0
testb $0x1, %al
jne 0x8315
jmp 0x831e
movb $-0x14, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12ea6(%rip), %rsi     # 0x1b1cf
callq 0xa8a0
testb $0x1, %al
jne 0x8334
jmp 0x833d
movb $-0x13, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12e8a(%rip), %rsi     # 0x1b1d2
callq 0xa8a0
testb $0x1, %al
jne 0x8353
jmp 0x835c
movb $-0x12, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12e6e(%rip), %rsi     # 0x1b1d5
callq 0xa8a0
testb $0x1, %al
jne 0x8372
jmp 0x837b
movb $-0x11, -0x1(%rbp)
jmp 0x8535
jmp 0x8531
cmpl $0x1, -0x14(%rbp)
jne 0x852f
movq -0x10(%rbp), %rdi
leaq 0x12e04(%rip), %rsi     # 0x1b199
callq 0xa8a0
testb $0x1, %al
jne 0x83a0
jmp 0x83a9
movb $-0x17, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12deb(%rip), %rsi     # 0x1b19f
callq 0xa8a0
testb $0x1, %al
jne 0x83bf
jmp 0x83c8
movb $-0x16, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12dd2(%rip), %rsi     # 0x1b1a5
callq 0xa8a0
testb $0x1, %al
jne 0x83de
jmp 0x83e7
movb $-0x15, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12d9e(%rip), %rsi     # 0x1b190
callq 0xa8a0
testb $0x1, %al
jne 0x83fd
jmp 0x8406
movb $-0x14, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12d85(%rip), %rsi     # 0x1b196
callq 0xa8a0
testb $0x1, %al
jne 0x841c
jmp 0x8425
movb $-0x13, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12d6c(%rip), %rsi     # 0x1b19c
callq 0xa8a0
testb $0x1, %al
jne 0x843b
jmp 0x8444
movb $-0x12, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12d53(%rip), %rsi     # 0x1b1a2
callq 0xa8a0
testb $0x1, %al
jne 0x845a
jmp 0x8463
movb $-0x11, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12d13(%rip), %rsi     # 0x1b181
callq 0xa8a0
testb $0x1, %al
jne 0x8479
jmp 0x8482
movb $-0x17, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12cfa(%rip), %rsi     # 0x1b187
callq 0xa8a0
testb $0x1, %al
jne 0x8498
jmp 0x84a1
movb $-0x16, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12ce1(%rip), %rsi     # 0x1b18d
callq 0xa8a0
testb $0x1, %al
jne 0x84b7
jmp 0x84bd
movb $-0x15, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12cb0(%rip), %rsi     # 0x1b178
callq 0xa8a0
testb $0x1, %al
jne 0x84d3
jmp 0x84d9
movb $-0x14, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12c9a(%rip), %rsi     # 0x1b17e
callq 0xa8a0
testb $0x1, %al
jne 0x84ef
jmp 0x84f5
movb $-0x13, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12c84(%rip), %rsi     # 0x1b184
callq 0xa8a0
testb $0x1, %al
jne 0x850b
jmp 0x8511
movb $-0x12, -0x1(%rbp)
jmp 0x8535
movq -0x10(%rbp), %rdi
leaq 0x12c6e(%rip), %rsi     # 0x1b18a
callq 0xa8a0
testb $0x1, %al
jne 0x8527
jmp 0x852d
movb $-0x11, -0x1(%rbp)
jmp 0x8535
jmp 0x852f
jmp 0x8531
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop