// File: lindorx[P]train/HelpInsPro.cpp
// Function: IntNum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
long IntNum(const std::string& str,int num)
{
	using namespace std;
	int i, sum = 0, n = str.size();
	//�鿴�Ƿ���BYTE WORD�ȱ�ʶ��
	char c = FoundMathChar(str);//������������
	if (c>0){
		string ch[2];
		long k[2] = {0};
		ch[0] = str.substr(0,str.find(c));
		ch[1] = str.substr(str.find(c)+1,n - str.find(c)-1);
		//��ʱ��ch�ֱ𴢴������������ߵ������ַ���������IntNum����ת��Ϊ����
		k[0] = IntNum(ch[0], num);
		k[1] = IntNum(ch[1], num);
		switch (c){
		case '+':return k[0] + k[1];
		case '-':return k[0] - k[1];
		case '*':return k[0] * k[1];
		case '/':return k[0] / k[1];
		case '$':return num;
		}
	}
	if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')){
		for (i = 2; i<n; ++i){
			sum += (int)pow(16.0, (double)(n - 1 - i))*HexOct(str[i]);
		}
		return sum;
	}
	else if (IsHexNum(str)){
		//�������ַ���ת��Ϊ�ɹ������ĸ�ʽ
		for (i = 0; i < n; ++i){
			sum += (int)pow(10.0, (double)(n - i - 1))*HexOct(str[i]);
		}
		return sum;
	}
	else if (str == "$")return num;
	//�����Ǳ����ַ���
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7690
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jle 0x7a55
leaq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x40, %rcx
movq %rcx, -0xe8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3330
movq -0xf0(%rbp), %rax
movq -0xe8(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0xe0(%rbp)
jne 0x7777
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movsbl -0x21(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0xf8(%rbp)
callq 0x3300
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movq %rax, %rcx
leaq -0xa0(%rbp), %rdi
callq 0x3230
jmp 0x77ed
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq %rsi, -0x128(%rbp)
callq 0x32c0
movq -0x128(%rbp), %rdi
callq 0x3468
movq -0x10(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movsbl -0x21(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x120(%rbp)
callq 0x3300
movq -0x120(%rbp), %rdx
incq %rax
movq %rax, -0x110(%rbp)
movslq -0x20(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
movsbl -0x21(%rbp), %esi
callq 0x3300
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq %rax, %rcx
movq -0x108(%rbp), %rax
notq %rcx
addq %rax, %rcx
leaq -0xd0(%rbp), %rdi
callq 0x3230
jmp 0x7884
leaq -0x50(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x138(%rbp)
callq 0x32c0
movq -0x138(%rbp), %rdi
callq 0x3468
movl -0x14(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x7720
movq %rax, -0x130(%rbp)
jmp 0x78bc
movq -0x130(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7720
movq %rax, -0x140(%rbp)
jmp 0x78dc
movq -0x140(%rbp), %rax
movq %rax, -0x78(%rbp)
movsbl -0x21(%rbp), %eax
addl $-0x24, %eax
movl %eax, %ecx
movq %rcx, -0x148(%rbp)
subl $0xb, %eax
ja 0x79bb
movq -0x148(%rbp), %rax
leaq 0x137f6(%rip), %rcx     # 0x1b104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x158(%rbp)
addq $0x40, %rax
movq %rax, -0x150(%rbp)
jmp 0x7a1f
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xd4(%rbp)
jmp 0x79c5
movq -0x80(%rbp), %rax
subq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xd4(%rbp)
jmp 0x79c5
movq -0x80(%rbp), %rax
imulq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xd4(%rbp)
jmp 0x79c5
movq -0x80(%rbp), %rax
cqto
idivq -0x78(%rbp)
movq %rax, -0x8(%rbp)
movl $0x1, -0xd4(%rbp)
jmp 0x79c5
movslq -0x14(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xd4(%rbp)
jmp 0x79c5
movl $0x0, -0xd4(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x168(%rbp)
addq $0x40, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x170(%rbp)
callq 0x3468
movq -0x168(%rbp), %rcx
movq -0x170(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x160(%rbp)
jne 0x79db
movl -0xd4(%rbp), %eax
testl %eax, %eax
je 0x7a1d
jmp 0x7a18
jmp 0x7bbc
jmp 0x7a55
movq -0x150(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x178(%rbp)
callq 0x3468
movq -0x158(%rbp), %rcx
movq -0x178(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x150(%rbp)
jne 0x7a1f
jmp 0x7bc9
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3280
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x7b0f
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3280
movsbl (%rax), %eax
cmpl $0x78, %eax
je 0x7a9a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3280
movsbl (%rax), %eax
cmpl $0x58, %eax
jne 0x7b0f
movl $0x2, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x7b02
movl -0x20(%rbp), %eax
subl $0x1, %eax
subl -0x18(%rbp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x136b2(%rip), %xmm0    # 0x1b170
callq 0x33e0
cvttsd2si %xmm0, %eax
movl %eax, -0x17c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x3280
movsbl (%rax), %edi
callq 0x7450
movw %ax, %cx
movl -0x17c(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7aa1
movslq -0x1c(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bbc
movq -0x10(%rbp), %rdi
callq 0x7580
testb $0x1, %al
jne 0x7b1e
jmp 0x7b90
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x7b86
movl -0x20(%rbp), %eax
subl -0x18(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x13626(%rip), %xmm0    # 0x1b168
callq 0x33e0
cvttsd2si %xmm0, %eax
movl %eax, -0x180(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x3280
movsbl (%rax), %edi
callq 0x7450
movw %ax, %cx
movl -0x180(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7b25
movslq -0x1c(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bbc
movq -0x10(%rbp), %rdi
leaq 0x13696(%rip), %rsi     # 0x1b231
callq 0xa8a0
testb $0x1, %al
jne 0x7ba6
jmp 0x7bb0
movslq -0x14(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bbc
jmp 0x7bb2
jmp 0x7bb4
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)