// File: Mariotti94[P]BigFloat/BigFloat.cc
// Function: BigFloat::operator=(char const*)
BigFloat& BigFloat::operator=(const char* strNum)
{
    number.clear();
    decimals = 0;
    sign = '\0';
    error = 0;

    int count = 0;
    if(strNum[count] == '+') {
        sign = '+';
        count++;
    }
    else if(strNum[count] == '-') {
        sign = '-';
        count++;
    }
    else if(isdigit(strNum[count]))
        sign = '+';
    else {
        error = 1;
        error_code = "Unset";
        return *this;
    }

    bool start_dec = false;

    while(strNum[count] != '\0') {
        if(!start_dec)
            if(strNum[count] == '.') {
                if(number.empty()) {
                    sign = '\0';
                    error = 1;
                    error_code = "Unset";
                    return *this;
                }
                start_dec = true;
                count++;
            }

        if(isdigit(strNum[count])) {
            number.push_front(strNum[count]);
            count++;
            if(start_dec)
                decimals++;
        }
        else {
            sign = '\0';
            number.clear();
            decimals = 0;
            error = 1;
            error_code = "Unset";
            return *this;
        }
    }
    this->LeadTrim();
    return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x8, %rdi
callq 0x4330
movq (%rsp), %rax
movl $0x0, 0x58(%rax)
movb $0x0, (%rax)
movb $0x0, 0x5c(%rax)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2b, %eax
jne 0x5b71
movq (%rsp), %rax
movb $0x2b, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5be3
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0x5b98
movq (%rsp), %rax
movb $0x2d, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5be1
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x21a0
cmpl $0x0, %eax
je 0x5bb9
movq (%rsp), %rax
movb $0x2b, (%rax)
jmp 0x5bdf
movq (%rsp), %rdi
movb $0x1, 0x5c(%rdi)
addq $0x60, %rdi
leaq 0xa438(%rip), %rsi      # 0x10004
callq 0x2270
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x5d0b
jmp 0x5be1
jmp 0x5be3
movb $0x0, 0xb(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x5cf9
testb $0x1, 0xb(%rsp)
jne 0x5c67
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x5c65
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0xb5d0
testb $0x1, %al
jne 0x5c2c
jmp 0x5c55
movq (%rsp), %rdi
movb $0x0, (%rdi)
movb $0x1, 0x5c(%rdi)
addq $0x60, %rdi
leaq 0xa3c2(%rip), %rsi      # 0x10004
callq 0x2270
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x5d0b
movb $0x1, 0xb(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5c67
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x21a0
cmpl $0x0, %eax
je 0x5cba
movq (%rsp), %rdi
addq $0x8, %rdi
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rax
addq %rax, %rsi
callq 0xb5f0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
testb $0x1, 0xb(%rsp)
je 0x5cb8
movq (%rsp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
jmp 0x5cf4
movq (%rsp), %rdi
movb $0x0, (%rdi)
addq $0x8, %rdi
callq 0x4330
movq (%rsp), %rdi
movl $0x0, 0x58(%rdi)
movb $0x1, 0x5c(%rdi)
addq $0x60, %rdi
leaq 0xa320(%rip), %rsi      # 0x10004
callq 0x2270
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x5d0b
jmp 0x5be8
movq (%rsp), %rdi
callq 0x5d20
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)