double cdflib_beta_log(const double *a0, const double *b0) {
  static const double e = .918938533204673e0;
  double value, a, b, c, h, u, v, w, z;
  int i, n;
  double T1;
  a = cdflib_fifdmin1(*a0, *b0);
  b = cdflib_fifdmax1(*a0, *b0);
  if (a >= 8.0e0) {
    goto S100;
  }
  if (a >= 1.0e0) {
    goto S20;
  }
  if (b >= 8.0e0) {
    goto S10;
  }
  T1 = a + b;
  value = cdflib_gamma_log(&a) + (cdflib_gamma_log(&b) - cdflib_gamma_log(&T1));
  return value;
S10:
  value = cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S20:
  if (a > 2.0e0) {
    goto S40;
  }
  if (b > 2.0e0) {
    goto S30;
  }
  value = cdflib_gamma_log(&a) + cdflib_gamma_log(&b) - cdflib_gsumln(&a, &b);
  return value;
S30:
  w = 0.0e0;
  if (b < 8.0e0) {
    goto S60;
  }
  value = cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S40:
  if (b > 1000.0e0) {
    goto S80;
  }
  n = (int)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    h = a / b;
    w *= (h / (1.0e0 + h));
  }
  w = log(w);
  if (b < 8.0e0) {
    goto S60;
  }
  value = w + cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S60:
  n = (int)(b - 1.0e0);
  z = 1.0e0;
  for (i = 1; i <= n; i++) {
    b -= 1.0e0;
    z *= (b / (a + b));
  }
  value =
      w + log(z) +
      (cdflib_gamma_log(&a) + (cdflib_gamma_log(&b) - cdflib_gsumln(&a, &b)));
  return value;
S80:
  n = (int)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    w *= (a / (1.0e0 + a / b));
  }
  value = log(w) - (double)n * log(b) +
          (cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b));
  return value;
S100:
  w = cdflib_bcorr(&a, &b);
  h = a / b;
  c = h / (1.0e0 + h);
  u = -((a - 0.5e0) * log(c));
  v = b * cdflib_alnrel(&h);
  if (u <= v) {
    goto S110;
  }
  value = -(0.5e0 * log(b)) + e + w - v - u;
  return value;
S110:
  value = -(0.5e0 * log(b)) + e + w - u - v;
  return value;
}


x86 assembly (clang, -O0):
<cdflib_beta_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1040 <cdflib_fifdmin1@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1070 <cdflib_fifdmax1@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe20(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11ef <cdflib_beta_log+0x6f>
jmp    1723 <cdflib_beta_log+0x5a3>
movsd  -0x28(%rbp),%xmm0
movsd  0xe0c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     120b <cdflib_beta_log+0x8b>
jmp    12bd <cdflib_beta_log+0x13d>
movsd  -0x30(%rbp),%xmm0
movsd  0xde8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1227 <cdflib_beta_log+0xa7>
jmp    1281 <cdflib_beta_log+0x101>
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x74(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    -0x78(%rbp),%ecx
mov    %eax,%edx
mov    -0x74(%rbp),%eax
sub    %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x7c(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <cdflib_algdiv@plt>
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
movsd  -0x28(%rbp),%xmm0
movsd  0xd46(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12d9 <cdflib_beta_log+0x159>
jmp    13ae <cdflib_beta_log+0x22e>
movsd  -0x30(%rbp),%xmm0
movsd  0xd2a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12f5 <cdflib_beta_log+0x175>
jmp    134c <cdflib_beta_log+0x1cc>
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x84(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x80(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   10a0 <cdflib_gsumln@plt>
mov    %eax,%ecx
mov    -0x80(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xca4(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    136c <cdflib_beta_log+0x1ec>
jmp    14df <cdflib_beta_log+0x35f>
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x88(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <cdflib_algdiv@plt>
mov    %eax,%ecx
mov    -0x88(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
movsd  -0x30(%rbp),%xmm0
movsd  0xc5d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13ca <cdflib_beta_log+0x24a>
jmp    15ed <cdflib_beta_log+0x46d>
movsd  -0x28(%rbp),%xmm0
movsd  0xc31(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x68(%rbp)
movsd  0xc1e(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x68(%rbp),%eax
jg     1455 <cdflib_beta_log+0x2d5>
movsd  -0x28(%rbp),%xmm0
movsd  0xbf9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xbd4(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    13f6 <cdflib_beta_log+0x276>
movsd  -0x58(%rbp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xb94(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    147c <cdflib_beta_log+0x2fc>
jmp    14df <cdflib_beta_log+0x35f>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
movsd  -0x98(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <cdflib_algdiv@plt>
movsd  -0x90(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
movsd  -0x30(%rbp),%xmm0
movsd  0xb1c(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x68(%rbp)
movsd  0xb09(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x68(%rbp),%eax
jg     1558 <cdflib_beta_log+0x3d8>
movsd  -0x30(%rbp),%xmm0
movsd  0xae4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
addsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    150b <cdflib_beta_log+0x38b>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0x9c(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0xac(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   10a0 <cdflib_gsumln@plt>
mov    -0xac(%rbp),%ecx
movsd  -0xa8(%rbp),%xmm0
ff
mov    %eax,%edx
mov    -0x9c(%rbp),%eax
sub    %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
movsd  -0x28(%rbp),%xmm0
movsd  0xa0e(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x68(%rbp)
movsd  0x9fb(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x68(%rbp),%eax
jg     1672 <cdflib_beta_log+0x4f2>
movsd  -0x28(%rbp),%xmm0
movsd  0x9d6(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
divsd  -0x30(%rbp),%xmm2
movsd  0x9b6(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1619 <cdflib_beta_log+0x499>
movsd  -0x58(%rbp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
cvtsi2sdl -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1080 <log@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1090 <cdflib_gamma_log@plt>
mov    %eax,-0xbc(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <cdflib_algdiv@plt>
movsd  -0xc8(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0xbc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1060 <cdflib_bcorr@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0x8b1(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0x8ae(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1030 <cdflib_alnrel@plt>
movsd  -0xe0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     17f9 <cdflib_beta_log+0x679>
jmp    1858 <cdflib_beta_log+0x6d8>
movsd  -0x30(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
movsd  0x812(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x7f7(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    18b2 <cdflib_beta_log+0x732>
movsd  -0x30(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
movsd  0x7b3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x798(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x58(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_beta_log>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    $0x2,%al
call   1040 <cdflib_fifdmin1@plt>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
movsd  (%r14),%xmm1
mov    $0x2,%al
call   1070 <cdflib_fifdmax1@plt>
cvtsi2sd %eax,%xmm6
movsd  %xmm6,(%rsp)
cmp    $0x7,%ebp
jg     122b <cdflib_beta_log+0xab>
mov    %eax,%ebx
test   %ebp,%ebp
jle    1311 <cdflib_beta_log+0x191>
cmp    $0x2,%ebp
movsd  0x10(%rsp),%xmm7
jbe    135c <cdflib_beta_log+0x1dc>
movsd  0xe25(%rip),%xmm0
addsd  %xmm7,%xmm0
cvttsd2si %xmm0,%ebp
cmp    $0x3e8,%ebx
movsd  %xmm6,0x28(%rsp)
jle    139a <cdflib_beta_log+0x21a>
test   %ebp,%ebp
jle    13f1 <cdflib_beta_log+0x271>
cmp    $0x1,%ebp
jne    140b <cdflib_beta_log+0x28b>
movsd  0xdda(%rip),%xmm0
jmp    146d <cdflib_beta_log+0x2ed>
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <cdflib_bcorr@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
movapd %xmm1,%xmm2
divsd  (%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0xd98(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
addsd  0xd90(%rip),%xmm2
movapd %xmm2,0x10(%rsp)
call   1080 <log@plt>
movapd 0x10(%rsp),%xmm1
xorpd  0xd8f(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1030 <cdflib_alnrel@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1080 <log@plt>
movsd  0x20(%rsp),%xmm2
movapd 0x10(%rsp),%xmm1
ucomisd %xmm1,%xmm2
mulsd  0xd21(%rip),%xmm0
addsd  0xd21(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
jae    1304 <cdflib_beta_log+0x184>
subsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
jmp    16f9 <cdflib_beta_log+0x579>
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
jmp    16f9 <cdflib_beta_log+0x579>
cmp    $0x7,%ebx
movsd  0x10(%rsp),%xmm0
jg     136e <cdflib_beta_log+0x1ee>
addsd  %xmm0,%xmm6
movsd  %xmm6,0x30(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebx
mov    %rsp,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebp
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
add    %ebx,%ebp
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
jmp    16f9 <cdflib_beta_log+0x579>
cmp    $0x2,%ebx
jle    13b4 <cdflib_beta_log+0x234>
xorpd  %xmm0,%xmm0
cmp    $0x8,%ebx
jb     15b7 <cdflib_beta_log+0x437>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebp
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <cdflib_algdiv@plt>
add    %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    16f9 <cdflib_beta_log+0x579>
test   %ebp,%ebp
jle    13fe <cdflib_beta_log+0x27e>
cmp    $0x1,%ebp
jne    14fb <cdflib_beta_log+0x37b>
movsd  0xc51(%rip),%xmm0
jmp    1561 <cdflib_beta_log+0x3e1>
lea    0x8(%rsp),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebp
mov    %rsp,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10a0 <cdflib_gsumln@plt>
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
jmp    16f9 <cdflib_beta_log+0x579>
movsd  0xc07(%rip),%xmm0
jmp    149d <cdflib_beta_log+0x31d>
movsd  0xbfa(%rip),%xmm0
jmp    159b <cdflib_beta_log+0x41b>
mov    %ebp,%eax
and    $0xfffffffe,%eax
movsd  0xbe8(%rip),%xmm1
movsd  0xbf8(%rip),%xmm2
movapd %xmm1,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm2,%xmm7
movapd %xmm7,%xmm3
divsd  %xmm6,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm7,%xmm4
divsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm7
movapd %xmm7,%xmm3
divsd  %xmm6,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm7,%xmm0
divsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
add    $0xfffffffe,%eax
jne    1430 <cdflib_beta_log+0x2b0>
test   $0x1,%bpl
je     1497 <cdflib_beta_log+0x317>
addsd  0xb9d(%rip),%xmm7
movapd %xmm7,%xmm1
divsd  %xmm6,%xmm1
addsd  0xb75(%rip),%xmm1
movapd %xmm7,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm7,0x8(%rsp)
call   1080 <log@plt>
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x28(%rsp),%xmm0
call   1080 <log@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebp
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <cdflib_algdiv@plt>
add    %ebp,%eax
jmp    161c <cdflib_beta_log+0x49c>
mov    %ebp,%eax
and    $0xfffffffe,%eax
movsd  0xaf8(%rip),%xmm2
movsd  0xb08(%rip),%xmm3
movapd %xmm2,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm3,%xmm7
movapd %xmm7,%xmm4
divsd  %xmm6,%xmm4
movapd %xmm4,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm7
movapd %xmm7,%xmm1
divsd  %xmm6,%xmm1
movapd %xmm1,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm1,%xmm0
divsd  %xmm5,%xmm0
mulsd  %xmm4,%xmm0
add    $0xfffffffe,%eax
jne    1520 <cdflib_beta_log+0x3a0>
test   $0x1,%bpl
je     158f <cdflib_beta_log+0x40f>
addsd  0xaa9(%rip),%xmm7
movapd %xmm7,%xmm1
divsd  %xmm6,%xmm1
movsd  0xa81(%rip),%xmm2
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
movsd  %xmm7,0x10(%rsp)
movsd  %xmm7,0x8(%rsp)
movsd  %xmm1,0x30(%rsp)
call   1080 <log@plt>
cmp    $0x8,%ebx
movsd  0x28(%rsp),%xmm6
movsd  0x10(%rsp),%xmm7
jge    15e3 <cdflib_beta_log+0x463>
movsd  0xa59(%rip),%xmm1
addsd  %xmm6,%xmm1
cvttsd2si %xmm1,%eax
test   %eax,%eax
movsd  %xmm0,0x10(%rsp)
jle    1628 <cdflib_beta_log+0x4a8>
cmp    $0x1,%eax
jne    1632 <cdflib_beta_log+0x4b2>
movsd  0xa22(%rip),%xmm0
jmp    1685 <cdflib_beta_log+0x505>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
movsd  %xmm0,0x10(%rsp)
call   1090 <cdflib_gamma_log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <cdflib_algdiv@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    16f3 <cdflib_beta_log+0x573>
movsd  0x9d0(%rip),%xmm0
jmp    16a6 <cdflib_beta_log+0x526>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0x9c1(%rip),%xmm0
movsd  0x9d1(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm6
movapd %xmm6,%xmm2
addsd  %xmm7,%xmm2
movapd %xmm6,%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm6
movapd %xmm6,%xmm2
addsd  %xmm7,%xmm2
movapd %xmm6,%xmm0
divsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
add    $0xfffffffe,%ecx
jne    1650 <cdflib_beta_log+0x4d0>
test   $0x1,%al
je     16a1 <cdflib_beta_log+0x521>
addsd  0x987(%rip),%xmm6
addsd  %xmm6,%xmm7
movapd %xmm6,%xmm1
divsd  %xmm7,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm6,(%rsp)
call   1080 <log@plt>
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x8(%rsp),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebp
mov    %rsp,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <cdflib_gamma_log@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10a0 <cdflib_gsumln@plt>
add    %ebp,%ebx
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@cdflib_beta_log.e = internal constant double 0x3FED67F1C864BEB7
define double @cdflib_beta_log(double* %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
store double* %0, double** %4
store double* %1, double** %5
%18 = load double*, double** %4
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = load double, double* %20
%22 = call i32 (double, double, ...) bitcast (i32 (...)* @cdflib_fifdmin1 to i32 (double, double, ...)*)(double %19, double %21)
%23 = sitofp i32 %22 to double
store double %23, double* %7
%24 = load double*, double** %4
%25 = load double, double* %24
%26 = load double*, double** %5
%27 = load double, double* %26
%28 = call i32 (double, double, ...) bitcast (i32 (...)* @cdflib_fifdmax1 to i32 (double, double, ...)*)(double %25, double %27)
%29 = sitofp i32 %28 to double
store double %29, double* %8
%30 = load double, double* %7
%31 = fcmp oge double %30, 8.000000e+00
br i1 %31, label %32, label %33
32: ; preds = %2
br label %197
33: ; preds = %2
%34 = load double, double* %7
%35 = fcmp oge double %34, 1.000000e+00
br i1 %35, label %36, label %37
36: ; preds = %33
br label %58
37: ; preds = %33
%38 = load double, double* %8
%39 = fcmp oge double %38, 8.000000e+00
br i1 %39, label %40, label %41
40: ; preds = %37
br label %52
41: ; preds = %37
%42 = load double, double* %7
%43 = load double, double* %8
%44 = fadd double %42, %43
store double %44, double* %17
%45 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%46 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %8)
%47 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %17)
%48 = sub nsw i32 %46, %47
%49 = add nsw i32 %45, %48
%50 = sitofp i32 %49 to double
store double %50, double* %6
%51 = load double, double* %6
store double %51, double* %3
br label %247
52: ; preds = %40
%53 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%54 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %7, double* %8)
%55 = add nsw i32 %53, %54
%56 = sitofp i32 %55 to double
store double %56, double* %6
%57 = load double, double* %6
store double %57, double* %3
br label %247
58: ; preds = %36
%59 = load double, double* %7
%60 = fcmp ogt double %59, 2.000000e+00
br i1 %60, label %61, label %62
61: ; preds = %58
br label %84
62: ; preds = %58
%63 = load double, double* %8
%64 = fcmp ogt double %63, 2.000000e+00
br i1 %64, label %65, label %66
65: ; preds = %62
br label %74
66: ; preds = %62
%67 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%68 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %8)
%69 = add nsw i32 %67, %68
%70 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_gsumln to i32 (double*, double*, ...)*)(double* %7, double* %8)
%71 = sub nsw i32 %69, %70
%72 = sitofp i32 %71 to double
store double %72, double* %6
%73 = load double, double* %6
store double %73, double* %3
br label %247
74: ; preds = %65
store double 0.000000e+00, double* %13
%75 = load double, double* %8
%76 = fcmp olt double %75, 8.000000e+00
br i1 %76, label %77, label %78
77: ; preds = %74
br label %126
78: ; preds = %74
%79 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%80 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %7, double* %8)
%81 = add nsw i32 %79, %80
%82 = sitofp i32 %81 to double
store double %82, double* %6
%83 = load double, double* %6
store double %83, double* %3
br label %247
84: ; preds = %61
%85 = load double, double* %8
%86 = fcmp ogt double %85, 1.000000e+03
br i1 %86, label %87, label %88
87: ; preds = %84
br label %160
88: ; preds = %84
%89 = load double, double* %7
%90 = fsub double %89, 1.000000e+00
%91 = fptosi double %90 to i32
store i32 %91, i32* %16
store double 1.000000e+00, double* %13
store i32 1, i32* %15
br label %92
92: ; preds = %108, %88
%93 = load i32, i32* %15
%94 = load i32, i32* %16
%95 = icmp sle i32 %93, %94
br i1 %95, label %96, label %111
96: ; preds = %92
%97 = load double, double* %7
%98 = fsub double %97, 1.000000e+00
store double %98, double* %7
%99 = load double, double* %7
%100 = load double, double* %8
%101 = fdiv double %99, %100
store double %101, double* %10
%102 = load double, double* %10
%103 = load double, double* %10
%104 = fadd double 1.000000e+00, %103
%105 = fdiv double %102, %104
%106 = load double, double* %13
%107 = fmul double %106, %105
store double %107, double* %13
br label %108
108: ; preds = %96
%109 = load i32, i32* %15
%110 = add nsw i32 %109, 1
store i32 %110, i32* %15
br label %92
111: ; preds = %92
%112 = load double, double* %13
%113 = call double @log(double %112)
store double %113, double* %13
%114 = load double, double* %8
%115 = fcmp olt double %114, 8.000000e+00
br i1 %115, label %116, label %117
116: ; preds = %111
br label %126
117: ; preds = %111
%118 = load double, double* %13
%119 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%120 = sitofp i32 %119 to double
%121 = fadd double %118, %120
%122 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %7, double* %8)
%123 = sitofp i32 %122 to double
%124 = fadd double %121, %123
store double %124, double* %6
%125 = load double, double* %6
store double %125, double* %3
br label %247
126: ; preds = %116, %77
%127 = load double, double* %8
%128 = fsub double %127, 1.000000e+00
%129 = fptosi double %128 to i32
store i32 %129, i32* %16
store double 1.000000e+00, double* %14
store i32 1, i32* %15
br label %130
130: ; preds = %144, %126
%131 = load i32, i32* %15
%132 = load i32, i32* %16
%133 = icmp sle i32 %131, %132
br i1 %133, label %134, label %147
134: ; preds = %130
%135 = load double, double* %8
%136 = fsub double %135, 1.000000e+00
store double %136, double* %8
%137 = load double, double* %8
%138 = load double, double* %7
%139 = load double, double* %8
%140 = fadd double %138, %139
%141 = fdiv double %137, %140
%142 = load double, double* %14
%143 = fmul double %142, %141
store double %143, double* %14
br label %144
144: ; preds = %134
%145 = load i32, i32* %15
%146 = add nsw i32 %145, 1
store i32 %146, i32* %15
br label %130
147: ; preds = %130
%148 = load double, double* %13
%149 = load double, double* %14
%150 = call double @log(double %149)
%151 = fadd double %148, %150
%152 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%153 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %8)
%154 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_gsumln to i32 (double*, double*, ...)*)(double* %7, double* %8)
%155 = sub nsw i32 %153, %154
%156 = add nsw i32 %152, %155
%157 = sitofp i32 %156 to double
%158 = fadd double %151, %157
store double %158, double* %6
%159 = load double, double* %6
store double %159, double* %3
br label %247
160: ; preds = %87
%161 = load double, double* %7
%162 = fsub double %161, 1.000000e+00
%163 = fptosi double %162 to i32
store i32 %163, i32* %16
store double 1.000000e+00, double* %13
store i32 1, i32* %15
br label %164
164: ; preds = %179, %160
%165 = load i32, i32* %15
%166 = load i32, i32* %16
%167 = icmp sle i32 %165, %166
br i1 %167, label %168, label %182
168: ; preds = %164
%169 = load double, double* %7
%170 = fsub double %169, 1.000000e+00
store double %170, double* %7
%171 = load double, double* %7
%172 = load double, double* %7
%173 = load double, double* %8
%174 = fdiv double %172, %173
%175 = fadd double 1.000000e+00, %174
%176 = fdiv double %171, %175
%177 = load double, double* %13
%178 = fmul double %177, %176
store double %178, double* %13
br label %179
179: ; preds = %168
%180 = load i32, i32* %15
%181 = add nsw i32 %180, 1
store i32 %181, i32* %15
br label %164
182: ; preds = %164
%183 = load double, double* %13
%184 = call double @log(double %183)
%185 = load i32, i32* %16
%186 = sitofp i32 %185 to double
%187 = load double, double* %8
%188 = call double @log(double %187)
%189 = fneg double %186
%190 = call double @llvm.fmuladd.f64(double %189, double %188, double %184)
%191 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %7)
%192 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %7, double* %8)
%193 = add nsw i32 %191, %192
%194 = sitofp i32 %193 to double
%195 = fadd double %190, %194
store double %195, double* %6
%196 = load double, double* %6
store double %196, double* %3
br label %247
197: ; preds = %32
%198 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_bcorr to i32 (double*, double*, ...)*)(double* %7, double* %8)
%199 = sitofp i32 %198 to double
store double %199, double* %13
%200 = load double, double* %7
%201 = load double, double* %8
%202 = fdiv double %200, %201
store double %202, double* %10
%203 = load double, double* %10
%204 = load double, double* %10
%205 = fadd double 1.000000e+00, %204
%206 = fdiv double %203, %205
store double %206, double* %9
%207 = load double, double* %7
%208 = fsub double %207, 5.000000e-01
%209 = load double, double* %9
%210 = call double @log(double %209)
%211 = fmul double %208, %210
%212 = fneg double %211
store double %212, double* %11
%213 = load double, double* %8
%214 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_alnrel to i32 (double*, ...)*)(double* %10)
%215 = sitofp i32 %214 to double
%216 = fmul double %213, %215
store double %216, double* %12
%217 = load double, double* %11
%218 = load double, double* %12
%219 = fcmp ole double %217, %218
br i1 %219, label %220, label %221
220: ; preds = %197
br label %234
221: ; preds = %197
%222 = load double, double* %8
%223 = call double @log(double %222)
%224 = fmul double 5.000000e-01, %223
%225 = fneg double %224
%226 = fadd double %225, 0x3FED67F1C864BEB7
%227 = load double, double* %13
%228 = fadd double %226, %227
%229 = load double, double* %12
%230 = fsub double %228, %229
%231 = load double, double* %11
%232 = fsub double %230, %231
store double %232, double* %6
%233 = load double, double* %6
store double %233, double* %3
br label %247
234: ; preds = %220
%235 = load double, double* %8
%236 = call double @log(double %235)
%237 = fmul double 5.000000e-01, %236
%238 = fneg double %237
%239 = fadd double %238, 0x3FED67F1C864BEB7
%240 = load double, double* %13
%241 = fadd double %239, %240
%242 = load double, double* %11
%243 = fsub double %241, %242
%244 = load double, double* %12
%245 = fsub double %243, %244
store double %245, double* %6
%246 = load double, double* %6
store double %246, double* %3
br label %247
247: ; preds = %234, %221, %182, %147, %117, %78, %66, %52, %41
%248 = load double, double* %3
ret double %248
}

LLVM IR (-O2):
define double @cdflib_beta_log(double* nocapture %0, double* nocapture %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
%9 = bitcast double* %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = load double, double* %0
%12 = load double, double* %1
%13 = tail call i32 (double, double, ...) bitcast (i32 (...)* @cdflib_fifdmin1 to i32 (double, double, ...)*)(double %11, double %12)
%14 = sitofp i32 %13 to double
store double %14, double* %3
%15 = load double, double* %0
%16 = load double, double* %1
%17 = tail call i32 (double, double, ...) bitcast (i32 (...)* @cdflib_fifdmax1 to i32 (double, double, ...)*)(double %15, double %16)
%18 = sitofp i32 %17 to double
store double %18, double* %4
%19 = icmp slt i32 %13, 8
br i1 %19, label %20, label %211
20: ; preds = %2
%21 = icmp slt i32 %13, 1
br i1 %21, label %22, label %37
22: ; preds = %20
%23 = icmp sgt i32 %17, 7
br i1 %23, label %32, label %24
24: ; preds = %22
%25 = fadd double %18, %14
store double %25, double* %6
%26 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%27 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %4)
%28 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %6)
%29 = add i32 %27, %26
%30 = sub i32 %29, %28
%31 = sitofp i32 %30 to double
br label %239
32: ; preds = %22
%33 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%34 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %3, double* %4)
%35 = add nsw i32 %34, %33
%36 = sitofp i32 %35 to double
br label %239
37: ; preds = %20
%38 = icmp ugt i32 %13, 2
br i1 %38, label %55, label %39
39: ; preds = %37
%40 = icmp sgt i32 %17, 2
br i1 %40, label %48, label %41
41: ; preds = %39
%42 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%43 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %4)
%44 = add nsw i32 %43, %42
%45 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_gsumln to i32 (double*, double*, ...)*)(double* %3, double* %4)
%46 = sub i32 %44, %45
%47 = sitofp i32 %46 to double
br label %239
48: ; preds = %39
%49 = icmp ult i32 %17, 8
br i1 %49, label %112, label %50
50: ; preds = %48
%51 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%52 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %3, double* %4)
%53 = add nsw i32 %52, %51
%54 = sitofp i32 %53 to double
br label %239
55: ; preds = %37
%56 = icmp sgt i32 %17, 1000
%57 = fadd double %14, -1.000000e+00
%58 = fptosi double %57 to i32
%59 = icmp slt i32 %58, 1
br i1 %56, label %162, label %60
60: ; preds = %55
br i1 %59, label %99, label %61
61: ; preds = %60
%62 = and i32 %58, 1
%63 = icmp eq i32 %58, 1
br i1 %63, label %82, label %64
64: ; preds = %61
%65 = and i32 %58, -2
br label %66
66: ; preds = %66, %64
%67 = phi double [ 1.000000e+00, %64 ], [ %79, %66 ]
%68 = phi double [ %14, %64 ], [ %75, %66 ]
%69 = phi i32 [ 0, %64 ], [ %80, %66 ]
%70 = fadd double %68, -1.000000e+00
%71 = fdiv double %70, %18
%72 = fadd double %71, 1.000000e+00
%73 = fdiv double %71, %72
%74 = fmul double %67, %73
%75 = fadd double %70, -1.000000e+00
%76 = fdiv double %75, %18
%77 = fadd double %76, 1.000000e+00
%78 = fdiv double %76, %77
%79 = fmul double %74, %78
%80 = add i32 %69, 2
%81 = icmp eq i32 %80, %65
br i1 %81, label %82, label %66
82: ; preds = %66, %61
%83 = phi double [ undef, %61 ], [ %75, %66 ]
%84 = phi double [ undef, %61 ], [ %76, %66 ]
%85 = phi double [ undef, %61 ], [ %79, %66 ]
%86 = phi double [ 1.000000e+00, %61 ], [ %79, %66 ]
%87 = phi double [ %14, %61 ], [ %75, %66 ]
%88 = icmp eq i32 %62, 0
br i1 %88, label %95, label %89
89: ; preds = %82
%90 = fadd double %87, -1.000000e+00
%91 = fdiv double %90, %18
%92 = fadd double %91, 1.000000e+00
%93 = fdiv double %91, %92
%94 = fmul double %86, %93
br label %95
95: ; preds = %82, %89
%96 = phi double [ %83, %82 ], [ %90, %89 ]
%97 = phi double [ %84, %82 ], [ %91, %89 ]
%98 = phi double [ %85, %82 ], [ %94, %89 ]
store double %96, double* %3
br label %99
99: ; preds = %95, %60
%100 = phi double [ %96, %95 ], [ %14, %60 ]
%101 = phi double [ %97, %95 ], [ undef, %60 ]
%102 = phi double [ %98, %95 ], [ 1.000000e+00, %60 ]
store double %101, double* %5
%103 = tail call double @log(double %102)
%104 = icmp slt i32 %17, 8
br i1 %104, label %112, label %105
105: ; preds = %99
%106 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%107 = sitofp i32 %106 to double
%108 = fadd double %103, %107
%109 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %3, double* %4)
%110 = sitofp i32 %109 to double
%111 = fadd double %108, %110
br label %239
112: ; preds = %99, %48
%113 = phi double [ %100, %99 ], [ %14, %48 ]
%114 = phi double [ %103, %99 ], [ 0.000000e+00, %48 ]
%115 = fadd double %18, -1.000000e+00
%116 = fptosi double %115 to i32
%117 = icmp slt i32 %116, 1
br i1 %117, label %151, label %118
118: ; preds = %112
%119 = and i32 %116, 1
%120 = icmp eq i32 %116, 1
br i1 %120, label %137, label %121
121: ; preds = %118
%122 = and i32 %116, -2
br label %123
123: ; preds = %123, %121
%124 = phi double [ 1.000000e+00, %121 ], [ %134, %123 ]
%125 = phi double [ %18, %121 ], [ %131, %123 ]
%126 = phi i32 [ 0, %121 ], [ %135, %123 ]
%127 = fadd double %125, -1.000000e+00
%128 = fadd double %127, %113
%129 = fdiv double %127, %128
%130 = fmul double %124, %129
%131 = fadd double %127, -1.000000e+00
%132 = fadd double %131, %113
%133 = fdiv double %131, %132
%134 = fmul double %130, %133
%135 = add i32 %126, 2
%136 = icmp eq i32 %135, %122
br i1 %136, label %137, label %123
137: ; preds = %123, %118
%138 = phi double [ undef, %118 ], [ %131, %123 ]
%139 = phi double [ undef, %118 ], [ %134, %123 ]
%140 = phi double [ 1.000000e+00, %118 ], [ %134, %123 ]
%141 = phi double [ %18, %118 ], [ %131, %123 ]
%142 = icmp eq i32 %119, 0
br i1 %142, label %148, label %143
143: ; preds = %137
%144 = fadd double %141, -1.000000e+00
%145 = fadd double %144, %113
%146 = fdiv double %144, %145
%147 = fmul double %140, %146
br label %148
148: ; preds = %137, %143
%149 = phi double [ %138, %137 ], [ %144, %143 ]
%150 = phi double [ %139, %137 ], [ %147, %143 ]
store double %149, double* %4
br label %151
151: ; preds = %148, %112
%152 = phi double [ %150, %148 ], [ 1.000000e+00, %112 ]
%153 = tail call double @log(double %152)
%154 = fadd double %114, %153
%155 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%156 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %4)
%157 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_gsumln to i32 (double*, double*, ...)*)(double* %3, double* %4)
%158 = add i32 %156, %155
%159 = sub i32 %158, %157
%160 = sitofp i32 %159 to double
%161 = fadd double %154, %160
br label %239
162: ; preds = %55
br i1 %59, label %199, label %163
163: ; preds = %162
%164 = and i32 %58, 1
%165 = icmp eq i32 %58, 1
br i1 %165, label %184, label %166
166: ; preds = %163
%167 = and i32 %58, -2
br label %168
168: ; preds = %168, %166
%169 = phi double [ 1.000000e+00, %166 ], [ %181, %168 ]
%170 = phi double [ %14, %166 ], [ %177, %168 ]
%171 = phi i32 [ 0, %166 ], [ %182, %168 ]
%172 = fadd double %170, -1.000000e+00
%173 = fdiv double %172, %18
%174 = fadd double %173, 1.000000e+00
%175 = fdiv double %172, %174
%176 = fmul double %169, %175
%177 = fadd double %172, -1.000000e+00
%178 = fdiv double %177, %18
%179 = fadd double %178, 1.000000e+00
%180 = fdiv double %177, %179
%181 = fmul double %176, %180
%182 = add i32 %171, 2
%183 = icmp eq i32 %182, %167
br i1 %183, label %184, label %168
184: ; preds = %168, %163
%185 = phi double [ undef, %163 ], [ %177, %168 ]
%186 = phi double [ undef, %163 ], [ %181, %168 ]
%187 = phi double [ 1.000000e+00, %163 ], [ %181, %168 ]
%188 = phi double [ %14, %163 ], [ %177, %168 ]
%189 = icmp eq i32 %164, 0
br i1 %189, label %196, label %190
190: ; preds = %184
%191 = fadd double %188, -1.000000e+00
%192 = fdiv double %191, %18
%193 = fadd double %192, 1.000000e+00
%194 = fdiv double %191, %193
%195 = fmul double %187, %194
br label %196
196: ; preds = %184, %190
%197 = phi double [ %185, %184 ], [ %191, %190 ]
%198 = phi double [ %186, %184 ], [ %195, %190 ]
store double %197, double* %3
br label %199
199: ; preds = %196, %162
%200 = phi double [ %198, %196 ], [ 1.000000e+00, %162 ]
%201 = tail call double @log(double %200)
%202 = sitofp i32 %58 to double
%203 = tail call double @log(double %18)
%204 = fneg double %202
%205 = tail call double @llvm.fmuladd.f64(double %204, double %203, double %201)
%206 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_gamma_log to i32 (double*, ...)*)(double* %3)
%207 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_algdiv to i32 (double*, double*, ...)*)(double* %3, double* %4)
%208 = add nsw i32 %207, %206
%209 = sitofp i32 %208 to double
%210 = fadd double %205, %209
br label %239
211: ; preds = %2
%212 = call i32 (double*, double*, ...) bitcast (i32 (...)* @cdflib_bcorr to i32 (double*, double*, ...)*)(double* %3, double* %4)
%213 = sitofp i32 %212 to double
%214 = load double, double* %3
%215 = load double, double* %4
%216 = fdiv double %214, %215
store double %216, double* %5
%217 = fadd double %216, 1.000000e+00
%218 = fdiv double %216, %217
%219 = fadd double %214, -5.000000e-01
%220 = call double @log(double %218)
%221 = fneg double %219
%222 = fmul double %220, %221
%223 = load double, double* %4
%224 = call i32 (double*, ...) bitcast (i32 (...)* @cdflib_alnrel to i32 (double*, ...)*)(double* %5)
%225 = sitofp i32 %224 to double
%226 = fmul double %223, %225
%227 = fcmp ugt double %222, %226
%228 = load double, double* %4
%229 = call double @log(double %228)
%230 = fmul double %229, 5.000000e-01
%231 = fsub double 0x3FED67F1C864BEB7, %230
%232 = fadd double %231, %213
br i1 %227, label %233, label %236
233: ; preds = %211
%234 = fsub double %232, %226
%235 = fsub double %234, %222
br label %239
236: ; preds = %211
%237 = fsub double %232, %222
%238 = fsub double %237, %226
br label %239
239: ; preds = %236, %233, %199, %151, %105, %50, %41, %32, %24
%240 = phi double [ %238, %236 ], [ %235, %233 ], [ %210, %199 ], [ %161, %151 ], [ %111, %105 ], [ %54, %50 ], [ %47, %41 ], [ %36, %32 ], [ %31, %24 ]
ret double %240
}