#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ b;
typedef scalar_t__ a;

/* Variables and functions */
double algdiv(double, double);
double betaln(double, double);
double exp(double);
double fabs(double);
double gam1(double);
double gamln1(double);
double log(double);
double pow(double, double);
double bpser(double a, double b, double x, double eps) {
  int i__1;
  double ret_val;
  double c__;
  int i__, m;
  double n, t, u, w, z__, a0, b0, apb, tol, sum;
  ret_val = 0.0;
  if (x == 0.0) {
    return ret_val;
  }
  a0 = ((a < b) ? a : b);
  if (a0 < 1.0) {
    goto L10;
  }
  z__ = a * log(x) - betaln(a, b);
  ret_val = exp(z__) / a;
  goto L70;
L10:
  b0 = ((a > b) ? a : b);
  if (b0 >= 8.0) {
    goto L60;
  }
  if (b0 > 1.0) {
    goto L40;
  }
  ret_val = pow(x, a);
  if (ret_val == 0.0) {
    return ret_val;
  }
  apb = a + b;
  if (apb > 1.0) {
    goto L20;
  }
  z__ = gam1(apb) + 1.0;
  goto L30;
L20:
  u = (double)(a) + (double)(b)-1.;
  z__ = (gam1(u) + 1.0) / apb;
L30:
  c__ = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z__;
  ret_val = ret_val * c__ * (b / apb);
  goto L70;
L40:
  u = gamln1(a0);
  m = b0 - 1.0;
  if (m < 1) {
    goto L50;
  }
  c__ = 1.0;
  i__1 = m;
  for (i__ = 1; i__ <= i__1; ++i__) {
    b0 += -1.0;
    c__ *= b0 / (a0 + b0);
  }
  u = log(c__) + u;
L50:
  z__ = a * log(x) - u;
  b0 += -1.0;
  apb = a0 + b0;
  if (apb > 1.0) {
    goto L51;
  }
  t = gam1(apb) + 1.0;
  goto L52;
L51:
  u = a0 + b0 - 1.;
  t = (gam1(u) + 1.0) / apb;
L52:
  ret_val = exp(z__) * (a0 / a) * (gam1(b0) + 1.0) / t;
  goto L70;
L60:
  u = gamln1(a0) + algdiv(a0, b0);
  z__ = a * log(x) - u;
  ret_val = a0 / a * exp(z__);
L70:
  if (ret_val == 0.0 || a <= eps * .1f) {
    return ret_val;
  }
  sum = 0.0;
  n = 0.0;
  c__ = 1.0;
  tol = eps / a;
L100:
  n += 1.0;
  c__ = c__ * (0.5 - b / n + 0.5) * x;
  w = c__ / (a + n);
  sum += w;
  if (fabs(w) > tol) {
    goto L100;
  }
  ret_val *= a * sum + 1.0;
  return ret_val;
}


x86 assembly (clang, -O0):
<bpser>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11be <bpser+0x4e>
jp     11be <bpser+0x4e>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1829 <bpser+0x6b9>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11e4 <bpser+0x74>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    11f1 <bpser+0x81>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  0xdfa(%rip),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    1216 <bpser+0xa6>
jmp    1294 <bpser+0x124>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1080 <betaln@plt>
movsd  -0xb0(%rbp),%xmm2
ff
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1050 <exp@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    16e7 <bpser+0x577>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12b6 <bpser+0x146>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    12c3 <bpser+0x153>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0xd2b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12ec <bpser+0x17c>
jmp    1637 <bpser+0x4c7>
movsd  -0x80(%rbp),%xmm0
movsd  0xd07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1308 <bpser+0x198>
jmp    1447 <bpser+0x2d7>
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1343 <bpser+0x1d3>
jp     1343 <bpser+0x1d3>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1829 <bpser+0x6b9>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc9b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1374 <bpser+0x204>
jmp    1397 <bpser+0x227>
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <gam1@plt>
movsd  0xc77(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13d5 <bpser+0x265>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xc57(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1030 <gam1@plt>
movsd  0xc3c(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <gam1@plt>
movsd  0xc19(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1030 <gam1@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xbf0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    16e7 <bpser+0x577>
movsd  -0x78(%rbp),%xmm0
call   1090 <gamln1@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0xb9d(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x1,-0x48(%rbp)
jge    147d <bpser+0x30d>
jmp    14f4 <bpser+0x384>
movsd  0xb7b(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     14e0 <bpser+0x370>
movsd  0xb65(%rip),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1497 <bpser+0x327>
movsd  -0x40(%rbp),%xmm0
call   1060 <log@plt>
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xac9(%rip),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xa8d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1582 <bpser+0x412>
jmp    15a5 <bpser+0x435>
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <gam1@plt>
movsd  0xa69(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    15e3 <bpser+0x473>
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  0xa49(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1030 <gam1@plt>
movsd  0xa2e(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1050 <exp@plt>
movsd  -0x78(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <gam1@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
movsd  0x9e0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    16e7 <bpser+0x577>
movsd  -0x78(%rbp),%xmm0
call   1090 <gamln1@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
call   1040 <algdiv@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x78(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1704 <bpser+0x594>
jp     1704 <bpser+0x594>
jmp    1720 <bpser+0x5b0>
movsd  -0x10(%rbp),%xmm1
movsd  0x907(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     172f <bpser+0x5bf>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1829 <bpser+0x6b9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0x8b6(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x897(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
divsd  -0x50(%rbp),%xmm2
movsd  0x896(%rip),%xmm1
subsd  %xmm2,%xmm1
movsd  0x88a(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movaps 0x84f(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x90(%rbp),%xmm0
ff
jbe    17f8 <bpser+0x688>
jmp    1761 <bpser+0x5f1>
movsd  -0x10(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x7ef(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpser>:
sub    $0x68,%rsp
movapd %xmm1,%xmm4
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jne    118d <bpser+0x1d>
jp     118d <bpser+0x1d>
add    $0x68,%rsp
ret
movapd %xmm1,%xmm0
minsd  %xmm4,%xmm0
movsd  0xe63(%rip),%xmm5
ucomisd %xmm0,%xmm5
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,0x48(%rsp)
movsd  %xmm2,0x40(%rsp)
movapd %xmm4,0x50(%rsp)
jbe    122e <bpser+0xbe>
movapd %xmm1,%xmm5
maxsd  %xmm4,%xmm5
ucomisd 0xe3d(%rip),%xmm5
jae    127e <bpser+0x10e>
ucomisd 0xe27(%rip),%xmm5
jbe    12f5 <bpser+0x185>
movsd  %xmm0,0x10(%rsp)
movsd  %xmm5,(%rsp)
call   1090 <gamln1@plt>
movsd  (%rsp),%xmm5
movsd  0xe14(%rip),%xmm1
addsd  %xmm5,%xmm1
cvttsd2si %xmm1,%eax
test   %eax,%eax
movsd  %xmm0,0x30(%rsp)
jle    135d <bpser+0x1ed>
cmp    $0x1,%eax
jne    136d <bpser+0x1fd>
movsd  0xddd(%rip),%xmm0
movsd  0x10(%rsp),%xmm4
jmp    13c5 <bpser+0x255>
movapd %xmm2,%xmm0
call   1060 <log@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
call   1080 <betaln@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <exp@plt>
movsd  0x48(%rsp),%xmm10
movsd  0x8(%rsp),%xmm9
divsd  %xmm9,%xmm0
jmp    1554 <bpser+0x3e4>
movsd  %xmm0,0x10(%rsp)
movsd  %xmm5,(%rsp)
call   1090 <gamln1@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1040 <algdiv@plt>
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <log@plt>
mulsd  0x8(%rsp),%xmm0
subsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
call   1050 <exp@plt>
movsd  0x48(%rsp),%xmm10
movsd  0x8(%rsp),%xmm9
mulsd  0x10(%rsp),%xmm0
jmp    1554 <bpser+0x3e4>
movapd %xmm2,%xmm0
call   1070 <pow@plt>
movapd 0x50(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jne    131a <bpser+0x1aa>
jnp    1188 <bpser+0x18>
movsd  %xmm0,(%rsp)
addsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
ucomisd 0xccf(%rip),%xmm1
jbe    14cc <bpser+0x35c>
movsd  0xcd1(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
call   1030 <gam1@plt>
addsd  0xcae(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
jmp    14df <bpser+0x36f>
movsd  0x40(%rsp),%xmm0
movsd  %xmm1,(%rsp)
jmp    1417 <bpser+0x2a7>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0xc86(%rip),%xmm0
movsd  0xc8e(%rip),%xmm1
movsd  0x10(%rsp),%xmm4
nopl   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm5
movapd %xmm4,%xmm2
addsd  %xmm5,%xmm2
movapd %xmm5,%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm5
movapd %xmm4,%xmm2
addsd  %xmm5,%xmm2
movapd %xmm5,%xmm0
divsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
add    $0xfffffffe,%ecx
jne    1390 <bpser+0x220>
test   $0x1,%al
je     13e5 <bpser+0x275>
addsd  0xc3f(%rip),%xmm5
movapd %xmm4,%xmm1
addsd  %xmm5,%xmm1
movapd %xmm5,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm5,(%rsp)
call   1060 <log@plt>
movsd  0x30(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  (%rsp),%xmm0
addsd  0xc04(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <log@plt>
mulsd  0x8(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  (%rsp),%xmm1
ucomisd 0xbbf(%rip),%xmm1
jbe    146a <bpser+0x2fa>
movsd  0xbc5(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm1,0x28(%rsp)
call   1030 <gam1@plt>
addsd  0xb9e(%rip),%xmm0
divsd  0x28(%rsp),%xmm0
jmp    147b <bpser+0x30b>
movapd %xmm1,%xmm0
call   1030 <gam1@plt>
addsd  0xb85(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <exp@plt>
movsd  0x10(%rsp),%xmm1
divsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1030 <gam1@plt>
movsd  0x8(%rsp),%xmm9
addsd  0xb45(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
jmp    154d <bpser+0x3dd>
movapd 0x10(%rsp),%xmm0
call   1030 <gam1@plt>
addsd  0xb21(%rip),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <gam1@plt>
addsd  0xb08(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
movapd 0x50(%rsp),%xmm0
call   1030 <gam1@plt>
movsd  0x8(%rsp),%xmm9
addsd  0xae8(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
movapd 0x50(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd 0x10(%rsp),%xmm0
unpcklpd 0x30(%rsp),%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movsd  (%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x48(%rsp),%xmm10
movsd  0xabc(%rip),%xmm1
mulsd  %xmm10,%xmm1
ucomisd %xmm9,%xmm1
jae    1188 <bpser+0x18>
xorpd  %xmm7,%xmm7
ucomisd %xmm7,%xmm0
jne    157c <bpser+0x40c>
jnp    1188 <bpser+0x18>
divsd  %xmm9,%xmm10
movsd  0xa96(%rip),%xmm11
movapd 0xa9d(%rip),%xmm8
movsd  0xa64(%rip),%xmm12
movapd %xmm12,%xmm4
xorpd  %xmm3,%xmm3
movsd  0x40(%rsp),%xmm1
movapd 0x50(%rsp),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addsd  %xmm12,%xmm7
movapd %xmm2,%xmm5
divsd  %xmm7,%xmm5
movapd %xmm11,%xmm6
subsd  %xmm5,%xmm6
addsd  %xmm11,%xmm6
mulsd  %xmm4,%xmm6
mulsd  %xmm1,%xmm6
movapd %xmm7,%xmm5
addsd  %xmm9,%xmm5
movapd %xmm6,%xmm4
divsd  %xmm5,%xmm6
addsd  %xmm6,%xmm3
andpd  %xmm8,%xmm6
ucomisd %xmm10,%xmm6
ja     15c0 <bpser+0x450>
mulsd  %xmm3,%xmm9
addsd  0x9ee(%rip),%xmm9
mulsd  %xmm9,%xmm0
add    $0x68,%rsp
ret

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

LLVM IR (-O2):
define double @bpser(double %0, double %1, double %2, double %3) {
%5 = fcmp oeq double %2, 0.000000e+00
br i1 %5, label %155, label %6
6: ; preds = %4
%7 = fcmp olt double %0, %1
%8 = select i1 %7, double %0, double %1
%9 = fcmp olt double %8, 1.000000e+00
br i1 %9, label %17, label %10
10: ; preds = %6
%11 = tail call double @log(double %2)
%12 = tail call double @betaln(double %0, double %1)
%13 = fneg double %12
%14 = tail call double @llvm.fmuladd.f64(double %0, double %11, double %13)
%15 = tail call double @exp(double %14)
%16 = fdiv double %15, %0
br label %129
17: ; preds = %6
%18 = fcmp ogt double %0, %1
%19 = select i1 %18, double %0, double %1
%20 = fcmp ult double %19, 8.000000e+00
br i1 %20, label %21, label %119
21: ; preds = %17
%22 = fcmp ogt double %19, 1.000000e+00
br i1 %22, label %53, label %23
23: ; preds = %21
%24 = tail call double @pow(double %2, double %0)
%25 = fcmp oeq double %24, 0.000000e+00
br i1 %25, label %155, label %26
26: ; preds = %23
%27 = fadd double %0, %1
%28 = fcmp ogt double %27, 1.000000e+00
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = tail call double @gam1(double %27)
%31 = fadd double %30, 1.000000e+00
br label %37
32: ; preds = %26
%33 = fadd double %27, -1.000000e+00
%34 = tail call double @gam1(double %33)
%35 = fadd double %34, 1.000000e+00
%36 = fdiv double %35, %27
br label %37
37: ; preds = %32, %29
%38 = phi double [ %36, %32 ], [ %31, %29 ]
%39 = tail call double @gam1(double %0)
%40 = fadd double %39, 1.000000e+00
%41 = tail call double @gam1(double %1)
%42 = fadd double %41, 1.000000e+00
%43 = fmul double %40, %42
%44 = insertelement <2 x double> poison, double %1, i64 0
%45 = insertelement <2 x double> %44, double %43, i64 1
%46 = insertelement <2 x double> poison, double %27, i64 0
%47 = insertelement <2 x double> %46, double %38, i64 1
%48 = fdiv <2 x double> %45, %47
%49 = extractelement <2 x double> %48, i64 1
%50 = fmul double %24, %49
%51 = extractelement <2 x double> %48, i64 0
%52 = fmul double %51, %50
br label %129
53: ; preds = %21
%54 = tail call double @gamln1(double %8)
%55 = fadd double %19, -1.000000e+00
%56 = fptosi double %55 to i32
%57 = icmp slt i32 %56, 1
br i1 %57, label %94, label %58
58: ; preds = %53
%59 = and i32 %56, 1
%60 = icmp eq i32 %56, 1
br i1 %60, label %77, label %61
61: ; preds = %58
%62 = and i32 %56, -2
br label %63
63: ; preds = %63, %61
%64 = phi double [ %19, %61 ], [ %71, %63 ]
%65 = phi double [ 1.000000e+00, %61 ], [ %74, %63 ]
%66 = phi i32 [ 0, %61 ], [ %75, %63 ]
%67 = fadd double %64, -1.000000e+00
%68 = fadd double %8, %67
%69 = fdiv double %67, %68
%70 = fmul double %65, %69
%71 = fadd double %67, -1.000000e+00
%72 = fadd double %8, %71
%73 = fdiv double %71, %72
%74 = fmul double %70, %73
%75 = add i32 %66, 2
%76 = icmp eq i32 %75, %62
br i1 %76, label %77, label %63
77: ; preds = %63, %58
%78 = phi double [ undef, %58 ], [ %71, %63 ]
%79 = phi double [ undef, %58 ], [ %74, %63 ]
%80 = phi double [ %19, %58 ], [ %71, %63 ]
%81 = phi double [ 1.000000e+00, %58 ], [ %74, %63 ]
%82 = icmp eq i32 %59, 0
br i1 %82, label %88, label %83
83: ; preds = %77
%84 = fadd double %80, -1.000000e+00
%85 = fadd double %8, %84
%86 = fdiv double %84, %85
%87 = fmul double %81, %86
br label %88
88: ; preds = %77, %83
%89 = phi double [ %78, %77 ], [ %84, %83 ]
%90 = phi double [ %79, %77 ], [ %87, %83 ]
%91 = tail call double @log(double %90)
%92 = fadd double %54, %91
%93 = fadd double %89, -1.000000e+00
br label %94
94: ; preds = %53, %88
%95 = phi double [ %55, %53 ], [ %93, %88 ]
%96 = phi double [ %54, %53 ], [ %92, %88 ]
%97 = tail call double @log(double %2)
%98 = fneg double %96
%99 = tail call double @llvm.fmuladd.f64(double %0, double %97, double %98)
%100 = fadd double %8, %95
%101 = fcmp ogt double %100, 1.000000e+00
br i1 %101, label %105, label %102
102: ; preds = %94
%103 = tail call double @gam1(double %100)
%104 = fadd double %103, 1.000000e+00
br label %110
105: ; preds = %94
%106 = fadd double %100, -1.000000e+00
%107 = tail call double @gam1(double %106)
%108 = fadd double %107, 1.000000e+00
%109 = fdiv double %108, %100
br label %110
110: ; preds = %105, %102
%111 = phi double [ %109, %105 ], [ %104, %102 ]
%112 = tail call double @exp(double %99)
%113 = fdiv double %8, %0
%114 = fmul double %113, %112
%115 = tail call double @gam1(double %95)
%116 = fadd double %115, 1.000000e+00
%117 = fmul double %114, %116
%118 = fdiv double %117, %111
br label %129
119: ; preds = %17
%120 = tail call double @gamln1(double %8)
%121 = tail call double @algdiv(double %8, double %19)
%122 = fadd double %120, %121
%123 = tail call double @log(double %2)
%124 = fneg double %122
%125 = tail call double @llvm.fmuladd.f64(double %0, double %123, double %124)
%126 = fdiv double %8, %0
%127 = tail call double @exp(double %125)
%128 = fmul double %126, %127
br label %129
129: ; preds = %119, %110, %37, %10
%130 = phi double [ %128, %119 ], [ %118, %110 ], [ %52, %37 ], [ %16, %10 ]
%131 = fcmp une double %130, 0.000000e+00
%132 = fmul double %3, 0x3FB99999A0000000
%133 = fcmp ult double %132, %0
%134 = and i1 %133, %131
br i1 %134, label %135, label %155
135: ; preds = %129
%136 = fdiv double %3, %0
br label %137
137: ; preds = %137, %135
%138 = phi double [ 0.000000e+00, %135 ], [ %141, %137 ]
%139 = phi double [ 1.000000e+00, %135 ], [ %146, %137 ]
%140 = phi double [ 0.000000e+00, %135 ], [ %149, %137 ]
%141 = fadd double %138, 1.000000e+00
%142 = fdiv double %1, %141
%143 = fsub double 5.000000e-01, %142
%144 = fadd double %143, 5.000000e-01
%145 = fmul double %139, %144
%146 = fmul double %145, %2
%147 = fadd double %141, %0
%148 = fdiv double %146, %147
%149 = fadd double %140, %148
%150 = tail call double @llvm.fabs.f64(double %148)
%151 = fcmp ogt double %150, %136
br i1 %151, label %137, label %152
152: ; preds = %137
%153 = tail call double @llvm.fmuladd.f64(double %0, double %149, double 1.000000e+00)
%154 = fmul double %130, %153
br label %155
155: ; preds = %129, %23, %4, %152
%156 = phi double [ %154, %152 ], [ 0.000000e+00, %4 ], [ %24, %23 ], [ %130, %129 ]
ret double %156
}