// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/binomlite.c
// Function: bcorr
static double bcorr(double a0, double b0)
{
/* ----------------------------------------------------------------------- */

/*     EVALUATION OF  DEL(A0) + DEL(B0) - DEL(A0 + B0)  WHERE */
/*     LN(GAMMA(A)) = (A - 0.5)*LN(A) - A + 0.5*LN(2*PI) + DEL(A). */
/*     IT IS ASSUMED THAT A0 >= 8 AND B0 >= 8. */

/* ----------------------------------------------------------------------- */
    /* Initialized data */

    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;

    /* System generated locals */
    double ret_val, r1;

    /* Local variables */
    double a, b, c, h, t, w, x, s3, s5, x2, s7, s9, s11;
/* ------------------------ */
    a = fmin2(a0, b0);
    b = fmax2(a0, b0);

    h = a / b;
    c = h / (h + 1.);
    x = 1. / (h + 1.);
    x2 = x * x;

/*                SET SN = (1 - X^N)/(1 - X) */

    s3 = x + x2 + 1.;
    s5 = x + x2 * s3 + 1.;
    s7 = x + x2 * s5 + 1.;
    s9 = x + x2 * s7 + 1.;
    s11 = x + x2 * s9 + 1.;

/*                SET W = DEL(B) - DEL(A + B) */

/* Computing 2nd power */
    r1 = 1. / b;
    t = r1 * r1;
    w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 *
        s3) * t + c0;
    w *= c / b;

/*                   COMPUTE  DEL(A) + W */

/* Computing 2nd power */
    r1 = 1. / a;
    t = r1 * r1;
    ret_val = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a +
        w;
    return ret_val;
}

// Assembly:
movapd %xmm0, %xmm2
cmplesd %xmm1, %xmm2
movapd %xmm2, %xmm3
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm2
orpd %xmm3, %xmm2
movapd %xmm1, %xmm4
cmplesd %xmm0, %xmm4
andpd %xmm4, %xmm0
andnpd %xmm1, %xmm4
orpd %xmm0, %xmm4
movapd %xmm2, %xmm1
divsd %xmm4, %xmm1
movsd 0x5046(%rip), %xmm3     # 0x21630
movapd %xmm1, %xmm0
addsd %xmm3, %xmm0
divsd %xmm0, %xmm1
movapd %xmm3, %xmm8
divsd %xmm0, %xmm8
movapd %xmm8, %xmm5
mulsd %xmm8, %xmm5
movapd %xmm8, %xmm6
addsd %xmm5, %xmm6
addsd %xmm3, %xmm6
movapd %xmm5, %xmm7
mulsd %xmm6, %xmm7
addsd %xmm8, %xmm7
addsd %xmm3, %xmm7
movapd %xmm5, %xmm10
mulsd %xmm7, %xmm10
addsd %xmm8, %xmm10
addsd %xmm3, %xmm10
movapd %xmm5, %xmm9
mulsd %xmm10, %xmm9
addsd %xmm8, %xmm9
addsd %xmm3, %xmm9
mulsd %xmm9, %xmm5
addsd %xmm8, %xmm5
addsd %xmm3, %xmm5
movapd %xmm3, %xmm11
divsd %xmm4, %xmm11
mulsd %xmm11, %xmm11
movsd 0x67eb(%rip), %xmm0     # 0x22e60
mulsd %xmm0, %xmm5
movsd 0x67e6(%rip), %xmm8     # 0x22e68
mulsd %xmm8, %xmm9
mulsd %xmm11, %xmm5
addsd %xmm9, %xmm5
movsd 0x67d6(%rip), %xmm9     # 0x22e70
mulsd %xmm9, %xmm10
mulsd %xmm11, %xmm5
addsd %xmm10, %xmm5
movsd 0x67c6(%rip), %xmm10    # 0x22e78
mulsd %xmm10, %xmm7
mulsd %xmm11, %xmm5
addsd %xmm7, %xmm5
movsd 0x67b8(%rip), %xmm7     # 0x22e80
mulsd %xmm7, %xmm6
mulsd %xmm11, %xmm5
addsd %xmm6, %xmm5
mulsd %xmm11, %xmm5
movsd 0x67a6(%rip), %xmm6     # 0x22e88
addsd %xmm6, %xmm5
divsd %xmm4, %xmm1
mulsd %xmm5, %xmm1
divsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm3, %xmm0
addsd %xmm8, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm9, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm10, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm7, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm6, %xmm0
divsd %xmm2, %xmm0
addsd %xmm1, %xmm0
retq