// File: Lartu[P]polaris/src/polaris.cpp
// Function: str_is_num(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool str_is_num(string & source){
    if (source == "inf") return true;
    if (source == "-inf") return true;
    bool already_found_sign = false;
    bool already_found_point = false;
    size_t numbers_before_point = 0;
    size_t numbers_after_point = 0;
    for(size_t i = 0; i < source.length(); ++i)
        if(!already_found_sign && source[i] == '-')
            already_found_sign = true;
        else if(!already_found_point && source[i] == '.')
            already_found_point = true;
        else if(
        source[i] == '0' || source[i] == '1' 
        || source[i] == '2' || source[i] == '3'
        || source[i] == '4' || source[i] == '5'
        || source[i] == '6' || source[i] == '7'
        || source[i] == '8' || source[i] == '9'
        )
        {
            already_found_sign = true;
            if(already_found_point)
                numbers_after_point++;
            else
                numbers_before_point++;
        }
        else
            return false;
    if(numbers_before_point == 0)
        return false;
    if(already_found_point && numbers_after_point == 0)
        return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xabd2(%rip), %rsi      # 0x10379
callq 0xa7b0
testb $0x1, %al
jne 0x57b2
jmp 0x57bb
movb $0x1, -0x1(%rbp)
jmp 0x59a8
movq -0x10(%rbp), %rdi
leaq 0xabb2(%rip), %rsi      # 0x10378
callq 0xa7b0
testb $0x1, %al
jne 0x57d1
jmp 0x57da
movb $0x1, -0x1(%rbp)
jmp 0x59a8
movb $0x0, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x33f0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x5984
testb $0x1, -0x11(%rbp)
jne 0x583f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x583f
movb $0x1, -0x11(%rbp)
jmp 0x5971
testb $0x1, -0x12(%rbp)
jne 0x5863
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x5863
movb $0x1, -0x12(%rbp)
jmp 0x596f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x30, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x31, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x32, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x33, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x34, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x35, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x36, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x37, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x38, %eax
je 0x5941
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x39, %eax
jne 0x5967
movb $0x1, -0x11(%rbp)
testb $0x1, -0x12(%rbp)
je 0x5959
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5965
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x596d
movb $0x0, -0x1(%rbp)
jmp 0x59a8
jmp 0x596f
jmp 0x5971
jmp 0x5973
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x57fa
cmpq $0x0, -0x20(%rbp)
jne 0x5991
movb $0x0, -0x1(%rbp)
jmp 0x59a8
testb $0x1, -0x12(%rbp)
je 0x59a4
cmpq $0x0, -0x28(%rbp)
jne 0x59a4
movb $0x0, -0x1(%rbp)
jmp 0x59a8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)