LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: fpser
double fpser(double a, double b, double x, double eps, int log_p)
{
/* ----------------------------------------------------------------------- *
 *                 EVALUATION OF I (A,B)
 *                                X
 *          FOR B < MIN(EPS, EPS*A) AND X <= 0.5
 * ----------------------------------------------------------------------- */

    double ans, c, s, t, an, tol;

    /* SET  ans := x^a : */
    if (log_p) {
        ans = a * log(x);
    } else if (a > eps * 0.001) {
        t = a * log(x);
        if (t < exparg(1)) { /* exp(t) would underflow */
            return 0.;
        }
        ans = exp(t);
    } else {
        ans = 1.;
    }

/*                NOTE THAT 1/B(A,B) = B */

    if (log_p)
        ans += log(b) - log(a);
    else
        ans *= b / a;

    tol = eps / a;
    an = a + 1.;
    t = x;
    s = t / an;
    do {
        an += 1.;
        t = x * t;
        c = t / an;
        s += c;
    } while (fabs(c) > tol);

    if (log_p)
        ans += log1p(a * s);
    else
        ans *= a * s + 1.;
    return ans;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
testl %edi, %edi
movsd %xmm0, 0x8(%rsp)
movsd %xmm2, 0x18(%rsp)
je 0x17e5f
movapd %xmm2, %xmm0
movsd %xmm1, (%rsp)
callq 0x2240
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm7
movapd %xmm0, %xmm9
mulsd %xmm7, %xmm9
jmp 0x17eb8
movapd %xmm0, %xmm7
ucomisd 0xaa2d(%rip), %xmm0     # 0x22898
jbe 0x17eaf
movsd %xmm1, (%rsp)
movapd %xmm2, %xmm0
callq 0x2240
mulsd 0x8(%rsp), %xmm0
xorpd %xmm9, %xmm9
movsd 0xaa82(%rip), %xmm1     # 0x22910
ucomisd %xmm0, %xmm1
ja 0x17f8f
callq 0x2550
movsd 0x8(%rsp), %xmm7
movapd %xmm0, %xmm9
movsd (%rsp), %xmm1
jmp 0x17eb8
movsd 0x9778(%rip), %xmm9     # 0x21630
testl %ebx, %ebx
je 0x17ef9
movapd %xmm1, %xmm0
movsd %xmm9, (%rsp)
callq 0x2240
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
movsd (%rsp), %xmm9
movsd 0x8(%rsp), %xmm7
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
addsd %xmm1, %xmm9
jmp 0x17f02
divsd %xmm7, %xmm1
mulsd %xmm1, %xmm9
movsd 0xa996(%rip), %xmm1     # 0x228a0
divsd %xmm7, %xmm1
movsd 0x971a(%rip), %xmm2     # 0x21630
addsd %xmm7, %xmm2
movsd 0x18(%rsp), %xmm8
movapd %xmm8, %xmm0
divsd %xmm2, %xmm0
movsd 0x96fe(%rip), %xmm3     # 0x21630
movapd 0xb096(%rip), %xmm4     # 0x22fd0
movapd %xmm8, %xmm5
addsd %xmm3, %xmm2
mulsd %xmm8, %xmm5
movapd %xmm5, %xmm6
divsd %xmm2, %xmm6
addsd %xmm6, %xmm0
andpd %xmm4, %xmm6
ucomisd %xmm1, %xmm6
ja 0x17f3f
testl %ebx, %ebx
je 0x17f7e
mulsd %xmm7, %xmm0
movsd %xmm9, (%rsp)
callq 0x2220
movsd (%rsp), %xmm9
addsd %xmm0, %xmm9
jmp 0x17f8f
mulsd %xmm0, %xmm7
addsd 0x96a6(%rip), %xmm7     # 0x21630
mulsd %xmm7, %xmm9
movapd %xmm9, %xmm0
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: rexpm1
double rexpm1(double x)
{
/* ----------------------------------------------------------------------- */
/*            EVALUATION OF THE FUNCTION EXP(X) - 1 */
/* ----------------------------------------------------------------------- */

    static double p1 = 9.14041914819518e-10;
    static double p2 = .0238082361044469;
    static double q1 = -.499999999085958;
    static double q2 = .107141568980644;
    static double q3 = -.0119041179760821;
    static double q4 = 5.95130811860248e-4;

    if (fabs(x) <= 0.15) {
    return x * (((p2 * x + p1) * x + 1.) /
            ((((q4 * x + q3) * x + q2) * x + q1) * x + 1.));
    }
    else { /* |x| > 0.15 : */
    double w = exp(x);
    if (x > 0.)
        return w * (0.5 - 1. / w + 0.5);
    else
        return w - 0.5 - 0.5;
    }

}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm3
movapd 0xb026(%rip), %xmm0     # 0x22fd0
andpd %xmm3, %xmm0
movsd 0xa962(%rip), %xmm1     # 0x22918
ucomisd %xmm0, %xmm1
jae 0x18003
movapd %xmm3, %xmm0
movapd %xmm3, (%rsp)
callq 0x2550
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movapd (%rsp), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x18065
movsd 0xa967(%rip), %xmm0     # 0x22950
divsd %xmm1, %xmm0
movsd 0x9203(%rip), %xmm2     # 0x211f8
addsd %xmm2, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
jmp 0x18079
movsd 0xa915(%rip), %xmm0     # 0x22920
mulsd %xmm3, %xmm0
addsd 0xa911(%rip), %xmm0     # 0x22928
mulsd %xmm3, %xmm0
movsd 0xa90d(%rip), %xmm1     # 0x22930
mulsd %xmm3, %xmm1
addsd 0xa909(%rip), %xmm1     # 0x22938
movsd 0x95f9(%rip), %xmm2     # 0x21630
mulsd %xmm3, %xmm1
addsd 0xa8fd(%rip), %xmm1     # 0x22940
addsd %xmm2, %xmm0
mulsd %xmm3, %xmm1
addsd 0xa8f5(%rip), %xmm1     # 0x22948
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
jmp 0x18079
movsd 0xa81b(%rip), %xmm0     # 0x22888
addsd %xmm0, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: pbeta_raw
double pbeta_raw(double x, double a, double b, int lower_tail, int log_p)
{
    // treat limit cases correctly here:
    if(a == 0 || b == 0 || !R_FINITE(a) || !R_FINITE(b)) {
    // NB:  0 < x < 1 :
    if(a == 0 && b == 0) // point mass 1/2 at each of {0,1} :
        return (log_p ? -M_LN2 : 0.5);
    if (a == 0 || a/b == 0) // point mass 1 at 0 ==> P(X <= x) = 1, all x > 0
        return R_DT_1;
    if (b == 0 || b/a == 0) // point mass 1 at 1 ==> P(X <= x) = 0, all x < 1
        return R_DT_0;
    // else, remaining case:  a = b = Inf : point mass 1 at 1/2
    if (x < 0.5) return R_DT_0; else return R_DT_1;
    }
    // Now:  0 < a < Inf;  0 < b < Inf

    double x1 = 0.5 - x + 0.5, w, wc;
    int ierr;
    //====
    bratio(a, b, x, x1, &w, &wc, &ierr, log_p); /* -> ./toms708.c */
    //====
    // ierr in {10,14} <==> bgrat() error code ierr-10 in 1:4; for 1 and 4, warned *there*
    return lower_tail ? w : wc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ecx
movl %edi, %ebx
movapd %xmm0, %xmm4
movq %xmm2, %rdx
movq %xmm1, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rsi # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rsi, %rax
setg %al
btrq $0x3f, %rdx
cmpq %rsi, %rdx
setg %dl
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1aade
jnp 0x1ab38
ucomisd %xmm0, %xmm2
jne 0x1aae6
jnp 0x1ab38
testb %al, %al
jne 0x1ab38
testb %dl, %dl
jne 0x1ab38
movsd 0x6702(%rip), %xmm0     # 0x211f8
movapd %xmm0, %xmm3
subsd %xmm4, %xmm3
addsd %xmm0, %xmm3
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rdx
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
movapd %xmm4, %xmm2
movq %r14, %rdi
movq %r15, %rsi
callq 0x17428
testl %ebx, %ebx
cmoveq %r15, %r14
movsd (%r14), %xmm0
jmp 0x1abd3
ucomisd %xmm0, %xmm1
jne 0x1ab5d
jp 0x1ab5d
ucomisd %xmm0, %xmm2
jne 0x1ab5d
jp 0x1ab5d
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x84ba(%rip), %rcx      # 0x23010
movsd (%rcx,%rax,8), %xmm0
jmp 0x1abd3
ucomisd %xmm0, %xmm1
jne 0x1ab65
jnp 0x1aba1
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
jne 0x1ab75
jnp 0x1aba1
ucomisd %xmm0, %xmm2
jne 0x1ab7d
jnp 0x1abab
divsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jne 0x1ab89
jnp 0x1abab
movsd 0x6667(%rip), %xmm0     # 0x211f8
ucomisd %xmm4, %xmm0
jbe 0x1abbd
testl %ebx, %ebx
je 0x1abc1
xorpd %xmm0, %xmm0
jmp 0x1abaf
testl %ebx, %ebx
je 0x1abaf
testl %ecx, %ecx
je 0x1abcb
jmp 0x1abd3
testl %ebx, %ebx
je 0x1aba5
testl %ecx, %ecx
je 0x1abd3
movsd 0x7cc5(%rip), %xmm0     # 0x22880
jmp 0x1abd3
testl %ebx, %ebx
je 0x1ab9b
testl %ecx, %ecx
je 0x1abcb
xorpd %xmm0, %xmm0
jmp 0x1abd3
movsd 0x6a5d(%rip), %xmm0     # 0x21630
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: pbeta
double pbeta(double x, double a, double b, int lower_tail, int log_p)
{
    if (x <= 0)
    return R_DT_0;
    if (x >= 1)
    return R_DT_1;

    return pbeta_raw(x, a, b, lower_tail, log_p);
}

// Assembly:
xorpd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
jae 0x1ac02
ucomisd 0x6a41(%rip), %xmm0     # 0x21630
jb 0x1aa97
testl %edi, %edi
je 0x1ac06
testl %esi, %esi
je 0x1ac17
xorpd %xmm0, %xmm0
retq
testl %edi, %edi
je 0x1abf9
xorpd %xmm0, %xmm0
testl %esi, %esi
je 0x1ac16
movsd 0x7c6a(%rip), %xmm0     # 0x22880
retq
movsd 0x6a11(%rip), %xmm0     # 0x21630
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: pbinom
double pbinom(double x, double n, double p, int lower_tail, int log_p)
{
    n = round(n);

    if (x < 0) return R_DT_0;
    x = floor(x + 1e-7);
    if (n <= x) return R_DT_1;
    return pbeta(p, x + 1, n - x, !lower_tail, log_p);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %ebp
movsd %xmm2, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x2090
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1ac5d
testl %ebp, %ebp
jne 0x1acc7
testl %ebx, %ebx
je 0x1acb9
jmp 0x1acd3
movapd %xmm2, %xmm0
addsd 0x80d7(%rip), %xmm0     # 0x22d40
movsd %xmm1, 0x8(%rsp)
callq 0x2470
movsd 0x8(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x1acab
movapd %xmm0, %xmm1
subsd %xmm0, %xmm2
addsd 0x69a0(%rip), %xmm1     # 0x21630
xorl %edi, %edi
testl %ebp, %ebp
sete %dil
movsd 0x10(%rsp), %xmm0
movl %ebx, %esi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x1abdd
testl %ebp, %ebp
je 0x1acc3
testl %ebx, %ebx
je 0x1acb9
xorpd %xmm0, %xmm0
jmp 0x1acd3
movsd 0x696f(%rip), %xmm0     # 0x21630
jmp 0x1acd3
xorpd %xmm0, %xmm0
testl %ebx, %ebx
je 0x1acd3
movsd 0x7bad(%rip), %xmm0     # 0x22880
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: alnrel
static double alnrel(double a)
{
/* -----------------------------------------------------------------------
 *            Evaluation of the function ln(1 + a)
 * ----------------------------------------------------------------------- */

    if (fabs(a) > 0.375)
    return log(1. + a);
    // else : |a| <= 0.375
    static double
    p1 = -1.29418923021993,
    p2 = .405303492862024,
    p3 = -.0178874546012214,
    q1 = -1.62752256355323,
    q2 = .747811014037616,
    q3 = -.0845104217945565;
    double
    t = a / (a + 2.),
    t2 = t * t,
    w = (((p3 * t2 + p2) * t2 + p1) * t2 + 1.) /
    (((q3 * t2 + q2) * t2 + q1) * t2 + 1.);
    return t * 2. * w;

}

// Assembly:
movapd 0x75a1(%rip), %xmm1     # 0x22fd0
andpd %xmm0, %xmm1
ucomisd 0x6fad(%rip), %xmm1     # 0x229e8
jbe 0x1ba4a
addsd 0x5beb(%rip), %xmm0     # 0x21630
jmp 0x2240
movsd 0x6fb6(%rip), %xmm1     # 0x22a08
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x7306(%rip), %xmm2     # 0x22d70
mulsd %xmm1, %xmm2
addsd 0x7302(%rip), %xmm2     # 0x22d78
mulsd %xmm1, %xmm2
addsd 0x72fe(%rip), %xmm2     # 0x22d80
mulsd %xmm1, %xmm2
movsd 0x5ba2(%rip), %xmm3     # 0x21630
addsd %xmm3, %xmm2
movsd 0x72ee(%rip), %xmm4     # 0x22d88
mulsd %xmm1, %xmm4
addsd 0x72ea(%rip), %xmm4     # 0x22d90
mulsd %xmm1, %xmm4
addsd 0x72e6(%rip), %xmm4     # 0x22d98
mulsd %xmm1, %xmm4
addsd %xmm3, %xmm4
divsd %xmm4, %xmm2
addsd %xmm0, %xmm0
mulsd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: esum
static double esum(int mu, double x, int give_log)
{
/* ----------------------------------------------------------------------- */
/*                    EVALUATION OF EXP(MU + X) */
/* ----------------------------------------------------------------------- */

    if(give_log)
    return x + (double) mu;

    // else :
    double w;
    if (x > 0.) { /* L10: */
    if (mu > 0)  return exp((double) mu) * exp(x);
    w = mu + x;
    if (w < 0.) return exp((double) mu) * exp(x);
    }
    else { /* x <= 0 */
    if (mu < 0)  return exp((double) mu) * exp(x);
    w = mu + x;
    if (w > 0.) return exp((double) mu) * exp(x);
    }
    return exp(w);

}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm3
testl %esi, %esi
je 0x1bf40
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
addsd %xmm3, %xmm0
jmp 0x1bfb6
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x1bf6d
testl %edi, %edi
jg 0x1bf8d
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x1bf87
addq $0x18, %rsp
jmp 0x2550
testl %edi, %edi
js 0x1bf8d
cvtsi2sd %edi, %xmm1
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1bf64
movapd %xmm1, %xmm0
jmp 0x1bf94
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd %xmm3, 0x10(%rsp)
callq 0x2550
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2550
mulsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: rlog1
static double rlog1(double x)
{
/* -----------------------------------------------------------------------
 *             Evaluation of the function  x - ln(1 + x)
 * ----------------------------------------------------------------------- */

    static double a = .0566749439387324;
    static double b = .0456512608815524;
    static double p0 = .333333333333333;
    static double p1 = -.224696413112536;
    static double p2 = .00620886815375787;
    static double q1 = -1.27408923933623;
    static double q2 = .354508718369557;

    double h, r, t, w, w1;
    if (x < -0.39 || x > 0.57) { /* direct evaluation */
    w = x + 0.5 + 0.5;
    return x - log(w);
    }
    /* else */
    if (x < -0.18) { /* L10: */
    h = x + .3;
    h /= .7;
    w1 = a - h * .3;
    }
    else if (x > 0.18) { /* L20: */
    h = x * .75 - .25;
    w1 = b + h / 3.;
    }
    else { /*        Argument Reduction */
    h = x;
    w1 = 0.;
    }

/* L30:                  Series Expansion */

    r = h / (h + 2.);
    t = r * r;
    w = ((p2 * t + p1) * t + p0) / ((q2 * t + q1) * t + 1.);
    return t * 2. * (1. / (1. - r) - r * w) + w1;

}

// Assembly:
movapd %xmm0, %xmm5
movsd 0x6ab1(%rip), %xmm0     # 0x22f38
ucomisd %xmm5, %xmm0
ja 0x1c4cb
ucomisd 0x6aab(%rip), %xmm5     # 0x22f40
ja 0x1c4cb
movsd 0x6aa9(%rip), %xmm0     # 0x22f48
ucomisd %xmm5, %xmm0
jbe 0x1c4f9
movsd 0x6403(%rip), %xmm0     # 0x228b0
addsd %xmm0, %xmm5
divsd 0x6407(%rip), %xmm5     # 0x228c0
mulsd %xmm5, %xmm0
movsd 0x6aa3(%rip), %xmm1     # 0x22f68
subsd %xmm0, %xmm1
jmp 0x1c52b
pushq %rax
movsd 0x4d24(%rip), %xmm1     # 0x211f8
movapd %xmm5, %xmm0
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd %xmm5, (%rsp)
callq 0x2240
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
xorpd %xmm1, %xmm1
ucomisd 0x6a4b(%rip), %xmm5     # 0x22f50
jbe 0x1c52b
mulsd 0x6a49(%rip), %xmm5     # 0x22f58
addsd 0x6461(%rip), %xmm5     # 0x22978
movapd %xmm5, %xmm1
divsd 0x6465(%rip), %xmm1     # 0x22988
addsd 0x6a35(%rip), %xmm1     # 0x22f60
movsd 0x64d5(%rip), %xmm0     # 0x22a08
addsd %xmm5, %xmm0
divsd %xmm0, %xmm5
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
movsd 0x6a25(%rip), %xmm3     # 0x22f70
mulsd %xmm2, %xmm3
addsd 0x6a21(%rip), %xmm3     # 0x22f78
mulsd %xmm2, %xmm3
addsd 0x6a1d(%rip), %xmm3     # 0x22f80
movsd 0x6a1d(%rip), %xmm4     # 0x22f88
mulsd %xmm2, %xmm4
addsd 0x6a19(%rip), %xmm4     # 0x22f90
mulsd %xmm2, %xmm4
movsd 0x50ad(%rip), %xmm0     # 0x21630
addsd %xmm0, %xmm4
divsd %xmm4, %xmm3
addsd %xmm2, %xmm2
movapd %xmm0, %xmm4
subsd %xmm5, %xmm4
divsd %xmm4, %xmm0
mulsd %xmm5, %xmm3
subsd %xmm3, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: gamln
static double gamln(double a)
{
/* -----------------------------------------------------------------------
 *            Evaluation of  ln(gamma(a))  for positive a
 * ----------------------------------------------------------------------- */
/*     Written by Alfred H. Morris */
/*          Naval Surface Warfare Center */
/*          Dahlgren, Virginia */
/* ----------------------------------------------------------------------- */

    static double d = .418938533204673;/* d == 0.5*(LN(2*PI) - 1) */

    static double c0 = .0833333333333333;
    static double c1 = -.00277777777760991;
    static double c2 = 7.9365066682539e-4;
    static double c3 = -5.9520293135187e-4;
    static double c4 = 8.37308034031215e-4;
    static double c5 = -.00165322962780713;

    if (a <= 0.8)
    return gamln1(a) - log(a); /* ln(G(a+1)) - ln(a) == ln(G(a+1)/a) = ln(G(a)) */
    else if (a <= 2.25)
    return gamln1(a - 0.5 - 0.5);

    else if (a < 10.) {
    int i, n = (int)(a - 1.25);
    double t = a;
    double w = 1.;
    for (i = 1; i <= n; ++i) {
        t += -1.;
        w *= t;
    }
    return gamln1(t - 1.) + log(w);
    }
    else { /* a >= 10 */
    double t = 1. / (a * a);
    double w = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a;
    return d + w + (a - 0.5) * (log(a) - 1.);
    }
}

// Assembly:
subq $0x18, %rsp
movsd 0x6862(%rip), %xmm1     # 0x22f98
ucomisd %xmm0, %xmm1
jae 0x1c7b9
movsd 0x685c(%rip), %xmm1     # 0x22fa0
ucomisd %xmm0, %xmm1
jae 0x1c7e8
movsd 0x4aaa(%rip), %xmm1     # 0x21200
ucomisd %xmm0, %xmm1
jbe 0x1c801
movsd 0x6848(%rip), %xmm1     # 0x22fb0
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movsd 0x4eb8(%rip), %xmm2     # 0x21630
testl %eax, %eax
jle 0x1c790
movsd 0x61cc(%rip), %xmm1     # 0x22950
addsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
decl %eax
jne 0x1c784
movsd %xmm2, 0x8(%rsp)
addsd 0x61b2(%rip), %xmm0     # 0x22950
callq 0x1bfbb
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
jmp 0x1c890
movsd %xmm0, 0x8(%rsp)
callq 0x1bfbb
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2240
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x1c896
movsd 0x6098(%rip), %xmm1     # 0x22888
addsd %xmm1, %xmm0
addsd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x1bfbb
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x4e1f(%rip), %xmm1     # 0x21630
divsd %xmm2, %xmm1
movsd 0x6643(%rip), %xmm2     # 0x22e60
mulsd %xmm1, %xmm2
addsd 0x663f(%rip), %xmm2     # 0x22e68
mulsd %xmm1, %xmm2
addsd 0x663b(%rip), %xmm2     # 0x22e70
mulsd %xmm1, %xmm2
addsd 0x6637(%rip), %xmm2     # 0x22e78
mulsd %xmm1, %xmm2
addsd 0x6633(%rip), %xmm2     # 0x22e80
mulsd %xmm1, %xmm2
addsd 0x662f(%rip), %xmm2     # 0x22e88
divsd %xmm0, %xmm2
addsd 0x6743(%rip), %xmm2     # 0x22fa8
movsd %xmm2, 0x10(%rsp)
movsd 0x6015(%rip), %xmm1     # 0x22888
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x2240
addsd 0x60c6(%rip), %xmm0     # 0x22950
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: gsumln
static double gsumln(double a, double b)
{
/* ----------------------------------------------------------------------- */
/*          EVALUATION OF THE FUNCTION LN(GAMMA(A + B)) */
/*          FOR 1 <= A <= 2  AND  1 <= B <= 2 */
/* ----------------------------------------------------------------------- */

    double x = a + b - 2.;/* in [0, 2] */

    if (x <= 0.25)
    return gamln1(x + 1.);

    /* else */
    if (x <= 1.25)
    return gamln1(x) + alnrel(x);
    /* else x > 1.25 : */
    return gamln1(x - 1.) + log(x * (x + 1.));

}

// Assembly:
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
addsd 0x670d(%rip), %xmm2     # 0x22fb8
movsd 0x615d(%rip), %xmm0     # 0x22a10
ucomisd %xmm2, %xmm0
jae 0x1c905
subq $0x18, %rsp
movsd 0x66fb(%rip), %xmm0     # 0x22fc0
ucomisd %xmm2, %xmm0
movsd %xmm2, 0x10(%rsp)
jae 0x1c916
movsd 0x6077(%rip), %xmm0     # 0x22950
addsd %xmm2, %xmm0
callq 0x1bfbb
movsd %xmm0, 0x8(%rsp)
movsd 0x4d40(%rip), %xmm0     # 0x21630
movsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
callq 0x2240
jmp 0x1c930
addsd 0x4d23(%rip), %xmm2     # 0x21630
movapd %xmm2, %xmm0
jmp 0x1bfbb
movapd %xmm2, %xmm0
callq 0x1bfbb
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x1ba27
addsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/enzyme.c
// Function: re_cuts_init
re_cuts_t *re_cuts_init(uint32_t n)
{
    re_cuts_t *re_cuts = (re_cuts_t *) malloc(sizeof(re_cuts_t));
    re_cuts->n = n;
    re_cuts->density = 0;
    re_cuts->re = (re_t *) malloc(n * sizeof(re_t));
    uint32_t i;
    for (i = 0; i < n; ++i)
        re_cuts->re[i].sites = 0;
    return re_cuts;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x18, %edi
callq 0x2330
movq %rax, %rbx
movl %ebp, (%rax)
movq $0x0, 0x8(%rax)
movl %ebp, %r14d
movq %r14, %rdi
shlq $0x4, %rdi
callq 0x2330
movq %rax, 0x10(%rbx)
testl %ebp, %ebp
je 0x1cc14
shlq $0x4, %r14
xorl %ecx, %ecx
movq $0x0, 0x8(%rax,%rcx)
addq $0x10, %rcx
cmpq %rcx, %r14
jne 0x1cc02
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/enzyme.c
// Function: re_cuts_destroy
void re_cuts_destroy(re_cuts_t *re_cuts)
{
    if (!re_cuts) return;
    uint32_t i;
    for (i = 0; i < re_cuts->n; ++i)
        if (re_cuts->re[i].sites)
            free(re_cuts->re[i].sites);
    free(re_cuts->re);
    free(re_cuts);
}

// Assembly:
testq %rdi, %rdi
je 0x1cc6d
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x1cc57
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0x1cc49
callq 0x2060
incq %r15
movl (%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x1cc37
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/enzyme.c
// Function: calc_re_cuts_density
double **calc_re_cuts_density(re_cuts_t *re_cuts, uint32_t resolution)
{
    if (!re_cuts)
        return 0;

    uint32_t i, j, b;
    double **dens, *ds;
    re_t re;
    dens = (double **) malloc(re_cuts->n * sizeof(double *));
    for (i = 0; i < re_cuts->n; ++i) {
        re = re_cuts->re[i];
        b = div_ceil(re.l, resolution);
        ds = (double *) calloc(b, sizeof(double));
        for (j = 0; j < re.n; ++j)
            ds[re.sites[j] / resolution] += 1.;
        for (j = 0; j < b - 1; ++j)
            ds[j] /= (double) resolution * re_cuts->density;
        ds[b - 1] /= ((double) re.l - (double) (b - 1) * resolution) * re_cuts->density;
        
        for (j = 0; j < b; ++j)
            if (ds[j] < MIN_RE_DENS || ds[j] > MAX_RE_DENS)
                ds[j] = .0;
        
        dens[i] = ds;
#ifdef DEBUG_ENZ
        fprintf(stderr, "[DEBUG_ENZ::%s] DENS [%u/%u] (%u):", __func__, i, re_cuts->n, b);
        for (j = 0; j < b; ++j)
            fprintf(stderr, " %.6f", ds[j]);
        fprintf(stderr, "\n");
#endif
    }
    return dens;
}

// Assembly:
testq %rdi, %rdi
je 0x1d16d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r13
movl (%rdi), %r14d
leaq (,%r14,8), %rdi
callq 0x2330
testq %r14, %r14
je 0x1d15e
movl %ebx, %ecx
cvtsi2sd %rcx, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r15d, %r15d
movq %r13, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%r13), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %edi
movl 0x4(%rax,%rcx), %r14d
movq 0x8(%rax,%rcx), %r13
movq %rdi, 0x20(%rsp)
movl %ebx, %esi
callq 0x4bf1
movl %eax, %ebp
movl %eax, %r12d
movl $0x8, %esi
movq %r12, %rdi
callq 0x2290
movsd 0x45ae(%rip), %xmm1     # 0x21630
movq %rax, %rcx
testq %r14, %r14
je 0x1d0ab
xorl %esi, %esi
movl (%r13,%rsi,4), %eax
xorl %edx, %edx
divl %ebx
movsd (%rcx,%rax,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rax,8)
incq %rsi
cmpq %rsi, %r14
jne 0x1d08c
movl %ebp, %eax
decl %eax
movl %eax, %eax
movq 0x18(%rsp), %r13
je 0x1d0dc
movsd 0x8(%r13), %xmm0
mulsd 0x8(%rsp), %xmm0
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1d0c6
movl 0x20(%rsp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd 0x8(%rsp), %xmm1
subsd %xmm1, %xmm0
mulsd 0x8(%r13), %xmm0
movsd (%rcx,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rax,8)
testl %ebp, %ebp
movsd 0x4520(%rip), %xmm1     # 0x21638
movsd 0x5fd0(%rip), %xmm2     # 0x230f0
je 0x1d145
xorl %eax, %eax
movsd (%rcx,%rax,8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x1d135
ucomisd %xmm2, %xmm0
jbe 0x1d13d
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r12
jne 0x1d124
movq 0x10(%rsp), %rax
movq %rcx, (%rax,%r15,8)
incq %r15
movl (%r13), %ecx
cmpq %rcx, %r15
jb 0x1d044
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/telo.c
// Function: check_motif
int check_motif(char *motif)
{
	int i, c, n;

	if (motif == NULL)
		return 0;

	n = strlen(motif);
	for (i = 0; i < n; i++) {
		c = seq_nt6_table[(uint8_t) motif[i]];
		if (c < 1 || c > 4)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x1d7a7
movq %rdi, %rbx
callq 0x2160
testl %eax, %eax
jle 0x1d7a7
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
leaq 0xdd4c(%rip), %rdx      # 0x2b4d0
movzbl (%rbx,%rcx), %esi
movb (%rsi,%rdx), %sil
addb $-0x5, %sil
cmpb $-0x5, %sil
jbe 0x1d7a2
incq %rcx
cmpq %rcx, %rax
jne 0x1d784
xorl %ebp, %ebp
jmp 0x1d7a7
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/yahs.c
// Function: find_aseq_telos
int8_t *find_aseq_telos(asm_dict_t *dict, int8_t *telo_ends)
{   
    int i, n;
    int8_t *telos;
    sdict_t *sdict;
    sd_aseq_t *aseq;
    sd_seg_t *segs, *seg;
    
    sdict = dict->sdict;
    n = dict->n;
    telos = (int8_t *) calloc(dict->n * 2, sizeof(int8_t));

    segs = dict->seg;
    for (i = 0; i < n; i++) {
        aseq = &dict->s[i];
        // first seg
        seg = &segs[aseq->s];
        if ((telo_ends[seg->c>>1<<1] && seg->x <= MAX_TELO_CLIP && (seg->c&1) == 0) ||
            (telo_ends[seg->c>>1<<1|1] && (seg->x + seg->y + MAX_TELO_CLIP) >= sdict->s[seg->c>>1].len && (seg->c&1) == 1))
            telos[i<<1] = 1;
        // last seg
        seg = &segs[aseq->s + aseq->n - 1];
        if ((telo_ends[seg->c>>1<<1] && seg->x <= MAX_TELO_CLIP && (seg->c&1) == 1) ||
            (telo_ends[seg->c>>1<<1|1] && (seg->x + seg->y + MAX_TELO_CLIP) >= sdict->s[seg->c>>1].len && (seg->c&1) == 0))
            telos[i<<1|1] = 1;
    }

    return telos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %r15
movslq (%rdi), %r12
leal (%r12,%r12), %edi
movl $0x1, %esi
callq 0x2290
testq %r12, %r12
jle 0x1e5fc
movq 0x20(%r14), %rcx
movq 0x8(%r14), %rdx
addq $0x1c, %rdx
addq %r12, %r12
xorl %esi, %esi
movl (%rdx), %edi
leaq (%rdi,%rdi,2), %r8
shlq $0x4, %r8
leaq (%rcx,%r8), %r9
movl 0x18(%rcx,%r8), %r8d
movl %r8d, %r10d
andl $-0x2, %r10d
cmpb $0x0, (%rbx,%r10)
je 0x1e53c
testb $0x1, %r8b
jne 0x1e53c
cmpl $0x33, 0x1c(%r9)
jb 0x1e571
movq %r8, %r10
orq $0x1, %r10
cmpb $0x0, (%rbx,%r10)
je 0x1e579
testb $0x1, %r8b
je 0x1e579
shrl %r8d
movl 0x1c(%r9), %r10d
movl 0x20(%r9), %r9d
addl %r10d, %r9d
addl $0x32, %r9d
movq 0x8(%r15), %r10
leaq (%r8,%r8,2), %r8
cmpl 0x10(%r10,%r8,8), %r9d
jb 0x1e579
movslq %esi, %r8
movb $0x1, (%rax,%r8)
movl -0x4(%rdx), %r8d
addl %r8d, %edi
decl %edi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
leaq (%rcx,%rdi), %r8
movl 0x18(%rcx,%rdi), %edi
movl %edi, %r9d
andl $-0x2, %r9d
cmpb $0x0, (%rbx,%r9)
je 0x1e5ad
testb $0x1, %dil
je 0x1e5ad
cmpl $0x33, 0x1c(%r8)
jb 0x1e5e1
movq %rdi, %r9
orq $0x1, %r9
cmpb $0x0, (%rbx,%r9)
je 0x1e5eb
testb $0x1, %dil
jne 0x1e5eb
shrl %edi
movl 0x1c(%r8), %r9d
movl 0x20(%r8), %r8d
addl %r9d, %r8d
addl $0x32, %r8d
movq 0x8(%r15), %r9
leaq (%rdi,%rdi,2), %rdi
cmpl 0x10(%r9,%rdi,8), %r8d
jb 0x1e5eb
leal 0x1(%rsi), %edi
movslq %edi, %rdi
movb $0x1, (%rax,%rdi)
addq $0x2, %rsi
addq $0x58, %rdx
cmpq %rsi, %r12
jne 0x1e50e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/yahs.c
// Function: scaffold_error_break
int scaffold_error_break(char *fai, char *link_file, uint32_t ml, uint8_t mq, char *agp, int flank_size, double noise, char *out)
{
    int dist_thres;
    sdict_t *sdict = make_sdict_from_index(fai, ml);
    asm_dict_t *dict = make_asm_dict_from_agp(sdict, agp, 1);

    dist_thres = flank_size * 2;
    //dist_thres = estimate_dist_thres_from_file(link_file, dict, ec_min_frac, ec_resolution);
    //dist_thres = MAX(dist_thres, ec_min_window);
    //fprintf(stderr, "[I::%s] dist threshold for scaffold error break: %d\n", __func__, dist_thres);
    link_mat_t *link_mat = link_mat_from_file(link_file, dict, dist_thres, ec_bin, noise, ec_move_avg, mq);

#ifdef DEBUG_ERROR_BREAK
    fprintf(stderr, "[DEBUG_ERROR_BREAK::%s] link matrix\n", __func__);
    print_link_mat(link_mat, dict, stderr);
#endif

    uint32_t bp_n = 0;
    bp_t *breaks = detect_break_points_local_joint(link_mat, ec_bin, ec_fold_thresh, flank_size, dict, &bp_n);
#ifdef DEBUG
    fprintf(stderr, "[DEBUG::%s] number scaffold breaks: %u\n", __func__, bp_n);
#endif

    FILE *agp_out = fopen(out, "w");
    write_break_agp(dict, breaks, bp_n, agp_out);
    fclose(agp_out);
    link_mat_destroy(link_mat);
    asm_destroy(dict);
    sd_destroy(sdict);
    int i;
    for (i = 0; i < bp_n; ++i)
        free(breaks[i].p);
    free(breaks);
    
    return bp_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movl %r9d, %ebx
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %r12
movq 0x50(%rsp), %r13
movl %edx, %esi
callq 0x11f82
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x129a4
movq %rax, %r15
leal (%rbx,%rbx), %edx
movq %r12, %rdi
movq %rax, %rsi
movl $0x3e8, %ecx            # imm = 0x3E8
movsd 0x10(%rsp), %xmm0
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x5b3f
movq %rax, %rbp
leaq 0xc(%rsp), %r12
movl $0x0, (%r12)
movsd 0x3e16(%rip), %xmm0     # 0x228a8
movq %rax, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movl %ebx, %edx
movq %r15, %rcx
movq %r12, %r8
callq 0x5ffd
movq %rax, %rbx
leaq 0x255f(%rip), %rsi      # 0x21010
movq %r13, %rdi
callq 0x23e0
movq %rax, %r13
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x6c15
movq %r13, %rdi
callq 0x2150
movq %rbp, %rdi
callq 0x5855
movq %r15, %rdi
callq 0x11528
movq %r14, %rdi
callq 0x1148c
cmpl $0x0, (%r12)
je 0x1eb17
movq %rbx, %r14
addq $0x10, %r14
xorl %r15d, %r15d
movq (%r14), %rdi
callq 0x2060
incq %r15
movl 0xc(%rsp), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x1eaff
movq %rbx, %rdi
callq 0x2060
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/yahs.c
// Function: default_nr
static int default_nr(char *fai, uint32_t ml)
{
    int i, max_res, nr;
    int64_t genome_size;
    genome_size = 0;
    sdict_t *sdict = make_sdict_from_index(fai, ml);
    for (i = 0; i < sdict->n; ++i)
        genome_size += sdict->s[i].len;
    sd_destroy(sdict);
    
    max_res = 0;
    if (genome_size < 100000000)
        max_res = 1000000;
    else if (genome_size < 200000000)
        max_res = 2000000;
    else if (genome_size < 500000000)
        max_res = 5000000;
    else if (genome_size < 1000000000)
        max_res = 10000000;
    else if (genome_size < 2000000000)
        max_res = 20000000;
    else if (genome_size < 5000000000)
        max_res = 50000000;
    else if (genome_size < 10000000000)
        max_res = 100000000;
    else if (genome_size < 20000000000)
        max_res = 200000000;
    else
        max_res = 500000000;

    nr = 0;
    while (nr < sizeof(default_resolutions) / sizeof(int) && default_resolutions[nr] <= max_res)
        ++nr;

    return nr;
}

// Assembly:
pushq %rbx
callq 0x11f82
movl (%rax), %edx
testq %rdx, %rdx
je 0x20c35
movq 0x8(%rax), %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %ebx, %ebx
movl 0x10(%rcx,%rsi), %edi
addq %rdi, %rbx
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x20c23
jmp 0x20c37
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x1148c
movl $0xf4240, %ecx          # imm = 0xF4240
cmpq $0x5f5e100, %rbx        # imm = 0x5F5E100
jb 0x20cc5
movl $0x1e8480, %ecx         # imm = 0x1E8480
cmpq $0xbebc200, %rbx        # imm = 0xBEBC200
jb 0x20cc5
movl $0x4c4b40, %ecx         # imm = 0x4C4B40
cmpq $0x1dcd6500, %rbx       # imm = 0x1DCD6500
jb 0x20cc5
movl $0x989680, %ecx         # imm = 0x989680
cmpq $0x3b9aca00, %rbx       # imm = 0x3B9ACA00
jb 0x20cc5
movl $0x1312d00, %ecx        # imm = 0x1312D00
cmpq $0x77359400, %rbx       # imm = 0x77359400
jb 0x20cc5
movq %rbx, %rax
shrq $0x9, %rax
movl $0x2faf080, %ecx        # imm = 0x2FAF080
cmpq $0x9502f9, %rax         # imm = 0x9502F9
jb 0x20cc5
movq %rbx, %rax
shrq $0xa, %rax
movl $0x5f5e100, %ecx        # imm = 0x5F5E100
cmpq $0x9502f9, %rax         # imm = 0x9502F9
jb 0x20cc5
shrq $0xb, %rbx
cmpq $0x9502f9, %rbx         # imm = 0x9502F9
movl $0xbebc200, %eax        # imm = 0xBEBC200
movl $0x1dcd6500, %ecx       # imm = 0x1DCD6500
cmovbl %eax, %ecx
leaq 0xa904(%rip), %rdx      # 0x2b5d0
xorl %eax, %eax
cmpl %ecx, (%rdx)
jg 0x20ce4
incq %rax
addq $0x4, %rdx
cmpq $0xf, %rax
jne 0x20cce
movl $0xf, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_04/syscalls.c
// Function: fill_buffer
int _fill_buffer(FILE *file_p)
{
  int buffer_size;

  if (file_p->flag._READ == 0 || file_p->flag._EOF == 1 || file_p->flag._ERR == 1)
  {
    return EOF;
  }

  buffer_size = (file_p->flag._UNBUF == 1) ? 1 : BUFFER_SIZE;

  if (file_p->base == NULL)
  {
    if ((file_p->base = (char *)malloc(buffer_size)) == NULL)
    {
      return EOF;
    }
  }

  file_p->next_char_pos_p = file_p->base;
  file_p->counter = read(file_p->file_descriptor, file_p->next_char_pos_p, buffer_size);

  if (--file_p->counter < 0)
  {
    if (file_p->counter == -1)
    {
      file_p->flag._EOF = 1;
    }
    else
    {
      file_p->flag._ERR = 1;
    }

    file_p->counter = 0;
    return EOF;
  }

  return (unsigned char)*file_p->next_char_pos_p++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb $0x1, 0x18(%rdi)
je 0x121c
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0x11d8
movl $0x400, %edi            # imm = 0x400
callq 0x1080
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x121c
movq 0x10(%r14), %rsi
movq %rsi, 0x8(%r14)
movl 0x1c(%r14), %edi
movl $0x400, %edx            # imm = 0x400
callq 0x1070
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
testl %eax, %eax
jle 0x1209
movq 0x8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r14)
movzbl (%rax), %ebx
jmp 0x121c
setne %al
shlb $0x3, %al
addb $0x8, %al
orb %al, 0x18(%r14)
movl $0x0, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_04/syscalls.c
// Function: flush_buffer
int _flush_buffer(int c, FILE *file_p)
{
  int buffer_size;

  if (file_p->flag._WRITE == 0 || file_p->flag._ERR == 1)
  {
    return EOF;
  }

  buffer_size = (file_p->flag._UNBUF == 1) ? 1 : BUFFER_SIZE;

  if (file_p->base == NULL)
  {
    if ((file_p->base = (char *)malloc(buffer_size)) == NULL)
    {
      return EOF;
    }
  }
  else
  {
    unsigned long nr_of_bytes = file_p->next_char_pos_p - file_p->base;
    if ((write(file_p->file_descriptor, file_p->base, nr_of_bytes)) != nr_of_bytes)
    {
      file_p->flag._ERR = 1;
      return EOF;
    }
  }

  file_p->next_char_pos_p = file_p->base;
  *file_p->next_char_pos_p++ = c;
  file_p->counter = buffer_size - 1;

  return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb $0x2, 0x18(%rsi)
je 0x1290
movq %rsi, %r14
movl %edi, %ebp
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x1265
movq 0x8(%r14), %r15
subq %rsi, %r15
movl 0x1c(%r14), %edi
movq %r15, %rdx
callq 0x1040
cmpq %r15, %rax
je 0x1278
orb $0x10, 0x18(%r14)
jmp 0x1290
movl $0x400, %edi            # imm = 0x400
callq 0x1080
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x1290
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r14)
movb %bpl, (%rax)
movl $0x3ff, (%r14)          # imm = 0x3FF
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_04/syscalls.c
// Function: file_flush
int file_flush(FILE *file_p)
{
  if (file_p->flag._WRITE == 0)
  {
    file_p->flag._ERR = 1;
    return EOF;
  }

  if (_flush_buffer('0', file_p) == EOF)
  {
    return EOF;
  }

  file_p->next_char_pos_p = file_p->base;
  file_p->counter = (file_p->flag._UNBUF == 1) ? 1 : BUFFER_SIZE;

  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x18(%rdi), %al
testb $0x2, %al
jne 0x12af
orb $0x10, %al
movb %al, 0x18(%rbx)
jmp 0x12d3
movl $0x30, %edi
movq %rbx, %rsi
callq 0x1226
cmpl $-0x1, %eax
je 0x12d3
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movl $0x400, (%rbx)          # imm = 0x400
xorl %eax, %eax
jmp 0x12d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_04/syscalls.c
// Function: file_open
FILE *file_open(char *name, char *mode)
{
  int file_descriptor;
  FILE *file_p;

  if (*mode != 'r' && *mode != 'w' && *mode != 'a')
  {
    return NULL;
  }

  for (file_p = _io_buffer; file_p < _io_buffer + MAX_NR_OF_OPEN_FILES; ++file_p)
  {
    if (file_p->flag._READ == 0 && file_p->flag._WRITE == 0)
    {
      break; // found free slot
    }
  }

  if (file_p >= _io_buffer + MAX_NR_OF_OPEN_FILES)
  {
    return NULL; // no free slots
  }

  if (*mode == 'w')
  {
    file_descriptor = creat(name, PERMISSIONS);
  }
  else if (*mode == 'a')
  {
    if ((file_descriptor = open(name, O_WRONLY, 0)) == -1)
    {
      file_descriptor = creat(name, PERMISSIONS);
    }
    lseek(file_descriptor, 0L, 2);
  }
  else
  {
    file_descriptor = open(name, O_RDONLY, 0);
  }

  if (file_descriptor == -1)
  {
    return NULL; // couldn't access name
  }

  file_p->file_descriptor = file_descriptor;
  file_p->counter = 0;
  file_p->base = NULL;
  file_p->flag._EOF = 0;
  file_p->flag._ERR = 0;
  file_p->flag._READ = (*mode == 'r') ? 1 : 0;
  file_p->flag._WRITE = (*mode == 'r') ? 0 : 1;

  return file_p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzbl (%rsi), %eax
xorl %ebx, %ebx
leal -0x61(%rax), %ecx
cmpl $0x16, %ecx
ja 0x13f1
movl $0x420001, %edx         # imm = 0x420001
btl %ecx, %edx
jae 0x13f1
movq %rsi, %r14
movq %rdi, %r15
testb $0x3, 0x2d7b(%rip)      # 0x4088
je 0x1340
xorl %ebx, %ebx
leaq 0x2d58(%rip), %rdx      # 0x4070
xorl %esi, %esi
cmpq $0x260, %rsi            # imm = 0x260
setb %cl
jae 0x13f1
leaq 0x20(%rsi), %rdi
testb $0x3, 0x38(%rsi,%rdx)
movq %rdi, %rsi
jne 0x131a
addq %rdi, %rdx
movq %rdx, %rbx
jmp 0x1349
leaq 0x2d29(%rip), %rbx      # 0x4070
movb $0x1, %cl
testb %cl, %cl
je 0x13ef
cmpl $0x61, %eax
je 0x136a
movq %r15, %rdi
cmpl $0x77, %eax
jne 0x13a1
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x10a0
jmp 0x13ac
movq %r15, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1090
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x1391
movq %r15, %rdi
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x10a0
movl %eax, %ebp
movl %ebp, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1050
jmp 0x13ae
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1090
movl %eax, %ebp
cmpl $-0x1, %ebp
je 0x13ef
movl %ebp, 0x1c(%rbx)
movl $0x0, (%rbx)
movq $0x0, 0x10(%rbx)
movb 0x18(%rbx), %al
movl %eax, %ecx
andb $-0x19, %cl
movb %cl, 0x18(%rbx)
cmpb $0x72, (%r14)
sete %cl
andb $-0x1a, %al
orb %cl, %al
movb %al, 0x18(%rbx)
cmpb $0x72, (%r14)
setne %cl
addb %cl, %cl
andb $-0x1b, %al
orb %cl, %al
movb %al, 0x18(%rbx)
jmp 0x13f1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_04/syscalls.c
// Function: main
int main(void)
{
  FILE *file_in_p;
  FILE *file_out_p;

  if ((file_in_p = file_open("syscalls.c", "r")) == NULL)
  {
    write(1, "Error: could not open the file.\n", 33);
    return EXIT_FAILURE;
  }

  if ((file_out_p = file_open("out.txt", "w")) == NULL)
  {
    write(1, "Error: could not open the file.\n", 33);
    return EXIT_FAILURE;
  }

  if (file_seek(file_in_p, 5, SEEK_SET) == -1)
  {
    return EXIT_FAILURE;
  }

  char c;
  while ((c = getc(file_in_p)) != EOF)
  {
    putc(c, file_out_p);
  }
  file_close(file_in_p);
  file_close(file_out_p);

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0xbe1(%rip), %rdi       # 0x2020
leaq 0xbe5(%rip), %rsi       # 0x202b
callq 0x12da
testq %rax, %rax
je 0x14ce
movq %rax, %rbx
leaq 0xbf4(%rip), %rdi       # 0x204e
leaq 0xbf5(%rip), %rsi       # 0x2056
callq 0x12da
testq %rax, %rax
je 0x14ce
movq %rax, %r14
movl 0x1c(%rbx), %edi
movl $0x5, %esi
xorl %edx, %edx
callq 0x1050
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
testl %eax, %eax
jle 0x1498
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
jmp 0x14a0
movq %rbx, %rdi
callq 0x11ac
cmpb $-0x1, %al
je 0x14eb
movl (%r14), %ecx
leal -0x1(%rcx), %edx
movl %edx, (%r14)
testl %ecx, %ecx
jle 0x14c1
movq 0x8(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r14)
movb %al, (%rcx)
jmp 0x147d
movsbl %al, %edi
movq %r14, %rsi
callq 0x1226
jmp 0x147d
leaq 0xb58(%rip), %rsi       # 0x202d
movl $0x1, %ebp
movl $0x21, %edx
movl $0x1, %edi
callq 0x1040
jmp 0x1524
movq 0x10(%rbx), %rdi
callq 0x1030
xorl %ebp, %ebp
movl %ebp, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl 0x1c(%rbx), %edi
callq 0x1060
movq 0x10(%r14), %rdi
callq 0x1030
movl %ebp, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movl 0x1c(%r14), %edi
callq 0x1060
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/srcs/checker/main_checker.c
// Function: checker
void	checker(t_lists *lists, t_list *commands, int ac)
{
	if (ft_read_command(commands) == -1)
		exit_failure(lists, commands);
	use_commands(commands, lists);
	check_sort(ac, lists);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1785
cmpl $-0x1, %eax
jne 0x3219
movq %r14, %rdi
movq %r15, %rsi
callq 0x1218
movq %r15, %rdi
movq %r14, %rsi
callq 0x1738
movl %ebx, %edi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1ad8
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/srcs/checker/main_checker.c
// Function: main
int		main(int ac, char **av)
{
	int		i;
	t_lists lists;
	t_list	*commands;

	i = 1;
	init_list(&lists);
	commands = ft_lstnew(NULL);
	if (ac < 2)
		exit_success(&lists, commands);
	else
	{
		while (i < ac)
		{
			if (parsing_ac(av[i]) == -1)
				exit_failure(&lists, commands);
			if (check_existant(av, i) == 1)
				exit_failure(&lists, commands);
			if (is_an_int(av[i]) == -1)
				exit_failure(&lists, commands);
			ft_lstadd_back(&lists.list_a, fill_list_a(av[i]));
			i++;
		}
	}
	checker(&lists, commands, ac);
	exit_success(&lists, commands);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movl %edi, %ebx
leaq 0x8(%rsp), %rdi
callq 0x1268
xorl %edi, %edi
callq 0x3314
movq %rax, %r14
cmpl $0x2, %ebx
jge 0x326e
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x125a
jmp 0x32e4
movl %ebx, %ebp
movl $0x1, %r12d
leaq 0x8(%rsp), %r13
movq (%r15,%r12,8), %rdi
callq 0x12e5
cmpl $-0x1, %eax
jne 0x3294
movq %r13, %rdi
movq %r14, %rsi
callq 0x1218
movq %r15, %rdi
movl %r12d, %esi
callq 0x126f
cmpl $0x1, %eax
jne 0x32af
movq %r13, %rdi
movq %r14, %rsi
callq 0x1218
movq (%r15,%r12,8), %rdi
callq 0x1314
cmpl $-0x1, %eax
jne 0x32c8
movq %r13, %rdi
movq %r14, %rsi
callq 0x1218
movq (%r15,%r12,8), %rdi
callq 0x132b
movq %r13, %rdi
movq %rax, %rsi
callq 0x3378
incq %r12
cmpq %r12, %rbp
jne 0x327b
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x31f4
movq %r15, %rdi
movq %r14, %rsi
callq 0x125a
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_lstlast.c
// Function: ft_lstlast
t_list		*ft_lstlast(t_list *lst)
{
	if (lst)
		while (lst->next)
			lst = lst->next;
	return (lst);
}

// Assembly:
testq %rdi, %rdi
je 0x3372
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x3365
retq
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_lstadd_back.c
// Function: ft_lstadd_back
void	ft_lstadd_back(t_list **alst, t_list *new)
{
	t_list		*last;

	if (!new)
		return ;
	if (!*alst)
	{
		*alst = new;
		return ;
	}
	last = ft_lstlast(*alst);
	last->next = new;
}

// Assembly:
testq %rsi, %rsi
je 0x339c
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x3398
movq %rax, %rdi
callq 0x3360
movq %rax, %rdi
addq $0x8, %rdi
movq %rbx, (%rdi)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_strncmp.c
// Function: ft_strncmp
int		ft_strncmp(const char *s1, const char *s2, size_t n)
{
	size_t	i;

	i = 0;
	while ((s1[i] || s2[i]) && i < n)
	{
		if (s1[i] != s2[i])
			return ((unsigned char)s1[i] - (unsigned char)s2[i]);
		i++;
	}
	return (0);
}

// Assembly:
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %r8d
testl %r8d, %r8d
je 0x33c7
cmpq %rdx, %rcx
jb 0x33d4
jmp 0x33e7
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0x33e9
cmpb $0x0, (%rsi,%rcx)
je 0x33e9
movzbl (%rsi,%rcx), %eax
incq %rcx
cmpb %al, %r8b
je 0x33b6
subl %eax, %r8d
movl %r8d, %eax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_atoi.c
// Function: ft_atoi
long int		ft_atoi(const char *str)
{
	long int		i;
	long int		neg;
	long int		res;

	i = 0;
	res = 0;
	neg = 1;
	while (str[i] == '\t' || str[i] == '\v' || str[i] == '\n'
			|| str[i] == '\f' || str[i] == '\r' || str[i] == ' ')
		i++;
	if (str[i] == '+' || str[i] == '-')
	{
		if (str[i] == '-')
			neg = -neg;
		i++;
	}
	while (str[i] >= '0' && str[i] <= '9')
	{
		res = res * 10 + str[i] - '0';
		i++;
	}
	return (res * neg);
}

// Assembly:
xorl %eax, %eax
movb (%rdi,%rax), %cl
movzbl %cl, %edx
leal -0x9(%rdx), %esi
cmpl $0x5, %esi
jae 0x3401
incq %rax
jmp 0x33ee
cmpl $0x20, %edx
je 0x33fc
cmpl $0x2b, %edx
je 0x3410
cmpl $0x2d, %edx
jne 0x3425
xorl %edx, %edx
cmpb $0x2d, %cl
setne %dl
leaq -0x1(,%rdx,2), %rcx
incq %rax
jmp 0x342a
movl $0x1, %ecx
movb (%rdi,%rax), %dl
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x345e
leaq (%rax,%rdi), %rsi
incq %rsi
xorl %eax, %eax
leaq (%rax,%rax,4), %rax
movzbl %dl, %edx
leaq (%rdx,%rax,2), %rax
addq $-0x30, %rax
movb (%rsi), %dl
leal -0x30(%rdx), %edi
incq %rsi
cmpb $0xa, %dil
jb 0x343f
jmp 0x3460
xorl %eax, %eax
imulq %rcx, %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_strdup.c
// Function: ft_strdup
char	*ft_strdup(const char *s1)
{
	char			*str;
	unsigned int	i;

	i = 0;
	if (!(str = malloc(sizeof(char) * (ft_strlen(s1) + 1))))
		return (NULL);
	while (s1[i])
	{
		str[i] = s1[i];
		i++;
	}
	str[i] = '\0';
	return (str);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x33a0
leaq 0x1(%rax), %rdi
callq 0x1090
testq %rax, %rax
je 0x349c
movb (%rbx), %dl
testb %dl, %dl
je 0x34a0
movl $0x1, %esi
xorl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl %esi, %ecx
movb (%rbx,%rcx), %dl
incl %esi
testb %dl, %dl
jne 0x348c
jmp 0x34a2
xorl %eax, %eax
jmp 0x34a6
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WalterLuong[P]push_swap/libft/ft_strcmp.c
// Function: ft_strcmp
int		ft_strcmp(const char *s1, const char *s2)
{
	int		i;

	i = 0;
	while (s1[i] || s2[i])
	{
		if (s1[i] != s2[i])
			return (s1[i] - s2[i]);
		i++;
	}
	return (0);
}

// Assembly:
xorl %ecx, %ecx
movsbl (%rdi,%rcx), %eax
testl %eax, %eax
jne 0x34b8
cmpb $0x0, (%rsi,%rcx)
je 0x34c6
movsbl (%rsi,%rcx), %edx
incq %rcx
cmpb %dl, %al
je 0x34aa
subl %edx, %eax
retq
xorl %eax, %eax
retq