#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 DBL_EPSILON;
int fabs(double);
double ibeta(double, double, double);
double invibeta_quick(double, double, double);
double invibeta(double p, double a, double b) {
  int i;
  double ql, qr, qm, qdiff;
  double pl, pr, pm, pdiff;
  qm = 0;
  if (p == 0 || p == 1)
    return (p);
  ql = qr = invibeta_quick(p, a, b);
  pl = pr = ibeta(ql, a, b);
  if (pl == p)
    return (ql);
  if (pl < p)
    while (1) {
      qr += 0.05;
      if (qr >= 1) {
        pr = qr = 1;
        break;
      }
      pr = ibeta(qr, a, b);
      if (pr == p)
        return (pr);
      if (pr > p)
        break;
    }
  else
    while (1) {
      ql -= 0.05;
      if (ql <= 0) {
        pl = ql = 0;
        break;
      }
      pl = ibeta(ql, a, b);
      if (pl == p)
        return (pl);
      if (pl < p)
        break;
    }
  for (i = 0; i < 5; i++) {
    qm = (ql + qr) / 2;
    pm = ibeta(qm, a, b);
    qdiff = qr - ql;
    pdiff = pm - p;
    if (fabs(qdiff) < DBL_EPSILON * qm || fabs(pdiff) < DBL_EPSILON)
      return (qm);
    if (pdiff < 0) {
      ql = qm;
      pl = pm;
    } else {
      qr = qm;
      pr = pm;
    }
  }
  for (i = 0; i < 40; i++) {
    qm = ql + (p - pl) * (qr - ql) / (pr - pl);
    pm = ibeta(qm, a, b);
    qdiff = qr - ql;
    pdiff = pm - p;
    if (fabs(qdiff) < 2 * DBL_EPSILON * qm || fabs(pdiff) < 2 * DBL_EPSILON)
      return (qm);
    if (pdiff < 0) {
      ql = qm;
      pl = pm;
    } else {
      qr = qm;
      pr = pm;
    }
  }
  return (qm);
}


x86 assembly (clang, -O0):
<invibeta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116c <invibeta+0x3c>
jp     116c <invibeta+0x3c>
jmp    1189 <invibeta+0x59>
movsd  -0x10(%rbp),%xmm0
movsd  0xe87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1198 <invibeta+0x68>
jp     1198 <invibeta+0x68>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1050 <invibeta_quick@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <ibeta@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    11f9 <invibeta+0xc9>
jp     11f9 <invibeta+0xc9>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
movsd  -0x50(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12b7 <invibeta+0x187>
jmp    1212 <invibeta+0xe2>
movsd  0xdee(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xdcf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     125a <invibeta+0x12a>
movsd  0xdbd(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdb0(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    12b2 <invibeta+0x182>
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <ibeta@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1298 <invibeta+0x168>
jp     1298 <invibeta+0x168>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
movsd  -0x58(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    12ad <invibeta+0x17d>
jmp    12b2 <invibeta+0x182>
jmp    1212 <invibeta+0xe2>
jmp    1356 <invibeta+0x226>
jmp    12bc <invibeta+0x18c>
movsd  -0x30(%rbp),%xmm0
movsd  0xd3f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     12f5 <invibeta+0x1c5>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1351 <invibeta+0x221>
movsd  -0x30(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <ibeta@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1333 <invibeta+0x203>
jp     1333 <invibeta+0x203>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
movsd  -0x50(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    134c <invibeta+0x21c>
jmp    1351 <invibeta+0x221>
jmp    12bc <invibeta+0x18c>
jmp    1356 <invibeta+0x226>
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    1461 <invibeta+0x331>
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  0xc97(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <ibeta@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
mov    0x2c1a(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1404 <invibeta+0x2d4>
movsd  -0x68(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
mov    0x2bf2(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1413 <invibeta+0x2e3>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    143a <invibeta+0x30a>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    144e <invibeta+0x31e>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1453 <invibeta+0x323>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    135d <invibeta+0x22d>
movl   $0x0,-0x24(%rbp)
cmpl   $0x28,-0x24(%rbp)
jge    1595 <invibeta+0x465>
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x58(%rbp),%xmm2
subsd  -0x50(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <ibeta@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xb1d(%rip),%xmm0
mov    0x2aee(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1538 <invibeta+0x408>
movsd  -0x68(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xaed(%rip),%xmm0
mov    0x2abe(%rip),%rax
mulsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1547 <invibeta+0x417>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    159f <invibeta+0x46f>
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    156e <invibeta+0x43e>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1582 <invibeta+0x452>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1587 <invibeta+0x457>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1468 <invibeta+0x338>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invibeta>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jne    1145 <invibeta+0x15>
jnp    1191 <invibeta+0x61>
ucomisd 0xeb3(%rip),%xmm0
jne    1151 <invibeta+0x21>
jnp    1191 <invibeta+0x61>
movsd  %xmm0,0x28(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
call   1050 <invibeta_quick@plt>
movapd %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1040 <ibeta@plt>
movsd  0x28(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jne    119b <invibeta+0x6b>
jp     119b <invibeta+0x6b>
movapd (%rsp),%xmm0
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret
movsd  %xmm0,0x40(%rsp)
ucomisd %xmm0,%xmm1
jbe    1237 <invibeta+0x107>
movsd  0xe4d(%rip),%xmm3
movapd (%rsp),%xmm5
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  0xe38(%rip),%xmm5
ucomisd %xmm3,%xmm5
jae    12ac <invibeta+0x17c>
movsd  %xmm5,0x30(%rsp)
movapd %xmm5,%xmm0
call   1040 <ibeta@plt>
ucomisd 0x28(%rsp),%xmm0
jne    11fb <invibeta+0xcb>
jnp    1191 <invibeta+0x61>
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movsd  0xdf1(%rip),%xmm3
movsd  0x30(%rsp),%xmm5
jbe    11d0 <invibeta+0xa0>
movsd  %xmm0,0x50(%rsp)
movapd (%rsp),%xmm4
movapd %xmm5,%xmm3
movsd  0x40(%rsp),%xmm0
movapd %xmm0,0x70(%rsp)
jmp    12dd <invibeta+0x1ad>
movapd (%rsp),%xmm3
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
nopl   0x0(%rax,%rax,1)
addsd  0xdb0(%rip),%xmm3
xorpd  %xmm4,%xmm4
ucomisd %xmm3,%xmm4
jae    12c3 <invibeta+0x193>
movsd  %xmm3,0x30(%rsp)
movapd %xmm3,%xmm0
call   1040 <ibeta@plt>
movsd  0x28(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jne    1283 <invibeta+0x153>
jnp    1191 <invibeta+0x61>
ucomisd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movsd  0x30(%rsp),%xmm3
jbe    1250 <invibeta+0x120>
movapd %xmm0,0x70(%rsp)
movapd %xmm3,%xmm4
movapd (%rsp),%xmm3
jmp    12d1 <invibeta+0x1a1>
movaps (%rsp),%xmm4
movsd  0x40(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  %xmm3,0x50(%rsp)
jmp    12dd <invibeta+0x1ad>
movaps (%rsp),%xmm3
xorpd  %xmm0,%xmm0
movapd %xmm0,0x70(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  %xmm3,0x40(%rsp)
movapd %xmm4,0x30(%rsp)
movapd %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xd1f(%rip),%xmm0
movapd %xmm0,(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x40(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x2cc0(%rip),%rbx
movsd  (%rbx),%xmm1
mulsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
movsd  0x20(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
xorpd  %xmm0,%xmm0
movapd 0x60(%rsp),%xmm3
ucomisd %xmm3,%xmm0
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm0
movapd (%rsp),%xmm1
andpd  %xmm1,%xmm0
andnpd 0x30(%rsp),%xmm3
orpd   %xmm0,%xmm3
ja     139f <invibeta+0x26f>
movsd  0x18(%rsp),%xmm2
movapd %xmm1,%xmm4
jmp    13c2 <invibeta+0x292>
movsd  0x40(%rsp),%xmm4
movsd  0x20(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd %xmm4,(%rsp)
movapd %xmm3,%xmm0
addsd  %xmm4,%xmm0
mulsd  0xc3b(%rip),%xmm0
movapd %xmm0,0x30(%rsp)
movapd %xmm3,0x60(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x40(%rsp)
movapd (%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
call   1030 <fabs@plt>
movapd 0x30(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
jbe    1428 <invibeta+0x2f8>
movapd %xmm2,%xmm0
jmp    1191 <invibeta+0x61>
movsd  0x40(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
jbe    145b <invibeta+0x32b>
movapd 0x30(%rsp),%xmm0
jmp    1191 <invibeta+0x61>
xorpd  %xmm0,%xmm0
movapd 0x50(%rsp),%xmm4
ucomisd %xmm4,%xmm0
cmpltsd %xmm0,%xmm4
movapd %xmm4,%xmm0
movapd 0x30(%rsp),%xmm3
andpd  %xmm3,%xmm0
andnpd 0x60(%rsp),%xmm4
orpd   %xmm0,%xmm4
jbe    14a4 <invibeta+0x374>
movapd (%rsp),%xmm3
movsd  0x40(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd %xmm3,0x30(%rsp)
movapd %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xb52(%rip),%xmm0
movapd %xmm0,(%rsp)
movapd %xmm4,0x50(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x30(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
mulsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
movsd  0x20(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
xorpd  %xmm0,%xmm0
movapd 0x60(%rsp),%xmm3
ucomisd %xmm3,%xmm0
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm0
movapd (%rsp),%xmm1
andpd  %xmm1,%xmm0
andnpd 0x50(%rsp),%xmm3
orpd   %xmm0,%xmm3
ja     156b <invibeta+0x43b>
movsd  0x18(%rsp),%xmm2
movapd %xmm1,%xmm4
jmp    158e <invibeta+0x45e>
movapd 0x30(%rsp),%xmm4
movsd  0x20(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd %xmm4,(%rsp)
movapd %xmm3,%xmm0
addsd  %xmm4,%xmm0
mulsd  0xa6f(%rip),%xmm0
movapd %xmm0,0x30(%rsp)
movapd %xmm3,0x60(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x40(%rsp)
movapd (%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
call   1030 <fabs@plt>
movapd 0x30(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
ja     141f <invibeta+0x2ef>
movsd  0x40(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
ja     1450 <invibeta+0x320>
xorpd  %xmm0,%xmm0
movapd 0x50(%rsp),%xmm4
ucomisd %xmm4,%xmm0
cmpltsd %xmm0,%xmm4
movapd %xmm4,%xmm0
movapd 0x30(%rsp),%xmm3
andpd  %xmm3,%xmm0
andnpd 0x60(%rsp),%xmm4
orpd   %xmm0,%xmm4
jbe    1664 <invibeta+0x534>
movapd (%rsp),%xmm3
movsd  0x40(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd %xmm3,0x30(%rsp)
movapd %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  0x992(%rip),%xmm0
movapd %xmm0,(%rsp)
movapd %xmm4,0x50(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x30(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
mulsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
movsd  0x20(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
xorpd  %xmm0,%xmm0
movapd 0x60(%rsp),%xmm4
ucomisd %xmm4,%xmm0
cmpltsd %xmm0,%xmm4
movapd %xmm4,%xmm0
andpd  (%rsp),%xmm0
andnpd 0x50(%rsp),%xmm4
orpd   %xmm0,%xmm4
ja     173b <invibeta+0x60b>
movsd  0x28(%rsp),%xmm3
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd 0x70(%rsp),%xmm5
movsd  0x20(%rsp),%xmm6
jmp    1764 <invibeta+0x634>
movapd 0x30(%rsp),%xmm0
movapd %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm5
movsd  0x40(%rsp),%xmm6
movsd  0x28(%rsp),%xmm3
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
mov    $0x28,%ebp
movapd (%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
jmp    17b5 <invibeta+0x685>
movapd (%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x30(%rsp),%xmm6
movsd  0x28(%rsp),%xmm3
cmpltsd 0x88a(%rip),%xmm7
movapd %xmm7,%xmm4
andpd  %xmm0,%xmm4
andnpd 0x60(%rsp),%xmm7
orpd   %xmm4,%xmm7
movapd %xmm7,%xmm4
add    $0xffffffff,%ebp
je     1191 <invibeta+0x61>
movapd %xmm3,%xmm0
subsd  %xmm5,%xmm0
movsd  0x50(%rsp),%xmm3
subsd  %xmm4,%xmm3
movsd  %xmm3,0x40(%rsp)
mulsd  %xmm3,%xmm0
movsd  %xmm6,0x20(%rsp)
movapd %xmm5,0x70(%rsp)
subsd  %xmm5,%xmm6
divsd  %xmm6,%xmm0
movapd %xmm4,0x60(%rsp)
addsd  %xmm4,%xmm0
movapd %xmm0,(%rsp)
call   1040 <ibeta@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x40(%rsp),%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
addsd  %xmm1,%xmm1
mulsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
movsd  0x30(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movapd %xmm0,0x40(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
addsd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     118c <invibeta+0x5c>
xorpd  %xmm0,%xmm0
movapd 0x40(%rsp),%xmm7
ucomisd %xmm7,%xmm0
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd 0x70(%rsp),%xmm5
movsd  0x20(%rsp),%xmm6
jbe    1776 <invibeta+0x646>
movsd  0x30(%rsp),%xmm5
movsd  0x28(%rsp),%xmm3
movapd (%rsp),%xmm0
jmp    178d <invibeta+0x65d>

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

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define double @invibeta(double %0, double %1, double %2) {
%4 = fcmp oeq double %0, 0.000000e+00
%5 = fcmp oeq double %0, 1.000000e+00
%6 = or i1 %4, %5
br i1 %6, label %175, label %7
7: ; preds = %3
%8 = tail call double @invibeta_quick(double %0, double %1, double %2)
%9 = tail call double @ibeta(double %8, double %1, double %2)
%10 = fcmp oeq double %9, %0
br i1 %10, label %175, label %11
11: ; preds = %7
%12 = fcmp olt double %9, %0
br i1 %12, label %13, label %22
13: ; preds = %11, %20
%14 = phi double [ %15, %20 ], [ %8, %11 ]
%15 = fadd double %14, 5.000000e-02
%16 = fcmp ult double %15, 1.000000e+00
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = tail call double @ibeta(double %15, double %1, double %2)
%19 = fcmp oeq double %18, %0
br i1 %19, label %175, label %20
20: ; preds = %17
%21 = fcmp ogt double %18, %0
br i1 %21, label %31, label %13
22: ; preds = %11, %29
%23 = phi double [ %24, %29 ], [ %8, %11 ]
%24 = fadd double %23, -5.000000e-02
%25 = fcmp ugt double %24, 0.000000e+00
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = tail call double @ibeta(double %24, double %1, double %2)
%28 = fcmp oeq double %27, %0
br i1 %28, label %175, label %29
29: ; preds = %26
%30 = fcmp olt double %27, %0
br i1 %30, label %31, label %22
31: ; preds = %22, %29, %13, %20
%32 = phi double [ %8, %20 ], [ %8, %13 ], [ 0.000000e+00, %22 ], [ %24, %29 ]
%33 = phi double [ 1.000000e+00, %13 ], [ %15, %20 ], [ %8, %29 ], [ %8, %22 ]
%34 = phi double [ %9, %20 ], [ %9, %13 ], [ 0.000000e+00, %22 ], [ %27, %29 ]
%35 = phi double [ 1.000000e+00, %13 ], [ %18, %20 ], [ %9, %29 ], [ %9, %22 ]
%36 = fadd double %32, %33
%37 = fmul double %36, 5.000000e-01
%38 = tail call double @ibeta(double %37, double %1, double %2)
%39 = fsub double %33, %32
%40 = fsub double %38, %0
%41 = tail call i32 @fabs(double %39)
%42 = sitofp i32 %41 to double
%43 = load double, double* @DBL_EPSILON
%44 = fmul double %37, %43
%45 = fcmp ogt double %44, %42
br i1 %45, label %175, label %46
46: ; preds = %31
%47 = tail call i32 @fabs(double %40)
%48 = sitofp i32 %47 to double
%49 = load double, double* @DBL_EPSILON
%50 = fcmp ogt double %49, %48
br i1 %50, label %175, label %51
51: ; preds = %46
%52 = fcmp olt double %40, 0.000000e+00
%53 = select i1 %52, double %37, double %32
%54 = select i1 %52, double %33, double %37
%55 = select i1 %52, double %38, double %34
%56 = select i1 %52, double %35, double %38
%57 = fadd double %53, %54
%58 = fmul double %57, 5.000000e-01
%59 = tail call double @ibeta(double %58, double %1, double %2)
%60 = fsub double %54, %53
%61 = fsub double %59, %0
%62 = tail call i32 @fabs(double %60)
%63 = sitofp i32 %62 to double
%64 = load double, double* @DBL_EPSILON
%65 = fmul double %58, %64
%66 = fcmp ogt double %65, %63
br i1 %66, label %175, label %67
67: ; preds = %51
%68 = tail call i32 @fabs(double %61)
%69 = sitofp i32 %68 to double
%70 = load double, double* @DBL_EPSILON
%71 = fcmp ogt double %70, %69
br i1 %71, label %175, label %72
72: ; preds = %67
%73 = fcmp olt double %61, 0.000000e+00
%74 = select i1 %73, double %58, double %53
%75 = select i1 %73, double %54, double %58
%76 = select i1 %73, double %59, double %55
%77 = select i1 %73, double %56, double %59
%78 = fadd double %74, %75
%79 = fmul double %78, 5.000000e-01
%80 = tail call double @ibeta(double %79, double %1, double %2)
%81 = fsub double %75, %74
%82 = fsub double %80, %0
%83 = tail call i32 @fabs(double %81)
%84 = sitofp i32 %83 to double
%85 = load double, double* @DBL_EPSILON
%86 = fmul double %79, %85
%87 = fcmp ogt double %86, %84
br i1 %87, label %175, label %88
88: ; preds = %72
%89 = tail call i32 @fabs(double %82)
%90 = sitofp i32 %89 to double
%91 = load double, double* @DBL_EPSILON
%92 = fcmp ogt double %91, %90
br i1 %92, label %175, label %93
93: ; preds = %88
%94 = fcmp olt double %82, 0.000000e+00
%95 = select i1 %94, double %79, double %74
%96 = select i1 %94, double %75, double %79
%97 = select i1 %94, double %80, double %76
%98 = select i1 %94, double %77, double %80
%99 = fadd double %95, %96
%100 = fmul double %99, 5.000000e-01
%101 = tail call double @ibeta(double %100, double %1, double %2)
%102 = fsub double %96, %95
%103 = fsub double %101, %0
%104 = tail call i32 @fabs(double %102)
%105 = sitofp i32 %104 to double
%106 = load double, double* @DBL_EPSILON
%107 = fmul double %100, %106
%108 = fcmp ogt double %107, %105
br i1 %108, label %175, label %109
109: ; preds = %93
%110 = tail call i32 @fabs(double %103)
%111 = sitofp i32 %110 to double
%112 = load double, double* @DBL_EPSILON
%113 = fcmp ogt double %112, %111
br i1 %113, label %175, label %114
114: ; preds = %109
%115 = fcmp olt double %103, 0.000000e+00
%116 = select i1 %115, double %100, double %95
%117 = select i1 %115, double %96, double %100
%118 = select i1 %115, double %101, double %97
%119 = select i1 %115, double %98, double %101
%120 = fadd double %116, %117
%121 = fmul double %120, 5.000000e-01
%122 = tail call double @ibeta(double %121, double %1, double %2)
%123 = fsub double %117, %116
%124 = fsub double %122, %0
%125 = tail call i32 @fabs(double %123)
%126 = sitofp i32 %125 to double
%127 = load double, double* @DBL_EPSILON
%128 = fmul double %121, %127
%129 = fcmp ogt double %128, %126
br i1 %129, label %175, label %130
130: ; preds = %114
%131 = tail call i32 @fabs(double %124)
%132 = sitofp i32 %131 to double
%133 = load double, double* @DBL_EPSILON
%134 = fcmp ogt double %133, %132
br i1 %134, label %175, label %135
135: ; preds = %130
%136 = fcmp olt double %124, 0.000000e+00
%137 = select i1 %136, double %121, double %116
%138 = select i1 %136, double %117, double %121
%139 = select i1 %136, double %122, double %118
%140 = select i1 %136, double %119, double %122
br label %141
141: ; preds = %135, %167
%142 = phi double [ %172, %167 ], [ %140, %135 ]
%143 = phi double [ %171, %167 ], [ %139, %135 ]
%144 = phi double [ %170, %167 ], [ %138, %135 ]
%145 = phi double [ %169, %167 ], [ %137, %135 ]
%146 = phi i32 [ %173, %167 ], [ 0, %135 ]
%147 = fsub double %0, %143
%148 = fsub double %144, %145
%149 = fmul double %148, %147
%150 = fsub double %142, %143
%151 = fdiv double %149, %150
%152 = fadd double %145, %151
%153 = tail call double @ibeta(double %152, double %1, double %2)
%154 = fsub double %153, %0
%155 = tail call i32 @fabs(double %148)
%156 = sitofp i32 %155 to double
%157 = load double, double* @DBL_EPSILON
%158 = fmul double %157, 2.000000e+00
%159 = fmul double %152, %158
%160 = fcmp ogt double %159, %156
br i1 %160, label %175, label %161
161: ; preds = %141
%162 = tail call i32 @fabs(double %154)
%163 = sitofp i32 %162 to double
%164 = load double, double* @DBL_EPSILON
%165 = fmul double %164, 2.000000e+00
%166 = fcmp ogt double %165, %163
br i1 %166, label %175, label %167
167: ; preds = %161
%168 = fcmp olt double %154, 0.000000e+00
%169 = select i1 %168, double %152, double %145
%170 = select i1 %168, double %144, double %152
%171 = select i1 %168, double %153, double %143
%172 = select i1 %168, double %142, double %153
%173 = add nuw nsw i32 %146, 1
%174 = icmp eq i32 %173, 40
br i1 %174, label %175, label %141
175: ; preds = %26, %17, %167, %141, %161, %31, %46, %51, %67, %72, %88, %93, %109, %114, %130, %7, %3
%176 = phi double [ %0, %3 ], [ %8, %7 ], [ %37, %46 ], [ %37, %31 ], [ %58, %51 ], [ %58, %67 ], [ %79, %72 ], [ %79, %88 ], [ %100, %93 ], [ %100, %109 ], [ %121, %114 ], [ %121, %130 ], [ %152, %161 ], [ %152, %141 ], [ %152, %167 ], [ %18, %17 ], [ %27, %26 ]
ret double %176
}