#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);
double stub1(double, void *);
double brent(double ax, double bx, double cx, double (*f)(double, void *),
             void *data, double ftol, double atol, double *foptx,
             double *f2optx, double fax, double fbx, double fcx) {
  int iter;
  double a, b, d = 0, etemp, fu, fv, fw, fx, p, q, r, tol1, tol2, u, v, w, x,
               xm;
  double xw, wv, vx;
  double e = 0.0;
  a = (ax < cx ? ax : cx);
  b = (ax > cx ? ax : cx);
  x = bx;
  fx = fbx;
  if (fax < fcx) {
    w = ax;
    fw = fax;
    v = cx;
    fv = fcx;
  } else {
    w = cx;
    fw = fcx;
    v = ax;
    fv = fax;
  }
  for (iter = 1; iter <= 100; iter++) {
    xm = 0.5 * (a + b);
    tol1 = ftol * fabs(x);
    tol2 = 2.0 * (tol1 + 1.0e-10);
    if (fabs(x - xm) <= (tol2 - 0.5 * (b - a)) || fabs(a - b) < atol) {
      *foptx = fx;
      xw = x - w;
      wv = w - v;
      vx = v - x;
      *f2optx = 2.0 * (fv * xw + fx * wv + fw * vx) /
                (v * v * xw + x * x * wv + w * w * vx);
      return x;
    }
    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, data);
    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;
      }
    }
  }
  *foptx = fx;
  xw = x - w;
  wv = w - v;
  vx = v - x;
  *f2optx = 2.0 * (fv * xw + fx * wv + fw * vx) /
            (v * v * xw + x * x * wv + w * w * vx);
  return x;
}


x86 assembly (clang, -O0):
<brent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
movsd  %xmm5,-0x58(%rbp)
movsd  %xmm6,-0x60(%rbp)
movsd  %xmm7,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    117f <brent+0x7f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    118c <brent+0x8c>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11bb <brent+0xbb>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
jmp    11c8 <brent+0xc8>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    123c <brent+0x13c>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1270 <brent+0x170>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x1,-0x6c(%rbp)
cmpl   $0x64,-0x6c(%rbp)
jg     1b32 <brent+0xa32>
movsd  -0x78(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
movsd  0xd85(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  -0xf8(%rbp),%xmm1
ff
movaps 0xd7d(%rip),%xmm2
pand   %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xd45(%rip),%xmm1
addsd  -0xd0(%rbp),%xmm1
ff
movsd  0xd25(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm1
ff
subsd  -0x100(%rbp),%xmm1
ff
movaps 0xd32(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  0xcec(%rip),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jae    1352 <brent+0x252>
movsd  -0x78(%rbp),%xmm1
subsd  -0x80(%rbp),%xmm1
movaps 0xcf1(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    146c <brent+0x36c>
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf8(%rbp),%xmm0
ff
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0x110(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc0e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xe8(%rbp),%xmm2
ff
mulsd  -0xe8(%rbp),%xmm2
ff
movsd  -0x108(%rbp),%xmm3
ff
movsd  -0xf8(%rbp),%xmm1
ff
mulsd  -0xf8(%rbp),%xmm1
ff
mulsd  -0x110(%rbp),%xmm1
ff
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xf0(%rbp),%xmm1
ff
mulsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1c47 <brent+0xb47>
movsd  -0x120(%rbp),%xmm0
ff
movaps 0xbb5(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xd0(%rbp),%xmm0
ff
jbe    17d2 <brent+0x6d2>
movsd  -0xf8(%rbp),%xmm0
ff
subsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
subsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
subsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0xf8(%rbp),%xmm1
ff
subsd  -0xf0(%rbp),%xmm1
ff
mulsd  -0xc8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm1
ff
subsd  -0xc8(%rbp),%xmm1
ff
movsd  0xaac(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    159c <brent+0x49c>
movsd  -0xb8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movaps 0xa85(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movaps 0xa4a(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xa26(%rip),%xmm1
mulsd  -0xc0(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
movaps 0xa27(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jae    166d <brent+0x56d>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm2
subsd  -0xf8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jae    166d <brent+0x56d>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
subsd  -0xf8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     16db <brent+0x5db>
movsd  -0xf8(%rbp),%xmm0
ff
ucomisd -0x100(%rbp),%xmm0
ff
jb     169d <brent+0x59d>
movsd  -0x78(%rbp),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
jmp    16b2 <brent+0x5b2>
movsd  -0x80(%rbp),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x138(%rbp),%xmm1
ff
movsd  %xmm1,-0x120(%rbp)
ff
movsd  0x956(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    17cd <brent+0x6cd>
movsd  -0xb8(%rbp),%xmm0
ff
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
subsd  -0x78(%rbp),%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
ja     1749 <brent+0x649>
movsd  -0x80(%rbp),%xmm1
subsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    17c8 <brent+0x6c8>
movsd  -0x100(%rbp),%xmm0
ff
subsd  -0xf8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1786 <brent+0x686>
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0x8bb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
jmp    17b8 <brent+0x6b8>
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0x89b(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
jmp    17cd <brent+0x6cd>
jmp    183b <brent+0x73b>
movsd  -0xf8(%rbp),%xmm0
ff
ucomisd -0x100(%rbp),%xmm0
ff
jb     1802 <brent+0x702>
movsd  -0x78(%rbp),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
jmp    1817 <brent+0x717>
movsd  -0x80(%rbp),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x148(%rbp),%xmm1
ff
movsd  %xmm1,-0x120(%rbp)
ff
movsd  0x7f1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movaps 0x7e6(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xd0(%rbp),%xmm0
ff
jb     1879 <brent+0x779>
movsd  -0xf8(%rbp),%xmm0
ff
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
jmp    190c <brent+0x80c>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     18be <brent+0x7be>
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0x783(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
jmp    18f0 <brent+0x7f0>
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0x763(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
movsd  -0x160(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x150(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rdi
call   *%rax
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     19ea <brent+0x8ea>
movsd  -0xe0(%rbp),%xmm0
ff
ucomisd -0xf8(%rbp),%xmm0
ff
jb     1978 <brent+0x878>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1985 <brent+0x885>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1b1f <brent+0xa1f>
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xf8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1a16 <brent+0x916>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1a23 <brent+0x923>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jae    1a59 <brent+0x959>
movsd  -0xf0(%rbp),%xmm0
ff
ucomisd -0xf8(%rbp),%xmm0
ff
jne    1a9e <brent+0x99e>
jp     1a9e <brent+0x99e>
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1b1a <brent+0xa1a>
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jae    1af5 <brent+0x9f5>
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd -0xf8(%rbp),%xmm0
ff
jne    1ad9 <brent+0x9d9>
jp     1ad9 <brent+0x9d9>
jmp    1af5 <brent+0x9f5>
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd -0xf0(%rbp),%xmm0
ff
jne    1b15 <brent+0xa15>
jp     1b15 <brent+0xa15>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1b1a <brent+0xa1a>
jmp    1b1f <brent+0xa1f>
jmp    1b24 <brent+0xa24>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1277 <brent+0x177>
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf8(%rbp),%xmm0
ff
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0x110(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x42e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xe8(%rbp),%xmm2
ff
mulsd  -0xe8(%rbp),%xmm2
ff
movsd  -0x108(%rbp),%xmm3
ff
movsd  -0xf8(%rbp),%xmm1
ff
mulsd  -0xf8(%rbp),%xmm1
ff
mulsd  -0x110(%rbp),%xmm1
ff
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xf0(%rbp),%xmm1
ff
mulsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brent>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x28(%rsp)
mov    %rsi,%r12
mov    %rdi,%r13
movapd %xmm1,%xmm10
movapd %xmm0,%xmm14
ucomisd %xmm5,%xmm7
movapd %xmm5,%xmm13
cmpltsd %xmm7,%xmm13
movapd %xmm13,%xmm0
andpd  %xmm2,%xmm0
andnpd %xmm14,%xmm13
orpd   %xmm0,%xmm13
movapd %xmm14,%xmm0
ja     1160 <brent+0x60>
movapd %xmm2,%xmm0
movapd %xmm14,%xmm12
minsd  %xmm2,%xmm12
maxsd  %xmm2,%xmm14
movapd %xmm7,%xmm9
maxsd  %xmm5,%xmm9
minsd  %xmm7,%xmm5
mov    $0x64,%ebp
movapd 0xea6(%rip),%xmm7
xorpd  %xmm15,%xmm15
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movapd %xmm0,0x80(%rsp)
movapd %xmm1,%xmm0
jmp    120a <brent+0x10a>
cs nopw 0x0(%rax,%rax,1)
movapd %xmm3,%xmm14
cmpnlesd %xmm10,%xmm14
movapd %xmm14,%xmm2
andpd  %xmm3,%xmm2
andnpd 0x70(%rsp),%xmm14
orpd   %xmm2,%xmm14
movsd  0x8(%rsp),%xmm9
movapd %xmm6,%xmm5
movapd %xmm0,%xmm6
movapd %xmm4,%xmm1
movsd  (%rsp),%xmm13
movapd %xmm3,%xmm0
movapd 0xe3b(%rip),%xmm7
movapd 0x60(%rsp),%xmm15
movapd %xmm1,%xmm12
add    $0xffffffff,%ebp
je     1622 <brent+0x522>
movapd 0x80(%rsp),%xmm8
movapd %xmm14,%xmm1
addsd  %xmm12,%xmm1
mulsd  0xdda(%rip),%xmm1
movapd %xmm10,%xmm11
movapd 0xdfd(%rip),%xmm2
andpd  %xmm2,%xmm11
mulsd  0x28(%rsp),%xmm11
movapd %xmm11,%xmm3
addsd  0xdbc(%rip),%xmm3
addsd  %xmm3,%xmm3
movapd %xmm10,%xmm4
subsd  %xmm1,%xmm4
andpd  %xmm2,%xmm4
movapd %xmm14,%xmm2
subsd  %xmm12,%xmm2
mulsd  0xda1(%rip),%xmm2
addsd  %xmm3,%xmm2
ucomisd %xmm4,%xmm2
jae    1622 <brent+0x522>
movapd %xmm12,%xmm4
subsd  %xmm14,%xmm4
andpd  %xmm7,%xmm4
movsd  0x20(%rsp),%xmm2
ucomisd %xmm4,%xmm2
ja     1622 <brent+0x522>
movapd %xmm15,%xmm4
andpd  %xmm7,%xmm4
ucomisd %xmm11,%xmm4
movapd %xmm12,0x10(%rsp)
movapd %xmm13,0x90(%rsp)
movsd  %xmm9,0x30(%rsp)
jbe    1410 <brent+0x310>
movapd %xmm10,%xmm4
subsd  %xmm0,%xmm4
movapd %xmm6,%xmm7
subsd  %xmm9,%xmm7
mulsd  %xmm4,%xmm7
movapd %xmm10,%xmm12
subsd  %xmm13,%xmm12
movapd %xmm6,%xmm2
subsd  %xmm5,%xmm2
mulsd  %xmm12,%xmm2
mulsd  %xmm7,%xmm4
mulsd  %xmm2,%xmm12
subsd  %xmm4,%xmm12
subsd  %xmm7,%xmm2
addsd  %xmm2,%xmm2
movapd %xmm2,%xmm9
movapd 0xd18(%rip),%xmm13
andpd  %xmm13,%xmm9
movapd %xmm12,%xmm7
andpd  %xmm13,%xmm7
movapd %xmm9,%xmm4
mulsd  0xccc(%rip),%xmm4
mulsd  %xmm4,%xmm15
andpd  %xmm13,%xmm15
movapd 0x10(%rsp),%xmm13
ucomisd %xmm15,%xmm7
jae    1450 <brent+0x350>
movapd %xmm12,%xmm4
xorpd  0xce3(%rip),%xmm4
xorpd  %xmm15,%xmm15
cmpltsd %xmm2,%xmm15
andpd  %xmm15,%xmm4
andnpd %xmm12,%xmm15
orpd   %xmm4,%xmm15
movapd %xmm13,%xmm4
subsd  %xmm10,%xmm4
mulsd  %xmm9,%xmm4
ucomisd %xmm15,%xmm4
jae    1450 <brent+0x350>
movapd %xmm14,%xmm4
subsd  %xmm10,%xmm4
mulsd  %xmm9,%xmm4
ucomisd %xmm4,%xmm15
jae    1450 <brent+0x350>
divsd  %xmm9,%xmm15
movapd %xmm10,%xmm4
addsd  %xmm15,%xmm4
movapd %xmm4,%xmm2
subsd  %xmm13,%xmm2
ucomisd %xmm2,%xmm3
ja     13dc <brent+0x2dc>
movapd %xmm14,%xmm2
subsd  %xmm4,%xmm2
ucomisd %xmm2,%xmm3
jbe    1480 <brent+0x380>
subsd  %xmm10,%xmm1
ucomisd 0xc37(%rip),%xmm1
movapd %xmm11,%xmm15
movapd 0xc3a(%rip),%xmm7
andpd  %xmm7,%xmm15
jae    1488 <brent+0x388>
xorpd  0xc36(%rip),%xmm15
jmp    1488 <brent+0x388>
nop
cmpnlesd %xmm10,%xmm1
movapd %xmm1,%xmm2
andpd  %xmm14,%xmm2
andnpd %xmm12,%xmm1
orpd   %xmm2,%xmm1
subsd  %xmm10,%xmm1
movapd %xmm1,%xmm15
mulsd  0xbdd(%rip),%xmm15
movapd %xmm1,%xmm8
jmp    1488 <brent+0x388>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpnlesd %xmm10,%xmm1
movapd %xmm1,%xmm2
andpd  %xmm14,%xmm2
andnpd %xmm13,%xmm1
orpd   %xmm2,%xmm1
subsd  %xmm10,%xmm1
movapd %xmm1,%xmm15
mulsd  0xb9d(%rip),%xmm15
movapd %xmm1,%xmm8
movapd 0xba8(%rip),%xmm7
movsd  %xmm6,0x38(%rsp)
movsd  %xmm0,(%rsp)
movsd  %xmm5,0x8(%rsp)
movapd %xmm15,%xmm1
andpd  %xmm7,%xmm1
ucomisd %xmm11,%xmm1
movapd %xmm15,%xmm0
jae    14cb <brent+0x3cb>
ucomisd 0xb69(%rip),%xmm15
andpd  %xmm7,%xmm11
movapd %xmm11,%xmm0
jae    14cb <brent+0x3cb>
xorpd  0xb75(%rip),%xmm0
movapd %xmm15,0x80(%rsp)
movapd %xmm8,0x60(%rsp)
movapd %xmm14,0x70(%rsp)
addsd  %xmm10,%xmm0
movapd %xmm0,0x50(%rsp)
mov    %r12,%rdi
movapd %xmm10,0x40(%rsp)
call   *%r13
movsd  0x38(%rsp),%xmm6
ucomisd %xmm0,%xmm6
jae    15e0 <brent+0x4e0>
movapd 0x50(%rsp),%xmm3
movapd 0x40(%rsp),%xmm10
ucomisd %xmm3,%xmm10
movapd %xmm3,%xmm1
movapd 0x90(%rsp),%xmm4
movsd  0x30(%rsp),%xmm8
ja     1539 <brent+0x439>
movapd 0x10(%rsp),%xmm1
movapd %xmm3,%xmm2
cmpltsd %xmm10,%xmm2
movapd 0x70(%rsp),%xmm14
andpd  %xmm2,%xmm14
andnpd %xmm3,%xmm2
orpd   %xmm2,%xmm14
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm5
ucomisd %xmm0,%xmm2
movsd  (%rsp),%xmm13
movapd 0xabc(%rip),%xmm7
movapd 0x60(%rsp),%xmm15
jae    1610 <brent+0x510>
ucomisd %xmm10,%xmm13
jne    158e <brent+0x48e>
jnp    1610 <brent+0x510>
ucomisd %xmm0,%xmm8
setae  %al
ucomisd %xmm10,%xmm4
setnp  %cl
sete   %dl
and    %cl,%dl
movapd %xmm13,%xmm2
ucomisd %xmm13,%xmm4
setnp  %cl
sete   %bl
and    %cl,%bl
or     %dl,%bl
or     %al,%bl
jne    15c4 <brent+0x4c4>
movapd %xmm8,%xmm0
movapd %xmm4,%xmm3
movapd %xmm0,%xmm9
movapd %xmm3,%xmm13
movapd %xmm2,%xmm0
jmp    11fc <brent+0xfc>
nopw   0x0(%rax,%rax,1)
movapd 0x50(%rsp),%xmm10
movapd 0x40(%rsp),%xmm3
ucomisd %xmm3,%xmm10
movapd 0x10(%rsp),%xmm4
jb     11b0 <brent+0xb0>
movapd %xmm3,%xmm4
jmp    11b0 <brent+0xb0>
nopw   0x0(%rax,%rax,1)
movapd %xmm5,%xmm9
movapd %xmm0,%xmm5
movapd %xmm3,%xmm0
jmp    11fc <brent+0xfc>
movsd  %xmm6,(%r15)
movapd %xmm0,%xmm4
movapd %xmm10,%xmm0
subsd  %xmm4,%xmm0
movapd %xmm4,%xmm1
subsd  %xmm13,%xmm1
movapd %xmm13,%xmm2
subsd  %xmm10,%xmm2
mulsd  %xmm1,%xmm6
mulsd  %xmm0,%xmm9
addsd  %xmm6,%xmm9
mulsd  %xmm2,%xmm5
addsd  %xmm9,%xmm5
addsd  %xmm5,%xmm5
mulsd  %xmm13,%xmm13
movapd %xmm10,%xmm3
mulsd  %xmm10,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm13
movapd %xmm5,%xmm0
addsd  %xmm3,%xmm13
mulsd  %xmm4,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm13,%xmm4
divsd  %xmm4,%xmm0
movsd  %xmm0,(%r14)
movapd %xmm10,%xmm0
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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