float zbrent(func, x1, x2, tol, erflag)
float x1, x2, tol;
float (*func)();
int *erflag;
{
  int iter;
  float a = x1, b = x2, c = 0.0, d = 0.0, e = 0.0, min1, min2;
  float fa = (*func)(a), fb = (*func)(b), fc, p, q, r, s, tol1, xm;
  void nrerror();
  if (fb * fa > 0.0) {
    nrerror("Root must be bracketed in ZBRENT");
    *erflag = 1;
  }
  fc = fb;
  for (iter = 1; iter <= 100; iter++) {
    if (fb * fc > 0.0) {
      c = a;
      fc = fa;
      e = d = b - a;
    }
    if (fabs(fc) < fabs(fb)) {
      a = b;
      b = c;
      c = a;
      fa = fb;
      fb = fc;
      fc = fa;
    }
    tol1 = 2.0 * 3.0e-8 * fabs(b) + 0.5 * tol;
    xm = 0.5 * (c - b);
    if (fabs(xm) <= tol1 || fb == 0.0)
      return b;
    if (fabs(e) >= tol1 && fabs(fa) > fabs(fb)) {
      s = fb / fa;
      if (a == c) {
        p = 2.0 * xm * s;
        q = 1.0 - s;
      } else {
        q = fa / fc;
        r = fb / fc;
        p = s * (2.0 * xm * q * (q - r) - (b - a) * (r - 1.0));
        q = (q - 1.0) * (r - 1.0) * (s - 1.0);
      }
      if (p > 0.0)
        q = -q;
      p = fabs(p);
      min1 = 3.0 * xm * q - fabs(tol1 * q);
      min2 = fabs(e * q);
      if (2.0 * p < (min1 < min2 ? min1 : min2)) {
        e = d;
        d = p / q;
      } else {
        d = xm;
        e = d;
      }
    } else {
      d = xm;
      e = d;
    }
    a = b;
    fa = fb;
    if (fabs(d) > tol1)
      b += d;
    else
      b += (xm > 0.0 ? fabs(tol1) : -fabs(tol1));
    fb = (*func)(b);
  }
  nrerror("Maximum number of iterations exceeded in ZBRENT");
  *erflag = 1;
  return 0.0;
}


x86 assembly (clang, -O0):
<zbrent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm2,-0x78(%rbp)
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    %rsi,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rcx
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rcx
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rcx
movss  %xmm0,-0x50(%rbp)
movss  -0x50(%rbp),%xmm0
mulss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11d6 <zbrent+0xc6>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movl   $0x1,-0x2c(%rbp)
cmpl   $0x64,-0x2c(%rbp)
jg     1796 <zbrent+0x686>
movss  -0x50(%rbp),%xmm0
mulss  -0x54(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1234 <zbrent+0x124>
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x34(%rbp),%xmm0
subss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  %xmm0,-0x40(%rbp)
movss  -0x54(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movaps 0xdbc(%rip),%xmm0
pand   %xmm0,%xmm1
movss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xda8(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    12a2 <zbrent+0x192>
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xd4e(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xd49(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd45(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x38(%rbp),%xmm0
subss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd16(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movaps 0xce9(%rip),%xmm0
pand   %xmm0,%xmm1
movss  -0x68(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    134a <zbrent+0x23a>
movss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1359 <zbrent+0x249>
jp     1359 <zbrent+0x249>
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    17b6 <zbrent+0x6a6>
movss  -0x40(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xc97(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1687 <zbrent+0x577>
movss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xc70(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x50(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movaps 0xc5c(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    1687 <zbrent+0x577>
movss  -0x50(%rbp),%xmm0
divss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x30(%rbp),%xmm0
ucomiss -0x38(%rbp),%xmm0
jne    1424 <zbrent+0x314>
jp     1424 <zbrent+0x314>
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc41(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x64(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc0e(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
jmp    151e <zbrent+0x40e>
movss  -0x4c(%rbp),%xmm0
divss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x50(%rbp),%xmm0
divss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x6c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xbcc(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0x5c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
movss  -0x5c(%rbp),%xmm2
subss  -0x60(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movss  -0x34(%rbp),%xmm2
subss  -0x30(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x60(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movsd  0xb86(%rip),%xmm5
subsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x5c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb41(%rip),%xmm1
subsd  %xmm1,%xmm0
movss  -0x60(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xb2c(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x64(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xb13(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x58(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    154b <zbrent+0x43b>
movss  -0x5c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x58(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xaa5(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xab7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x5c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0x68(%rbp),%xmm1
mulss  -0x5c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movaps 0xa65(%rip),%xmm3
pand   %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x40(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xa24(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x58(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa2e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movss  -0x44(%rbp),%xmm1
movss  -0x48(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1628 <zbrent+0x518>
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
jmp    1635 <zbrent+0x525>
movss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movss  -0x84(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    166e <zbrent+0x55e>
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x58(%rbp),%xmm0
divss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
jmp    1682 <zbrent+0x572>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
jmp    169b <zbrent+0x58b>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x941(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    16ea <zbrent+0x5da>
movss  -0x3c(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    1772 <zbrent+0x662>
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1721 <zbrent+0x611>
movss  -0x68(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x8f0(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1754 <zbrent+0x644>
movss  -0x68(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x8cf(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x10(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rcx
movss  %xmm0,-0x50(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11e7 <zbrent+0xd7>
lea    0x8bc(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zbrent>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0xc(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
movss  %xmm1,0x8(%rsp)
movss  %xmm0,(%rsp)
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rdi
movaps %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rbx
movaps 0x10(%rsp),%xmm11
movaps %xmm0,%xmm15
movaps %xmm11,%xmm0
mulss  %xmm15,%xmm0
xorps  %xmm14,%xmm14
ucomiss %xmm14,%xmm0
jbe    11a1 <zbrent+0x91>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
movaps %xmm15,0x20(%rsp)
call   1030 <nrerror@plt>
movaps 0x20(%rsp),%xmm15
xorps  %xmm14,%xmm14
movaps 0x10(%rsp),%xmm11
movl   $0x1,(%r14)
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe4d(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    $0x64,%ebp
movaps 0xe6b(%rip),%xmm5
movaps %xmm15,%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
xorps  %xmm13,%xmm13
movss  (%rsp),%xmm4
jmp    122d <zbrent+0x11d>
nopw   0x0(%rax,%rax,1)
movaps %xmm2,%xmm0
addss  %xmm10,%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   *%rbx
movss  (%rsp),%xmm4
add    $0xffffffff,%ebp
movaps 0x10(%rsp),%xmm11
xorps  %xmm14,%xmm14
movaps 0x20(%rsp),%xmm15
movaps 0xe1b(%rip),%xmm5
movss  0x8(%rsp),%xmm2
movss  0x4(%rsp),%xmm13
movaps 0x40(%rsp),%xmm3
je     1508 <zbrent+0x3f8>
movaps %xmm0,%xmm1
mulss  %xmm15,%xmm1
ucomiss %xmm14,%xmm1
movaps %xmm3,%xmm1
movss  0xc(%rsp),%xmm12
jbe    1259 <zbrent+0x149>
movaps %xmm12,%xmm13
subss  %xmm4,%xmm13
movaps %xmm13,%xmm1
movaps %xmm4,%xmm2
movaps %xmm11,%xmm15
movss  %xmm1,0x4(%rsp)
movaps %xmm15,%xmm1
andps  %xmm5,%xmm1
movaps %xmm0,%xmm3
andps  %xmm5,%xmm3
ucomiss %xmm1,%xmm3
jbe    1290 <zbrent+0x180>
movaps %xmm12,%xmm9
movaps %xmm0,%xmm11
movaps %xmm15,%xmm7
movaps %xmm0,%xmm15
jmp    129f <zbrent+0x18f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movaps %xmm2,%xmm9
movaps %xmm0,%xmm7
movaps %xmm12,%xmm2
movaps %xmm4,%xmm12
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movaps %xmm0,%xmm1
movaps 0xd90(%rip),%xmm3
andps  %xmm3,%xmm1
mulsd  0xd4d(%rip),%xmm1
addsd  0x38(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm8
movaps %xmm9,%xmm4
subss  %xmm2,%xmm4
mulss  0xdaa(%rip),%xmm4
xorps  %xmm6,%xmm6
cvtss2sd %xmm4,%xmm6
movaps %xmm6,%xmm1
andps  %xmm3,%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm8,%xmm3
ucomisd %xmm1,%xmm3
jae    1520 <zbrent+0x410>
ucomiss %xmm14,%xmm7
jne    1301 <zbrent+0x1f1>
jnp    1520 <zbrent+0x410>
movaps %xmm7,0x10(%rsp)
movaps %xmm13,%xmm1
andps  %xmm5,%xmm1
ucomiss %xmm8,%xmm1
movaps %xmm4,%xmm7
movaps %xmm4,%xmm10
movss  %xmm9,0x8(%rsp)
movss  %xmm2,(%rsp)
jb     14b0 <zbrent+0x3a0>
movaps %xmm11,%xmm1
andps  %xmm5,%xmm1
movaps 0x10(%rsp),%xmm7
andps  %xmm5,%xmm7
ucomiss %xmm7,%xmm1
movaps %xmm4,%xmm7
movaps %xmm4,%xmm10
jbe    14b0 <zbrent+0x3a0>
movaps 0x10(%rsp),%xmm1
movaps %xmm1,%xmm10
divss  %xmm11,%xmm10
ucomiss %xmm9,%xmm12
jne    1386 <zbrent+0x276>
jp     1386 <zbrent+0x276>
movapd %xmm6,%xmm1
addsd  %xmm6,%xmm1
xorps  %xmm7,%xmm7
cvtss2sd %xmm10,%xmm7
mulsd  %xmm7,%xmm1
movsd  0xc9c(%rip),%xmm9
subsd  %xmm7,%xmm9
jmp    140d <zbrent+0x2fd>
divss  %xmm15,%xmm11
movaps %xmm1,%xmm5
divss  %xmm15,%xmm5
movaps %xmm6,%xmm7
addsd  %xmm6,%xmm7
xorps  %xmm9,%xmm9
cvtss2sd %xmm11,%xmm9
mulsd  %xmm9,%xmm7
subss  %xmm5,%xmm11
xorps  %xmm1,%xmm1
cvtss2sd %xmm11,%xmm1
mulsd  %xmm7,%xmm1
subss  %xmm12,%xmm2
xorps  %xmm11,%xmm11
cvtss2sd %xmm2,%xmm11
unpcklps %xmm5,%xmm10
cvtps2pd %xmm10,%xmm10
movapd %xmm10,%xmm2
addpd  0xc74(%rip),%xmm2
movapd %xmm2,%xmm7
unpckhpd %xmm2,%xmm7
mulsd  %xmm7,%xmm11
subsd  %xmm11,%xmm1
mulsd  %xmm10,%xmm1
addsd  0xc14(%rip),%xmm9
mulsd  %xmm7,%xmm9
mulsd  %xmm2,%xmm9
movaps 0xc23(%rip),%xmm5
cvtsd2ss %xmm9,%xmm9
xorps  %xmm11,%xmm11
cvtsd2ss %xmm1,%xmm11
movaps %xmm9,%xmm7
xorps  0xc3a(%rip),%xmm7
xorps  %xmm1,%xmm1
cmpltss %xmm11,%xmm1
andps  %xmm1,%xmm7
andnps %xmm9,%xmm1
orps   %xmm7,%xmm1
andps  %xmm5,%xmm11
mulsd  0xbdb(%rip),%xmm6
xorps  %xmm7,%xmm7
cvtss2sd %xmm1,%xmm7
mulsd  %xmm6,%xmm7
movaps %xmm1,%xmm6
mulss  %xmm8,%xmm6
andps  %xmm5,%xmm6
cvtss2sd %xmm6,%xmm6
subsd  %xmm6,%xmm7
xorps  %xmm6,%xmm6
cvtsd2ss %xmm7,%xmm6
mulss  %xmm1,%xmm13
andps  %xmm5,%xmm13
xorps  %xmm7,%xmm7
cvtss2sd %xmm11,%xmm7
addsd  %xmm7,%xmm7
minss  %xmm13,%xmm6
xorps  %xmm2,%xmm2
cvtss2sd %xmm6,%xmm2
ucomisd %xmm7,%xmm2
movaps %xmm4,%xmm7
movaps %xmm4,%xmm10
movss  (%rsp),%xmm2
jbe    14b0 <zbrent+0x3a0>
divss  %xmm1,%xmm11
movss  0x4(%rsp),%xmm7
movaps %xmm11,%xmm10
nopl   0x0(%rax)
movaps %xmm10,%xmm1
andps  %xmm5,%xmm1
ucomiss %xmm8,%xmm1
movaps %xmm15,0x20(%rsp)
movss  %xmm7,0x4(%rsp)
movaps %xmm10,0x40(%rsp)
ja     11e0 <zbrent+0xd0>
ucomiss %xmm14,%xmm4
ja     14f0 <zbrent+0x3e0>
orpd   0xb8f(%rip),%xmm3
jmp    14f8 <zbrent+0x3e8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
andpd  0xb48(%rip),%xmm3
addsd  %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
jmp    11e8 <zbrent+0xd8>
lea    0xb96(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
movl   $0x1,(%r14)
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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