// File: lindorx[P]train/InsPro.cpp
// Function: Subtraction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int)
std::vector<unsigned char>Subtraction(const std::string& str, int n, int num)
{
	using namespace std;
	vector<unsigned char>data;
	vector<unsigned char>w;
	unsigned char a, b, c, d, f;
	string ch[2];
	ch[0] = CutStr(str, n);
	ch[1] = CutStr(str, str.find(',') + 1);
	a = TwoRegBin(ch, 1);
	b = TwoRegBin(ch, 2);
	c = TwoRegBin(ch, 3);
	//�����Ƿ�Ϊ�Ĵ���֮�丳ֵ
	if (a){
		data.push_back(0x28);
		data.push_back(a);
		return data;
	}
	else if (b){
		data.push_back(0x29);
		data.push_back(b);
		return data;
	}
	else if (c){
		cout << "�μĴ�������ֱ�Ӳ�������!-error-007!" << endl;
	}
	//˵��ch[1]��һ�������ַ���������
	//�����Ƿ���ax�Ĵ���
	else if (ch[0] == "ax" || ch[0] == "AX"){
		data.push_back(0x2d);
		w = Num(ch[1], 2, num);
		data.insert(data.end(), w.begin(), w.end());
		return data;
	}
	else if (ch[0] == "al" || ch[0] == "AL"){
		data.push_back(0x2c);
		w = Num(ch[1], 1, num);
		data.insert(data.end(), w.begin(), w.end());
		return data;
	}
	else{
		//�жϼĴ���λ��
		d = regsub(ch[0], 1);//������ֵ��Ϊ0����˵��ch[0]��8λ�Ĵ�������
		f = regsub(ch[0], 2);//������ֵ��Ϊ0����˵��ch[1]��16λ�Ĵ�������
		if (d){
			//�ж�Ϊ8λ�Ĵ���
			data.push_back(0x80);
			data.push_back(d);
			w = Num(ch[1], 1, num);
			data.insert(data.end(), w.begin(), w.end());
			return data;
		}
		else if (f){
			//�ж�Ϊ16λ�Ĵ���
			if (IntNum(ch[1], num) > 0x7f){
				//��ֵӦת��Ϊ2�ֽ�
				w = Num(ch[1], 2, num);
				data.push_back(0x81);
				data.push_back(f);
				data.insert(data.end(), w.begin(), w.end());
				return data;
			}
			else{
				w = Num(ch[1], 1, num);
				data.push_back(0x83);
				data.push_back(f);
				data.insert(data.end(), w.begin(), w.end());
				return data;
			}
		}
	}
	return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x260(%rbp)
movq %rdi, %rax
movq %rax, -0x258(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0xa8d0
leaq -0x38(%rbp), %rdi
callq 0xa8d0
leaq -0x80(%rbp), %rax
movq %rax, %rcx
addq $0x40, %rcx
movq %rcx, -0x250(%rbp)
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x3330
movq -0x268(%rbp), %rax
movq -0x250(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x248(%rbp)
jne 0x11c15
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0xa0(%rbp), %rdi
callq 0x67d0
jmp 0x11c5b
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq %rsi, -0x278(%rbp)
callq 0x32c0
movq -0x278(%rbp), %rdi
callq 0x3468
movq -0x10(%rbp), %rdi
movq %rdi, -0x270(%rbp)
xorl %eax, %eax
movl %eax, %edx
movl $0x2c, %esi
callq 0x3300
movq -0x270(%rbp), %rsi
movl %eax, %edx
incl %edx
leaq -0xd0(%rbp), %rdi
callq 0x67d0
jmp 0x11cb0
leaq -0x60(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x288(%rbp)
callq 0x32c0
movq -0x288(%rbp), %rdi
callq 0x3468
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x6d30
movb %al, -0x279(%rbp)
jmp 0x11ce9
movb -0x279(%rbp), %al
movb %al, -0x39(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x2, %esi
callq 0x6d30
movb %al, -0x289(%rbp)
jmp 0x11d08
movb -0x289(%rbp), %al
movb %al, -0x3a(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x3, %esi
callq 0x6d30
movb %al, -0x28a(%rbp)
jmp 0x11d27
movb -0x28a(%rbp), %al
movb %al, -0x3b(%rbp)
cmpb $0x0, -0x39(%rbp)
je 0x11da4
movq -0x260(%rbp), %rdi
movb $0x28, -0xd1(%rbp)
leaq -0xd1(%rbp), %rsi
callq 0xa8f0
jmp 0x11d52
movq -0x260(%rbp), %rdi
leaq -0x39(%rbp), %rsi
callq 0xaa00
jmp 0x11d64
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x2a0(%rbp)
addq $0x40, %rax
movq %rax, -0x298(%rbp)
jmp 0x124a7
cmpb $0x0, -0x3a(%rbp)
je 0x11deb
movq -0x260(%rbp), %rdi
movb $0x29, -0xd9(%rbp)
leaq -0xd9(%rbp), %rsi
callq 0xa8f0
jmp 0x11dc6
movq -0x260(%rbp), %rdi
leaq -0x3a(%rbp), %rsi
callq 0xaa00
jmp 0x11dd8
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
cmpb $0x0, -0x3b(%rbp)
je 0x11e27
movq 0xf1e0(%rip), %rdi      # 0x20fd8
leaq 0x96d0(%rip), %rsi      # 0x1b4cf
callq 0x31f0
movq %rax, -0x2a8(%rbp)
jmp 0x11e0d
movq -0x2a8(%rbp), %rdi
movq 0xf1a5(%rip), %rsi      # 0x20fc0
callq 0x3240
jmp 0x11e22
jmp 0x1243d
leaq 0x9392(%rip), %rsi      # 0x1b1c0
leaq -0x80(%rbp), %rdi
callq 0xa8a0
movb %al, -0x2a9(%rbp)
jmp 0x11e3f
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0x11e72
jmp 0x11e4b
leaq 0x9356(%rip), %rsi      # 0x1b1a8
leaq -0x80(%rbp), %rdi
callq 0xa8a0
movb %al, -0x2aa(%rbp)
jmp 0x11e63
movb -0x2aa(%rbp), %al
testb $0x1, %al
jne 0x11e72
jmp 0x11f69
movq -0x260(%rbp), %rdi
movb $0x2d, -0xda(%rbp)
leaq -0xda(%rbp), %rsi
callq 0xa8f0
jmp 0x11e8e
leaq -0x60(%rbp), %rsi
movl -0x18(%rbp), %ecx
leaq -0xf8(%rbp), %rdi
movl $0x2, %edx
callq 0x7be0
jmp 0x11ea8
leaq -0x38(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
leaq -0xf8(%rbp), %rsi
movq %rsi, -0x2c8(%rbp)
callq 0xa9b0
movq -0x2c8(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
callq 0xab40
movq %rax, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xab70
movq -0x2c0(%rbp), %rdi
callq 0xabb0
movq -0x2c0(%rbp), %rdi
movq %rax, -0x110(%rbp)
callq 0xab40
movq -0x260(%rbp), %rdi
movq %rax, -0x118(%rbp)
movq -0x100(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq -0x118(%rbp), %rcx
callq 0xaa90
movq %rax, -0x2b8(%rbp)
jmp 0x11f48
movq -0x2b8(%rbp), %rax
movq %rax, -0x120(%rbp)
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
leaq 0x9223(%rip), %rsi      # 0x1b193
leaq -0x80(%rbp), %rdi
callq 0xa8a0
movb %al, -0x2c9(%rbp)
jmp 0x11f81
movb -0x2c9(%rbp), %al
testb $0x1, %al
jne 0x11fb4
jmp 0x11f8d
leaq 0x91e7(%rip), %rsi      # 0x1b17b
leaq -0x80(%rbp), %rdi
callq 0xa8a0
movb %al, -0x2ca(%rbp)
jmp 0x11fa5
movb -0x2ca(%rbp), %al
testb $0x1, %al
jne 0x11fb4
jmp 0x120ab
movq -0x260(%rbp), %rdi
movb $0x2c, -0x121(%rbp)
leaq -0x121(%rbp), %rsi
callq 0xa8f0
jmp 0x11fd0
leaq -0x60(%rbp), %rsi
movl -0x18(%rbp), %ecx
leaq -0x140(%rbp), %rdi
movl $0x1, %edx
callq 0x7be0
jmp 0x11fea
leaq -0x38(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
leaq -0x140(%rbp), %rsi
movq %rsi, -0x2e8(%rbp)
callq 0xa9b0
movq -0x2e8(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
callq 0xab40
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xab70
movq -0x2e0(%rbp), %rdi
callq 0xabb0
movq -0x2e0(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0xab40
movq -0x260(%rbp), %rdi
movq %rax, -0x160(%rbp)
movq -0x148(%rbp), %rsi
movq -0x158(%rbp), %rdx
movq -0x160(%rbp), %rcx
callq 0xaa90
movq %rax, -0x2d8(%rbp)
jmp 0x1208a
movq -0x2d8(%rbp), %rax
movq %rax, -0x168(%rbp)
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x81b0
movb %al, -0x2e9(%rbp)
jmp 0x120c1
movb -0x2e9(%rbp), %al
movb %al, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x2, %esi
callq 0x81b0
movb %al, -0x2ea(%rbp)
jmp 0x120e0
movb -0x2ea(%rbp), %al
movb %al, -0x3d(%rbp)
cmpb $0x0, -0x3c(%rbp)
je 0x121fc
movq -0x260(%rbp), %rdi
movb $-0x80, -0x169(%rbp)
leaq -0x169(%rbp), %rsi
callq 0xa8f0
jmp 0x1210f
movq -0x260(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0xaa00
jmp 0x12121
leaq -0x60(%rbp), %rsi
movl -0x18(%rbp), %ecx
leaq -0x188(%rbp), %rdi
movl $0x1, %edx
callq 0x7be0
jmp 0x1213b
leaq -0x38(%rbp), %rdi
movq %rdi, -0x300(%rbp)
leaq -0x188(%rbp), %rsi
movq %rsi, -0x308(%rbp)
callq 0xa9b0
movq -0x308(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
callq 0xab40
movq %rax, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0xab70
movq -0x300(%rbp), %rdi
callq 0xabb0
movq -0x300(%rbp), %rdi
movq %rax, -0x1a0(%rbp)
callq 0xab40
movq -0x260(%rbp), %rdi
movq %rax, -0x1a8(%rbp)
movq -0x190(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
movq -0x1a8(%rbp), %rcx
callq 0xaa90
movq %rax, -0x2f8(%rbp)
jmp 0x121db
movq -0x2f8(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
cmpb $0x0, -0x3d(%rbp)
je 0x12435
leaq -0x60(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x7720
movq %rax, -0x310(%rbp)
jmp 0x1221b
movq -0x310(%rbp), %rax
cmpq $0x7f, %rax
jle 0x12332
leaq -0x60(%rbp), %rsi
movl -0x18(%rbp), %ecx
leaq -0x1c8(%rbp), %rdi
movl $0x2, %edx
callq 0x7be0
jmp 0x12246
leaq -0x38(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movq %rsi, -0x318(%rbp)
callq 0xa9b0
movq -0x318(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
movb $-0x7f, -0x1c9(%rbp)
leaq -0x1c9(%rbp), %rsi
callq 0xa8f0
jmp 0x12285
movq -0x260(%rbp), %rdi
leaq -0x3d(%rbp), %rsi
callq 0xaa00
jmp 0x12297
movq -0x260(%rbp), %rdi
callq 0xab40
movq %rax, -0x1e0(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xab70
leaq -0x38(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0xabb0
movq -0x328(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
callq 0xab40
movq -0x260(%rbp), %rdi
movq %rax, -0x1f0(%rbp)
movq -0x1d8(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
movq -0x1f0(%rbp), %rcx
callq 0xaa90
movq %rax, -0x320(%rbp)
jmp 0x12311
movq -0x320(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
leaq -0x60(%rbp), %rsi
movl -0x18(%rbp), %ecx
leaq -0x210(%rbp), %rdi
movl $0x1, %edx
callq 0x7be0
jmp 0x1234c
leaq -0x38(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq %rsi, -0x330(%rbp)
callq 0xa9b0
movq -0x330(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
movb $-0x7d, -0x211(%rbp)
leaq -0x211(%rbp), %rsi
callq 0xa8f0
jmp 0x1238b
movq -0x260(%rbp), %rdi
leaq -0x3d(%rbp), %rsi
callq 0xaa00
jmp 0x1239d
movq -0x260(%rbp), %rdi
callq 0xab40
movq %rax, -0x228(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0xab70
leaq -0x38(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0xabb0
movq -0x340(%rbp), %rdi
movq %rax, -0x230(%rbp)
callq 0xab40
movq -0x260(%rbp), %rdi
movq %rax, -0x238(%rbp)
movq -0x220(%rbp), %rsi
movq -0x230(%rbp), %rdx
movq -0x238(%rbp), %rcx
callq 0xaa90
movq %rax, -0x338(%rbp)
jmp 0x12417
movq -0x338(%rbp), %rax
movq %rax, -0x240(%rbp)
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
jmp 0x1244f
jmp 0x12437
jmp 0x12439
jmp 0x1243b
jmp 0x1243d
jmp 0x1243f
jmp 0x12441
movb $0x1, -0x19(%rbp)
movl $0x1, -0xd8(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x350(%rbp)
addq $0x40, %rax
movq %rax, -0x348(%rbp)
movq -0x348(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x358(%rbp)
callq 0x3468
movq -0x350(%rbp), %rcx
movq -0x358(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x348(%rbp)
jne 0x12465
leaq -0x38(%rbp), %rdi
callq 0xa920
testb $0x1, -0x19(%rbp)
jne 0x124fb
jmp 0x124ef
movq -0x298(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x360(%rbp)
callq 0x3468
movq -0x2a0(%rbp), %rcx
movq -0x360(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x298(%rbp)
jne 0x124a7
leaq -0x38(%rbp), %rdi
callq 0xa920
movq -0x260(%rbp), %rdi
callq 0xa920
jmp 0x1250b
movq -0x260(%rbp), %rdi
callq 0xa920
movq -0x258(%rbp), %rax
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x33f0
nopw (%rax,%rax)