#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 fabs(double);
int /*<<< orphan*/ nrerror(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
double stub1(double);
double stub2(double);
double brent(double ax, double bx, double cx, double (*f)(double), double tol,
             double *xmin) {
  int iter;
  char errmesg[100];
  double a, b, d, etemp, fu, fv, fw, fx, p, q, r, tol1, tol2, u, v, w, x, xm;
  double e = 0.0;
  a = (ax < cx ? ax : cx);
  b = (ax > cx ? ax : cx);
  x = w = v = bx;
  fw = fv = fx = (*f)(x);
  for (iter = 1; iter <= 100; iter++) {
    xm = 0.5 * (a + b);
    tol2 = 2.0 * (tol1 = tol * fabs(x) + 1.0e-10);
    if (fabs(x - xm) <= (tol2 - 0.5 * (b - a))) {
      *xmin = x;
      return fx;
    }
    if (fabs(e) > tol1) {
      r = (x - w) * (fx - fv);
      q = (x - v) * (fx - fw);
      p = (x - v) * q - (x - w) * r;
      q = 2.0 * (q - r);
      if (q > 0.0)
        p = -p;
      q = fabs(q);
      etemp = e;
      e = d;
      if (fabs(p) >= fabs(0.5 * q * etemp) || p <= q * (a - x) ||
          p >= q * (b - x))
        d = 0.3819660 * (e = (x >= xm ? a - x : b - x));
      else {
        d = p / q;
        u = x + d;
        if (u - a < tol2 || b - u < tol2)
          d = ((xm - x) >= 0.0 ? fabs(tol1) : -fabs(tol1));
      }
    } else {
      d = 0.3819660 * (e = (x >= xm ? a - x : b - x));
    }
    u = (fabs(d) >= tol1 ? x + d : x + ((d) >= 0.0 ? fabs(tol1) : -fabs(tol1)));
    fu = (*f)(u);
    if (fu <= fx) {
      if (u >= x)
        a = x;
      else
        b = x;
      (v) = (w);
      (w) = (x);
      (x) = (u);
      (fv) = (fw);
      (fw) = (fx);
      (fx) = (fu);
    } else {
      if (u < x)
        a = u;
      else
        b = u;
      if (fu <= fw || w == x) {
        v = w;
        w = u;
        fv = fw;
        fw = fu;
      } else if (fu <= fv || v == x || v == w) {
        v = u;
        fv = fu;
      }
    }
  }
  sprintf(errmesg, "Too many iterations (> %d) in brent", 100);
  nrerror(errmesg);
  *xmin = x;
  return fx;
}


x86 assembly (clang, -O0):
<brent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1178 <brent+0x58>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
jmp    1185 <brent+0x65>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11b7 <brent+0x97>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
jmp    11c4 <brent+0xa4>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x148(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  %xmm0,-0x128(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  -0x128(%rbp),%xmm0
ff
call   *%rax
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x1,-0x3c(%rbp)
cmpl   $0x64,-0x3c(%rbp)
jg     19e5 <brent+0x8c5>
movsd  -0xa8(%rbp),%xmm1
ff
addsd  -0xb0(%rbp),%xmm1
ff
movsd  0xdd8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
movsd  -0x128(%rbp),%xmm0
ff
movaps 0xdd0(%rip),%xmm2
pand   %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xda0(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x100(%rbp)
ff
movsd  0xd84(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x128(%rbp),%xmm1
ff
subsd  -0x130(%rbp),%xmm1
ff
movaps 0xd89(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0xa8(%rbp),%xmm0
ff
movsd  0xd35(%rip),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     12ff <brent+0x1df>
movsd  -0x128(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1a26 <brent+0x906>
movsd  -0x138(%rbp),%xmm0
ff
movaps 0xd22(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x100(%rbp),%xmm0
ff
jbe    1677 <brent+0x557>
movsd  -0x128(%rbp),%xmm0
ff
subsd  -0x120(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
subsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
subsd  -0x118(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
subsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
subsd  -0x118(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm1
ff
subsd  -0x120(%rbp),%xmm1
ff
mulsd  -0xf8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
subsd  -0xf8(%rbp),%xmm1
ff
movsd  0xc21(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    142f <brent+0x30f>
movsd  -0xe8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movaps 0xbf2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movaps 0xbb7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xb93(%rip),%xmm1
mulsd  -0xf0(%rbp),%xmm1
ff
mulsd  -0xc0(%rbp),%xmm1
ff
movaps 0xb94(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jae    1506 <brent+0x3e6>
movsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
subsd  -0x128(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jae    1506 <brent+0x3e6>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
subsd  -0x128(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     157a <brent+0x45a>
movsd  -0x128(%rbp),%xmm0
ff
ucomisd -0x130(%rbp),%xmm0
ff
jb     1539 <brent+0x419>
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
jmp    1551 <brent+0x431>
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x150(%rbp),%xmm1
ff
movsd  %xmm1,-0x138(%rbp)
ff
movsd  0xab7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1672 <brent+0x552>
movsd  -0xe8(%rbp),%xmm0
ff
divsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm1
ff
subsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
ja     15ee <brent+0x4ce>
movsd  -0xb0(%rbp),%xmm1
ff
subsd  -0x110(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    166d <brent+0x54d>
movsd  -0x130(%rbp),%xmm0
ff
subsd  -0x128(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     162b <brent+0x50b>
movsd  -0x100(%rbp),%xmm0
ff
movaps 0xa16(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
jmp    165d <brent+0x53d>
movsd  -0x100(%rbp),%xmm0
ff
movaps 0x9f6(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1672 <brent+0x552>
jmp    16e6 <brent+0x5c6>
movsd  -0x128(%rbp),%xmm0
ff
ucomisd -0x130(%rbp),%xmm0
ff
jb     16aa <brent+0x58a>
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
jmp    16c2 <brent+0x5a2>
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x160(%rbp),%xmm1
ff
movsd  %xmm1,-0x138(%rbp)
ff
movsd  0x946(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movaps 0x93b(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x100(%rbp),%xmm0
jb     1724 <brent+0x604>
movsd  -0x128(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x168(%rbp)
ff
jmp    17b7 <brent+0x697>
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1769 <brent+0x649>
movsd  -0x100(%rbp),%xmm0
ff
movaps 0x8d8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
jmp    179b <brent+0x67b>
movsd  -0x100(%rbp),%xmm0
ff
movaps 0x8b8(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x170(%rbp),%xmm0
ff
movsd  -0x178(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x168(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  -0x110(%rbp),%xmm0
ff
call   *%rax
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1897 <brent+0x777>
movsd  -0x110(%rbp),%xmm0
ff
ucomisd -0x128(%rbp),%xmm0
ff
jb     1822 <brent+0x702>
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1832 <brent+0x712>
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    19d2 <brent+0x8b2>
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x128(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    18c6 <brent+0x7a6>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    18d6 <brent+0x7b6>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jae    190c <brent+0x7ec>
movsd  -0x120(%rbp),%xmm0
ff
ucomisd -0x128(%rbp),%xmm0
ff
jne    1951 <brent+0x831>
jp     1951 <brent+0x831>
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    19cd <brent+0x8ad>
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jae    19a8 <brent+0x888>
movsd  -0x118(%rbp),%xmm0
ff
ucomisd -0x128(%rbp),%xmm0
ff
jne    198c <brent+0x86c>
jp     198c <brent+0x86c>
jmp    19a8 <brent+0x888>
movsd  -0x118(%rbp),%xmm0
ff
ucomisd -0x120(%rbp),%xmm0
ff
jne    19c8 <brent+0x8a8>
jp     19c8 <brent+0x8a8>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    19cd <brent+0x8ad>
jmp    19d2 <brent+0x8b2>
jmp    19d7 <brent+0x8b7>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    121e <brent+0xfe>
lea    -0xa0(%rbp),%rdi
lea    0x64d(%rip),%rsi
mov    $0x64,%edx
call   1040 <sprintf@plt>
lea    -0xa0(%rbp),%rdi
call   1030 <nrerror@plt>
movsd  -0x128(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brent>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rsi,%r14
movsd  %xmm3,0x60(%rsp)
mov    %rdi,%r15
movapd %xmm1,0x10(%rsp)
movapd %xmm0,%xmm3
minsd  %xmm2,%xmm3
movapd %xmm3,0x20(%rsp)
maxsd  %xmm2,%xmm0
movapd %xmm0,0x50(%rsp)
movapd %xmm1,%xmm0
call   *%rdi
movapd 0x20(%rsp),%xmm7
movapd 0x50(%rsp),%xmm11
movapd 0x10(%rsp),%xmm9
movapd %xmm0,%xmm10
mov    $0x64,%ebp
movapd 0xeac(%rip),%xmm13
xorpd  %xmm12,%xmm12
movapd %xmm9,%xmm14
movapd %xmm9,%xmm6
movapd %xmm0,%xmm15
movapd %xmm0,%xmm2
jmp    1200 <brent+0xe0>
xchg   %ax,%ax
movapd %xmm3,%xmm1
cmpnlesd %xmm9,%xmm1
movapd %xmm1,%xmm2
andpd  %xmm3,%xmm2
andnpd 0x50(%rsp),%xmm1
orpd   %xmm2,%xmm1
movsd  0x40(%rsp),%xmm2
movapd %xmm10,%xmm15
movapd %xmm0,%xmm10
movapd %xmm1,%xmm11
movapd %xmm4,%xmm1
movsd  0x48(%rsp),%xmm6
movapd %xmm3,%xmm14
movapd 0xe47(%rip),%xmm13
movapd 0x80(%rsp),%xmm12
movapd %xmm1,%xmm7
add    $0xffffffff,%ebp
je     1599 <brent+0x479>
movsd  %xmm2,0x38(%rsp)
movapd 0x90(%rsp),%xmm8
movapd %xmm11,%xmm1
addsd  %xmm7,%xmm1
mulsd  0xddf(%rip),%xmm1
movapd %xmm9,%xmm3
movapd 0xe02(%rip),%xmm2
andpd  %xmm2,%xmm3
mulsd  0x60(%rsp),%xmm3
addsd  0xdc8(%rip),%xmm3
movapd %xmm3,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm9,%xmm4
subsd  %xmm1,%xmm4
andpd  %xmm2,%xmm4
movapd %xmm11,%xmm5
subsd  %xmm7,%xmm5
mulsd  0xdaa(%rip),%xmm5
addsd  %xmm0,%xmm5
ucomisd %xmm4,%xmm5
jae    15d9 <brent+0x4b9>
movapd %xmm12,%xmm4
andpd  %xmm13,%xmm4
ucomisd %xmm3,%xmm4
movsd  %xmm6,0x68(%rsp)
movapd %xmm7,0x20(%rsp)
movsd  %xmm15,0x40(%rsp)
jbe    13c0 <brent+0x2a0>
movapd %xmm9,%xmm4
subsd  %xmm14,%xmm4
movapd %xmm10,%xmm7
subsd  0x38(%rsp),%xmm7
mulsd  %xmm4,%xmm7
movapd %xmm9,%xmm5
subsd  %xmm6,%xmm5
movapd %xmm10,%xmm6
subsd  %xmm15,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm7,%xmm4
mulsd  %xmm6,%xmm5
subsd  %xmm4,%xmm5
subsd  %xmm7,%xmm6
addsd  %xmm6,%xmm6
movapd %xmm6,%xmm2
movapd 0xd44(%rip),%xmm15
andpd  %xmm15,%xmm2
movapd %xmm5,%xmm7
andpd  %xmm15,%xmm7
movapd %xmm2,%xmm4
mulsd  0xcfa(%rip),%xmm4
mulsd  %xmm4,%xmm12
andpd  %xmm15,%xmm12
ucomisd %xmm12,%xmm7
movapd 0x20(%rsp),%xmm12
jae    13e0 <brent+0x2c0>
movapd %xmm5,%xmm4
xorpd  0xd12(%rip),%xmm4
xorpd  %xmm7,%xmm7
cmpltsd %xmm6,%xmm7
andpd  %xmm7,%xmm4
andnpd %xmm5,%xmm7
orpd   %xmm4,%xmm7
movapd %xmm12,%xmm4
subsd  %xmm9,%xmm4
mulsd  %xmm2,%xmm4
ucomisd %xmm7,%xmm4
jae    13e0 <brent+0x2c0>
movapd %xmm11,%xmm4
subsd  %xmm9,%xmm4
mulsd  %xmm2,%xmm4
ucomisd %xmm4,%xmm7
jae    13e0 <brent+0x2c0>
divsd  %xmm2,%xmm7
movapd %xmm9,%xmm4
addsd  %xmm7,%xmm4
movapd %xmm4,%xmm2
subsd  %xmm12,%xmm2
ucomisd %xmm2,%xmm0
ja     139a <brent+0x27a>
movapd %xmm11,%xmm2
subsd  %xmm4,%xmm2
ucomisd %xmm2,%xmm0
jbe    140e <brent+0x2ee>
subsd  %xmm9,%xmm1
ucomisd 0xc79(%rip),%xmm1
movapd %xmm3,%xmm7
andpd  %xmm13,%xmm7
jae    140e <brent+0x2ee>
xorpd  0xc86(%rip),%xmm7
jmp    140e <brent+0x2ee>
nopl   0x0(%rax)
cmpnlesd %xmm9,%xmm1
movapd %xmm1,%xmm2
andpd  %xmm11,%xmm2
andnpd %xmm7,%xmm1
jmp    13f4 <brent+0x2d4>
cs nopw 0x0(%rax,%rax,1)
nop
cmpnlesd %xmm9,%xmm1
movapd %xmm1,%xmm2
andpd  %xmm11,%xmm2
andnpd %xmm12,%xmm1
orpd   %xmm2,%xmm1
subsd  %xmm9,%xmm1
movapd %xmm1,%xmm7
mulsd  0xc0f(%rip),%xmm7
movapd %xmm1,%xmm8
movsd  %xmm14,0x48(%rsp)
movsd  %xmm10,0x8(%rsp)
movapd %xmm7,%xmm1
andpd  %xmm13,%xmm1
ucomisd %xmm3,%xmm1
movapd %xmm7,%xmm0
jae    144a <brent+0x32a>
ucomisd 0xbe9(%rip),%xmm7
andpd  %xmm13,%xmm3
movapd %xmm3,%xmm0
jae    144a <brent+0x32a>
xorpd  0xbf6(%rip),%xmm0
movapd %xmm7,0x90(%rsp)
movapd %xmm8,0x80(%rsp)
movapd %xmm11,0x50(%rsp)
addsd  %xmm9,%xmm0
movapd %xmm0,0x70(%rsp)
movapd %xmm9,0x10(%rsp)
call   *%r15
movsd  0x8(%rsp),%xmm10
ucomisd %xmm0,%xmm10
jae    1550 <brent+0x430>
movapd 0x70(%rsp),%xmm4
movapd 0x10(%rsp),%xmm9
ucomisd %xmm4,%xmm9
movapd %xmm4,%xmm1
movsd  0x68(%rsp),%xmm3
ja     14af <brent+0x38f>
movapd 0x20(%rsp),%xmm1
movapd %xmm4,%xmm2
cmpltsd %xmm9,%xmm2
movapd 0x50(%rsp),%xmm11
andpd  %xmm2,%xmm11
andnpd %xmm4,%xmm2
orpd   %xmm2,%xmm11
movsd  0x40(%rsp),%xmm15
ucomisd %xmm0,%xmm15
movapd 0xb4d(%rip),%xmm13
movsd  0x48(%rsp),%xmm14
movapd 0x80(%rsp),%xmm12
jae    1580 <brent+0x460>
ucomisd %xmm9,%xmm14
jne    1507 <brent+0x3e7>
jnp    1580 <brent+0x460>
movsd  0x38(%rsp),%xmm2
ucomisd %xmm0,%xmm2
setae  %al
ucomisd %xmm9,%xmm3
setnp  %cl
sete   %dl
and    %cl,%dl
ucomisd %xmm14,%xmm3
setnp  %cl
sete   %bl
and    %cl,%bl
or     %dl,%bl
or     %al,%bl
jne    153c <brent+0x41c>
movapd %xmm2,%xmm0
movapd %xmm3,%xmm4
movapd %xmm0,%xmm2
movapd %xmm4,%xmm6
jmp    11f3 <brent+0xd3>
nopl   0x0(%rax)
movapd 0x70(%rsp),%xmm9
movapd 0x10(%rsp),%xmm3
ucomisd %xmm3,%xmm9
movapd 0x20(%rsp),%xmm4
jb     11a0 <brent+0x80>
movapd %xmm3,%xmm4
jmp    11a0 <brent+0x80>
nopw   0x0(%rax,%rax,1)
movapd %xmm15,%xmm2
movapd %xmm0,%xmm15
movapd %xmm14,%xmm6
movapd %xmm4,%xmm14
jmp    11f3 <brent+0xd3>
lea    0xab0(%rip),%rsi
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x64,%edx
movapd %xmm9,0x10(%rsp)
movsd  %xmm10,0x8(%rsp)
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <nrerror@plt>
movsd  0x8(%rsp),%xmm10
movapd 0x10(%rsp),%xmm9
movsd  %xmm9,(%r14)
movapd %xmm10,%xmm0
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [36 x i8] c"Too many iterations (> %d) in brent\00"
define double @brent(double %0, double %1, double %2, double (double)* nocapture %3, double %4, double* nocapture writeonly %5) {
%7 = alloca [100 x i8]
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%9 = fcmp olt double %0, %2
%10 = select i1 %9, double %0, double %2
%11 = fcmp ogt double %0, %2
%12 = select i1 %11, double %0, double %2
%13 = tail call double %3(double %1)
br label %14
14: ; preds = %6, %126
%15 = phi double [ 0.000000e+00, %6 ], [ %94, %126 ]
%16 = phi double [ %1, %6 ], [ %134, %126 ]
%17 = phi double [ %1, %6 ], [ %133, %126 ]
%18 = phi double [ %1, %6 ], [ %132, %126 ]
%19 = phi i32 [ 1, %6 ], [ %135, %126 ]
%20 = phi double [ %10, %6 ], [ %131, %126 ]
%21 = phi double [ %12, %6 ], [ %130, %126 ]
%22 = phi double [ %13, %6 ], [ %129, %126 ]
%23 = phi double [ %13, %6 ], [ %128, %126 ]
%24 = phi double [ %13, %6 ], [ %127, %126 ]
%25 = phi double [ undef, %6 ], [ %93, %126 ]
%26 = fadd double %21, %20
%27 = fmul double %26, 5.000000e-01
%28 = tail call double @llvm.fabs.f64(double %16)
%29 = tail call double @llvm.fmuladd.f64(double %4, double %28, double 1.000000e-10)
%30 = fmul double %29, 2.000000e+00
%31 = fsub double %16, %27
%32 = tail call double @llvm.fabs.f64(double %31)
%33 = fsub double %21, %20
%34 = tail call double @llvm.fmuladd.f64(double %33, double -5.000000e-01, double %30)
%35 = fcmp ugt double %32, %34
br i1 %35, label %36, label %140
36: ; preds = %14
%37 = tail call double @llvm.fabs.f64(double %15)
%38 = fcmp ogt double %37, %29
br i1 %38, label %39, label %87
39: ; preds = %36
%40 = fsub double %16, %17
%41 = fsub double %22, %24
%42 = fmul double %41, %40
%43 = fsub double %16, %18
%44 = fsub double %22, %23
%45 = fmul double %44, %43
%46 = fneg double %40
%47 = fmul double %42, %46
%48 = tail call double @llvm.fmuladd.f64(double %43, double %45, double %47)
%49 = fsub double %45, %42
%50 = fmul double %49, 2.000000e+00
%51 = fcmp ogt double %50, 0.000000e+00
%52 = fneg double %48
%53 = select i1 %51, double %52, double %48
%54 = tail call double @llvm.fabs.f64(double %50)
%55 = tail call double @llvm.fabs.f64(double %48)
%56 = fmul double %54, 5.000000e-01
%57 = fmul double %15, %56
%58 = tail call double @llvm.fabs.f64(double %57)
%59 = fcmp ult double %55, %58
br i1 %59, label %60, label %68
60: ; preds = %39
%61 = fsub double %20, %16
%62 = fmul double %61, %54
%63 = fcmp ugt double %53, %62
br i1 %63, label %64, label %68
64: ; preds = %60
%65 = fsub double %21, %16
%66 = fmul double %65, %54
%67 = fcmp ult double %53, %66
br i1 %67, label %73, label %68
68: ; preds = %64, %60, %39
%69 = fcmp ult double %16, %27
%70 = select i1 %69, double %21, double %20
%71 = fsub double %70, %16
%72 = fmul double %71, 3.819660e-01
br label %92
73: ; preds = %64
%74 = fdiv double %53, %54
%75 = fadd double %16, %74
%76 = fsub double %75, %20
%77 = fcmp olt double %76, %30
%78 = fsub double %21, %75
%79 = fcmp olt double %78, %30
%80 = select i1 %77, i1 true, i1 %79
br i1 %80, label %81, label %92
81: ; preds = %73
%82 = fsub double %27, %16
%83 = fcmp ult double %82, 0.000000e+00
%84 = tail call double @llvm.fabs.f64(double %29)
br i1 %83, label %85, label %92
85: ; preds = %81
%86 = fneg double %84
br label %92
87: ; preds = %36
%88 = fcmp ult double %16, %27
%89 = select i1 %88, double %21, double %20
%90 = fsub double %89, %16
%91 = fmul double %90, 3.819660e-01
br label %92
92: ; preds = %81, %85, %73, %68, %87
%93 = phi double [ %72, %68 ], [ %91, %87 ], [ %74, %73 ], [ %86, %85 ], [ %84, %81 ]
%94 = phi double [ %71, %68 ], [ %90, %87 ], [ %25, %73 ], [ %25, %85 ], [ %25, %81 ]
%95 = tail call double @llvm.fabs.f64(double %93)
%96 = fcmp ult double %95, %29
br i1 %96, label %97, label %102
97: ; preds = %92
%98 = fcmp ult double %93, 0.000000e+00
%99 = tail call double @llvm.fabs.f64(double %29)
br i1 %98, label %100, label %102
100: ; preds = %97
%101 = fneg double %99
br label %102
102: ; preds = %97, %100, %92
%103 = phi double [ %93, %92 ], [ %101, %100 ], [ %99, %97 ]
%104 = fadd double %16, %103
%105 = tail call double %3(double %104)
%106 = fcmp ugt double %105, %22
br i1 %106, label %111, label %107
107: ; preds = %102
%108 = fcmp ult double %104, %16
%109 = select i1 %108, double %16, double %21
%110 = select i1 %108, double %20, double %16
br label %126
111: ; preds = %102
%112 = fcmp olt double %104, %16
%113 = select i1 %112, double %21, double %104
%114 = select i1 %112, double %104, double %20
%115 = fcmp ole double %105, %23
%116 = fcmp oeq double %17, %16
%117 = select i1 %115, i1 true, i1 %116
br i1 %117, label %126, label %118
118: ; preds = %111
%119 = fcmp ole double %105, %24
%120 = fcmp oeq double %18, %16
%121 = select i1 %119, i1 true, i1 %120
%122 = fcmp oeq double %18, %17
%123 = select i1 %121, i1 true, i1 %122
%124 = select i1 %123, double %105, double %24
%125 = select i1 %123, double %104, double %18
br label %126
126: ; preds = %118, %111, %107
%127 = phi double [ %23, %107 ], [ %23, %111 ], [ %124, %118 ]
%128 = phi double [ %22, %107 ], [ %105, %111 ], [ %23, %118 ]
%129 = phi double [ %105, %107 ], [ %22, %111 ], [ %22, %118 ]
%130 = phi double [ %109, %107 ], [ %113, %111 ], [ %113, %118 ]
%131 = phi double [ %110, %107 ], [ %114, %111 ], [ %114, %118 ]
%132 = phi double [ %17, %107 ], [ %17, %111 ], [ %125, %118 ]
%133 = phi double [ %16, %107 ], [ %104, %111 ], [ %17, %118 ]
%134 = phi double [ %104, %107 ], [ %16, %111 ], [ %16, %118 ]
%135 = add nuw nsw i32 %19, 1
%136 = icmp eq i32 %135, 101
br i1 %136, label %137, label %14
137: ; preds = %126
%138 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 100)
%139 = call i32 @nrerror(i8* %8)
br label %140
140: ; preds = %14, %137
%141 = phi double [ %129, %137 ], [ %22, %14 ]
%142 = phi double [ %134, %137 ], [ %16, %14 ]
store double %142, double* %5
ret double %141
}