// File: /workspace/github_cpp_makefile_star2_O3/Mariotti94[P]BigFloat/BigFloat.cc
// Function: BigFloat::SetPrecision(int)
void BigFloat::SetPrecision(int prec)
{
    if((error) || (prec < 0))
        return;
    if(this->decimals < prec) {
        while(this->decimals < prec) {
            this->decimals++;
            this->number.push_front('0');
        }
    }
    else if(this->decimals > prec) {
        char last;
        while(this->decimals > prec) {
            last = number[0];
            this->decimals--;
            this->number.pop_front();
        }
        if(CharToInt(last) >= 5) {
            if(prec == 0)
                (*this)++;
            else {
                std::stringstream ss;
                ss << "0.";
                for(int i = 1; i < prec; i++)
                    ss << "0";
                ss << "1";
                BigFloat aus(ss.str());
                *this = *this + aus;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
testl %esi, %esi
js 0x915e
movq %rdi, %rbx
cmpb $0x0, 0x5c(%rdi)
jne 0x915e
movl %esi, %ebp
leaq 0x58(%rbx), %r13
movl 0x58(%rbx), %eax
cmpl %esi, %eax
jge 0x8f72
leaq 0x8(%rbx), %r14
leaq 0x1a0(%rsp), %r15
incl %eax
movl %eax, 0x58(%rbx)
movb $0x30, 0x1a0(%rsp)
movq 0x18(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x8f5a
movb $0x30, -0x1(%rax)
decq 0x18(%rbx)
jmp 0x8f65
movq %r14, %rdi
movq %r15, %rsi
callq 0xb5ba
movl (%r13), %eax
cmpl %ebp, %eax
jl 0x8f39
jmp 0x915e
jbe 0x915e
leaq 0x8(%rbx), %r14
movq 0x18(%rbx), %rsi
movq 0x30(%rbx), %rcx
movq %rsi, %rdx
subq 0x20(%rbx), %rdx
js 0x8f9f
cmpq $0x200, %rdx            # imm = 0x200
jb 0x8fb7
movq %rdx, %rsi
shrq $0x9, %rsi
jmp 0x8fa6
movq %rdx, %rsi
sarq $0x9, %rsi
movq %rsi, %rdi
shlq $0x9, %rdi
subq %rdi, %rdx
addq (%rcx,%rsi,8), %rdx
movq %rdx, %rsi
movb (%rsi), %r15b
decl %eax
movl %eax, (%r13)
movq %r14, %rdi
callq 0x99fe
movl (%r13), %eax
cmpl %ebp, %eax
jg 0x8f7c
cmpb $0x35, %r15b
jl 0x915e
testl %ebp, %ebp
je 0x9126
leaq 0x1a0(%rsp), %rdi
callq 0x20c0
leaq 0x1b0(%rsp), %r15
leaq 0x30b8(%rip), %rsi      # 0xc0b6
movl $0x2, %edx
movq %r15, %rdi
callq 0x2150
cmpl $0x2, %ebp
jl 0x902d
decl %ebp
leaq 0x306c(%rip), %r12      # 0xc085
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2150
decl %ebp
jne 0x9019
leaq 0x3085(%rip), %rsi      # 0xc0b9
movl $0x1, %edx
movq %r15, %rdi
callq 0x2150
leaq 0x1b8(%rsp), %rsi
movq %rsp, %rdi
callq 0x21c0
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x9b48
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9071
callq 0x2120
leaq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x459d
leaq 0xa8(%rsp), %r15
movb -0x8(%r15), %al
movb %al, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb3ae
movb 0x54(%r15), %al
movb %al, 0x4(%r13)
movl 0x50(%r15), %eax
movl %eax, (%r13)
addq $0x60, %rbx
leaq 0x100(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2170
movq (%r14), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x90db
callq 0x2120
movq %r15, %rdi
callq 0x28a2
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x90f9
callq 0x2120
leaq 0x28(%rsp), %rdi
callq 0x28a2
movq 0x6eae(%rip), %rsi      # 0xffb8
leaq 0x1a0(%rsp), %rdi
callq 0x20e0
leaq 0x220(%rsp), %rdi
callq 0x2060
jmp 0x915e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x9a46
movq 0x60(%r14), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x9151
callq 0x2120
leaq 0x128(%rsp), %rdi
callq 0x28a2
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2758
jmp 0x919e
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x919e
callq 0x2120
jmp 0x919e
jmp 0x919b
jmp 0x919b
movq %rax, %rbx
movq 0x6e13(%rip), %rsi      # 0xffb8
leaq 0x1a0(%rsp), %rdi
callq 0x20e0
leaq 0x220(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2200
nop