// File: /workspace/github_cpp_makefile_star2_O1/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 0x927e
movq %rdi, %rbx
cmpb $0x0, 0x5c(%rdi)
jne 0x927e
movl %esi, %ebp
leaq 0x58(%rbx), %r13
cmpl %esi, 0x58(%rbx)
jge 0x907c
movl (%r13), %eax
cmpl %ebp, %eax
jge 0x927e
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 0x9064
movb $0x30, -0x1(%rax)
decq 0x18(%rbx)
jmp 0x906f
movq %r14, %rdi
movq %r15, %rsi
callq 0xb6e0
movl (%r13), %eax
cmpl %ebp, %eax
jl 0x9043
jmp 0x927e
jle 0x927e
movl (%r13), %eax
cmpl %ebp, %eax
jle 0x927e
leaq 0x8(%rbx), %r14
movabsq $-0x80000000000000, %r15 # imm = 0xFF80000000000000
movq 0x18(%rbx), %rdx
movq %rdx, %rcx
subq 0x20(%rbx), %rcx
cmpq $0x200, %rcx            # imm = 0x200
jb 0x90d7
movq 0x30(%rbx), %rdx
movq %rcx, %rsi
shrq $0x9, %rsi
leaq (%rsi,%r15), %rdi
testq %rcx, %rcx
cmovgq %rsi, %rdi
movq %rdi, %rsi
shlq $0x9, %rsi
subq %rsi, %rcx
addq (%rdx,%rdi,8), %rcx
movq %rcx, %rdx
movb (%rdx), %r12b
decl %eax
movl %eax, (%r13)
movq %r14, %rdi
callq 0x9b70
movl (%r13), %eax
cmpl %ebp, %eax
jg 0x909c
cmpb $0x35, %r12b
jl 0x927e
testl %ebp, %ebp
je 0x9246
leaq 0x1a0(%rsp), %rdi
callq 0x20c0
leaq 0x1b0(%rsp), %r15
leaq 0x2f98(%rip), %rsi      # 0xc0b6
movl $0x2, %edx
movq %r15, %rdi
callq 0x2150
cmpl $0x2, %ebp
jl 0x914d
decl %ebp
leaq 0x2f4c(%rip), %r12      # 0xc085
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2150
decl %ebp
jne 0x9139
leaq 0x2f65(%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 0x9cba
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9191
callq 0x2120
leaq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x45e7
leaq 0xa8(%rsp), %r15
movb -0x8(%r15), %al
movb %al, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb4d4
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 0x91fb
callq 0x2120
movq %r15, %rdi
callq 0x28a2
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9219
callq 0x2120
leaq 0x28(%rsp), %rdi
callq 0x28a2
movq 0x6d8e(%rip), %rsi      # 0xffb8
leaq 0x1a0(%rsp), %rdi
callq 0x20e0
leaq 0x220(%rsp), %rdi
callq 0x2060
jmp 0x927e
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x9bb8
movq 0x60(%r14), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x9271
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 0x92be
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92be
callq 0x2120
jmp 0x92be
jmp 0x92bb
jmp 0x92bb
movq %rax, %rbx
movq 0x6cf3(%rip), %rsi      # 0xffb8
leaq 0x1a0(%rsp), %rdi
callq 0x20e0
leaq 0x220(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2200
nop