// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, -0x30(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %r14
callq 0x45a8
testb %al, %al
jle 0x47ac
movl %eax, %r12d
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0xa0, %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x4629
movsbl %r12b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x2240
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2200
leaq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %r13
movq %r13, %rsi
callq 0x2230
movq (%r13), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x469b
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x2240
leaq 0x1(%rax), %r13
movq %r14, -0x38(%rbp)
movslq %r14d, %r14
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x2240
notq %rax
addq %rax, %r14
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x2200
leaq -0x80(%rbp), %r15
leaq -0x58(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2230
movq (%r14), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4703
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21d0
leaq -0xa0(%rbp), %rdi
movl -0x30(%rbp), %r14d
movl %r14d, %esi
callq 0x45f9
movq %rax, %r13
movq %r15, %rdi
movl %r14d, %esi
callq 0x45f9
movq %rax, %r15
movzbl %r12b, %eax
movb $0x1, %r14b
addl $-0x24, %eax
cmpl $0xb, %eax
ja 0x4775
leaq 0xc8e3(%rip), %rcx      # 0x11020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x30(%rbp), %r15
jmp 0x4755
addq %r13, %r15
jmp 0x4755
imulq %r13, %r15
xorl %r14d, %r14d
jmp 0x4775
subq %r15, %r13
xorl %r14d, %r14d
movq %r13, %r15
jmp 0x4775
movq %r13, %rax
cqto
idivq %r15
xorl %r14d, %r14d
movq %rax, %r15
jmp 0x4775
movq $-0x40, %r12
leaq -0x70(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x4795
movq (%r13), %rsi
incq %rsi
callq 0x21d0
addq $-0x20, %r13
addq $0x20, %r12
jne 0x4780
testb %r14b, %r14b
movq -0x38(%rbp), %r14
je 0x48a4
movq (%rbx), %rax
cmpb $0x30, (%rax)
jne 0x4821
movzbl 0x1(%rax), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x4821
xorl %r15d, %r15d
cmpl $0x3, %r14d
jl 0x48a4
movl %r14d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x30(%rbp)
leal -0x3(%r14), %r12d
movl $0x2, %r13d
movq %rbx, %r14
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd 0xc902(%rip), %xmm0     # 0x110f8
callq 0x21a0
cvttsd2si %xmm0, %ebx
movq (%r14), %rax
movsbl (%rax,%r13), %edi
callq 0x4477
cwtl
imull %ebx, %eax
addl %eax, %r15d
incq %r13
decl %r12d
cmpq %r13, -0x30(%rbp)
jne 0x47e6
jmp 0x4884
movq %rbx, %rdi
callq 0x44c3
testb %al, %al
je 0x4889
xorl %r15d, %r15d
testl %r14d, %r14d
jle 0x48a4
movl %r14d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x30(%rbp)
leal -0x1(%r14), %r12d
xorl %r13d, %r13d
movq %rbx, %r14
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
movsd 0xc8a5(%rip), %xmm0     # 0x11100
callq 0x22f0
cvttsd2si %xmm0, %ebx
movq (%r14), %rax
movsbl (%rax,%r13), %edi
callq 0x4477
cwtl
imull %ebx, %eax
addl %eax, %r15d
incq %r13
decl %r12d
cmpq %r13, -0x30(%rbp)
jne 0x484b
movslq %r15d, %r15
jmp 0x48a4
leaq 0xc931(%rip), %rsi      # 0x111c1
movq %rbx, %rdi
callq 0x20a0
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
orl -0x30(%rbp), %ecx
movslq %ecx, %r15
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48ba
jmp 0x48ba
movq %rax, %rbx
movq $-0x40, %r14
leaq -0x70(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x48dc
movq (%r15), %rsi
incq %rsi
callq 0x21d0
addq $-0x20, %r15
addq $0x20, %r14
jne 0x48c8
movq %rbx, %rdi
callq 0x2300