// File: /workspace/github_c_makefile_star2_O3/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
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm1, %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
cmplepd %xmm3, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
pshufd $0xee, %xmm2, %xmm4     # xmm4 = xmm2[2,3,2,3]
movapd %xmm2, %xmm0
divsd %xmm4, %xmm0
movsd 0x52c2(%rip), %xmm3     # 0x22660
movapd %xmm0, %xmm1
addsd %xmm3, %xmm1
divsd %xmm1, %xmm0
movapd %xmm3, %xmm7
divsd %xmm1, %xmm7
movapd %xmm7, %xmm1
mulsd %xmm7, %xmm1
movapd %xmm7, %xmm5
addsd %xmm1, %xmm5
addsd %xmm3, %xmm5
movapd %xmm1, %xmm6
mulsd %xmm5, %xmm6
addsd %xmm7, %xmm6
addsd %xmm3, %xmm6
movapd %xmm1, %xmm8
mulsd %xmm6, %xmm8
addsd %xmm7, %xmm8
addsd %xmm3, %xmm8
movapd %xmm1, %xmm9
mulsd %xmm8, %xmm9
addsd %xmm7, %xmm9
addsd %xmm3, %xmm9
mulsd %xmm9, %xmm1
addsd %xmm7, %xmm1
addsd %xmm3, %xmm1
movapd %xmm3, %xmm10
divsd %xmm4, %xmm10
mulsd %xmm10, %xmm10
movsd 0x686e(%rip), %xmm4     # 0x23c90
mulsd %xmm4, %xmm1
movsd 0x686a(%rip), %xmm7     # 0x23c98
mulsd %xmm7, %xmm9
mulsd %xmm10, %xmm1
addsd %xmm9, %xmm1
movsd 0x685a(%rip), %xmm9     # 0x23ca0
mulsd %xmm9, %xmm8
mulsd %xmm10, %xmm1
addsd %xmm8, %xmm1
movsd 0x684a(%rip), %xmm8     # 0x23ca8
mulsd %xmm8, %xmm6
mulsd %xmm10, %xmm1
addsd %xmm6, %xmm1
movsd 0x683c(%rip), %xmm6     # 0x23cb0
mulsd %xmm6, %xmm5
mulsd %xmm10, %xmm1
addsd %xmm5, %xmm1
mulsd %xmm10, %xmm1
movsd 0x682a(%rip), %xmm5     # 0x23cb8
addsd %xmm5, %xmm1
divsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm3, %xmm4
addsd %xmm7, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm9, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm8, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm6, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm5, %xmm4
unpcklpd %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
divpd %xmm2, %xmm4
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
mulsd %xmm1, %xmm0
addsd %xmm4, %xmm0
retq