#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 */
int M_PI;
double fabs(double);
double pow(double, double);
double sqrt(int);
double bondi_rel_solve(double Mdot, double GM, double r, double gam, double h0,
                       double K, double as) {
  double TOL = 1.0e-12;
  int MAX_ITER = 100;
  double C = h0 * h0;
  double us = -as / sqrt(1 + 3 * as * as);
  double rs = GM / (2 * us * us);
  double u0, u1, u, du, f, df;
  double umin, umax;
  if (r > rs) {
    double c1 = sqrt(C / (1 - 2 * GM / r)) - 1.0;
    double a21 = (gam - 1) * c1 / (1 + c1);
    double rho1 = pow(a21 / (K * gam * (1 - a21 / (gam - 1))), 1.0 / (gam - 1));
    u0 = -Mdot / (4 * M_PI * r * r * rho1);
    umin = us;
    umax = 0.0;
  } else {
    u0 = -sqrt(2 * GM / r);
    umin = -1.0e100;
    umax = us;
  }
  u1 = u0;
  int i = 0;
  do {
    u = u1;
    double rho = -Mdot / (4 * M_PI * r * r * u);
    double drho = -rho / u;
    double h = 1.0 + gam * K * pow(rho, gam - 1) / (gam - 1);
    double dh = gam * K * pow(rho, gam - 2) * drho;
    f = h * h * (1 - 2 * GM / r + u * u) - C;
    df = 2 * h * (1 - 2 * GM / r + u * u) * dh + 2 * h * h * u;
    du = -f / df;
    u1 = u + du;
    if (u1 < umin)
      u1 = 0.5 * (u + umin);
    if (u1 > umax)
      u1 = 0.5 * (u + umax);
    i++;
  } while (fabs(du) > TOL && i < MAX_ITER);
  return u1;
}


x86 assembly (clang, -O0):
<bondi_rel_solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x64,-0x44(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xe73(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe55(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe1f(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    134e <bondi_rel_solve+0x22e>
movsd  -0x50(%rbp),%xmm0
movsd  0xdef(%rip),%xmm2
mulsd  -0x10(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  0xde5(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  0xdcc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xdb3(%rip),%xmm1
subsd  %xmm1,%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  0xd9f(%rip),%xmm1
addsd  -0xa8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x30(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0x20(%rbp),%xmm2
movsd  0xd64(%rip),%xmm4
subsd  %xmm4,%xmm2
divsd  %xmm2,%xmm3
movsd  0xd54(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0xd3b(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0xd2f(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x2cdb(%rip),%rax
mov    (%rax),%eax
shl    $0x2,%eax
cvtsi2sd %eax,%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0xb8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    13a2 <bondi_rel_solve+0x282>
movsd  0xcaa(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xc93(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0xbc(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x2c05(%rip),%rax
mov    (%rax),%eax
shl    $0x2,%eax
cvtsi2sd %eax,%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x20(%rbp),%xmm1
movsd  0xbae(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1030 <pow@plt>
movsd  -0xf8(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xb8c(%rip),%xmm2
subsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0xb7c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x20(%rbp),%xmm1
movsd  0xb41(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  0xb01(%rip),%xmm2
mulsd  -0x10(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  0xaf7(%rip),%xmm1
subsd  %xmm2,%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xaa5(%rip),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  0xa95(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xa8b(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  -0x78(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0xe0(%rbp),%xmm2
ff
movsd  0xa59(%rip),%xmm1
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    163c <bondi_rel_solve+0x51c>
movsd  -0x78(%rbp),%xmm1
addsd  -0x98(%rbp),%xmm1
ff
movsd  0x9f5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    166d <bondi_rel_solve+0x54d>
movsd  -0x78(%rbp),%xmm1
addsd  -0xa0(%rbp),%xmm1
ff
movsd  0x9c4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
movsd  -0x80(%rbp),%xmm0
movaps 0x9a8(%rip),%xmm1
pand   %xmm1,%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0xf9(%rbp)
jbe    16b1 <bondi_rel_solve+0x591>
mov    -0xbc(%rbp),%eax
cmp    -0x44(%rbp),%eax
setl   %al
mov    %al,-0xf9(%rbp)
mov    -0xf9(%rbp),%al
test   $0x1,%al
jne    13b6 <bondi_rel_solve+0x296>
movsd  -0x70(%rbp),%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bondi_rel_solve>:
push   %r14
push   %rbx
sub    $0x98,%rsp
movsd  %xmm5,0x8(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
movaps %xmm0,0x50(%rsp)
mulsd  %xmm4,%xmm4
movapd %xmm4,0x60(%rsp)
movapd 0xea7(%rip),%xmm0
xorpd  %xmm6,%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xeb5(%rip),%xmm0
mulsd  %xmm6,%xmm0
mulsd  %xmm6,%xmm0
addsd  0xead(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movapd 0x30(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm1,0x30(%rsp)
mulsd  %xmm1,%xmm0
movsd  0x18(%rsp),%xmm2
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
movsd  0x20(%rsp),%xmm2
ucomisd %xmm1,%xmm2
addsd  %xmm0,%xmm0
divsd  %xmm2,%xmm0
jbe    12b2 <bondi_rel_solve+0x192>
movsd  0xe56(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd 0x60(%rsp),%xmm0
movsd  %xmm1,0x48(%rsp)
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  0xe39(%rip),%xmm3
addsd  %xmm3,%xmm0
movsd  0x10(%rsp),%xmm2
addsd  %xmm2,%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe13(%rip),%xmm5
addsd  %xmm5,%xmm0
divsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm4
mulsd  %xmm2,%xmm4
movapd %xmm1,%xmm0
divsd  %xmm3,%xmm0
movapd %xmm5,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm4,0x8(%rsp)
mulsd  %xmm4,%xmm2
divsd  %xmm2,%xmm1
movsd  %xmm3,0x28(%rsp)
divsd  %xmm3,%xmm5
movapd %xmm1,%xmm0
movapd %xmm5,%xmm1
call   1030 <pow@plt>
movapd 0x50(%rsp),%xmm3
xorpd  0xd96(%rip),%xmm3
mov    0x2d77(%rip),%rax
mov    (%rax),%eax
shl    $0x2,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm3,%xmm4
divsd  %xmm1,%xmm4
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x10(%rsp),%xmm0
movapd 0x30(%rsp),%xmm6
jmp    1334 <bondi_rel_solve+0x214>
cvttsd2si %xmm0,%edi
movsd  %xmm0,0x18(%rsp)
call   1040 <sqrt@plt>
movapd %xmm0,%xmm4
movapd 0xd33(%rip),%xmm0
xorpd  %xmm0,%xmm4
movapd 0x50(%rsp),%xmm3
xorpd  %xmm0,%xmm3
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xd37(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0xd1d(%rip),%xmm0
subsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
movaps 0x30(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0xd0e(%rip),%xmm6
movapd %xmm1,%xmm0
movsd  0x20(%rsp),%xmm2
addsd  0xd04(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0x60(%rsp),%xmm5
xorpd  0xcb0(%rip),%xmm5
xor    %ebx,%ebx
mov    0x2c8f(%rip),%r14
movapd %xmm5,0x60(%rsp)
movapd %xmm3,0x50(%rsp)
movapd %xmm6,0x30(%rsp)
nopl   0x0(%rax,%rax,1)
movapd %xmm4,0x80(%rsp)
mov    (%r14),%eax
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,0x78(%rsp)
movapd %xmm3,%xmm0
divsd  %xmm4,%xmm0
movsd  %xmm0,0x18(%rsp)
movapd %xmm3,%xmm0
movsd  0x28(%rsp),%xmm1
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
addsd  0xc5b(%rip),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  0x78(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
movapd 0x30(%rsp),%xmm6
movapd 0x60(%rsp),%xmm5
mulsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  0x70(%rsp),%xmm7
movapd %xmm7,%xmm1
mulsd  %xmm7,%xmm1
movapd 0x80(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm4,%xmm2
addsd  0x48(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm5,%xmm1
xorpd  0xbcf(%rip),%xmm1
movapd %xmm7,%xmm3
addsd  %xmm7,%xmm3
mulsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm7,%xmm3
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm3
subsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
movapd %xmm4,%xmm3
addsd  %xmm1,%xmm0
movapd %xmm6,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm4,%xmm7
movsd  0xbd6(%rip),%xmm8
mulsd  %xmm8,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm6,%xmm3
movapd %xmm3,%xmm4
andnpd %xmm0,%xmm4
andpd  %xmm2,%xmm3
orpd   %xmm4,%xmm3
movsd  0x40(%rsp),%xmm0
movapd %xmm7,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm8,%xmm2
movapd %xmm2,%xmm4
cmpltsd %xmm3,%xmm0
movapd %xmm0,%xmm2
andnpd %xmm3,%xmm2
movapd 0x50(%rsp),%xmm3
andpd  %xmm4,%xmm0
orpd   %xmm2,%xmm0
movsd  0x20(%rsp),%xmm2
movapd %xmm0,%xmm4
andpd  0xb3c(%rip),%xmm1
ucomisd 0xb74(%rip),%xmm1
jbe    14ec <bondi_rel_solve+0x3cc>
lea    0x1(%rbx),%eax
cmp    $0x63,%ebx
mov    %eax,%ebx
jb     1370 <bondi_rel_solve+0x250>
movapd %xmm4,%xmm0
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@M_PI = global i32 0
define double @bondi_rel_solve(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fmul double %4, %4
%9 = fneg double %6
%10 = fmul double %6, 3.000000e+00
%11 = tail call double @llvm.fmuladd.f64(double %10, double %6, double 1.000000e+00)
%12 = fptosi double %11 to i32
%13 = tail call double @sqrt(i32 %12)
%14 = fdiv double %9, %13
%15 = fmul double %14, 2.000000e+00
%16 = fmul double %14, %15
%17 = fdiv double %1, %16
%18 = fcmp olt double %17, %2
%19 = fmul double %1, 2.000000e+00
%20 = fdiv double %19, %2
br i1 %18, label %21, label %46
21: ; preds = %7
%22 = fsub double 1.000000e+00, %20
%23 = fdiv double %8, %22
%24 = fptosi double %23 to i32
%25 = tail call double @sqrt(i32 %24)
%26 = fadd double %25, -1.000000e+00
%27 = fadd double %3, -1.000000e+00
%28 = fmul double %27, %26
%29 = fadd double %26, 1.000000e+00
%30 = fdiv double %28, %29
%31 = fmul double %3, %5
%32 = fdiv double %30, %27
%33 = fsub double 1.000000e+00, %32
%34 = fmul double %31, %33
%35 = fdiv double %30, %34
%36 = fdiv double 1.000000e+00, %27
%37 = tail call double @pow(double %35, double %36)
%38 = fneg double %0
%39 = load i32, i32* @M_PI
%40 = shl nsw i32 %39, 2
%41 = sitofp i32 %40 to double
%42 = fmul double %41, %2
%43 = fmul double %42, %2
%44 = fmul double %37, %43
%45 = fdiv double %38, %44
br label %54
46: ; preds = %7
%47 = fptosi double %20 to i32
%48 = tail call double @sqrt(i32 %47)
%49 = fneg double %48
%50 = fneg double %0
%51 = fmul double %3, %5
%52 = fadd double %3, -1.000000e+00
%53 = fsub double 1.000000e+00, %20
br label %54
54: ; preds = %46, %21
%55 = phi double [ %53, %46 ], [ %22, %21 ]
%56 = phi double [ %52, %46 ], [ %27, %21 ]
%57 = phi double [ %51, %46 ], [ %31, %21 ]
%58 = phi double [ %50, %46 ], [ %38, %21 ]
%59 = phi double [ %14, %46 ], [ 0.000000e+00, %21 ]
%60 = phi double [ -1.000000e+100, %46 ], [ %14, %21 ]
%61 = phi double [ %49, %46 ], [ %45, %21 ]
%62 = fadd double %3, -2.000000e+00
%63 = fneg double %8
br label %64
64: ; preds = %64, %54
%65 = phi i32 [ 0, %54 ], [ %102, %64 ]
%66 = phi double [ %61, %54 ], [ %101, %64 ]
%67 = load i32, i32* @M_PI
%68 = shl nsw i32 %67, 2
%69 = sitofp i32 %68 to double
%70 = fmul double %69, %2
%71 = fmul double %70, %2
%72 = fmul double %66, %71
%73 = fdiv double %58, %72
%74 = fneg double %73
%75 = fdiv double %74, %66
%76 = tail call double @pow(double %73, double %56)
%77 = fmul double %57, %76
%78 = fdiv double %77, %56
%79 = fadd double %78, 1.000000e+00
%80 = tail call double @pow(double %73, double %62)
%81 = fmul double %57, %80
%82 = fmul double %81, %75
%83 = fmul double %79, %79
%84 = tail call double @llvm.fmuladd.f64(double %66, double %66, double %55)
%85 = tail call double @llvm.fmuladd.f64(double %83, double %84, double %63)
%86 = fmul double %79, 2.000000e+00
%87 = fmul double %84, %86
%88 = fmul double %79, %86
%89 = fmul double %66, %88
%90 = tail call double @llvm.fmuladd.f64(double %87, double %82, double %89)
%91 = fneg double %85
%92 = fdiv double %91, %90
%93 = fadd double %66, %92
%94 = fcmp olt double %93, %60
%95 = fadd double %60, %66
%96 = fmul double %95, 5.000000e-01
%97 = select i1 %94, double %96, double %93
%98 = fcmp ogt double %97, %59
%99 = fadd double %59, %66
%100 = fmul double %99, 5.000000e-01
%101 = select i1 %98, double %100, double %97
%102 = add nuw nsw i32 %65, 1
%103 = tail call double @llvm.fabs.f64(double %92)
%104 = fcmp ogt double %103, 0x3D719799812DEA11
%105 = icmp ult i32 %65, 99
%106 = select i1 %104, i1 %105, i1 false
br i1 %106, label %64, label %107
107: ; preds = %64
ret double %101
}