double cdflib_beta_pser(const double *a, const double *b, const double *x,
                        const double *eps) {
  double bpser, a0, apb, b0, c, n, sum, t, tol, u, w, z;
  int i, m;
  bpser = 0.0e0;
  if (*x == 0.0e0) {
    return bpser;
  }
  a0 = cdflib_fifdmin1(*a, *b);
  if (a0 < 1.0e0) {
    goto S10;
  }
  z = *a * log(*x) - cdflib_beta_log(a, b);
  bpser = exp(z) / *a;
  goto S100;
S10:
  b0 = cdflib_fifdmax1(*a, *b);
  if (b0 >= 8.0e0) {
    goto S90;
  }
  if (b0 > 1.0e0) {
    goto S40;
  }
  bpser = pow(*x, *a);
  if (bpser == 0.0e0) {
    return bpser;
  }
  apb = *a + *b;
  if (apb > 1.0e0) {
    goto S20;
  }
  z = 1.0e0 + cdflib_gam1(&apb);
  goto S30;
S20:
  u = *a + *b - 1.e0;
  z = (1.0e0 + cdflib_gam1(&u)) / apb;
S30:
  c = (1.0e0 + cdflib_gam1(a)) * (1.0e0 + cdflib_gam1(b)) / z;
  bpser *= (c * (*b / apb));
  goto S100;
S40:
  u = cdflib_gamma_ln1(&a0);
  m = (int)(b0 - 1.0e0);
  if (m < 1) {
    goto S60;
  }
  c = 1.0e0;
  for (i = 1; i <= m; i++) {
    b0 -= 1.0e0;
    c *= (b0 / (a0 + b0));
  }
  u = log(c) + u;
S60:
  z = *a * log(*x) - u;
  b0 -= 1.0e0;
  apb = a0 + b0;
  if (apb > 1.0e0) {
    goto S70;
  }
  t = 1.0e0 + cdflib_gam1(&apb);
  goto S80;
S70:
  u = a0 + b0 - 1.e0;
  t = (1.0e0 + cdflib_gam1(&u)) / apb;
S80:
  bpser = exp(z) * (a0 / *a) * (1.0e0 + cdflib_gam1(&b0)) / t;
  goto S100;
S90:
  u = cdflib_gamma_ln1(&a0) + cdflib_algdiv(&a0, &b0);
  z = *a * log(*x) - u;
  bpser = a0 / *a * exp(z);
S100:
  if (bpser == 0.0e0 || *a <= 0.1e0 * *eps) {
    return bpser;
  }
  sum = n = 0.0e0;
  c = 1.0e0;
  tol = *eps / *a;
S110:
  n = n + 1.0e0;
  c *= ((0.5e0 + (0.5e0 - *b / n)) * *x);
  w = c / (*a + n);
  sum = sum + w;
  if (fabs(w) > tol) {
    goto S110;
  }
  bpser *= (1.0e0 + *a * sum);
  return bpser;
}


x86 assembly (clang, -O0):
<cdflib_beta_pser>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11dd <cdflib_beta_pser+0x4d>
jp     11dd <cdflib_beta_pser+0x4d>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1876 <cdflib_beta_pser+0x6e6>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1030 <cdflib_fifdmin1@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdfb(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1215 <cdflib_beta_pser+0x85>
jmp    12a3 <cdflib_beta_pser+0x113>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   10a0 <log@plt>
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <cdflib_beta_log@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1080 <exp@plt>
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1732 <cdflib_beta_pser+0x5a2>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1090 <cdflib_fifdmax1@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xd38(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12df <cdflib_beta_pser+0x14f>
jmp    1675 <cdflib_beta_pser+0x4e5>
movsd  -0x48(%rbp),%xmm0
movsd  0xd14(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12fb <cdflib_beta_pser+0x16b>
jmp    145a <cdflib_beta_pser+0x2ca>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   10b0 <pow@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    133c <cdflib_beta_pser+0x1ac>
jp     133c <cdflib_beta_pser+0x1ac>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1876 <cdflib_beta_pser+0x6e6>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xca2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    136d <cdflib_beta_pser+0x1dd>
jmp    1395 <cdflib_beta_pser+0x205>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
cvtsi2sd %eax,%xmm1
movsd  0xc7c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    13de <cdflib_beta_pser+0x24e>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  0xc53(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
cvtsi2sd %eax,%xmm1
movsd  0xc33(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
cvtsi2sd %eax,%xmm1
movsd  0xc0b(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0xbe0(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
divsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1732 <cdflib_beta_pser+0x5a2>
lea    -0x38(%rbp),%rdi
mov    $0x0,%al
call   1050 <cdflib_gamma_ln1@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xb85(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x1,-0x90(%rbp)
jge    149b <cdflib_beta_pser+0x30b>
jmp    151f <cdflib_beta_pser+0x38f>
movsd  0xb5d(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x90(%rbp),%eax
jg     150b <cdflib_beta_pser+0x37b>
movsd  -0x48(%rbp),%xmm0
movsd  0xb2f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14b2 <cdflib_beta_pser+0x322>
movsd  -0x50(%rbp),%xmm0
call   10a0 <log@plt>
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   10a0 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  0xa80(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xa5b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15b4 <cdflib_beta_pser+0x424>
jmp    15d9 <cdflib_beta_pser+0x449>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
cvtsi2sd %eax,%xmm1
movsd  0xa35(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1619 <cdflib_beta_pser+0x489>
movsd  -0x38(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  0xa15(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
cvtsi2sd %eax,%xmm1
movsd  0x9f5(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
call   1080 <exp@plt>
movsd  -0x38(%rbp),%xmm1
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1040 <cdflib_gam1@plt>
movsd  -0xb8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0x9a2(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1732 <cdflib_beta_pser+0x5a2>
lea    -0x38(%rbp),%rdi
mov    $0x0,%al
call   1050 <cdflib_gamma_ln1@plt>
mov    %eax,-0xcc(%rbp)
lea    -0x38(%rbp),%rdi
lea    -0x48(%rbp),%rsi
mov    $0x0,%al
call   1070 <cdflib_algdiv@plt>
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   10a0 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1080 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    174f <cdflib_beta_pser+0x5bf>
jp     174f <cdflib_beta_pser+0x5bf>
jmp    1771 <cdflib_beta_pser+0x5e1>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  0x8ad(%rip),%xmm0
mulsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1780 <cdflib_beta_pser+0x5f0>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1876 <cdflib_beta_pser+0x6e6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0x868(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0x846(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  0x83f(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x833(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
addsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x80(%rbp),%xmm0
movaps 0x7ef(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1845 <cdflib_beta_pser+0x6b5>
jmp    17b2 <cdflib_beta_pser+0x622>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x7a2(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_beta_pser>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  (%rdx),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    11b2 <cdflib_beta_pser+0x22>
jnp    1653 <cdflib_beta_pser+0x4c3>
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    $0x2,%al
call   1030 <cdflib_fifdmin1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rbx),%xmm0
test   %eax,%eax
jle    122d <cdflib_beta_pser+0x9d>
movsd  %xmm0,(%rsp)
movsd  (%r12),%xmm0
call   10a0 <log@plt>
movsd  %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <cdflib_beta_log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1080 <exp@plt>
divsd  (%rbx),%xmm0
jmp    1597 <cdflib_beta_pser+0x407>
movsd  (%r14),%xmm1
mov    $0x2,%al
call   1090 <cdflib_fifdmax1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
cmp    $0x7,%eax
jle    12b7 <cdflib_beta_pser+0x127>
lea    0x10(%rsp),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <cdflib_gamma_ln1@plt>
mov    %eax,%ebp
lea    0x18(%rsp),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <cdflib_algdiv@plt>
add    %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%r12),%xmm0
call   10a0 <log@plt>
mulsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  (%rbx),%xmm1
movsd  %xmm1,(%rsp)
call   1080 <exp@plt>
mulsd  (%rsp),%xmm0
jmp    1597 <cdflib_beta_pser+0x407>
cmp    $0x1,%eax
jle    1313 <cdflib_beta_pser+0x183>
lea    0x10(%rsp),%rdi
xor    %eax,%eax
movsd  %xmm0,(%rsp)
call   1050 <cdflib_gamma_ln1@plt>
movsd  (%rsp),%xmm5
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xd21(%rip),%xmm0
addsd  %xmm5,%xmm0
cvttsd2si %xmm0,%eax
test   %eax,%eax
jle    1418 <cdflib_beta_pser+0x288>
movsd  0x10(%rsp),%xmm1
cmp    $0x1,%eax
jne    1392 <cdflib_beta_pser+0x202>
movsd  0xcf2(%rip),%xmm0
jmp    13e5 <cdflib_beta_pser+0x255>
movsd  (%r12),%xmm0
movsd  (%rbx),%xmm1
call   10b0 <pow@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1332 <cdflib_beta_pser+0x1a2>
jnp    1653 <cdflib_beta_pser+0x4c3>
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,0x38(%rsp)
ucomisd 0xcb2(%rip),%xmm1
jbe    150a <cdflib_beta_pser+0x37a>
movsd  0xcac(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
movsd  %xmm1,0x20(%rsp)
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xc79(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
jmp    1525 <cdflib_beta_pser+0x395>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0xc61(%rip),%xmm0
movsd  0xc61(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm2,%xmm5
movapd %xmm5,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm5,%xmm4
divsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm5
movapd %xmm5,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm5,%xmm0
divsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
add    $0xfffffffe,%ecx
jne    13b0 <cdflib_beta_pser+0x220>
test   $0x1,%al
je     1401 <cdflib_beta_pser+0x271>
addsd  0xc17(%rip),%xmm5
addsd  %xmm5,%xmm1
movapd %xmm5,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm5,0x18(%rsp)
call   10a0 <log@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%r12),%xmm0
call   10a0 <log@plt>
mulsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm1
addsd  0xbbe(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x38(%rsp)
ucomisd 0xb9c(%rip),%xmm1
jbe    14a1 <cdflib_beta_pser+0x311>
movsd  0xb9a(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
movsd  %xmm1,0x20(%rsp)
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xb67(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
jmp    14bc <cdflib_beta_pser+0x32c>
lea    0x38(%rsp),%rdi
xor    %eax,%eax
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xb44(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1080 <exp@plt>
movsd  0x10(%rsp),%xmm1
divsd  (%rbx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
lea    0x18(%rsp),%rdi
xor    %eax,%eax
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xb06(%rip),%xmm0
mulsd  (%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
jmp    1597 <cdflib_beta_pser+0x407>
lea    0x38(%rsp),%rdi
xor    %eax,%eax
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xadb(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xabc(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <cdflib_gam1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xa9d(%rip),%xmm0
mulsd  0x40(%rsp),%xmm0
movsd  (%r14),%xmm1
unpcklpd %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
unpcklpd 0x20(%rsp),%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movsd  (%rsp),%xmm0
mulsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15a7 <cdflib_beta_pser+0x417>
jnp    1653 <cdflib_beta_pser+0x4c3>
movsd  (%rbx),%xmm3
movsd  (%r15),%xmm10
movsd  0xa58(%rip),%xmm2
mulsd  %xmm10,%xmm2
ucomisd %xmm3,%xmm2
jae    1653 <cdflib_beta_pser+0x4c3>
divsd  %xmm3,%xmm10
movsd  (%r14),%xmm11
movsd  (%r12),%xmm12
movsd  0xa20(%rip),%xmm8
xorpd  %xmm5,%xmm5
movsd  0xa2c(%rip),%xmm1
movapd 0xa2b(%rip),%xmm9
xorpd  %xmm7,%xmm7
movapd %xmm8,%xmm4
xchg   %ax,%ax
addsd  %xmm8,%xmm5
movapd %xmm11,%xmm2
divsd  %xmm5,%xmm2
movapd %xmm1,%xmm6
subsd  %xmm2,%xmm6
addsd  %xmm1,%xmm6
mulsd  %xmm12,%xmm6
mulsd  %xmm6,%xmm4
movapd %xmm3,%xmm2
addsd  %xmm5,%xmm2
movapd %xmm4,%xmm6
divsd  %xmm2,%xmm6
addsd  %xmm6,%xmm7
andpd  %xmm9,%xmm6
ucomisd %xmm10,%xmm6
ja     1600 <cdflib_beta_pser+0x470>
mulsd  %xmm7,%xmm3
addsd  0x9b1(%rip),%xmm3
mulsd  %xmm3,%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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