LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_raw_add
int bigint_raw_add(
    bigint_word *dst,
    const bigint_word *src_a, int na,
    const bigint_word *src_b, int nb
){
    bigint_word sum, carry = 0;
    int i, n = BIGINT_MIN(na, nb);

    for (i = 0; i < n; i++){
        carry  = bigint_word_add_get_carry(&sum, carry, src_a[i]);
        carry += bigint_word_add_get_carry(&sum, sum  , src_b[i]);
        dst[i] = sum;
    }

    for (; i < na; i++){
        carry = bigint_word_add_get_carry(&dst[i], src_a[i], carry);
    }

    for (; i < nb; i++){
        carry = bigint_word_add_get_carry(&dst[i], src_b[i], carry);
    }

    if (carry) dst[i++] = carry;

    return bigint_raw_truncate(dst, i);
}

// Assembly:
cmpl %r8d, %edx
movl %r8d, %eax
cmovll %edx, %eax
testl %eax, %eax
jle 0x2185
pushq %rbp
pushq %r14
pushq %rbx
movl %eax, %r10d
xorl %r11d, %r11d
xorl %r9d, %r9d
movl (%rsi,%r11,4), %ebx
leal (%r9,%rbx), %ebp
xorl %r14d, %r14d
addl (%rcx,%r11,4), %ebp
setb %r14b
addl %ebx, %r9d
movl %r14d, %r9d
adcl $0x0, %r9d
movl %ebp, (%rdi,%r11,4)
incq %r11
cmpq %r11, %r10
jne 0x2156
popq %rbx
popq %r14
popq %rbp
jmp 0x218a
xorl %eax, %eax
xorl %r9d, %r9d
cmpl %edx, %eax
jge 0x21af
movl %eax, %eax
movl %edx, %r10d
addl (%rsi,%rax,4), %r9d
setb %r11b
movl %r9d, (%rdi,%rax,4)
xorl %r9d, %r9d
movb %r11b, %r9b
incq %rax
cmpq %rax, %r10
jne 0x2193
movl %edx, %eax
cmpl %r8d, %eax
jge 0x21cf
movl %eax, %eax
addl (%rcx,%rax,4), %r9d
setb %dl
movl %r9d, (%rdi,%rax,4)
xorl %r9d, %r9d
movb %dl, %r9b
incq %rax
cmpl %r8d, %eax
jl 0x21b6
testl %r9d, %r9d
je 0x21dc
movl %eax, %ecx
incl %eax
movl %r9d, (%rdi,%rcx,4)
testl %eax, %eax
jle 0x21f5
movl %eax, %ecx
cmpl $0x0, -0x4(%rdi,%rcx,4)
jne 0x21f5
leal -0x1(%rax), %ecx
cmpl $0x1, %eax
movl %ecx, %eax
jg 0x21e0
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_raw_sub
int bigint_raw_sub(
    bigint_word *dst,
    const bigint_word *src_a, int na,
    const bigint_word *src_b, int nb
){
    bigint_word dif, carry = 0;
    int i;
    BIGINT_ASSERT(na, >=, nb);
    BIGINT_ASSERT(bigint_raw_cmp_abs(src_a, na, src_b, nb), >=, 0);

    for (i = 0; i < nb; i++){
        carry  = bigint_word_sub_get_carry(&dif, src_a[i], carry);
        carry += bigint_word_sub_get_carry(&dif, dif, src_b[i]);
        dst[i] = dif;
    }

    for (; i < na; i++){
        carry = bigint_word_sub_get_carry(&dst[i], src_a[i], carry);
    }

    BIGINT_ASSERT(carry, ==, 0);
    return bigint_raw_truncate(dst, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl %r8d, %edx
jl 0x22bd
movl %r8d, %r14d
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
movq %rcx, %rdx
movl %r8d, %ecx
callq 0x1ae4
testl %eax, %eax
js 0x22dc
testl %r14d, %r14d
jle 0x2261
movl %r14d, %ecx
xorl %edx, %edx
xorl %eax, %eax
movl (%r15,%rdx,4), %esi
movl %esi, %edi
subl %eax, %edi
xorl %r8d, %r8d
subl (%r12,%rdx,4), %edi
setb %r8b
cmpl %eax, %esi
movl %r8d, %eax
adcl $0x0, %eax
movl %edi, (%rbx,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x2239
jmp 0x2266
xorl %eax, %eax
xorl %r14d, %r14d
cmpl %ebp, %r14d
jge 0x228d
movl %r14d, %ecx
movl %ebp, %edx
movl (%r15,%rcx,4), %esi
subl %eax, %esi
setb %dil
movl %esi, (%rbx,%rcx,4)
xorl %eax, %eax
movb %dil, %al
incq %rcx
cmpq %rcx, %rdx
jne 0x2270
movl %ebp, %r14d
testl %eax, %eax
jne 0x22fb
xorl %eax, %eax
testl %r14d, %r14d
je 0x22b4
movl %r14d, %ecx
cmpl $0x0, -0x4(%rbx,%rcx,4)
jne 0x22b1
leal -0x1(%r14), %ecx
cmpl $0x1, %r14d
movl %ecx, %r14d
jg 0x2298
jmp 0x22b4
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30b3(%rip), %rdi      # 0x5377
leaq 0x2f48(%rip), %rsi      # 0x5213
leaq 0x30b2(%rip), %rcx      # 0x5384
movl $0x18a, %edx            # imm = 0x18A
callq 0x1060
leaq 0x30f7(%rip), %rdi      # 0x53da
leaq 0x2f29(%rip), %rsi      # 0x5213
leaq 0x3093(%rip), %rcx      # 0x5384
movl $0x18b, %edx            # imm = 0x18B
callq 0x1060
leaq 0x310a(%rip), %rdi      # 0x540c
leaq 0x2f0a(%rip), %rsi      # 0x5213
leaq 0x3074(%rip), %rcx      # 0x5384
movl $0x197, %edx            # imm = 0x197
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_mul
bigint* bigint_mul(bigint *dst, const bigint *a, const bigint *b){
    int na = a->size;
    int nb = b->size;
    int n = na + nb;
    bigint_word *tmp;

    bigint_reserve(dst, n);

    /* bigint_raw_mul_karatsuba already has this fastpath */
    /* but this way we avoid allocating tmp */
    if (
        dst != a &&
        dst != b &&
        na < BIGINT_KARATSUBA_WORD_THRESHOLD &&
        nb < BIGINT_KARATSUBA_WORD_THRESHOLD
    ){
        bigint_raw_zero(dst->words, 0, na + nb);
        dst->size = bigint_raw_mul_add(dst->words, a->words, na, b->words, nb);
    }else{
        int magical_upper_bound = BIGINT_MAX(na, nb) * 11 + 180 + n;
        tmp = (bigint_word*)malloc(magical_upper_bound * sizeof(*tmp));

        dst->size = bigint_raw_mul_karatsuba(tmp, a->words, na, b->words, nb, tmp + n);
        bigint_raw_cpy(dst->words, tmp, dst->size);
        free(tmp);
    }

    return bigint_set_neg(dst, a->neg ^ b->neg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %r13d
movl 0xc(%rdx), %r12d
leal (%r12,%r13), %ebp
movl %ebp, %esi
callq 0x1a55
cmpq %r14, %rbx
je 0x26ba
cmpq %r15, %rbx
sete %al
cmpl $0x14, %r13d
setge %cl
cmpl $0x14, %r12d
setge %dl
orb %cl, %dl
orb %al, %dl
jne 0x26ba
testl %ebp, %ebp
jle 0x26a1
movq (%rbx), %rdi
movl %ebp, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rdi
movq (%r14), %rsi
movq (%r15), %rcx
movl %r13d, %edx
movl %r12d, %r8d
callq 0x1f4b
movl %eax, 0xc(%rbx)
jmp 0x272a
cmpl %r12d, %r13d
movl %r12d, %eax
cmovgl %r13d, %eax
leal (%rax,%rax,4), %ecx
leal (%rax,%rcx,2), %eax
addl %ebp, %eax
addl $0xb4, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x10b0
movq %r14, (%rsp)
movq %r15, %r14
movq %rax, %r15
movq (%rsp), %rax
movq (%rax), %rsi
movq (%r14), %rcx
movslq %ebp, %rax
leaq (%r15,%rax,4), %r9
movq %r15, %rdi
movl %r13d, %edx
movl %r12d, %r8d
callq 0x231a
movl %eax, 0xc(%rbx)
movq (%rbx), %rdi
movslq %eax, %rdx
shlq $0x2, %rdx
movq %r15, %rsi
callq 0x10a0
movq %r15, %rdi
movq %r14, %r15
movq (%rsp), %r14
callq 0x1030
movl 0x8(%r15), %eax
xorl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_from_str_base
bigint* bigint_from_str_base(bigint *dst, const char *src, int src_base){
    int n_digits_src, n_digits_dst;
    double dst_base = pow(2.0, BIGINT_WORD_BITS);

    n_digits_src = bigint_count_digits(src);
    n_digits_dst = bigint_digits_bound(n_digits_src, src_base, dst_base);

    bigint_reserve(dst, n_digits_dst);
    dst->size = n_digits_dst;
    bigint_raw_zero(dst->words, 0, n_digits_dst);

    dst->size = bigint_raw_from_str_base(dst->words, src, src_base);
    return bigint_set_neg(dst, *src == '-');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
testb %al, %al
je 0x281f
leaq 0x1(%r14), %r12
xorl %r15d, %r15d
movsbl %al, %edi
callq 0x1984
xorl %ecx, %ecx
cmpl $-0x1, %eax
setne %cl
addl %ecx, %r15d
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x27fa
cvtsi2sd %r15d, %xmm0
jmp 0x2823
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
callq 0x1080
mulsd 0x8(%rsp), %xmm0
divsd 0x298d(%rip), %xmm0     # 0x51d0
callq 0x10d0
addsd 0x27c8(%rip), %xmm0     # 0x5018
cvttsd2si %xmm0, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1a55
movl %r15d, 0xc(%rbx)
testl %r15d, %r15d
jle 0x287a
movq (%rbx), %rdi
movl %r15d, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x207f
movl %eax, 0xc(%rbx)
xorl %eax, %eax
cmpb $0x2d, (%r14)
sete %al
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_raw_add_signed
int bigint_raw_add_signed(
    bigint_word *dst, int *dst_neg,
    const bigint_word *a, int na, int a_neg,
    const bigint_word *b, int nb, int b_neg
){
    if (a_neg){
        if (b_neg){
            if (na >= nb){
                *dst_neg = 1;
                return bigint_raw_add(dst, a, na, b, nb);
            }else{
                *dst_neg = 1;
                return bigint_raw_add(dst, b, nb, a, na);
            }
        }else{
            if (bigint_raw_cmp_abs(a, na, b, nb) >= 0){
                *dst_neg = 1;
                return bigint_raw_sub(dst, a, na, b, nb);
            }else{
                *dst_neg = 0;
                return bigint_raw_sub(dst, b, nb, a, na);
            }
        }
    }else{
        if (b_neg){
            if (bigint_raw_cmp_abs(a, na, b, nb) >= 0){
                *dst_neg = 0;
                return bigint_raw_sub(dst, a, na, b, nb);
            }else{
                *dst_neg = 1;
                return bigint_raw_sub(dst, b, nb, a, na);
            }
        }else{
            if (na >= nb){
                *dst_neg = 0;
                return bigint_raw_add(dst, a, na, b, nb);
            }else{
                *dst_neg = 0;
                return bigint_raw_add(dst, b, nb, a, na);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %ebp
testl %r8d, %r8d
je 0x2960
testl %eax, %eax
je 0x2981
movl $0x1, (%r13)
jmp 0x29b4
testl %eax, %eax
je 0x29ac
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1ae4
testl %eax, %eax
js 0x29e6
movl $0x0, (%r13)
jmp 0x299c
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1ae4
testl %eax, %eax
js 0x29f0
movl $0x1, (%r13)
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %edx
movq %r14, %rcx
movl %ebp, %r8d
jmp 0x2a06
movl $0x0, (%r13)
movq %r12, %rdi
cmpl %ebp, %ebx
jge 0x29c8
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movl %ebx, %r8d
jmp 0x29d3
movq %r15, %rsi
movl %ebx, %edx
movq %r14, %rcx
movl %ebp, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x213c
movl $0x1, (%r13)
jmp 0x29f8
movl $0x0, (%r13)
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21f6
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_add_signed
bigint* bigint_add_signed(
    bigint *dst,
    const bigint *a, int a_neg,
    const bigint *b, int b_neg
){
    int na = a->size;
    int nb = b->size;
    int n = BIGINT_MAX(na, nb) + 1;

    bigint_reserve(dst, n);

    dst->size = bigint_raw_add_signed(
        dst->words, &dst->neg,
        a->words, na, a_neg,
        b->words, nb, b_neg
    );

    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movl 0xc(%rsi), %r13d
movl 0xc(%rcx), %r14d
cmpl %r14d, %r13d
movl %r14d, %esi
cmovgl %r13d, %esi
incl %esi
callq 0x1a55
movq (%rbx), %rdi
leaq 0x8(%rbx), %rsi
movq (%r12), %rdx
movq (%r15), %r9
movl %r13d, %ecx
movl %ebp, %r8d
pushq (%rsp)
pushq %r14
callq 0x292c
addq $0x10, %rsp
movl %eax, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_add_word_signed
bigint* bigint_add_word_signed(
    bigint *dst,
    const bigint *src_a,
    bigint_word b, int b_neg
){
    int na = src_a->size;

    bigint_reserve(dst, na + 1);

    dst->size = bigint_raw_add_signed(
        dst->words, &dst->neg,
        src_a->words, na, src_a->neg,
        &b, 1, b_neg
    );

    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc(%rsp), %r12
movl %edx, (%r12)
movl 0xc(%rsi), %r13d
leal 0x1(%r13), %esi
callq 0x1a55
movq (%rbx), %rdi
leaq 0x8(%rbx), %rsi
movq (%r15), %rdx
movl 0x8(%r15), %r8d
movl %r13d, %ecx
movq %r12, %r9
pushq %r14
pushq $0x1
callq 0x292c
addq $0x10, %rsp
movl %eax, 0xc(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_shift_left
bigint* bigint_shift_left(bigint *dst, const bigint *src, unsigned shift){
    unsigned n = src->size + shift / BIGINT_WORD_BITS + (shift % BIGINT_WORD_BITS != 0);
    bigint_reserve(dst, n);
    dst->size = bigint_raw_shift_left(dst->words, dst->capacity, src->words, src->size, shift);
    return bigint_set_neg(dst, src->neg);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
shrl $0x5, %esi
movl %edx, %eax
andl $0x1f, %eax
cmpl $0x1, %eax
sbbl $-0x1, %esi
addl 0xc(%r14), %esi
callq 0x1a55
movq (%rbx), %rdi
movl 0x10(%rbx), %esi
movq (%r14), %rdx
movl 0xc(%r14), %ecx
movl %ebp, %r8d
callq 0x2b1a
movl %eax, 0xc(%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_count_trailing_zeros
int bigint_count_trailing_zeros(const bigint *a){
    int i;
    for (i = 0; i < a->size; i++){
        bigint_word w = a->words[i];
        if (w) return bigint_word_count_trailing_zeros(w) + i*BIGINT_WORD_BITS;
    }
    return a->size * BIGINT_WORD_BITS;
}

// Assembly:
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x2f96
movq (%rdi), %rdx
movq %rax, %rsi
shlq $0x5, %rsi
xorl %ecx, %ecx
movl (%rdx), %edi
testl %edi, %edi
jne 0x2f9a
addq $-0x20, %rcx
addq $0x4, %rdx
movq %rsi, %rdi
addq %rcx, %rdi
jne 0x2f80
shll $0x5, %eax
retq
xorl %eax, %eax
btl %eax, %edi
jb 0x2fad
incl %eax
cmpl $0x20, %eax
jne 0x2f9c
movl $0x20, %eax
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_div_mod_half_word
bigint* bigint_div_mod_half_word(
    bigint *dst,
    bigint_word *dst_remainder,
    bigint_word denominator
){
    int i, j;
    bigint_word parts[2], div_word, mod_word, remainder = 0;

    BIGINT_ASSERT(denominator, !=, 0);
    BIGINT_ASSERT(denominator, <=, BIGINT_HALF_WORD_MAX);

    for (i = dst->size - 1; i >= 0; i--){
        bigint_word dst_word = 0;
        bigint_word src_word = dst->words[i];
        parts[1] = BIGINT_WORD_LO(src_word);
        parts[0] = BIGINT_WORD_HI(src_word);

        /* divide by denominator twice, keeping remainder in mind */
        for (j = 0; j < 2; j++){
            remainder <<= BIGINT_WORD_BITS / 2;
            remainder |= parts[j];

            div_word = remainder / denominator;
            mod_word = remainder % denominator;
            remainder = mod_word;

            dst_word <<= BIGINT_WORD_BITS / 2;
            dst_word |= div_word;
        }

        dst->words[i] = dst_word;
    }

    *dst_remainder = remainder;
    dst->size = bigint_raw_truncate(dst->words, dst->size);
    return dst;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testl %edx, %edx
je 0x32b3
movl %edx, %ecx
cmpl $0x10000, %edx          # imm = 0x10000
jae 0x32d2
movslq 0xc(%rdi), %r9
movq (%rdi), %r8
xorl %edx, %edx
testq %r9, %r9
jle 0x3287
leaq -0x1(%r9), %r10
movl -0x4(%r8,%r9,4), %eax
movzwl %ax, %r11d
shrl $0x10, %eax
movb $0x1, %bl
xorl %ebp, %ebp
shll $0x10, %edx
orl %eax, %edx
movl %edx, %eax
xorl %edx, %edx
divl %ecx
shll $0x10, %ebp
orl %eax, %ebp
movl %r11d, %eax
testb $0x1, %bl
movl $0x0, %ebx
jne 0x325d
movl %ebp, (%r8,%r10,4)
cmpq $0x1, %r9
movq %r10, %r9
jg 0x3249
movl %edx, (%rsi)
movl 0xc(%rdi), %eax
testl %eax, %eax
jle 0x32a6
movl %eax, %ecx
cmpl $0x0, -0x4(%r8,%rcx,4)
jne 0x32a6
leal -0x1(%rax), %ecx
cmpl $0x1, %eax
movl %ecx, %eax
jg 0x3290
xorl %eax, %eax
movl %eax, 0xc(%rdi)
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2222(%rip), %rdi      # 0x54dc
leaq 0x1f52(%rip), %rsi      # 0x5213
leaq 0x2229(%rip), %rcx      # 0x54f1
movl $0x366, %edx            # imm = 0x366
callq 0x1060
leaq 0x225f(%rip), %rdi      # 0x5538
leaq 0x1f33(%rip), %rsi      # 0x5213
leaq 0x220a(%rip), %rcx      # 0x54f1
movl $0x367, %edx            # imm = 0x367
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_div
bigint* bigint_div(
    bigint *dst,
    const bigint *numerator,
    const bigint *denominator
){
    bigint unused[1];
    bigint_init(unused);

    bigint_div_mod(dst, unused, numerator, denominator);

    bigint_free(unused);
    return dst;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movq %r14, %rsi
callq 0x2fb0
movq (%r14), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_mod
bigint* bigint_mod(
    bigint *dst,
    const bigint *numerator,
    const bigint *denominator
){
    bigint unused[1];
    bigint_init(unused);

    bigint_div_mod(unused, dst, numerator, denominator);

    bigint_free(unused);
    return dst;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2fb0
movq (%r14), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_sqrt
bigint* bigint_sqrt(bigint *dst, const bigint *src){
    int bit;
    bigint sum[1], tmp[1];
    const double MAX_INT_THAT_FITS_IN_DOUBLE = pow(2.0, 52.0);

    dst->neg = 0;
    dst->size = 0;

    if (src->size == 0) return dst;

    if (src->size == 1 && src->words[0] < MAX_INT_THAT_FITS_IN_DOUBLE){
        bigint_from_word(dst, sqrt(src->words[0]));
        return dst;
    }

    bigint_init(sum);
    bigint_init(tmp);

    bigint_cpy(tmp, src);
    tmp->neg = 0;

    /* index of highest 1 bit rounded down */
    bit = bigint_bitlength(src);
    if (bit & 1) bit ^= 1;

    for (; bit >= 0; bit -= 2){
        bigint_cpy(sum, dst);
        bigint_set_bit(sum, bit);

        if (bigint_cmp_abs(tmp, sum) >= 0){
            bigint_sub(tmp, tmp, sum);
            bigint_set_bit(dst, bit + 1);
        }

        bigint_shift_right(dst, dst, 1);
    }

    bigint_free(tmp);
    bigint_free(sum);
    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movl 0xc(%rsi), %eax
testl %eax, %eax
je 0x369c
movq %rsi, %r15
cmpl $0x1, %eax
jne 0x3591
movq (%r15), %rax
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
sqrtsd %xmm0, %xmm0
cvttsd2si %xmm0, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1a55
movq (%rbx), %rax
movl %r14d, (%rax)
xorl %eax, %eax
testl %r14d, %r14d
setne %al
movl %eax, 0xc(%rbx)
movl $0x0, 0x8(%rbx)
jmp 0x369c
xorl %r14d, %r14d
movl %r14d, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq %rsp, %r12
movapd %xmm0, (%r12)
movl %r14d, 0x10(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1c42
movl %r14d, 0x8(%r12)
movl 0xc(%r15), %eax
testl %eax, %eax
jle 0x35f9
movq (%r15), %rcx
decl %eax
movl (%rcx,%rax,4), %edx
movl $0x20, %ecx
leal -0x1(%rcx), %esi
movzbl %sil, %esi
btl %esi, %edx
jb 0x35e8
decl %ecx
jne 0x35d6
xorl %ecx, %ecx
shll $0x5, %eax
addl %ecx, %eax
js 0x3678
andl $-0x2, %eax
movl %eax, %r14d
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1c42
movq %r15, %rdi
movl %r14d, %esi
callq 0x1d1d
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %ecx
callq 0x1ae4
testl %eax, %eax
js 0x365b
movl 0x8(%rsp), %edx
xorl %r8d, %r8d
cmpl $0x0, 0x28(%rsp)
sete %r8b
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2a19
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x1d1d
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x2ed1
leal -0x2(%r14), %eax
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0x3601
movq (%rsp), %rdi
callq 0x1030
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_write_base
char* bigint_write_base(
    char *dst,
    int *n_dst,
    const bigint *a,
    bigint_word base,
    int zero_terminate
){
    int i = 0, n = *n_dst;
    static const char *table = "0123456789abcdefghijklmnopqrstuvwxyz";
    BIGINT_ASSERT(base, >=, 2);
    BIGINT_ASSERT(base, <=, 36);

    if (zero_terminate) if (i < n) dst[i++] = '\0';

    if (a->size == 0){
        if (i < n) dst[i++] = '0';
    }else{
        bigint tmp[1];
        bigint_init(tmp);
        bigint_cpy(tmp, a);

        while (tmp->size > 0){
            bigint_word remainder;
            /* TODO extract as many digits as fit into bigint_word at once */
            /* tricky with leading zeros */
            bigint_div_mod_half_word(tmp, &remainder, base);
            if (i < n) dst[i++] = table[remainder];
        }

        bigint_free(tmp);
    }

    if (a->neg) if (i < n) dst[i++] = '-';
    BIGINT_REVERSE(char, dst, i);
    *n_dst = i;

    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, (%rsp)
cmpl $0x1, %ecx
jbe 0x3803
movl %ecx, %ebp
cmpl $0x25, %ecx
jae 0x3822
movq %rsi, %r9
movl (%rsi), %r15d
testl %r8d, %r8d
setne %al
testl %r15d, %r15d
setg %cl
andb %al, %cl
xorl %r14d, %r14d
cmpb $0x1, %cl
jne 0x36fa
movq (%rsp), %rax
movb $0x0, (%rax)
movl $0x1, %r14d
cmpl $0x0, 0xc(%rdx)
je 0x378b
movq %r9, 0x18(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movl $0x0, 0x10(%r12)
movq %r12, %rdi
movq %rdx, 0x10(%rsp)
movq %rdx, %rsi
callq 0x1c42
cmpl $0x0, 0xc(%r12)
jle 0x3775
leaq 0x20(%rsp), %r12
leaq 0xc(%rsp), %r13
leaq 0x1e3a(%rip), %rbx      # 0x5582
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x3222
cmpl %r15d, %r14d
jge 0x376e
movl 0xc(%rsp), %eax
movb (%rax,%rbx), %al
movslq %r14d, %rcx
incl %r14d
movq (%rsp), %rdx
movb %al, (%rdx,%rcx)
cmpl $0x0, 0x2c(%rsp)
jg 0x3748
movq 0x20(%rsp), %rdi
callq 0x1030
movq 0x18(%rsp), %r9
movq 0x10(%rsp), %rdx
jmp 0x379e
cmpl %r15d, %r14d
jge 0x379e
movl %r14d, %eax
incl %r14d
movq (%rsp), %rcx
movb $0x30, (%rcx,%rax)
cmpl $0x0, 0x8(%rdx)
je 0x37b7
cmpl %r15d, %r14d
jge 0x37b7
movslq %r14d, %rax
incl %r14d
movq (%rsp), %rcx
movb $0x2d, (%rcx,%rax)
cmpl $0x2, %r14d
jl 0x37ed
movl %r14d, %eax
shrl %eax
movl %r14d, %ecx
movq (%rsp), %rsi
addq %rsi, %rcx
decq %rcx
negq %rax
xorl %edx, %edx
movb (%rsi), %dil
movb (%rcx,%rdx), %r8b
movb %r8b, (%rsi)
movb %dil, (%rcx,%rdx)
incq %rsi
decq %rdx
cmpq %rdx, %rax
jne 0x37d4
movl %r14d, (%r9)
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d9d(%rip), %rdi      # 0x55a7
leaq 0x1a02(%rip), %rsi      # 0x5213
leaq 0x1d9d(%rip), %rcx      # 0x55b5
movl $0x3de, %edx            # imm = 0x3DE
callq 0x1060
leaq 0x1dd5(%rip), %rdi      # 0x55fe
leaq 0x19e3(%rip), %rsi      # 0x5213
leaq 0x1d7e(%rip), %rcx      # 0x55b5
movl $0x3df, %edx            # imm = 0x3DF
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_rand_bits
bigint* bigint_rand_bits(bigint *dst, int n_bits, bigint_rand_func rand_func){
    int n_word_bits = n_bits % BIGINT_WORD_BITS;
    int n_words = n_bits / BIGINT_WORD_BITS + (n_word_bits != 0);

    bigint_reserve(dst, n_words);

    rand_func((uint8_t*)dst->words, sizeof(*dst->words) * n_words);

    if (n_word_bits){
        dst->words[n_words - 1] >>= BIGINT_WORD_BITS - n_word_bits;
    }

    dst->size = bigint_raw_truncate(dst->words, n_words);
    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
movslq %esi, %r12
movq %r12, %rax
shrq $0x5, %rax
xorl %r14d, %r14d
movl %r12d, %ecx
andl $0x1f, %ecx
setne %r14b
addq %rax, %r14
movl %r14d, %esi
callq 0x1a55
movq (%rbx), %rdi
leal (,%r14,4), %esi
callq *%r15
movq (%rbx), %rax
andl $0x1f, %r12d
je 0x38d3
movq %r14, %rcx
shlq $0x20, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rdx
sarq $0x1e, %rdx
movb $0x20, %cl
subb %r12b, %cl
shrl %cl, (%rax,%rdx)
testl %r14d, %r14d
jle 0x38f2
movl %r14d, %ecx
cmpl $0x0, -0x4(%rax,%rcx,4)
jne 0x38f2
leal -0x1(%r14), %ecx
cmpl $0x1, %r14d
movl %ecx, %r14d
jg 0x38d8
xorl %r14d, %r14d
movl %r14d, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_rand_inclusive
bigint* bigint_rand_inclusive(
    bigint *dst,
    const bigint *n,
    bigint_rand_func rand_func
){
    int n_bits = bigint_bitlength(n);

    do {
        bigint_rand_bits(dst, n_bits, rand_func);
    } while (bigint_cmp(dst, n) > 0);

    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0xc(%rsi), %r12d
testl %r12d, %r12d
jle 0x3948
movq (%r15), %rax
decl %r12d
movl (%rax,%r12,4), %ecx
movl $0x20, %eax
leal -0x1(%rax), %edx
movzbl %dl, %edx
btl %edx, %ecx
jb 0x393f
decl %eax
jne 0x392e
xorl %eax, %eax
shll $0x5, %r12d
addl %eax, %r12d
jmp 0x394b
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
movq %rbx, %rdx
callq 0x386c
movq (%r14), %rdi
movl 0xc(%r14), %esi
movl 0x8(%r14), %edx
movq (%r15), %rcx
movl 0xc(%r15), %r8d
movl 0x8(%r15), %r9d
callq 0x1b51
testl %eax, %eax
jg 0x394b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_rand_exclusive
bigint* bigint_rand_exclusive(
    bigint *dst,
    const bigint *n,
    bigint_rand_func rand_func
){
    int n_bits = bigint_bitlength(n);

    do {
        bigint_rand_bits(dst, n_bits, rand_func);
    } while (bigint_cmp(dst, n) >= 0);

    return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0xc(%rsi), %r12d
testl %r12d, %r12d
jle 0x39ca
movq (%r15), %rax
decl %r12d
movl (%rax,%r12,4), %ecx
movl $0x20, %eax
leal -0x1(%rax), %edx
movzbl %dl, %edx
btl %edx, %ecx
jb 0x39c1
decl %eax
jne 0x39b0
xorl %eax, %eax
shll $0x5, %r12d
addl %eax, %r12d
jmp 0x39cd
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
movq %rbx, %rdx
callq 0x386c
movq (%r14), %rdi
movl 0xc(%r14), %esi
movl 0x8(%r14), %edx
movq (%r15), %rcx
movl 0xc(%r15), %r8d
movl 0x8(%r15), %r9d
callq 0x1b51
testl %eax, %eax
jns 0x39cd
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_pow_mod
bigint* bigint_pow_mod(
    bigint *dst,
    const bigint *src_base,
    const bigint *src_exponent,
    const bigint *src_modulus
){
    bigint base[1], exponent[1], tmp[1], unused[1], modulus[1];

    bigint_init(base);
    bigint_init(exponent);
    bigint_init(tmp);
    bigint_init(unused);
    bigint_init(modulus);

    bigint_cpy(exponent, src_exponent);
    bigint_cpy(modulus, src_modulus);
    bigint_div_mod(unused, base, src_base, modulus);
    bigint_from_word(dst, 1);

    for (; exponent->size; bigint_shift_right(exponent, exponent, 1)){
        if (bigint_get_bit(exponent, 0)){
            bigint_mul(tmp, dst, base);
            bigint_div_mod(unused, dst, tmp, modulus);
        }
        bigint_mul(tmp, base, base);
        bigint_div_mod(unused, base, tmp, modulus);
    }

    bigint_free(base);
    bigint_free(exponent);
    bigint_free(tmp);
    bigint_free(unused);
    bigint_free(modulus);
    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %r12
movq %rsi, 0x38(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r13
movaps %xmm0, (%r13)
xorl %eax, %eax
movl %eax, 0x10(%r13)
movq %rsp, %r14
movaps %xmm0, (%r14)
movl %eax, 0x10(%r14)
movaps %xmm0, 0x20(%rsp)
movl %eax, 0x30(%rsp)
leaq 0x40(%rsp), %rbp
movaps %xmm0, (%rbp)
movl %eax, 0x10(%rbp)
leaq 0x80(%rsp), %r15
movaps %xmm0, (%r15)
movl %eax, 0x10(%r15)
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1c42
movq %r15, %rdi
movq %r12, %rsi
callq 0x1c42
movq %rbp, %rdi
movq %r13, %rsi
movq 0x38(%rsp), %rdx
movq %r15, %rcx
callq 0x2fb0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1a55
movq (%rbx), %rax
movl $0x1, (%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rbx)
movl 0xc(%r14), %eax
testl %eax, %eax
je 0x3b3a
leaq 0x20(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x80(%rsp), %r13
movq %rsp, %rbp
testl %eax, %eax
jle 0x3b03
movq (%rsp), %rax
testb $0x1, (%rax)
je 0x3b03
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2647
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x2fb0
movq %r14, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x2647
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x2fb0
movq %rbp, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x2ed1
movl 0xc(%rsp), %eax
testl %eax, %eax
jne 0x3ad7
movq 0x60(%rsp), %rdi
callq 0x1030
xorl %ebp, %ebp
movl %ebp, 0x70(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq (%rsp), %rdi
callq 0x1030
movl %ebp, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x1030
movl %ebp, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rdi
callq 0x1030
movl %ebp, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_pow_word
bigint* bigint_pow_word(bigint *dst, const bigint *base, bigint_word exponent){
    bigint result[1], p[1];

    bigint_init(p);
    bigint_init(result);

    bigint_cpy(p, base);
    bigint_from_word(result, 1);

    for (; exponent; exponent >>= 1){
        if (exponent & 1){
            bigint_mul(result, result, p);
            exponent--;
        }
        bigint_mul(p, p, p);
    }

    bigint_cpy(dst, result);
    bigint_free(p);
    bigint_free(result);
    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, %rbx
xorl %eax, %eax
movq %rsp, %rdi
movl %eax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
movl %eax, 0x10(%r14)
callq 0x1c42
movq %r14, %rdi
movl $0x1, %esi
callq 0x1a55
movq (%r14), %rax
movl $0x1, (%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%r14)
testl %ebp, %ebp
je 0x3f77
movq %rsp, %r14
leaq 0x20(%rsp), %r15
testb $0x1, %bpl
je 0x3f5e
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2647
decl %ebp
movq %r14, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2647
movl %ebp, %eax
shrl %eax
cmpl $0x1, %ebp
movl %eax, %ebp
ja 0x3f48
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c42
movq (%rsp), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq (%r14), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_raw_get_high_bits
void bigint_raw_get_high_bits(
    bigint_word *dst, int n_dst,
    const bigint_word *src_a, int na,
    int n_bits,
    int *n_bitlength
){
    int shift;
    *n_bitlength = bigint_raw_bitlength(src_a, na);
    shift = n_bits - *n_bitlength + 1;

    if (shift < 0) bigint_raw_shift_right(dst, n_dst, src_a, na, -shift);
    else           bigint_raw_shift_left (dst, n_dst, src_a, na, +shift);
}

// Assembly:
pushq %rbx
testl %ecx, %ecx
jle 0x3fe4
leal -0x1(%rcx), %eax
movl (%rdx,%rax,4), %r11d
movl $0x20, %r10d
leal -0x1(%r10), %ebx
movzbl %bl, %ebx
btl %ebx, %r11d
jb 0x3fdc
decl %r10d
jne 0x3fc7
xorl %r10d, %r10d
shll $0x5, %eax
addl %r10d, %eax
jmp 0x3fe6
xorl %eax, %eax
movl %eax, (%r9)
subl %eax, %r8d
cmpl $-0x2, %r8d
jg 0x3ffb
notl %r8d
popq %rbx
jmp 0x2d05
incl %r8d
popq %rbx
jmp 0x2b1a
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/bigint.c
// Function: bigint_double
double bigint_double(const bigint *src){
    /* assumes IEEE 754 floating point standard */
    int n, n_mant_bits = 52;
    uint64_t x = 0, exponent = 1023;
    double d;
    bigint_word tmp[20];

    if (src->size == 0) return 0.0;

    bigint_raw_get_high_bits(tmp, 20, src->words, src->size, n_mant_bits, &n);
    /* this bit is stored implicitely */
    bigint_raw_clr_bit(tmp, n_mant_bits);
    exponent--;
    exponent += n;
    memcpy(&x, tmp, sizeof(x));
    x |= exponent << n_mant_bits;

    memcpy(&d, &x, sizeof(d));
    return src->neg ? -d : d;
}

// Assembly:
movl 0xc(%rdi), %ecx
testl %ecx, %ecx
je 0x4073
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq (%rdi), %rdx
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl $0x14, %esi
movl $0x34, %r8d
movq %r15, %r9
callq 0x3fb5
andb $-0x11, 0x6(%r14)
movl (%r15), %eax
shlq $0x34, %rax
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
addq %rax, %rcx
orq (%r14), %rcx
movq %rcx, %xmm0
cmpl $0x0, 0x8(%rbx)
je 0x4069
pxor 0x1187(%rip), %xmm0     # 0x51f0
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSCircularBuffer.c
// Function: eaDSCircularBufferAdd
int eaDSCircularBufferAdd(eaDSCircularBuffer circularBuffer, const void * data, size_t len)
{
	if (circularBuffer->Stop)
	{
		return EXIT_FAILURE;
	}

	if (circularBuffer->Tail >= circularBuffer->Head)
	{
		if (len <= (circularBuffer->Capacity - circularBuffer->Tail))
		{
			circularBuffer->dataCopy((char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Tail, data, circularBuffer->SizeOfData * len);
			circularBuffer->Tail += len;

			if (circularBuffer->Tail == circularBuffer->Capacity)
			{
				circularBuffer->Tail = 0;
			}
		}
		else
		{
			if (len > (circularBuffer->Head + circularBuffer->Capacity - circularBuffer->Tail))
			{
				return EXIT_FAILURE;
			}
			else
			{
				circularBuffer->dataCopy((char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Tail, data, circularBuffer->SizeOfData * (circularBuffer->Capacity - circularBuffer->Tail));
				circularBuffer->dataCopy(circularBuffer->Data, (char *)data + circularBuffer->SizeOfData * (circularBuffer->Capacity - circularBuffer->Tail), circularBuffer->SizeOfData * (len - circularBuffer->Capacity + circularBuffer->Tail));
				circularBuffer->Tail = len - circularBuffer->Capacity + circularBuffer->Tail;
			}
		}
	}
	else
	{
		if (len > (circularBuffer->Head - circularBuffer->Tail))
		{
			return EXIT_FAILURE;
		}
		else
		{
			circularBuffer->dataCopy((char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Tail, data, circularBuffer->SizeOfData * len);
			circularBuffer->Tail += len;
		}
	}

	if (circularBuffer->Head == circularBuffer->Tail)
	{
		circularBuffer->Stop = 1;
	}

	return EXIT_SUCCESS;
}

// Assembly:
movl $0x1, %eax
cmpl $0x0, 0x20(%rdi)
je 0x1320
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
subq %rdi, %rcx
jbe 0x135b
cmpq %r14, %rcx
jb 0x13f7
movq 0x28(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
imulq %r14, %rdx
movq %r15, %rsi
callq *0x38(%rbx)
jmp 0x13b8
movq 0x18(%rbx), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
cmpq %r14, %rdx
jae 0x13c1
addq %rsi, %rcx
cmpq %r14, %rcx
jb 0x13f7
movq 0x28(%rbx), %rax
imulq %rax, %rdi
addq (%rbx), %rdi
imulq %rax, %rdx
movq %r15, %rsi
callq *0x38(%rbx)
movq 0x28(%rbx), %rax
movq 0x18(%rbx), %rsi
movq (%rbx), %rdi
movq 0x10(%rbx), %rcx
movq %r14, %rdx
subq %rsi, %rdx
subq %rcx, %rsi
imulq %rax, %rsi
addq %r15, %rsi
addq %rcx, %rdx
imulq %rax, %rdx
callq *0x38(%rbx)
subq 0x18(%rbx), %r14
addq 0x10(%rbx), %r14
movq %r14, %rcx
jmp 0x13e4
movq 0x28(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
imulq %r14, %rdx
movq %r15, %rsi
callq *0x38(%rbx)
addq 0x10(%rbx), %r14
xorl %ecx, %ecx
cmpq 0x18(%rbx), %r14
cmovneq %r14, %rcx
movq %rcx, 0x10(%rbx)
xorl %eax, %eax
cmpq %rcx, 0x8(%rbx)
jne 0x13f7
movl $0x1, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSCircularBuffer.c
// Function: eaDSCircularBufferGet
int eaDSCircularBufferGet(eaDSCircularBuffer circularBuffer, void * data, size_t numberOfData)
{
	if (numberOfData > circularBuffer->Capacity)
	{
		return EXIT_FAILURE;
	}

	if (circularBuffer->Tail < circularBuffer->Head)
	{
		if (numberOfData <= (circularBuffer->Capacity - circularBuffer->Head))
		{
			circularBuffer->dataCopy(data, (char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Head, circularBuffer->SizeOfData * numberOfData);
			circularBuffer->Head += numberOfData;

			if (circularBuffer->Head == circularBuffer->Capacity)
			{
				circularBuffer->Head = 0;
			}
		}
		else
		{
			if (numberOfData > (circularBuffer->Tail + circularBuffer->Capacity - circularBuffer->Head))
			{
				return EXIT_FAILURE;
			}
			else
			{
				circularBuffer->dataCopy(data, (char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Head, circularBuffer->SizeOfData * (circularBuffer->Capacity - circularBuffer->Head));
				circularBuffer->dataCopy((char *)data + circularBuffer->SizeOfData * (circularBuffer->Capacity - circularBuffer->Head),circularBuffer->Data, circularBuffer->SizeOfData * (numberOfData - circularBuffer->Capacity + circularBuffer->Head));
				circularBuffer->Head = numberOfData - circularBuffer->Capacity + circularBuffer->Head;
			}
		}
	}
	else
	{
		if (numberOfData > (circularBuffer->Tail - circularBuffer->Head))
		{
			return EXIT_FAILURE;
		}
		else
		{
			circularBuffer->dataCopy(data, (char *)circularBuffer->Data + circularBuffer->SizeOfData * circularBuffer->Head, circularBuffer->SizeOfData * numberOfData);
			circularBuffer->Head += numberOfData;
		}
	}

	return EXIT_SUCCESS;
}

// Assembly:
movq 0x18(%rdi), %rcx
movl $0x1, %eax
cmpq %rdx, %rcx
jb 0x14dc
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
movq %rdi, %rdx
subq %rsi, %rdx
jae 0x148b
movq %rcx, %rdx
subq %rsi, %rdx
cmpq %r14, %rdx
jae 0x14ae
addq %rcx, %rdi
subq %rsi, %rdi
cmpq %r14, %rdi
jb 0x14d7
movq 0x28(%rbx), %rax
imulq %rax, %rsi
addq (%rbx), %rsi
imulq %rax, %rdx
movq %r15, %rdi
callq *0x38(%rbx)
movq 0x28(%rbx), %rax
movq 0x18(%rbx), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r14, %rdx
subq %rdi, %rdx
subq %rcx, %rdi
imulq %rax, %rdi
addq %r15, %rdi
addq %rcx, %rdx
imulq %rax, %rdx
callq *0x38(%rbx)
subq 0x18(%rbx), %r14
jmp 0x14a5
cmpq %r14, %rdx
jb 0x14d7
movq 0x28(%rbx), %rdx
imulq %rdx, %rsi
addq (%rbx), %rsi
imulq %r14, %rdx
movq %r15, %rdi
callq *0x38(%rbx)
addq 0x8(%rbx), %r14
movq %r14, %rax
jmp 0x14d1
movq 0x28(%rbx), %rdx
imulq %rdx, %rsi
addq (%rbx), %rsi
imulq %r14, %rdx
movq %r15, %rdi
callq *0x38(%rbx)
addq 0x8(%rbx), %r14
xorl %eax, %eax
cmpq 0x18(%rbx), %r14
cmovneq %r14, %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSCircularBuffer.c
// Function: eaDSCircularBufferGetWhereIsIt
int eaDSCircularBufferGetWhereIsIt(const eaDSCircularBuffer circularBuffer, const void * data, size_t numberOfData, size_t * len)
{
	size_t i;

	if (circularBuffer->Head <= circularBuffer->Tail)
	{
		for (i = circularBuffer->Head; i < circularBuffer->Tail; ++i)
		{
			if (circularBuffer->dataCompare((char *)circularBuffer->Data + i, data, circularBuffer->SizeOfData * numberOfData) == 0)
			{
				*len = i - circularBuffer->Head;

				return EXIT_SUCCESS;
			}
		}
	}
	else
	{
		for (i = circularBuffer->Head; i < circularBuffer->Capacity; ++i)
		{
			if (circularBuffer->dataCompare((char *)circularBuffer->Data + i, data, circularBuffer->SizeOfData * numberOfData) == 0)
			{
				*len = i - circularBuffer->Head;

				return EXIT_SUCCESS;
			}
		}

		for (i = 0; i < circularBuffer->Tail; ++i)
		{
			if (circularBuffer->dataCompare((char *)circularBuffer->Data + i, data, circularBuffer->SizeOfData * numberOfData) == 0)
			{
				*len = i + circularBuffer->Capacity - circularBuffer->Head;

				return EXIT_SUCCESS;
			}
		}
	}

	return EXIT_FAILURE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %r13
movq 0x10(%rdi), %rax
cmpq %rax, %r13
jbe 0x155e
cmpq 0x18(%r14), %r13
jae 0x152d
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x158d
incq %r13
cmpq 0x18(%r14), %r13
jb 0x1507
movq 0x10(%r14), %rax
movl $0x1, %ebp
testq %rax, %rax
je 0x1596
xorl %r13d, %r13d
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x1589
incq %r13
cmpq 0x10(%r14), %r13
jb 0x153a
jmp 0x1596
movl $0x1, %ebp
jae 0x1596
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x158d
incq %r13
cmpq 0x10(%r14), %r13
jb 0x1565
jmp 0x1596
addq 0x18(%r14), %r13
subq 0x8(%r14), %r13
movq %r13, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayInitWithDetails
int eaDSDynamicArrayInitWithDetails(eaDSDynamicArray * dynamicArray, void * (*dataCreateAndCopy)(const void *), int (*dataCompare)(const void *, const void *), void (*dataClear)(void *), unsigned short expFactor, unsigned short startingCapacity)
{
	if (startingCapacity == 0)
		startingCapacity = DEFAULT_STARTING_CAPACITY;

	dynamicArray->Data = (void **) malloc(startingCapacity * sizeof(void *));

	if (NULL == dynamicArray->Data)
	{
		perror(NULL);
		return EXIT_FAILURE;
	}

	dynamicArray->Count = 0;
	dynamicArray->Capacity = startingCapacity;
	dynamicArray->StartingCapacity = startingCapacity;
	dynamicArray->ExpFactor = (expFactor < 2) ? DEFAULT_EXP_FACTOR : expFactor;
	dynamicArray->dataCreateAndCopy = (NULL == dataCreateAndCopy) ? copyAddress : dataCreateAndCopy;
	dynamicArray->dataCompare = (NULL == dataCompare) ? compareAddress : dataCompare;
	dynamicArray->dataClear = (NULL == dataClear) ? free : dataClear;

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testl %r9d, %r9d
movl $0x4, %r13d
cmovnel %r9d, %r13d
leal (,%r13,8), %edi
callq 0x1090
movq %rax, (%r14)
testq %rax, %rax
je 0x16bd
movq $0x0, 0x8(%r14)
movq %r13, 0x10(%r14)
movw %r13w, 0x1a(%r14)
cmpw $0x3, %bp
movl $0x2, %eax
cmovael %ebp, %eax
movw %ax, 0x18(%r14)
movq %r12, %xmm0
movq %r15, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm1, %xmm0
pshufd $0xb1, %xmm0, %xmm2     # xmm2 = xmm0[1,0,3,2]
pand %xmm0, %xmm2
leaq 0x5a(%rip), %rax        # 0x16cf
movq %rax, %xmm0
leaq 0x4a(%rip), %rax        # 0x16cb
movq %rax, %xmm3
punpcklqdq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0]
pand %xmm2, %xmm3
pandn %xmm1, %xmm2
por %xmm3, %xmm2
movdqu %xmm2, 0x20(%r14)
testq %rbx, %rbx
jne 0x16a8
movq 0x4928(%rip), %rbx      # 0x5fd0
movq %rbx, 0x30(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
movl $0x1, %eax
jmp 0x16ae
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayReset
int eaDSDynamicArrayReset(eaDSDynamicArray * dynamicArray)
{
	if (NULL == dynamicArray->Data)
	{
		dynamicArray->Data = (void **) malloc(dynamicArray->Capacity * sizeof(void *));

		if (NULL == dynamicArray->Data)
		{
			perror(NULL);

			return EXIT_FAILURE;
		}
	}
	else
	{
		while (dynamicArray->Count)
		{
			dynamicArray->dataClear(dynamicArray->Data[--dynamicArray->Count]);
		}

		if (dynamicArray->StartingCapacity < dynamicArray->Capacity)
		{
			free(dynamicArray->Data);
			dynamicArray->Data = (void **) malloc(dynamicArray->StartingCapacity * sizeof(void *));

			if (NULL == dynamicArray->Data)
			{
				perror(NULL);

				return EXIT_FAILURE;
			}

			dynamicArray->Capacity = dynamicArray->StartingCapacity;
		}
	}

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1737
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1703
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
jmp 0x16e5
movzwl 0x1a(%rbx), %eax
xorl %ebp, %ebp
cmpq %rax, 0x10(%rbx)
jbe 0x174e
movq (%rbx), %rdi
callq 0x10e0
movzwl 0x1a(%rbx), %r14d
leal (,%r14,8), %edi
callq 0x1090
movq %rax, (%rbx)
testq %rax, %rax
je 0x1755
movq %r14, 0x10(%rbx)
jmp 0x174e
movq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x1090
movq %rax, (%rbx)
xorl %ebp, %ebp
testq %rax, %rax
je 0x1755
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
movl $0x1, %ebp
jmp 0x174e
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayClear
void eaDSDynamicArrayClear(eaDSDynamicArray * dynamicArray)
{
	if (NULL != dynamicArray->Data)
	{
		while (dynamicArray->Count)
		{
			dynamicArray->dataClear(dynamicArray->Data[--dynamicArray->Count]);
		}

		free(dynamicArray->Data);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x179d
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1797
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x1778
movq (%rbx), %rdi
popq %rbx
jmp 0x10e0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArraySort
void eaDSDynamicArraySort(eaDSDynamicArray * dynamicArray)
{
	void * buf;
	size_t i, j, N = dynamicArray->Count;

	for (i = 1; i < N; i++)
	{
		for (j = i; (0 < j) && (dynamicArray->dataCompare(dynamicArray->Data[j - 1], dynamicArray->Data[j]) > 0); j--)
		{
			buf = dynamicArray->Data[j];
			dynamicArray->Data[j] = dynamicArray->Data[j - 1];
			dynamicArray->Data[j - 1] = buf;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r14
cmpq $0x2, %r14
jb 0x17fd
movq %rdi, %rbx
movl $0x1, %r15d
xorl %r12d, %r12d
movq %r12, %r13
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
movq 0x8(%rax,%r13,8), %rsi
callq *0x28(%rbx)
testl %eax, %eax
jle 0x17f2
movq (%rbx), %rax
movq (%rax,%r13,8), %rcx
movq 0x8(%rax,%r13,8), %rdx
movq %rcx, 0x8(%rax,%r13,8)
movq (%rbx), %rax
movq %rdx, (%rax,%r13,8)
addq $-0x1, %r13
jb 0x17c1
incq %r15
incq %r12
cmpq %r14, %r15
jne 0x17be
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq