LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_raw_add_word
int bigint_raw_add_word(
    bigint_word *dst,
    const bigint_word *src, int n,
    bigint_word b
){
    int i;
    bigint_word carry = b;

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

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

    return bigint_raw_truncate(dst, i);
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x1ed9
xorl %r8d, %r8d
addl (%rsi,%rax,4), %ecx
setb %r8b
movl %ecx, (%rdi,%rax,4)
incq %rax
movl %r8d, %ecx
jmp 0x1eb2
xorl %eax, %eax
addl %ecx, (%rdi,%rdx,4)
setb %al
incq %rdx
movl %eax, %ecx
testl %ecx, %ecx
jne 0x1ecc
movl %edx, %esi
jmp 0x1c0c
// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_raw_from_str_base
int bigint_raw_from_str_base(bigint_word *dst, const char *src, int base){
    int n = 0;

    for (; *src; src++){
        bigint_word digit = bigint_word_from_char(*src);

        if (digit == BIGINT_WORD_MAX) continue;

        n = bigint_raw_mul_word(dst, dst, n, base);
        n = bigint_raw_add_word(dst, dst, n, digit);
    }

    return bigint_raw_truncate(dst, n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
xorl %ebp, %ebp
movb (%r15), %al
testb %al, %al
je 0x1f33
movsbl %al, %edi
callq 0x1910
cmpl $-0x1, %eax
je 0x1f2e
movl %eax, %r12d
movq %r14, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x1d62
movq %r14, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %r12d, %ecx
callq 0x1eab
movl %eax, %ebp
incq %r15
jmp 0x1ef6
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1c0c
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %rbx
movq %rsi, %rax
cmpl %r8d, %edx
movl %r8d, %esi
cmovll %edx, %esi
xorl %r10d, %r10d
testl %esi, %esi
cmovlel %r10d, %esi
xorl %r9d, %r9d
cmpq %r10, %rsi
je 0x1fb9
movl (%rax,%r10,4), %r11d
leal (%r9,%r11), %ebx
xorl %ebp, %ebp
addl (%rcx,%r10,4), %ebx
setb %bpl
addl %r11d, %r9d
adcl $0x0, %ebp
movl %ebx, (%rdi,%r10,4)
incq %r10
movl %ebp, %r9d
jmp 0x1f90
movslq %edx, %rdx
cmpq %rdx, %rsi
jge 0x1fd8
xorl %r10d, %r10d
addl (%rax,%rsi,4), %r9d
setb %r10b
movl %r9d, (%rdi,%rsi,4)
incq %rsi
movl %r10d, %r9d
jmp 0x1fbc
movslq %r8d, %rax
cmpq %rax, %rsi
jge 0x1ff5
xorl %edx, %edx
addl (%rcx,%rsi,4), %r9d
setb %dl
movl %r9d, (%rdi,%rsi,4)
incq %rsi
movl %edx, %r9d
jmp 0x1fdb
testl %r9d, %r9d
je 0x2002
movl %esi, %eax
incl %esi
movl %r9d, (%rdi,%rax,4)
popq %rbx
popq %rbp
jmp 0x1c0c
// File: /workspace/github_c_makefile_star2_O2/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 0x20a5
movl %r8d, %ebx
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
movq %rcx, %rdx
movl %r8d, %ecx
callq 0x1a3e
testl %eax, %eax
js 0x20c4
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
xorl %eax, %eax
cmpq %rcx, %rbx
je 0x2070
movl (%r15,%rcx,4), %edx
movl %edx, %esi
subl %eax, %esi
xorl %edi, %edi
subl (%r12,%rcx,4), %esi
setb %dil
cmpl %eax, %edx
adcl $0x0, %edi
movl %esi, (%r14,%rcx,4)
incq %rcx
movl %edi, %eax
jmp 0x2049
movslq %ebp, %rcx
cmpq %rcx, %rbx
jge 0x208f
movl (%r15,%rbx,4), %edx
xorl %esi, %esi
subl %eax, %edx
setb %sil
movl %edx, (%r14,%rbx,4)
incq %rbx
movl %esi, %eax
jmp 0x2073
testl %eax, %eax
jne 0x20e3
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1c0c
leaq 0x22bb(%rip), %rdi      # 0x4367
leaq 0x2150(%rip), %rsi      # 0x4203
leaq 0x22ba(%rip), %rcx      # 0x4374
movl $0x18a, %edx            # imm = 0x18A
callq 0x1060
leaq 0x22ff(%rip), %rdi      # 0x43ca
leaq 0x2131(%rip), %rsi      # 0x4203
leaq 0x229b(%rip), %rcx      # 0x4374
movl $0x18b, %edx            # imm = 0x18B
callq 0x1060
leaq 0x2312(%rip), %rdi      # 0x43fc
leaq 0x2112(%rip), %rsi      # 0x4203
leaq 0x227c(%rip), %rcx      # 0x4374
movl $0x197, %edx            # imm = 0x197
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/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 0x19b2
cmpq %r14, %rbx
je 0x2440
cmpq %r15, %rbx
sete %al
cmpl $0x14, %r13d
setge %cl
cmpl $0x14, %r12d
setge %dl
orb %cl, %dl
orb %al, %dl
jne 0x2440
testl %ebp, %ebp
jle 0x2427
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 0x1ddc
movl %eax, 0xc(%rbx)
jmp 0x24ad
cmpl %r12d, %r13d
movl %r12d, %eax
cmovgl %r13d, %eax
imull $0xb, %eax, %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 0x2102
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_O2/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 %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1f45
cvtsi2sd %ebp, %xmm0
movsd 0x1c76(%rip), %xmm1     # 0x41d0
movl %eax, %edi
callq 0x24ca
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x19b2
movl %r15d, 0xc(%rbx)
testl %r15d, %r15d
jle 0x2588
movq (%rbx), %rdi
movl %r15d, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1ee4
movl %eax, 0xc(%rbx)
xorl %eax, %eax
cmpb $0x2d, (%r14)
sete %al
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_from_int
bigint* bigint_from_int(bigint *dst, int src){
    unsigned int x = BIGINT_INT_ABS(src);
    int n = BIGINT_MAX(1, sizeof(x)/sizeof(bigint_word));
    bigint_reserve(dst, n);
    bigint_raw_zero(dst->words, 0, n);
    memcpy(dst->words, &x, sizeof(x));
    dst->size = bigint_raw_truncate(dst->words, n);
    return bigint_set_neg(dst, src < 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
negl %r15d
cmovsl %esi, %r15d
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x19b2
movq (%r14), %rax
andl $0x0, (%rax)
movq (%r14), %rax
movl %r15d, (%rax)
movq (%r14), %rdi
movl %ebp, %esi
callq 0x1c0c
movl %eax, 0xc(%r14)
shrl $0x1f, %ebx
movl %ebx, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_from_word
bigint* bigint_from_word(bigint *dst, bigint_word a){
    bigint_reserve(dst, 1);
    dst->words[0] = a;
    dst->size = bigint_raw_truncate(dst->words, 1);
    return bigint_set_neg(dst, 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x19b2
movq (%r14), %rdi
movl %ebx, (%rdi)
movl %ebp, %esi
callq 0x1c0c
movl %eax, 0xc(%r14)
andl $0x0, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x266d
testl %eax, %eax
je 0x268b
movl $0x1, (%r13)
jmp 0x26bb
testl %eax, %eax
je 0x26b6
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1a3e
testl %eax, %eax
js 0x26ed
andl $0x0, (%r13)
jmp 0x26a6
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1a3e
testl %eax, %eax
js 0x26f7
movl $0x1, (%r13)
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %edx
movq %r14, %rcx
movl %ebp, %r8d
jmp 0x270a
andl $0x0, (%r13)
movq %r12, %rdi
cmpl %ebp, %ebx
jge 0x26cf
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movl %ebx, %r8d
jmp 0x26da
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 0x1f76
movl $0x1, (%r13)
jmp 0x26fc
andl $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 0x2009
// File: /workspace/github_c_makefile_star2_O2/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 0x19b2
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 0x2639
popq %rcx
popq %rdx
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_O2/983[P]bigint/bigint.c
// Function: bigint_raw_shift_right
int bigint_raw_shift_right(
    bigint_word *dst, int n_dst,
    const bigint_word *src, int n_src,
    int shift
){
    int i;
    int word_shift = shift / BIGINT_WORD_BITS;
    int bits_shift = shift % BIGINT_WORD_BITS;

    if (bits_shift){
        bigint_word hi, lo = src[word_shift];

        for (i = 0; i < n_src - word_shift - 1; i++){
            hi = src[i + word_shift + 1];
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = (hi << (BIGINT_WORD_BITS - bits_shift)) | (lo >> bits_shift);
            lo = hi;
        }

        BIGINT_ASSERT(i, <, n_dst);
        dst[i++] = lo >> bits_shift;

        BIGINT_ASSERT(i, <=, n_dst);
        return bigint_raw_truncate(dst, i);
    }else{
        /* this case is not only separate because of performance */
        /* but (hi << (BIGINT_WORD_BITS - 0)) is also undefined behaviour */
        for (i = 0; i < n_src - word_shift; i++){
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = src[i + word_shift];
        }

        BIGINT_ASSERT(i, <=, n_dst);
        return bigint_raw_truncate(dst, i);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %r8d, %r9d
sarl $0x5, %r9d
movl %r8d, %eax
andl $0x1f, %eax
je 0x2a1b
movslq %r9d, %r9
leaq (%rdx,%r9,4), %r10
addq $0x4, %r10
movl -0x4(%r10), %edx
notl %r9d
addl %ecx, %r9d
xorl %r11d, %r11d
testl %r9d, %r9d
cmovlel %r11d, %r9d
testl %esi, %esi
movl $0x0, %ebx
cmovgl %esi, %ebx
cmpq %r11, %r9
je 0x2a04
cmpq %r11, %rbx
je 0x2a60
movl (%r10,%r11,4), %ebp
movl %r8d, %ecx
shrdl %cl, %ebp, %edx
movl %edx, (%rdi,%r11,4)
incq %r11
movl %ebp, %edx
jmp 0x29e5
cmpl %esi, %r9d
jge 0x2a9e
movl %eax, %ecx
shrl %cl, %edx
movl %edx, (%rdi,%r9,4)
leal 0x1(%r9), %ecx
jmp 0x2a53
subl %r9d, %ecx
movslq %r9d, %r9
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
testl %esi, %esi
movl $0x0, %r8d
cmovgl %esi, %r8d
leaq (%rdx,%r9,4), %rdx
cmpq %rax, %rcx
je 0x2a4f
cmpq %rax, %r8
je 0x2a7f
movl (%rdx,%rax,4), %r9d
movl %r9d, (%rdi,%rax,4)
incq %rax
jmp 0x2a38
cmpl %esi, %ecx
jg 0x2abd
movl %ecx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1c0c
leaq 0x19fa(%rip), %rdi      # 0x4461
leaq 0x1795(%rip), %rsi      # 0x4203
leaq 0x1a09(%rip), %rcx      # 0x447e
movl $0x2c9, %edx            # imm = 0x2C9
callq 0x1060
leaq 0x19db(%rip), %rdi      # 0x4461
leaq 0x1776(%rip), %rsi      # 0x4203
leaq 0x19ea(%rip), %rcx      # 0x447e
movl $0x2d7, %edx            # imm = 0x2D7
callq 0x1060
leaq 0x19bc(%rip), %rdi      # 0x4461
leaq 0x1757(%rip), %rsi      # 0x4203
leaq 0x19cb(%rip), %rcx      # 0x447e
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x1060
leaq 0x19ab(%rip), %rdi      # 0x446f
leaq 0x1738(%rip), %rsi      # 0x4203
leaq 0x19ac(%rip), %rcx      # 0x447e
movl $0x2db, %edx            # imm = 0x2DB
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/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 0x19b2
movq (%rbx), %rdi
movl 0x10(%rbx), %esi
movq (%r14), %rdx
movl 0xc(%r14), %ecx
movl %ebp, %r8d
callq 0x2818
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_O2/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:
pushq %rbx
movl 0xc(%rdi), %eax
xorl %ebx, %ebx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x2bbd
movq (%rdi), %rcx
movl (%rcx,%rsi,4), %ecx
testl %ecx, %ecx
jne 0x2bc2
incq %rsi
addl $-0x20, %ebx
jmp 0x2ba6
shll $0x5, %eax
jmp 0x2bcb
movl %ecx, %edi
callq 0x1942
subl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
testl %edx, %edx
je 0x2db9
movl %edx, %ecx
cmpl $0x10000, %edx          # imm = 0x10000
jae 0x2dd8
movq %rdi, %rbx
movl 0xc(%rdi), %edi
xorl %eax, %eax
testl %edi, %edi
jle 0x2da0
decq %rdi
movq (%rbx), %r8
movl (%r8,%rdi,4), %edx
movzwl %dx, %r9d
movl %r9d, 0xc(%rsp)
shrl $0x10, %edx
movl %edx, 0x8(%rsp)
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq $0x2, %r9
je 0x2d9a
shll $0x10, %eax
orl 0x8(%rsp,%r9,4), %eax
xorl %edx, %edx
divl %ecx
shll $0x10, %r10d
orl %eax, %r10d
incq %r9
movl %edx, %eax
jmp 0x2d7a
movl %r10d, (%r8,%rdi,4)
jmp 0x2d56
movl %eax, (%rsi)
movq (%rbx), %rdi
movl 0xc(%rbx), %esi
callq 0x1c0c
movl %eax, 0xc(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x170c(%rip), %rdi      # 0x44cc
leaq 0x143c(%rip), %rsi      # 0x4203
leaq 0x1713(%rip), %rcx      # 0x44e1
movl $0x366, %edx            # imm = 0x366
callq 0x1060
leaq 0x1749(%rip), %rdi      # 0x4528
leaq 0x141d(%rip), %rsi      # 0x4203
leaq 0x16f4(%rip), %rcx      # 0x44e1
movl $0x367, %edx            # imm = 0x367
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/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)
andl $0x0, 0x10(%r14)
movq %r14, %rsi
callq 0x2bcd
movq %r14, %rdi
callq 0x1a26
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_gcd
bigint* bigint_gcd(bigint *dst, const bigint *src_a, const bigint *src_b){
    int shift, shift_a, shift_b;
    bigint a[1], b[1];

    if (src_a->size == 0) return bigint_set_neg(bigint_cpy(dst, src_b), 0);
    if (src_b->size == 0) return bigint_set_neg(bigint_cpy(dst, src_a), 0);

    if (src_a->size == 1 && src_b->size == 1){
        bigint_word word = bigint_word_gcd(src_a->words[0], src_b->words[0]);
        return bigint_from_word(dst, word);
    }

    bigint_init(a);
    bigint_init(b);

    shift_a = bigint_count_trailing_zeros(src_a);
    shift_b = bigint_count_trailing_zeros(src_b);
    shift = BIGINT_MIN(shift_a, shift_b);

    bigint_shift_right(a, src_a, shift_a);
    bigint_shift_right(b, src_b, shift);
    a->neg = 0;
    b->neg = 0;

    do {
        bigint_shift_right(b, b, bigint_count_trailing_zeros(b));

        if (bigint_cmp_abs(a, b) > 0) BIGINT_SWAP(bigint, *a, *b);

        bigint_sub(b, b, a);
    } while (b->size != 0);

    bigint_shift_left(dst, a, shift);

    bigint_free(a);
    bigint_free(b);
    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rdi, %rbx
movl 0xc(%rsi), %eax
testl %eax, %eax
je 0x2ebf
movq %rsi, %r13
movl 0xc(%r12), %ecx
testl %ecx, %ecx
je 0x2ec7
xorl $0x1, %eax
xorl $0x1, %ecx
orl %eax, %ecx
jne 0x2edb
movq (%r13), %rax
movl (%rax), %edi
movq (%r12), %rax
movl (%rax), %esi
callq 0x1953
movq %rbx, %rdi
movl %eax, %esi
callq 0x2609
jmp 0x2fb6
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x2ecd
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1b99
andl $0x0, 0x8(%rbx)
jmp 0x2fb6
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
andl $0x0, 0x10(%r14)
movq %rsp, %r15
movaps %xmm0, (%r15)
andl $0x0, 0x10(%r15)
movq %r13, %rdi
callq 0x2b94
movl %eax, %ebp
movq %r12, %rdi
callq 0x2b94
cmpl %eax, %ebp
cmovll %ebp, %eax
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %eax, %ebp
callq 0x2b28
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x2b28
andl $0x0, 0x8(%r14)
andl $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x2b94
movq %r15, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x2b28
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a92
testl %eax, %eax
jle 0x2f7f
movq 0x30(%rsp), %rax
movaps 0x20(%rsp), %xmm0
movaps (%rsp), %xmm1
movaps %xmm1, 0x20(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movaps %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2794
cmpl $0x0, 0xc(%rsp)
jne 0x2f35
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2adc
movq %r14, %rdi
callq 0x1a26
movq %rsp, %rdi
callq 0x1a26
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
andq $0x0, 0x8(%rdi)
movl 0xc(%rsi), %eax
testl %eax, %eax
je 0x30bc
movq %rsi, %r12
cmpl $0x1, %eax
jne 0x3010
movq (%r12), %rax
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
sqrtsd %xmm0, %xmm0
cvttsd2si %xmm0, %rsi
movq %rbx, %rdi
callq 0x2609
jmp 0x30bc
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movapd %xmm0, (%r14)
andl $0x0, 0x10(%r14)
movq %rsp, %r15
movapd %xmm0, (%r15)
andl $0x0, 0x10(%r15)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1b99
andl $0x0, 0x8(%r15)
movq %r12, %rdi
callq 0x2b86
movl %eax, %r12d
andl $-0x2, %r12d
pushq $0x1
popq %rbp
testl %r12d, %r12d
js 0x30aa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b99
movq %r14, %rdi
movl %r12d, %esi
callq 0x1c59
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a92
testl %eax, %eax
js 0x3097
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2794
leal 0x1(%r12), %esi
movq %rbx, %rdi
callq 0x1c59
movq %rbx, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b28
addl $-0x2, %r12d
jmp 0x3052
movq %rsp, %rdi
callq 0x1a26
leaq 0x20(%rsp), %rdi
callq 0x1a26
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpl $0x1, %ecx
jbe 0x31f7
movl %ecx, %ebp
cmpl $0x25, %ecx
jae 0x3216
movq %rdi, %rbx
movl (%rsi), %r12d
testl %r8d, %r8d
setne %al
testl %r12d, %r12d
setg %cl
andb %al, %cl
xorl %r15d, %r15d
cmpb $0x1, %cl
jne 0x3111
movb $0x0, (%rbx)
pushq $0x1
popq %r15
cmpl $0x0, 0xc(%rdx)
je 0x318b
movq %rsi, 0x18(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r13
movaps %xmm0, (%r13)
andl $0x0, 0x10(%r13)
movq %r13, %rdi
movq %rdx, 0x10(%rsp)
movq %rdx, %rsi
callq 0x1b99
leaq 0xc(%rsp), %r14
cmpl $0x0, 0x2c(%rsp)
jle 0x3175
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2d37
cmpl %r12d, %r15d
jge 0x3143
movl 0xc(%rsp), %eax
leaq 0x140b(%rip), %rcx      # 0x4572
movb (%rax,%rcx), %al
movslq %r15d, %rcx
incl %r15d
movb %al, (%rbx,%rcx)
jmp 0x3143
leaq 0x20(%rsp), %rdi
callq 0x1a26
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
jmp 0x319a
cmpl %r12d, %r15d
jge 0x319a
movl %r15d, %eax
incl %r15d
movb $0x30, (%rbx,%rax)
cmpl $0x0, 0x8(%rdx)
je 0x31af
cmpl %r12d, %r15d
jge 0x31af
movslq %r15d, %rax
incl %r15d
movb $0x2d, (%rbx,%rax)
pushq $0x2
popq %rcx
movl %r15d, %eax
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
leal -0x1(%r15), %edx
cmpq %rcx, %rax
je 0x31e2
movb (%rbx,%rcx), %r8b
movslq %edx, %rdx
movb (%rbx,%rdx), %dil
movb %dil, (%rbx,%rcx)
movb %r8b, (%rbx,%rdx)
incq %rcx
decl %edx
jmp 0x31c3
movl %r15d, (%rsi)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1399(%rip), %rdi      # 0x4597
leaq 0xffe(%rip), %rsi       # 0x4203
leaq 0x1399(%rip), %rcx      # 0x45a5
movl $0x3de, %edx            # imm = 0x3DE
callq 0x1060
leaq 0x13d1(%rip), %rdi      # 0x45ee
leaq 0xfdf(%rip), %rsi       # 0x4203
leaq 0x137a(%rip), %rcx      # 0x45a5
movl $0x3df, %edx            # imm = 0x3DF
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/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 0x19b2
movq (%rbx), %rdi
leal (,%r14,4), %esi
callq *%r15
movq (%rbx), %rdi
andl $0x1f, %r12d
je 0x32c3
movq %r14, %rax
shlq $0x20, %rax
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rax, %rdx
sarq $0x1e, %rdx
movb $0x20, %cl
subb %r12b, %cl
shrl %cl, (%rdi,%rdx)
movl %r14d, %esi
callq 0x1c0c
movl %eax, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2b86
movl %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x325c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1afc
testl %eax, %eax
jg 0x32f7
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2b86
movl %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x325c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1afc
testl %eax, %eax
jns 0x333b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0xa8, %rsp
movq %rcx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %r14
movaps %xmm0, (%r14)
andl $0x0, 0x10(%r14)
leaq 0x10(%rsp), %r15
andl $0x0, 0x10(%r15)
leaq 0x30(%rsp), %r12
andl $0x0, 0x10(%r12)
movaps %xmm0, (%r15)
movaps %xmm0, (%r12)
leaq 0x70(%rsp), %r13
movaps %xmm0, (%r13)
andl $0x0, 0x10(%r13)
leaq 0x50(%rsp), %rbp
movaps %xmm0, (%rbp)
andl $0x0, 0x10(%rbp)
movq %r15, %rdi
movq %rdx, %rsi
callq 0x1b99
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1b99
movq %r13, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rcx
callq 0x2bcd
pushq $0x1
popq %rbx
movq (%rsp), %rdi
movl %ebx, %esi
callq 0x2609
cmpl $0x0, 0x1c(%rsp)
je 0x3480
jle 0x3452
movq 0x10(%rsp), %rax
testb $0x1, (%rax)
je 0x3452
movq %r12, %rdi
movq %r15, %r12
movq %rbp, %r15
movl %ebx, %ebp
movq (%rsp), %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23cd
movq %r13, %rdi
movq %rbx, %rsi
movl %ebp, %ebx
movq %r15, %rbp
movq %r12, %r15
leaq 0x30(%rsp), %r12
movq %r12, %rdx
movq %rbp, %rcx
callq 0x2bcd
movq %r12, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x23cd
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x2bcd
movq %r15, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x2b28
jmp 0x3407
leaq 0x90(%rsp), %rdi
callq 0x1a26
leaq 0x10(%rsp), %rdi
callq 0x1a26
leaq 0x30(%rsp), %rdi
callq 0x1a26
leaq 0x70(%rsp), %rdi
callq 0x1a26
leaq 0x50(%rsp), %rdi
callq 0x1a26
movq (%rsp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
andl $0x0, 0x10(%r14)
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
andl $0x0, 0x10(%r15)
movq %r14, %rdi
callq 0x1b99
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x2609
testl %ebp, %ebp
je 0x3748
testb $0x1, %bpl
je 0x3736
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x23cd
decl %ebp
movq %r14, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x23cd
shrl %ebp
jmp 0x371c
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b99
movq %rsp, %rdi
callq 0x1a26
movq %r14, %rdi
callq 0x1a26
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
movq %rdx, %rdi
movl %ecx, %esi
callq 0x2b68
movl %eax, (%r13)
subl %eax, %ebx
cmpl $-0x2, %ebx
jg 0x37ca
notl %ebx
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29aa
incl %ebx
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2818
// File: /workspace/github_c_makefile_star2_O2/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 0x3858
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq (%rdi), %rdx
leaq 0x10(%rsp), %r14
pushq $0x14
popq %rsi
pushq $0x34
popq %r8
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %r9
callq 0x3776
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 0x384e
pxor 0x992(%rip), %xmm0      # 0x41e0
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/Enes1313[P]DataStructures/DS/eaDSCircularBuffer.c
// Function: eaDSCircularBufferInitWithDetails
eaDSCircularBuffer eaDSCircularBufferInitWithDetails(size_t sizeOfData, void * (*dataCreate)(size_t), void * (*dataCopy)(void *, const void *, size_t), int (*dataCompare)(const void *, const void *, size_t), void (*dataClear)(void *), size_t capacity)
{
	eaDSCircularBuffer circularBuffer = (eaDSCircularBuffer) calloc(1, sizeof(struct _eaDSCircularBuffer));

	if (NULL == circularBuffer)
	{
		perror(NULL);
	}
	else
	{
		circularBuffer->Data = dataCreate(sizeOfData * capacity);

		if (NULL == circularBuffer->Data)
		{
			perror(NULL);
			free(circularBuffer);
			circularBuffer = NULL;
		}
		else
		{
			circularBuffer->Capacity = capacity;
			circularBuffer->SizeOfData = sizeOfData;
			circularBuffer->dataCreate = dataCreate;
			circularBuffer->dataCopy = dataCopy;
			circularBuffer->dataCompare = dataCompare;
			circularBuffer->dataClear = dataClear;
		}
	}

	return circularBuffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, (%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x50
popq %rsi
callq 0x1060
testq %rax, %rax
je 0x1257
movq %rax, %rbx
movq %r13, %rdi
imulq %r14, %rdi
callq *%rbp
movq %rax, (%rbx)
testq %rax, %rax
je 0x1262
movq %r13, 0x18(%rbx)
movq %r14, 0x28(%rbx)
movq %rbp, 0x30(%rbx)
movq %r12, 0x38(%rbx)
movq %r15, 0x40(%rbx)
movq (%rsp), %rax
movq %rax, 0x48(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x1245
xorl %edi, %edi
callq 0x10b0
movq %rbx, %rdi
callq 0x10e0
xorl %ebx, %ebx
jmp 0x1245
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $0x1
popq %rax
cmpl $0x0, 0x20(%rdi)
je 0x129a
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 0x12d5
cmpq %r14, %rcx
jb 0x1371
movq 0x28(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
imulq %r14, %rdx
movq %r15, %rsi
callq *0x38(%rbx)
jmp 0x1332
movq 0x18(%rbx), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
cmpq %r14, %rdx
jae 0x133b
addq %rsi, %rcx
cmpq %r14, %rcx
jb 0x1371
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 0x135e
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 0x1371
movl $0x1, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rax
cmpq %rdx, %rcx
jb 0x1454
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 0x1403
movq %rcx, %rdx
subq %rsi, %rdx
cmpq %r14, %rdx
jae 0x1426
addq %rcx, %rdi
subq %rsi, %rdi
cmpq %r14, %rdi
jb 0x144f
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 0x141d
cmpq %r14, %rdx
jb 0x144f
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 0x1449
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_O2/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 0x149d
cmpq 0x18(%r14), %r13
jae 0x14c7
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x14f5
incq %r13
jmp 0x1479
pushq $0x1
popq %rbp
cmpq %rax, %r13
jae 0x14fe
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x14f5
incq %r13
movq 0x10(%r14), %rax
jmp 0x14a0
xorl %r13d, %r13d
pushq $0x1
popq %rbp
cmpq 0x10(%r14), %r13
jae 0x14fe
movq (%r14), %rdi
addq %r13, %rdi
movq 0x28(%r14), %rdx
imulq %r15, %rdx
movq %r12, %rsi
callq *0x40(%r14)
testl %eax, %eax
je 0x14f1
incq %r13
jmp 0x14cd
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