// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/binomlite.c
// Function: algdiv
static double algdiv(double a, double b)
{
/* ----------------------------------------------------------------------- */

/*     COMPUTATION OF LN(GAMMA(B)/GAMMA(A+B)) WHEN B >= 8 */

/*                         -------- */

/*     IN THIS ALGORITHM, DEL(X) IS THE FUNCTION DEFINED BY */
/*     LN(GAMMA(X)) = (X - 0.5)*LN(X) - X + 0.5*LN(2*PI) + DEL(X). */

/* ----------------------------------------------------------------------- */

    /* 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;

    double c, d, h, t, u, v, w, x, s3, s5, x2, s7, s9, s11;

/* ------------------------ */
    if (a > b) {
    h = b / a;
    c = 1. / (h + 1.);
    x = h / (h + 1.);
    d = a + (b - 0.5);
    }
    else {
    h = a / b;
    c = h / (h + 1.);
    x = 1. / (h + 1.);
    d = b + (a - 0.5);
    }

/* Set s<n> = (1 - x^n)/(1 - x) : */

    x2 = x * 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.;

/* w := Del(b) - Del(a + b) */

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

/*                    COMBINE THE RESULTS */

    u = d * alnrel(a / b);
    v = a * (log(b) - 1.);
    if (u > v)
    return w - v - u;
    else
    return w - u - v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x26bca
movsd -0x18(%rbp), %xmm0
divsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0xaa80(%rip), %xmm1     # 0x315f8
addsd -0x30(%rbp), %xmm1
movsd 0xaa73(%rip), %xmm0     # 0x315f8
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0xaa5d(%rip), %xmm1     # 0x315f8
addsd -0x30(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd 0xaa45(%rip), %xmm2     # 0x31600
subsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x26c31
movsd -0x10(%rbp), %xmm0
divsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0xaa12(%rip), %xmm1     # 0x315f8
addsd -0x30(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0xa9fc(%rip), %xmm1     # 0x315f8
addsd -0x30(%rbp), %xmm1
movsd 0xa9ef(%rip), %xmm0     # 0x315f8
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x18(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd 0xa9dc(%rip), %xmm2     # 0x31600
subsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x58(%rbp), %xmm0
mulsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x58(%rbp), %xmm0
addsd -0x70(%rbp), %xmm0
movsd 0xa9a6(%rip), %xmm1     # 0x315f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xa97e(%rip), %xmm1     # 0x315f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x58(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
movsd -0x68(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xa956(%rip), %xmm1     # 0x315f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x58(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
movsd -0x78(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xa92e(%rip), %xmm1     # 0x315f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x58(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
movsd -0x80(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xa906(%rip), %xmm1     # 0x315f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x18(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
movsd 0xa8e8(%rip), %xmm0     # 0x315f8
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x1294f(%rip), %xmm0    # 0x39670
mulsd -0x88(%rbp), %xmm0
movsd -0x38(%rbp), %xmm2
movsd 0x12932(%rip), %xmm1    # 0x39668
mulsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm2
movsd 0x12910(%rip), %xmm1    # 0x39660
mulsd -0x78(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm2
movsd 0x128ee(%rip), %xmm1    # 0x39658
mulsd -0x68(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm2
movsd 0x128cc(%rip), %xmm1    # 0x39650
mulsd -0x60(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm2
movsd 0x128aa(%rip), %xmm1    # 0x39648
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x20(%rbp), %xmm0
divsd -0x18(%rbp), %xmm0
mulsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x10(%rbp), %xmm0
divsd -0x18(%rbp), %xmm0
callq 0x25fc0
movaps %xmm0, %xmm1
movsd -0x98(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x2250
movaps %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
movsd 0xa7df(%rip), %xmm2     # 0x315f8
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jbe 0x26e48
movsd -0x50(%rbp), %xmm0
subsd -0x48(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x26e5c
movsd -0x50(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
subsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)