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

/* Variables and functions */
double CDFBeta(double, double, double, double);
double LnGamma(double);
int /*<<< orphan*/ error2(char *);
double exp(double);
double fabs(double);
double log(int);
double pow(int, int);
int /*<<< orphan*/ printf(char *, double, double, double, int, int);
double sqrt(double);
double QuantileBeta(double prob, double p, double q, double lnbeta) {
  double fpu = 3e-308, acu_min = 1e-300, lower = fpu, upper = 1 - 2.22e-16;
  int swap_tail, i_pb, i_inn, niterations = 2000;
  double a, adj, g, h, pp, prev = 0, qq, r, s, t, tx = 0, w, y, yprev;
  double acu, xinbta;
  if (prob < 0 || prob > 1 || p < 0 || q < 0)
    error2("out of range in QuantileBeta");
  xinbta = prob;
  if (p < 0 || q < 0 || prob < 0 || prob > 1)
    error2("beta par err");
  if (prob == 0 || prob == 1)
    return prob;
  if (lnbeta == 0)
    lnbeta = (LnGamma(p) + LnGamma(q) - LnGamma(p + q));
  if (prob <= 0.5) {
    a = prob;
    pp = p;
    qq = q;
    swap_tail = 0;
  } else {
    a = 1. - prob;
    pp = q;
    qq = p;
    swap_tail = 1;
  }
  r = sqrt(-log(a * a));
  y = r - (2.30753 + 0.27061 * r) / (1. + (0.99229 + 0.04481 * r) * r);
  if (pp > 1. && qq > 1.) {
    r = (y * y - 3.) / 6.;
    s = 1. / (pp * 2. - 1.);
    t = 1. / (qq * 2. - 1.);
    h = 2. / (s + t);
    w = y * sqrt(h + r) / h - (t - s) * (r + 5. / 6. - 2. / (3. * h));
    xinbta = pp / (pp + qq * exp(w + w));
  } else {
    r = qq * 2.;
    t = 1. / (9. * qq);
    t = r * pow(1. - t + y * sqrt(t), 3.);
    if (t <= 0.)
      xinbta = 1. - exp((log((1. - a) * qq) + lnbeta) / qq);
    else {
      t = (4. * pp + r - 2.) / t;
      if (t <= 1.)
        xinbta = exp((log(a * pp) + lnbeta) / pp);
      else
        xinbta = 1. - 2. / (t + 1.);
    }
  }
  r = 1. - pp;
  t = 1. - qq;
  yprev = 0.;
  adj = 1.;
  if (xinbta <= lower || xinbta >= upper)
    xinbta = (a + .5) / 2;
  acu = pow(10., -13. - 2.5 / (pp * pp) - 0.5 / (a * a));
  acu = ((acu) > (acu_min) ? (acu) : (acu_min));
  for (i_pb = 0; i_pb < niterations; i_pb++) {
    y = CDFBeta(xinbta, pp, qq, lnbeta);
    y = (y - a) * exp(lnbeta + r * log(xinbta) + t * log(1. - xinbta));
    if (y * yprev <= 0)
      prev = ((fabs(adj)) > (fpu) ? (fabs(adj)) : (fpu));
    for (i_inn = 0, g = 1; i_inn < niterations; i_inn++) {
      adj = g * y;
      if (fabs(adj) < prev) {
        tx = xinbta - adj;
        if (tx >= 0. && tx <= 1.) {
          if (prev <= acu || fabs(y) <= acu)
            goto L_converged;
          if (tx != 0. && tx != 1.)
            break;
        }
      }
      g /= 3.;
    }
    if (fabs(tx - xinbta) < fpu)
      goto L_converged;
    xinbta = tx;
    yprev = y;
  }
  if (!0)
    printf("\nQuantileBeta(%.2f, %.5f, %.5f) = %.6e\t%d rounds\n", prob, p, q,
           (swap_tail ? 1. - xinbta : xinbta), niterations);
L_converged:
  return (swap_tail ? 1. - xinbta : xinbta);
}


x86 assembly (clang, -O0):
<QuantileBeta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe54(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe35(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x7d0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     122e <QuantileBeta+0xae>
movsd  -0x10(%rbp),%xmm0
movsd  0xe10(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     122e <QuantileBeta+0xae>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     122e <QuantileBeta+0xae>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    123a <QuantileBeta+0xba>
lea    0xe7b(%rip),%rdi
call   1050 <error2@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     1288 <QuantileBeta+0x108>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
ja     1288 <QuantileBeta+0x108>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1288 <QuantileBeta+0x108>
movsd  -0x10(%rbp),%xmm0
movsd  0xd9a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1294 <QuantileBeta+0x114>
lea    0xe3e(%rip),%rdi
call   1050 <error2@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12b1 <QuantileBeta+0x131>
jp     12b1 <QuantileBeta+0x131>
jmp    12ce <QuantileBeta+0x14e>
movsd  -0x10(%rbp),%xmm0
movsd  0xd5a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12dd <QuantileBeta+0x15d>
jp     12dd <QuantileBeta+0x15d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d34 <QuantileBeta+0xbb4>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    134b <QuantileBeta+0x1cb>
jp     134b <QuantileBeta+0x1cb>
movsd  -0x18(%rbp),%xmm0
call   10a0 <LnGamma@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   10a0 <LnGamma@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   10a0 <LnGamma@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xccd(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     138b <QuantileBeta+0x20b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
jmp    13bb <QuantileBeta+0x23b>
movsd  0xc85(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1090 <sqrt@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xc2e(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc2a(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x98(%rbp),%xmm2
ff
movsd  0xbfe(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xbfa(%rip),%xmm3
addsd  %xmm3,%xmm2
movsd  -0x98(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm2
movsd  0xbca(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xba9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1647 <QuantileBeta+0x4c7>
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xb8f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1647 <QuantileBeta+0x4c7>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0xbd1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xbbd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xb98(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xb34(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
movsd  0xb6c(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xb08(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
addsd  -0xa8(%rbp),%xmm1
ff
movsd  0xb1c(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
movsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
divsd  -0x78(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0xa0(%rbp),%xmm0
ff
movsd  0xae0(%rip),%xmm2
addsd  -0x98(%rbp),%xmm2
ff
movsd  0xac8(%rip),%xmm4
mulsd  -0x78(%rbp),%xmm4
movsd  0xaab(%rip),%xmm3
divsd  %xmm4,%xmm3
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
call   1060 <exp@plt>
movsd  -0x100(%rbp),%xmm1
ff
movsd  -0xf8(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    181d <QuantileBeta+0x69d>
movsd  0xa01(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x9e1(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movsd  0x9a1(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  0x97d(%rip),%xmm0
subsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
movsd  -0x120(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x3,%esi
call   1080 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     1765 <QuantileBeta+0x5e5>
movsd  0x8f7(%rip),%xmm0
subsd  -0x60(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
addsd  -0x28(%rbp),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  0x8c4(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1818 <QuantileBeta+0x698>
movsd  -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0x8de(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x8c6(%rip),%xmm1
subsd  %xmm1,%xmm0
divsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x872(%rip),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     17e3 <QuantileBeta+0x663>
movsd  -0x60(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
addsd  -0x28(%rbp),%xmm0
divsd  -0x80(%rbp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1813 <QuantileBeta+0x693>
movsd  0x82d(%rip),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  0x855(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0x811(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1818 <QuantileBeta+0x698>
jmp    181d <QuantileBeta+0x69d>
movsd  0x7f3(%rip),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x7de(%rip),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x7bb(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    188c <QuantileBeta+0x70c>
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd -0x48(%rbp),%xmm0
jb     18ad <QuantileBeta+0x72d>
movsd  0x78c(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  0x7af(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  0x7d1(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0x7bd(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
movsd  0x73f(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0xa,%edi
call   1080 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd -0x38(%rbp),%xmm0
jbe    1927 <QuantileBeta+0x7a7>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1934 <QuantileBeta+0x7b4>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    1c5f <QuantileBeta+0xadf>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x28(%rbp),%xmm3
call   1030 <CDFBeta@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
cvttsd2si -0xd8(%rbp),%edi
ff
call   1070 <log@plt>
movsd  -0x150(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  0x620(%rip),%xmm0
subsd  -0xd8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
movsd  -0x140(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  -0xc8(%rbp),%xmm1
ff
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     1ab2 <QuantileBeta+0x932>
movsd  -0x68(%rbp),%xmm0
movaps 0x637(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1a95 <QuantileBeta+0x915>
movsd  -0x68(%rbp),%xmm0
movaps 0x61c(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
jmp    1aa2 <QuantileBeta+0x922>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x54(%rbp)
movsd  0x557(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    1c02 <QuantileBeta+0xa82>
movsd  -0x70(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
movaps 0x5b0(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1bde <QuantileBeta+0xa5e>
movsd  -0xd8(%rbp),%xmm0
ff
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1bd9 <QuantileBeta+0xa59>
movsd  0x4e0(%rip),%xmm0
ucomisd -0xb0(%rbp),%xmm0
ff
jb     1bd9 <QuantileBeta+0xa59>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jae    1b85 <QuantileBeta+0xa05>
movsd  -0xc0(%rbp),%xmm1
ff
movaps 0x531(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1b8a <QuantileBeta+0xa0a>
jmp    1cf0 <QuantileBeta+0xb70>
movsd  -0xb0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1baa <QuantileBeta+0xa2a>
jp     1baa <QuantileBeta+0xa2a>
jmp    1bd4 <QuantileBeta+0xa54>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x45e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1bcf <QuantileBeta+0xa4f>
jp     1bcf <QuantileBeta+0xa4f>
jmp    1bd4 <QuantileBeta+0xa54>
jmp    1c02 <QuantileBeta+0xa82>
jmp    1bd9 <QuantileBeta+0xa59>
jmp    1bde <QuantileBeta+0xa5e>
movsd  -0x70(%rbp),%xmm0
movsd  0x475(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1ac6 <QuantileBeta+0x946>
movsd  -0xb0(%rbp),%xmm1
ff
subsd  -0xd8(%rbp),%xmm1
ff
movaps 0x487(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1c31 <QuantileBeta+0xab1>
jmp    1cf0 <QuantileBeta+0xb70>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    194b <QuantileBeta+0x7cb>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
cmpl   $0x0,-0x4c(%rbp)
je     1cad <QuantileBeta+0xb2d>
movsd  0x380(%rip),%xmm0
subsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x178(%rbp)
ff
jmp    1cbd <QuantileBeta+0xb3d>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x160(%rbp),%xmm2
ff
movsd  -0x168(%rbp),%xmm1
ff
movsd  -0x170(%rbp),%xmm0
ff
movsd  -0x178(%rbp),%xmm3
ff
cvttsd2si %xmm3,%esi
mov    -0x58(%rbp),%edx
lea    0x3ef(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x4c(%rbp)
je     1d17 <QuantileBeta+0xb97>
movsd  0x316(%rip),%xmm0
subsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
jmp    1d27 <QuantileBeta+0xba7>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuantileBeta>:
push   %rbx
sub    $0xf0,%rsp
movsd  %xmm3,(%rsp)
movapd %xmm2,0x50(%rsp)
movaps %xmm1,0x60(%rsp)
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
movapd %xmm1,0x70(%rsp)
ja     11ca <QuantileBeta+0x4a>
ucomisd 0xe4c(%rip),%xmm1
ja     11ca <QuantileBeta+0x4a>
xorpd  %xmm0,%xmm0
ucomisd 0x60(%rsp),%xmm0
ja     11ca <QuantileBeta+0x4a>
ucomisd 0x50(%rsp),%xmm0
jbe    11dc <QuantileBeta+0x5c>
lea    0xf2f(%rip),%rdi
call   1050 <error2@plt>
movapd 0x70(%rsp),%xmm1
ucomisd 0xe1c(%rip),%xmm1
ja     1204 <QuantileBeta+0x84>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     1204 <QuantileBeta+0x84>
ucomisd 0x60(%rsp),%xmm0
ja     1204 <QuantileBeta+0x84>
xorpd  %xmm0,%xmm0
ucomisd 0x50(%rsp),%xmm0
jbe    1216 <QuantileBeta+0x96>
lea    0xf12(%rip),%rdi
call   1050 <error2@plt>
movapd 0x70(%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1226 <QuantileBeta+0xa6>
jnp    19a1 <QuantileBeta+0x821>
ucomisd 0xdd2(%rip),%xmm1
jne    1236 <QuantileBeta+0xb6>
jnp    19a1 <QuantileBeta+0x821>
xorpd  %xmm0,%xmm0
movsd  (%rsp),%xmm2
ucomisd %xmm0,%xmm2
jne    1292 <QuantileBeta+0x112>
jp     1292 <QuantileBeta+0x112>
movaps 0x60(%rsp),%xmm0
call   10a0 <LnGamma@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x50(%rsp),%xmm0
call   10a0 <LnGamma@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x60(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
call   10a0 <LnGamma@plt>
movapd 0x70(%rsp),%xmm1
movsd  (%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movsd  0xd6e(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %cl
movsd  0xd55(%rip),%xmm0
jb     12b3 <QuantileBeta+0x133>
movapd %xmm1,%xmm3
jmp    12bb <QuantileBeta+0x13b>
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
mov    %cl,%al
movd   %eax,%xmm0
pshufd $0x44,%xmm0,%xmm0
psllq  $0x3f,%xmm0
psrad  $0x1f,%xmm0
pshufd $0xf5,%xmm0,%xmm4
movdqa 0x60(%rsp),%xmm2
movdqa %xmm2,%xmm0
movdqa 0x50(%rsp),%xmm1
punpcklqdq %xmm1,%xmm0
punpcklqdq %xmm2,%xmm1
pand   %xmm4,%xmm0
pandn  %xmm1,%xmm4
por    %xmm0,%xmm4
movdqa %xmm4,0x30(%rsp)
movsd  %xmm3,0x8(%rsp)
mulsd  %xmm3,%xmm3
movapd %xmm3,0x10(%rsp)
cvttsd2si %xmm3,%edi
call   1070 <log@plt>
movdqa %xmm0,%xmm1
movdqa 0xd6c(%rip),%xmm0
pxor   %xmm1,%xmm0
movsd  0xce0(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     133f <QuantileBeta+0x1bf>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
jmp    1348 <QuantileBeta+0x1c8>
call   1090 <sqrt@plt>
movdqa %xmm0,%xmm3
movsd  0xcc8(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xcc4(%rip),%xmm0
movsd  0xcc4(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  0xcc0(%rip),%xmm1
mulsd  %xmm3,%xmm1
movsd  0xc84(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  %xmm0,%xmm3
movapd 0x30(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
movapd %xmm1,0x40(%rsp)
ucomisd %xmm2,%xmm1
jbe    1420 <QuantileBeta+0x2a0>
ucomisd 0xc56(%rip),%xmm0
jbe    1420 <QuantileBeta+0x2a0>
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  0xc94(%rip),%xmm2
addpd  %xmm0,%xmm0
addpd  0xcd8(%rip),%xmm0
movapd 0xce0(%rip),%xmm4
divpd  %xmm0,%xmm4
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
movapd %xmm5,%xmm0
addsd  %xmm4,%xmm0
shufpd $0x2,0xcd3(%rip),%xmm2
movapd 0xcdb(%rip),%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm6
unpckhpd %xmm2,%xmm6
movapd %xmm6,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1460 <QuantileBeta+0x2e0>
sqrtsd %xmm0,%xmm0
jmp    14b9 <QuantileBeta+0x339>
movapd %xmm0,%xmm4
addsd  %xmm0,%xmm4
movsd  0xc08(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
subsd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm4,0x90(%rsp)
jb     1529 <QuantileBeta+0x3a9>
sqrtsd %xmm0,%xmm0
jmp    154c <QuantileBeta+0x3cc>
movsd  %xmm3,0x28(%rsp)
movapd %xmm2,0x90(%rsp)
movapd %xmm4,0x80(%rsp)
movapd %xmm5,0xb0(%rsp)
movapd %xmm6,0xa0(%rsp)
call   1090 <sqrt@plt>
movapd 0xa0(%rsp),%xmm6
movapd 0xb0(%rsp),%xmm5
movapd 0x80(%rsp),%xmm4
movapd 0x90(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
mulsd  %xmm0,%xmm3
divsd  %xmm6,%xmm3
subsd  %xmm5,%xmm4
mulsd  0xb8b(%rip),%xmm6
movsd  0xb73(%rip),%xmm0
divsd  %xmm6,%xmm0
addsd  0xb7f(%rip),%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm4,%xmm2
subsd  %xmm2,%xmm3
addsd  %xmm3,%xmm3
movapd %xmm3,%xmm0
call   1060 <exp@plt>
movapd 0x30(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd 0x40(%rsp),%xmm4
addsd  %xmm4,%xmm0
movapd %xmm4,%xmm7
divsd  %xmm0,%xmm7
movsd  0xae2(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
jmp    165a <QuantileBeta+0x4da>
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x80(%rsp)
call   1090 <sqrt@plt>
movsd  0x80(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
cvttsd2si %xmm3,%edi
mov    $0x3,%esi
call   1080 <pow@plt>
movsd  0x90(%rsp),%xmm2
mulsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    15c8 <QuantileBeta+0x448>
movsd  0xabf(%rip),%xmm1
movapd 0x40(%rsp),%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
addsd  0xab1(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xa5d(%rip),%xmm2
ucomisd %xmm1,%xmm2
jae    1619 <QuantileBeta+0x499>
addsd  %xmm2,%xmm1
movsd  0xa93(%rip),%xmm7
divsd  %xmm1,%xmm7
addsd  %xmm2,%xmm7
movsd  0x8(%rsp),%xmm1
jmp    1654 <QuantileBeta+0x4d4>
movsd  0xa30(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
addsd  (%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
call   1060 <exp@plt>
movapd 0x30(%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movsd  0x9f7(%rip),%xmm2
movapd %xmm2,%xmm7
subsd  %xmm0,%xmm7
movapd 0x40(%rsp),%xmm4
jmp    165a <QuantileBeta+0x4da>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm4,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
addsd  (%rsp),%xmm0
divsd  0x40(%rsp),%xmm0
call   1060 <exp@plt>
movapd 0x40(%rsp),%xmm4
movsd  0x8(%rsp),%xmm1
movsd  0x9b0(%rip),%xmm2
movapd %xmm0,%xmm7
movapd 0x30(%rsp),%xmm3
movsd  0x9a6(%rip),%xmm5
movapd 0x10(%rsp),%xmm6
movapd %xmm2,%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,0xd0(%rsp)
subsd  %xmm3,%xmm2
movsd  %xmm2,0xc8(%rsp)
movapd %xmm1,%xmm0
addsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
movsd  0x9ce(%rip),%xmm1
cmpnlesd %xmm7,%xmm1
movapd %xmm1,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm7,%xmm1
orpd   %xmm2,%xmm1
cmpnlesd 0x9b8(%rip),%xmm7
andpd  %xmm7,%xmm1
andnpd %xmm0,%xmm7
orpd   %xmm1,%xmm7
movapd %xmm7,0x10(%rsp)
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
unpcklpd %xmm6,%xmm0
movapd 0xa02(%rip),%xmm1
divpd  %xmm0,%xmm1
movsd  0x98e(%rip),%xmm0
subsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0xa,%edi
call   1080 <pow@plt>
movapd 0x10(%rsp),%xmm3
maxsd  0x96e(%rip),%xmm0
movsd  %xmm0,0xc0(%rsp)
xor    %ebx,%ebx
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
xorpd  %xmm9,%xmm9
movsd  0x8ce(%rip),%xmm4
movapd %xmm4,0xb0(%rsp)
movsd  %xmm2,0x28(%rsp)
movapd %xmm9,0x90(%rsp)
movapd %xmm0,0x80(%rsp)
movapd %xmm3,%xmm0
movapd %xmm3,0x10(%rsp)
movaps 0x40(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
movsd  (%rsp),%xmm3
call   1030 <CDFBeta@plt>
subsd  0x8(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
cvttsd2si 0x10(%rsp),%edi
call   1070 <log@plt>
mulsd  0xd0(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,0xd8(%rsp)
movsd  0x855(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
movapd %xmm0,0xe0(%rsp)
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
mulsd  0xc8(%rsp),%xmm0
addsd  0xd8(%rsp),%xmm0
call   1060 <exp@plt>
movapd 0x10(%rsp),%xmm10
movapd 0x90(%rsp),%xmm9
movsd  0x865(%rip),%xmm5
movapd 0x8f5(%rip),%xmm7
movsd  0x86d(%rip),%xmm6
xorpd  %xmm8,%xmm8
movsd  0x7ef(%rip),%xmm11
mulsd  0xa0(%rsp),%xmm0
movapd 0x80(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movapd 0x8c1(%rip),%xmm4
movapd 0xb0(%rsp),%xmm1
andpd  %xmm4,%xmm1
maxsd  %xmm6,%xmm1
cmpnlesd %xmm8,%xmm2
andpd  %xmm2,%xmm9
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm9
movsd  0xc0(%rsp),%xmm2
ucomisd %xmm9,%xmm2
setb   %cl
movapd %xmm0,%xmm1
andpd  %xmm4,%xmm1
ucomisd %xmm1,%xmm2
setb   %al
and    %cl,%al
mov    $0x7d0,%ecx
movsd  0x28(%rsp),%xmm3
movapd %xmm11,%xmm1
jmp    1899 <QuantileBeta+0x719>
nopl   0x0(%rax,%rax,1)
divsd  %xmm5,%xmm1
add    $0xffffffff,%ecx
je     18f0 <QuantileBeta+0x770>
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm4,%xmm2
andpd  %xmm7,%xmm2
ucomisd %xmm2,%xmm9
jbe    1890 <QuantileBeta+0x710>
movapd %xmm10,%xmm3
subsd  %xmm4,%xmm3
ucomisd %xmm8,%xmm3
jb     1890 <QuantileBeta+0x710>
ucomisd %xmm3,%xmm11
jb     1890 <QuantileBeta+0x710>
test   %al,%al
je     197c <QuantileBeta+0x7fc>
ucomisd %xmm8,%xmm3
jne    18d8 <QuantileBeta+0x758>
jnp    1890 <QuantileBeta+0x710>
ucomisd %xmm11,%xmm3
jne    18f0 <QuantileBeta+0x770>
jnp    1890 <QuantileBeta+0x710>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm3,%xmm1
subsd  %xmm10,%xmm1
andpd  %xmm7,%xmm1
ucomisd %xmm1,%xmm6
ja     197c <QuantileBeta+0x7fc>
add    $0x1,%ebx
movapd %xmm3,%xmm2
cmp    $0x7d0,%ebx
jne    1732 <QuantileBeta+0x5b2>
movsd  0x6e2(%rip),%xmm4
subsd  %xmm3,%xmm4
movapd 0x70(%rsp),%xmm0
movapd %xmm0,%xmm2
cmpnlesd 0x6d3(%rip),%xmm2
movapd %xmm2,%xmm1
movapd %xmm4,0xe0(%rsp)
andpd  %xmm4,%xmm1
andnpd %xmm3,%xmm2
orpd   %xmm1,%xmm2
cvttsd2si %xmm2,%esi
lea    0x7d1(%rip),%rdi
movapd 0x60(%rsp),%xmm1
movapd 0x50(%rsp),%xmm2
mov    $0x7d0,%edx
movapd %xmm3,0x10(%rsp)
call   1040 <printf@plt>
movapd 0x10(%rsp),%xmm10
movapd 0x70(%rsp),%xmm1
cmpnlesd 0x67d(%rip),%xmm1
movapd 0xe0(%rsp),%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm10,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0xf0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"out of range in QuantileBeta\00"
@.str.1 = [13 x i8] c"beta par err\00"
@.str.2 = [50 x i8] c"\0AQuantileBeta(%.2f, %.5f, %.5f) = %.6e\09%d rounds\0A\00"
define double @QuantileBeta(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 i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double 3.000000e-308, double* %10
store double 1.000000e-300, double* %11
%34 = load double, double* %10
store double %34, double* %12
store double 0x3FEFFFFFFFFFFFFE, double* %13
store i32 2000, i32* %17
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %28
%35 = load double, double* %6
%36 = fcmp olt double %35, 0.000000e+00
br i1 %36, label %46, label %37
37: ; preds = %4
%38 = load double, double* %6
%39 = fcmp ogt double %38, 1.000000e+00
br i1 %39, label %46, label %40
40: ; preds = %37
%41 = load double, double* %7
%42 = fcmp olt double %41, 0.000000e+00
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = load double, double* %8
%45 = fcmp olt double %44, 0.000000e+00
br i1 %45, label %46, label %48
46: ; preds = %43, %40, %37, %4
%47 = call i32 @error2(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %48
48: ; preds = %46, %43
%49 = load double, double* %6
store double %49, double* %33
%50 = load double, double* %7
%51 = fcmp olt double %50, 0.000000e+00
br i1 %51, label %61, label %52
52: ; preds = %48
%53 = load double, double* %8
%54 = fcmp olt double %53, 0.000000e+00
br i1 %54, label %61, label %55
55: ; preds = %52
%56 = load double, double* %6
%57 = fcmp olt double %56, 0.000000e+00
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = load double, double* %6
%60 = fcmp ogt double %59, 1.000000e+00
br i1 %60, label %61, label %63
61: ; preds = %58, %55, %52, %48
%62 = call i32 @error2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
%64 = load double, double* %6
%65 = fcmp oeq double %64, 0.000000e+00
br i1 %65, label %69, label %66
66: ; preds = %63
%67 = load double, double* %6
%68 = fcmp oeq double %67, 1.000000e+00
br i1 %68, label %69, label %71
69: ; preds = %66, %63
%70 = load double, double* %6
store double %70, double* %5
br label %388
71: ; preds = %66
%72 = load double, double* %9
%73 = fcmp oeq double %72, 0.000000e+00
br i1 %73, label %74, label %85
74: ; preds = %71
%75 = load double, double* %7
%76 = call double @LnGamma(double %75)
%77 = load double, double* %8
%78 = call double @LnGamma(double %77)
%79 = fadd double %76, %78
%80 = load double, double* %7
%81 = load double, double* %8
%82 = fadd double %80, %81
%83 = call double @LnGamma(double %82)
%84 = fsub double %79, %83
store double %84, double* %9
br label %85
85: ; preds = %74, %71
%86 = load double, double* %6
%87 = fcmp ole double %86, 5.000000e-01
br i1 %87, label %88, label %92
88: ; preds = %85
%89 = load double, double* %6
store double %89, double* %18
%90 = load double, double* %7
store double %90, double* %22
%91 = load double, double* %8
store double %91, double* %24
store i32 0, i32* %14
br label %97
92: ; preds = %85
%93 = load double, double* %6
%94 = fsub double 1.000000e+00, %93
store double %94, double* %18
%95 = load double, double* %8
store double %95, double* %22
%96 = load double, double* %7
store double %96, double* %24
store i32 1, i32* %14
br label %97
97: ; preds = %92, %88
%98 = load double, double* %18
%99 = load double, double* %18
%100 = fmul double %98, %99
%101 = fptosi double %100 to i32
%102 = call double @log(i32 %101)
%103 = fneg double %102
%104 = call double @sqrt(double %103)
store double %104, double* %25
%105 = load double, double* %25
%106 = load double, double* %25
%107 = call double @llvm.fmuladd.f64(double 2.706100e-01, double %106, double 2.307530e+00)
%108 = load double, double* %25
%109 = call double @llvm.fmuladd.f64(double 4.481000e-02, double %108, double 9.922900e-01)
%110 = load double, double* %25
%111 = call double @llvm.fmuladd.f64(double %109, double %110, double 1.000000e+00)
%112 = fdiv double %107, %111
%113 = fsub double %105, %112
store double %113, double* %30
%114 = load double, double* %22
%115 = fcmp ogt double %114, 1.000000e+00
br i1 %115, label %116, label %162
116: ; preds = %97
%117 = load double, double* %24
%118 = fcmp ogt double %117, 1.000000e+00
br i1 %118, label %119, label %162
119: ; preds = %116
%120 = load double, double* %30
%121 = load double, double* %30
%122 = call double @llvm.fmuladd.f64(double %120, double %121, double -3.000000e+00)
%123 = fdiv double %122, 6.000000e+00
store double %123, double* %25
%124 = load double, double* %22
%125 = call double @llvm.fmuladd.f64(double %124, double 2.000000e+00, double -1.000000e+00)
%126 = fdiv double 1.000000e+00, %125
store double %126, double* %26
%127 = load double, double* %24
%128 = call double @llvm.fmuladd.f64(double %127, double 2.000000e+00, double -1.000000e+00)
%129 = fdiv double 1.000000e+00, %128
store double %129, double* %27
%130 = load double, double* %26
%131 = load double, double* %27
%132 = fadd double %130, %131
%133 = fdiv double 2.000000e+00, %132
store double %133, double* %21
%134 = load double, double* %30
%135 = load double, double* %21
%136 = load double, double* %25
%137 = fadd double %135, %136
%138 = call double @sqrt(double %137)
%139 = fmul double %134, %138
%140 = load double, double* %21
%141 = fdiv double %139, %140
%142 = load double, double* %27
%143 = load double, double* %26
%144 = fsub double %142, %143
%145 = load double, double* %25
%146 = fadd double %145, 0x3FEAAAAAAAAAAAAB
%147 = load double, double* %21
%148 = fmul double 3.000000e+00, %147
%149 = fdiv double 2.000000e+00, %148
%150 = fsub double %146, %149
%151 = fneg double %144
%152 = call double @llvm.fmuladd.f64(double %151, double %150, double %141)
store double %152, double* %29
%153 = load double, double* %22
%154 = load double, double* %22
%155 = load double, double* %24
%156 = load double, double* %29
%157 = load double, double* %29
%158 = fadd double %156, %157
%159 = call double @exp(double %158)
%160 = call double @llvm.fmuladd.f64(double %155, double %159, double %154)
%161 = fdiv double %153, %160
store double %161, double* %33
br label %220
162: ; preds = %116, %97
%163 = load double, double* %24
%164 = fmul double %163, 2.000000e+00
store double %164, double* %25
%165 = load double, double* %24
%166 = fmul double 9.000000e+00, %165
%167 = fdiv double 1.000000e+00, %166
store double %167, double* %27
%168 = load double, double* %25
%169 = load double, double* %27
%170 = fsub double 1.000000e+00, %169
%171 = load double, double* %30
%172 = load double, double* %27
%173 = call double @sqrt(double %172)
%174 = call double @llvm.fmuladd.f64(double %171, double %173, double %170)
%175 = fptosi double %174 to i32
%176 = call double @pow(i32 %175, i32 3)
%177 = fmul double %168, %176
store double %177, double* %27
%178 = load double, double* %27
%179 = fcmp ole double %178, 0.000000e+00
br i1 %179, label %180, label %193
180: ; preds = %162
%181 = load double, double* %18
%182 = fsub double 1.000000e+00, %181
%183 = load double, double* %24
%184 = fmul double %182, %183
%185 = fptosi double %184 to i32
%186 = call double @log(i32 %185)
%187 = load double, double* %9
%188 = fadd double %186, %187
%189 = load double, double* %24
%190 = fdiv double %188, %189
%191 = call double @exp(double %190)
%192 = fsub double 1.000000e+00, %191
store double %192, double* %33
br label %219
193: ; preds = %162
%194 = load double, double* %22
%195 = load double, double* %25
%196 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %194, double %195)
%197 = fsub double %196, 2.000000e+00
%198 = load double, double* %27
%199 = fdiv double %197, %198
store double %199, double* %27
%200 = load double, double* %27
%201 = fcmp ole double %200, 1.000000e+00
br i1 %201, label %202, label %213
202: ; preds = %193
%203 = load double, double* %18
%204 = load double, double* %22
%205 = fmul double %203, %204
%206 = fptosi double %205 to i32
%207 = call double @log(i32 %206)
%208 = load double, double* %9
%209 = fadd double %207, %208
%210 = load double, double* %22
%211 = fdiv double %209, %210
%212 = call double @exp(double %211)
store double %212, double* %33
br label %218
213: ; preds = %193
%214 = load double, double* %27
%215 = fadd double %214, 1.000000e+00
%216 = fdiv double 2.000000e+00, %215
%217 = fsub double 1.000000e+00, %216
store double %217, double* %33
br label %218
218: ; preds = %213, %202
br label %219
219: ; preds = %218, %180
br label %220
220: ; preds = %219, %119
%221 = load double, double* %22
%222 = fsub double 1.000000e+00, %221
store double %222, double* %25
%223 = load double, double* %24
%224 = fsub double 1.000000e+00, %223
store double %224, double* %27
store double 0.000000e+00, double* %31
store double 1.000000e+00, double* %19
%225 = load double, double* %33
%226 = load double, double* %12
%227 = fcmp ole double %225, %226
br i1 %227, label %232, label %228
228: ; preds = %220
%229 = load double, double* %33
%230 = load double, double* %13
%231 = fcmp oge double %229, %230
br i1 %231, label %232, label %236
232: ; preds = %228, %220
%233 = load double, double* %18
%234 = fadd double %233, 5.000000e-01
%235 = fdiv double %234, 2.000000e+00
store double %235, double* %33
br label %236
236: ; preds = %232, %228
%237 = load double, double* %22
%238 = load double, double* %22
%239 = fmul double %237, %238
%240 = fdiv double 2.500000e+00, %239
%241 = fsub double -1.300000e+01, %240
%242 = load double, double* %18
%243 = load double, double* %18
%244 = fmul double %242, %243
%245 = fdiv double 5.000000e-01, %244
%246 = fsub double %241, %245
%247 = fptosi double %246 to i32
%248 = call double @pow(i32 10, i32 %247)
store double %248, double* %32
%249 = load double, double* %32
%250 = load double, double* %11
%251 = fcmp ogt double %249, %250
br i1 %251, label %252, label %254
252: ; preds = %236
%253 = load double, double* %32
br label %256
254: ; preds = %236
%255 = load double, double* %11
br label %256
256: ; preds = %254, %252
%257 = phi double [ %253, %252 ], [ %255, %254 ]
store double %257, double* %32
store i32 0, i32* %15
br label %258
258: ; preds = %359, %256
%259 = load i32, i32* %15
%260 = load i32, i32* %17
%261 = icmp slt i32 %259, %260
br i1 %261, label %262, label %362
262: ; preds = %258
%263 = load double, double* %33
%264 = load double, double* %22
%265 = load double, double* %24
%266 = load double, double* %9
%267 = call double @CDFBeta(double %263, double %264, double %265, double %266)
store double %267, double* %30
%268 = load double, double* %30
%269 = load double, double* %18
%270 = fsub double %268, %269
%271 = load double, double* %9
%272 = load double, double* %25
%273 = load double, double* %33
%274 = fptosi double %273 to i32
%275 = call double @log(i32 %274)
%276 = call double @llvm.fmuladd.f64(double %272, double %275, double %271)
%277 = load double, double* %27
%278 = load double, double* %33
%279 = fsub double 1.000000e+00, %278
%280 = fptosi double %279 to i32
%281 = call double @log(i32 %280)
%282 = call double @llvm.fmuladd.f64(double %277, double %281, double %276)
%283 = call double @exp(double %282)
%284 = fmul double %270, %283
store double %284, double* %30
%285 = load double, double* %30
%286 = load double, double* %31
%287 = fmul double %285, %286
%288 = fcmp ole double %287, 0.000000e+00
br i1 %288, label %289, label %301
289: ; preds = %262
%290 = load double, double* %19
%291 = call double @llvm.fabs.f64(double %290)
%292 = load double, double* %10
%293 = fcmp ogt double %291, %292
br i1 %293, label %294, label %297
294: ; preds = %289
%295 = load double, double* %19
%296 = call double @llvm.fabs.f64(double %295)
br label %299
297: ; preds = %289
%298 = load double, double* %10
br label %299
299: ; preds = %297, %294
%300 = phi double [ %296, %294 ], [ %298, %297 ]
store double %300, double* %23
br label %301
301: ; preds = %299, %262
store i32 0, i32* %16
store double 1.000000e+00, double* %20
br label %302
302: ; preds = %345, %301
%303 = load i32, i32* %16
%304 = load i32, i32* %17
%305 = icmp slt i32 %303, %304
br i1 %305, label %306, label %348
306: ; preds = %302
%307 = load double, double* %20
%308 = load double, double* %30
%309 = fmul double %307, %308
store double %309, double* %19
%310 = load double, double* %19
%311 = call double @llvm.fabs.f64(double %310)
%312 = load double, double* %23
%313 = fcmp olt double %311, %312
br i1 %313, label %314, label %342
314: ; preds = %306
%315 = load double, double* %33
%316 = load double, double* %19
%317 = fsub double %315, %316
store double %317, double* %28
%318 = load double, double* %28
%319 = fcmp oge double %318, 0.000000e+00
br i1 %319, label %320, label %341
320: ; preds = %314
%321 = load double, double* %28
%322 = fcmp ole double %321, 1.000000e+00
br i1 %322, label %323, label %341
323: ; preds = %320
%324 = load double, double* %23
%325 = load double, double* %32
%326 = fcmp ole double %324, %325
br i1 %326, label %332, label %327
327: ; preds = %323
%328 = load double, double* %30
%329 = call double @llvm.fabs.f64(double %328)
%330 = load double, double* %32
%331 = fcmp ole double %329, %330
br i1 %331, label %332, label %333
332: ; preds = %327, %323
br label %378
333: ; preds = %327
%334 = load double, double* %28
%335 = fcmp une double %334, 0.000000e+00
br i1 %335, label %336, label %340
336: ; preds = %333
%337 = load double, double* %28
%338 = fcmp une double %337, 1.000000e+00
br i1 %338, label %339, label %340
339: ; preds = %336
br label %348
340: ; preds = %336, %333
br label %341
341: ; preds = %340, %320, %314
br label %342
342: ; preds = %341, %306
%343 = load double, double* %20
%344 = fdiv double %343, 3.000000e+00
store double %344, double* %20
br label %345
345: ; preds = %342
%346 = load i32, i32* %16
%347 = add nsw i32 %346, 1
store i32 %347, i32* %16
br label %302
348: ; preds = %339, %302
%349 = load double, double* %28
%350 = load double, double* %33
%351 = fsub double %349, %350
%352 = call double @llvm.fabs.f64(double %351)
%353 = load double, double* %10
%354 = fcmp olt double %352, %353
br i1 %354, label %355, label %356
355: ; preds = %348
br label %378
356: ; preds = %348
%357 = load double, double* %28
store double %357, double* %33
%358 = load double, double* %30
store double %358, double* %31
br label %359
359: ; preds = %356
%360 = load i32, i32* %15
%361 = add nsw i32 %360, 1
store i32 %361, i32* %15
br label %258
362: ; preds = %258
%363 = load double, double* %6
%364 = load double, double* %7
%365 = load double, double* %8
%366 = load i32, i32* %14
%367 = icmp ne i32 %366, 0
br i1 %367, label %368, label %371
368: ; preds = %362
%369 = load double, double* %33
%370 = fsub double 1.000000e+00, %369
br label %373
371: ; preds = %362
%372 = load double, double* %33
br label %373
373: ; preds = %371, %368
%374 = phi double [ %370, %368 ], [ %372, %371 ]
%375 = fptosi double %374 to i32
%376 = load i32, i32* %17
%377 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), double %363, double %364, double %365, i32 %375, i32 %376)
br label %378
378: ; preds = %373, %355, %332
%379 = load i32, i32* %14
%380 = icmp ne i32 %379, 0
br i1 %380, label %381, label %384
381: ; preds = %378
%382 = load double, double* %33
%383 = fsub double 1.000000e+00, %382
br label %386
384: ; preds = %378
%385 = load double, double* %33
br label %386
386: ; preds = %384, %381
%387 = phi double [ %383, %381 ], [ %385, %384 ]
store double %387, double* %5
br label %388
388: ; preds = %386, %69
%389 = load double, double* %5
ret double %389
}

LLVM IR (-O2):
@.str = [29 x i8] c"out of range in QuantileBeta\00"
@.str.1 = [13 x i8] c"beta par err\00"
@.str.2 = [50 x i8] c"\0AQuantileBeta(%.2f, %.5f, %.5f) = %.6e\09%d rounds\0A\00"
define double @QuantileBeta(double %0, double %1, double %2, double %3) {
%5 = fcmp olt double %0, 0.000000e+00
%6 = fcmp ogt double %0, 1.000000e+00
%7 = or i1 %5, %6
%8 = fcmp olt double %1, 0.000000e+00
%9 = or i1 %7, %8
%10 = fcmp olt double %2, 0.000000e+00
%11 = or i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = tail call i32 @error2(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %4, %12
%15 = or i1 %8, %10
%16 = or i1 %5, %15
%17 = or i1 %6, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 @error2(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %14, %18
%21 = fcmp oeq double %0, 0.000000e+00
%22 = fcmp oeq double %0, 1.000000e+00
%23 = or i1 %21, %22
br i1 %23, label %214, label %24
24: ; preds = %20
%25 = fcmp oeq double %3, 0.000000e+00
br i1 %25, label %26, label %33
26: ; preds = %24
%27 = tail call double @LnGamma(double %1)
%28 = tail call double @LnGamma(double %2)
%29 = fadd double %27, %28
%30 = fadd double %1, %2
%31 = tail call double @LnGamma(double %30)
%32 = fsub double %29, %31
br label %33
33: ; preds = %26, %24
%34 = phi double [ %32, %26 ], [ %3, %24 ]
%35 = fcmp ugt double %0, 5.000000e-01
%36 = fsub double 1.000000e+00, %0
%37 = select i1 %35, double %36, double %0
%38 = insertelement <2 x i1> poison, i1 %35, i64 0
%39 = shufflevector <2 x i1> %38, <2 x i1> poison, <2 x i32> zeroinitializer
%40 = insertelement <2 x double> poison, double %1, i64 0
%41 = insertelement <2 x double> %40, double %2, i64 1
%42 = insertelement <2 x double> poison, double %2, i64 0
%43 = insertelement <2 x double> %42, double %1, i64 1
%44 = select <2 x i1> %39, <2 x double> %41, <2 x double> %43
%45 = fmul double %37, %37
%46 = fptosi double %45 to i32
%47 = tail call double @log(i32 %46)
%48 = fneg double %47
%49 = tail call double @sqrt(double %48)
%50 = tail call double @llvm.fmuladd.f64(double %49, double 2.706100e-01, double 2.307530e+00)
%51 = tail call double @llvm.fmuladd.f64(double %49, double 4.481000e-02, double 9.922900e-01)
%52 = tail call double @llvm.fmuladd.f64(double %51, double %49, double 1.000000e+00)
%53 = fdiv double %50, %52
%54 = fsub double %49, %53
%55 = extractelement <2 x double> %44, i64 1
%56 = fcmp ogt double %55, 1.000000e+00
%57 = extractelement <2 x double> %44, i64 0
%58 = fcmp ogt double %57, 1.000000e+00
%59 = and i1 %56, %58
br i1 %59, label %60, label %89
60: ; preds = %33
%61 = tail call double @llvm.fmuladd.f64(double %54, double %54, double -3.000000e+00)
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %44, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%63 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %62
%64 = extractelement <2 x double> %63, i64 0
%65 = extractelement <2 x double> %63, i64 1
%66 = fadd double %65, %64
%67 = insertelement <2 x double> <double poison, double 2.000000e+00>, double %61, i64 0
%68 = insertelement <2 x double> <double 6.000000e+00, double poison>, double %66, i64 1
%69 = fdiv <2 x double> %67, %68
%70 = extractelement <2 x double> %69, i64 0
%71 = extractelement <2 x double> %69, i64 1
%72 = fadd double %71, %70
%73 = tail call double @sqrt(double %72)
%74 = fmul double %54, %73
%75 = fdiv double %74, %71
%76 = fsub double %64, %65
%77 = extractelement <2 x double> %69, i64 1
%78 = fmul double %77, 3.000000e+00
%79 = fdiv double 2.000000e+00, %78
%80 = extractelement <2 x double> %69, i64 0
%81 = fadd double %80, 0x3FEAAAAAAAAAAAAB
%82 = fsub double %81, %79
%83 = fneg double %76
%84 = tail call double @llvm.fmuladd.f64(double %83, double %82, double %75)
%85 = fadd double %84, %84
%86 = tail call double @exp(double %85)
%87 = tail call double @llvm.fmuladd.f64(double %57, double %86, double %55)
%88 = fdiv double %55, %87
br label %125
89: ; preds = %33
%90 = fmul double %57, 2.000000e+00
%91 = fmul double %57, 9.000000e+00
%92 = fdiv double 1.000000e+00, %91
%93 = fsub double 1.000000e+00, %92
%94 = tail call double @sqrt(double %92)
%95 = tail call double @llvm.fmuladd.f64(double %54, double %94, double %93)
%96 = fptosi double %95 to i32
%97 = tail call double @pow(i32 %96, i32 3)
%98 = fmul double %90, %97
%99 = fcmp ugt double %98, 0.000000e+00
br i1 %99, label %109, label %100
100: ; preds = %89
%101 = fsub double 1.000000e+00, %37
%102 = fmul double %101, %57
%103 = fptosi double %102 to i32
%104 = tail call double @log(i32 %103)
%105 = fadd double %34, %104
%106 = fdiv double %105, %57
%107 = tail call double @exp(double %106)
%108 = fsub double 1.000000e+00, %107
br label %125
109: ; preds = %89
%110 = tail call double @llvm.fmuladd.f64(double %55, double 4.000000e+00, double %90)
%111 = fadd double %110, -2.000000e+00
%112 = fdiv double %111, %98
%113 = fcmp ugt double %112, 1.000000e+00
br i1 %113, label %121, label %114
114: ; preds = %109
%115 = fmul double %37, %55
%116 = fptosi double %115 to i32
%117 = tail call double @log(i32 %116)
%118 = fadd double %34, %117
%119 = fdiv double %118, %55
%120 = tail call double @exp(double %119)
br label %125
121: ; preds = %109
%122 = fadd double %112, 1.000000e+00
%123 = fdiv double 2.000000e+00, %122
%124 = fsub double 1.000000e+00, %123
br label %125
125: ; preds = %100, %121, %114, %60
%126 = phi double [ %88, %60 ], [ %108, %100 ], [ %120, %114 ], [ %124, %121 ]
%127 = fsub double 1.000000e+00, %55
%128 = fsub double 1.000000e+00, %57
%129 = fcmp ugt double %126, 3.000000e-308
%130 = fcmp ult double %126, 0x3FEFFFFFFFFFFFFE
%131 = and i1 %129, %130
%132 = fadd double %37, 5.000000e-01
%133 = fmul double %132, 5.000000e-01
%134 = select i1 %131, double %126, double %133
%135 = fmul double %55, %55
%136 = insertelement <2 x double> poison, double %45, i64 1
%137 = insertelement <2 x double> %136, double %135, i64 0
%138 = fdiv <2 x double> <double 2.500000e+00, double 5.000000e-01>, %137
%139 = extractelement <2 x double> %138, i64 0
%140 = fsub double -1.300000e+01, %139
%141 = extractelement <2 x double> %138, i64 1
%142 = fsub double %140, %141
%143 = fptosi double %142 to i32
%144 = tail call double @pow(i32 10, i32 %143)
%145 = fcmp ogt double %144, 1.000000e-300
%146 = select i1 %145, double %144, double 1.000000e-300
br label %150
147: ; preds = %200
%148 = add nuw nsw i32 %156, 1
%149 = icmp eq i32 %148, 2000
br i1 %149, label %205, label %150
150: ; preds = %125, %147
%151 = phi double [ %134, %125 ], [ %201, %147 ]
%152 = phi double [ 0.000000e+00, %125 ], [ %167, %147 ]
%153 = phi double [ 0.000000e+00, %125 ], [ %201, %147 ]
%154 = phi double [ 0.000000e+00, %125 ], [ %173, %147 ]
%155 = phi double [ 1.000000e+00, %125 ], [ %182, %147 ]
%156 = phi i32 [ 0, %125 ], [ %148, %147 ]
%157 = tail call double @CDFBeta(double %151, double %55, double %57, double %34)
%158 = fsub double %157, %37
%159 = fptosi double %151 to i32
%160 = tail call double @log(i32 %159)
%161 = tail call double @llvm.fmuladd.f64(double %127, double %160, double %34)
%162 = fsub double 1.000000e+00, %151
%163 = fptosi double %162 to i32
%164 = tail call double @log(i32 %163)
%165 = tail call double @llvm.fmuladd.f64(double %128, double %164, double %161)
%166 = tail call double @exp(double %165)
%167 = fmul double %158, %166
%168 = fmul double %152, %167
%169 = fcmp ugt double %168, 0.000000e+00
%170 = tail call double @llvm.fabs.f64(double %155)
%171 = fcmp ogt double %170, 3.000000e-308
%172 = select i1 %171, double %170, double 3.000000e-308
%173 = select i1 %169, double %154, double %172
%174 = fcmp ugt double %173, %146
%175 = tail call double @llvm.fabs.f64(double %167)
%176 = fcmp ugt double %175, %146
%177 = select i1 %174, i1 %176, i1 false
br label %178
178: ; preds = %150, %195
%179 = phi double [ %153, %150 ], [ %196, %195 ]
%180 = phi double [ 1.000000e+00, %150 ], [ %197, %195 ]
%181 = phi i32 [ 0, %150 ], [ %198, %195 ]
%182 = fmul double %167, %180
%183 = tail call double @llvm.fabs.f64(double %182)
%184 = fcmp olt double %183, %173
br i1 %184, label %185, label %195
185: ; preds = %178
%186 = fsub double %151, %182
%187 = fcmp oge double %186, 0.000000e+00
%188 = fcmp ole double %186, 1.000000e+00
%189 = and i1 %187, %188
br i1 %189, label %190, label %195
190: ; preds = %185
br i1 %177, label %191, label %210
191: ; preds = %190
%192 = fcmp une double %186, 0.000000e+00
%193 = fcmp une double %186, 1.000000e+00
%194 = and i1 %192, %193
br i1 %194, label %200, label %195
195: ; preds = %185, %191, %178
%196 = phi double [ %186, %191 ], [ %186, %185 ], [ %179, %178 ]
%197 = fdiv double %180, 3.000000e+00
%198 = add nuw nsw i32 %181, 1
%199 = icmp eq i32 %198, 2000
br i1 %199, label %200, label %178
200: ; preds = %191, %195
%201 = phi double [ %186, %191 ], [ %196, %195 ]
%202 = fsub double %201, %151
%203 = tail call double @llvm.fabs.f64(double %202)
%204 = fcmp olt double %203, 3.000000e-308
br i1 %204, label %210, label %147
205: ; preds = %147
%206 = fsub double 1.000000e+00, %201
%207 = select i1 %35, double %206, double %201
%208 = fptosi double %207 to i32
%209 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), double %0, double %1, double %2, i32 %208, i32 2000)
br label %210
210: ; preds = %200, %190, %205
%211 = phi double [ %206, %205 ], [ %162, %190 ], [ %162, %200 ]
%212 = phi double [ %201, %205 ], [ %151, %190 ], [ %151, %200 ]
%213 = select i1 %35, double %211, double %212
br label %214
214: ; preds = %20, %210
%215 = phi double [ %213, %210 ], [ %0, %20 ]
ret double %215
}