#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 */
struct pumas_physics {
  int dummy;
};

/* Variables and functions */
double fabs(double const);
double stub1(struct pumas_physics const *, double, void *);
double stub2(struct pumas_physics const *, double const, void *);
int math_find_minimum_brent(double (*f)(const struct pumas_physics *physics,
                                        double x, void *params),
                            const struct pumas_physics *physics, double xa,
                            double xb, double xc, const double *fb_p,
                            double tol, int max_iter, void *params,
                            double *xopt, double *fopt) {
  double fb;
  if (fb_p == NULL)
    fb = (*f)(physics, xb, params);
  else
    fb = *fb_p;
  tol *= fabs(xc - xa);
  double x = xb, w = xb, v = xb;
  double fw = fb, fv = fb, fx = fb;
  double d = 0., e = 0.;
  int i;
  for (i = 0; i < max_iter; i++) {
    const double xm = 0.5 * (xa + xb);
    const double tol1 = tol * fabs(x) + 1E-15;
    const double tol2 = 2 * tol1;
    if (fabs(x - xm) <= (tol2 - 0.5 * (xb - xa))) {
      break;
    }
    if (fabs(e) > tol1) {
      const double r = (x - w) * (fx - fv);
      double q = (x - v) * (fx - fw);
      double p = (x - v) * q - (x - w) * r;
      q = 2. * (q - r);
      if (q > 0.)
        p = -p;
      q = fabs(q);
      const double etemp = e;
      e = d;
      if (fabs(p) >= fabs(0.5 * q * etemp) || (p <= q * (xa - x)) ||
          (p >= q * (xb - x))) {
        e = (x >= xm) ? xa - x : xb - x;
        d = 0.3819660 * e;
      } else {
        d = p / q;
        const double u = x + d;
        if ((u - xa < tol2) || (xb - u < tol2)) {
          d = ((xm - x) >= 0.0 ? fabs(tol1) : -fabs(tol1));
        }
      }
    } else {
      e = (x >= xm) ? xa - x : xb - x;
      d = 0.3819660 * e;
    }
    const double u =
        (fabs(d) >= tol1) ? x + d : x + ((d) >= 0.0 ? fabs(tol1) : -fabs(tol1));
    const double fu = (*f)(physics, u, params);
    if (fu <= fx) {
      if (u >= x) {
        xa = x;
      } else {
        xb = x;
      }
      v = w, w = x, x = u;
      fv = fw, fw = fx, fx = fu;
    } else {
      if (u < x) {
        xa = u;
      } else {
        xb = 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;
      }
    }
  }
  if (xopt != NULL)
    *xopt = x;
  if (fopt != NULL)
    *fopt = fx;
  return (i < max_iter) ? i : -1;
}


x86 assembly (clang, -O0):
<math_find_minimum_brent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
mov    %ecx,-0x3c(%rbp)
mov    %r8,-0x48(%rbp)
mov    %r9,-0x50(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1162 <math_find_minimum_brent+0x62>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x48(%rbp),%rsi
call   *%rax
movsd  %xmm0,-0x58(%rbp)
jmp    116f <math_find_minimum_brent+0x6f>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xe80(%rip),%xmm1
pand   %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    18ea <math_find_minimum_brent+0x7ea>
movsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  0xe1a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movaps 0xdd5(%rip),%xmm2
pand   %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xdc9(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x60(%rbp),%xmm1
subsd  -0xa8(%rbp),%xmm1
ff
movaps 0xd8d(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xd7f(%rip),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     12a8 <math_find_minimum_brent+0x1a8>
jmp    18ea <math_find_minimum_brent+0x7ea>
movsd  -0x98(%rbp),%xmm0
ff
movaps 0xd49(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xb0(%rbp),%xmm0
ff
jbe    15df <math_find_minimum_brent+0x4df>
movsd  -0x60(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x80(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x78(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0x60(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
mulsd  -0xc0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm1
ff
subsd  -0xc0(%rbp),%xmm1
ff
movsd  0xca6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13ba <math_find_minimum_brent+0x2ba>
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movaps 0xc37(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0xbfc(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xc18(%rip),%xmm1
mulsd  -0xc8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
movaps 0xbd9(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jae    1485 <math_find_minimum_brent+0x385>
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x18(%rbp),%xmm2
subsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jae    1485 <math_find_minimum_brent+0x385>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm2
subsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     14ee <math_find_minimum_brent+0x3ee>
movsd  -0x60(%rbp),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     14af <math_find_minimum_brent+0x3af>
movsd  -0x18(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
jmp    14c1 <math_find_minimum_brent+0x3c1>
movsd  -0x20(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xb57(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15da <math_find_minimum_brent+0x4da>
movsd  -0xd0(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
subsd  -0x18(%rbp),%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
ja     1559 <math_find_minimum_brent+0x459>
movsd  -0x20(%rbp),%xmm1
subsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    15d5 <math_find_minimum_brent+0x4d5>
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1593 <math_find_minimum_brent+0x493>
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0xa7e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    15c5 <math_find_minimum_brent+0x4c5>
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0xa5e(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15da <math_find_minimum_brent+0x4da>
jmp    1643 <math_find_minimum_brent+0x543>
movsd  -0x60(%rbp),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     1609 <math_find_minimum_brent+0x509>
movsd  -0x18(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
jmp    161b <math_find_minimum_brent+0x51b>
movsd  -0x20(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x9fd(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movaps 0x9ae(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xb0(%rbp),%xmm0
ff
jb     167e <math_find_minimum_brent+0x57e>
movsd  -0x60(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
jmp    170e <math_find_minimum_brent+0x60e>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     16c0 <math_find_minimum_brent+0x5c0>
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0x951(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
jmp    16f2 <math_find_minimum_brent+0x5f2>
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0x931(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movsd  -0xe8(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rsi
call   *%rax
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     17cf <math_find_minimum_brent+0x6cf>
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd -0x60(%rbp),%xmm0
jb     1778 <math_find_minimum_brent+0x678>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1782 <math_find_minimum_brent+0x682>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
jmp    18d1 <math_find_minimum_brent+0x7d1>
movsd  -0xe8(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    17f8 <math_find_minimum_brent+0x6f8>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
jmp    1805 <math_find_minimum_brent+0x705>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x20(%rbp)
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    1832 <math_find_minimum_brent+0x732>
movsd  -0x68(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    1865 <math_find_minimum_brent+0x765>
jp     1865 <math_find_minimum_brent+0x765>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    18cc <math_find_minimum_brent+0x7cc>
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    18ad <math_find_minimum_brent+0x7ad>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    1897 <math_find_minimum_brent+0x797>
jp     1897 <math_find_minimum_brent+0x797>
jmp    18ad <math_find_minimum_brent+0x7ad>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jne    18c7 <math_find_minimum_brent+0x7c7>
jp     18c7 <math_find_minimum_brent+0x7c7>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
jmp    18cc <math_find_minimum_brent+0x7cc>
jmp    18d1 <math_find_minimum_brent+0x7d1>
jmp    18d6 <math_find_minimum_brent+0x7d6>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    11ed <math_find_minimum_brent+0xed>
cmpq   $0x0,-0x50(%rbp)
je     1902 <math_find_minimum_brent+0x802>
movsd  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,0x10(%rbp)
je     191d <math_find_minimum_brent+0x81d>
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x9c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    193d <math_find_minimum_brent+0x83d>
mov    -0x9c(%rbp),%eax
mov    %eax,-0x124(%rbp)
jmp    194d <math_find_minimum_brent+0x84d>
mov    $0xffffffff,%eax
mov    %eax,-0x124(%rbp)
jmp    194d <math_find_minimum_brent+0x84d>
mov    -0x124(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_find_minimum_brent>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9,%rbx
mov    %r8,%r15
mov    %ecx,%ebp
movapd %xmm2,0x40(%rsp)
movapd %xmm0,%xmm12
mov    %rsi,%r12
mov    %rdi,%r13
test   %rdx,%rdx
movapd %xmm1,0x10(%rsp)
je     1606 <math_find_minimum_brent+0x506>
movsd  (%rdx),%xmm0
test   %ebp,%ebp
jle    1635 <math_find_minimum_brent+0x535>
movapd 0x40(%rsp),%xmm4
subsd  %xmm12,%xmm4
andpd  0xea8(%rip),%xmm4
movapd 0x10(%rsp),%xmm9
movapd %xmm9,%xmm2
addsd  %xmm12,%xmm2
mulsd  0xeaf(%rip),%xmm2
mulsd  %xmm3,%xmm4
movapd 0xe83(%rip),%xmm5
movapd %xmm9,%xmm1
andpd  %xmm5,%xmm1
movapd %xmm4,0x40(%rsp)
mulsd  %xmm4,%xmm1
addsd  0xe90(%rip),%xmm1
movapd %xmm1,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm9,%xmm4
subsd  %xmm2,%xmm4
andpd  %xmm5,%xmm4
movapd %xmm9,%xmm5
subsd  %xmm12,%xmm5
mulsd  0xe71(%rip),%xmm5
addsd  %xmm3,%xmm5
xor    %eax,%eax
ucomisd %xmm4,%xmm5
jae    1656 <math_find_minimum_brent+0x556>
mov    %rbx,0x50(%rsp)
mov    $0x1,%ecx
movapd 0xe1e(%rip),%xmm11
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm4
xorpd  %xmm8,%xmm8
xorpd  %xmm14,%xmm14
movapd %xmm0,%xmm10
movapd %xmm9,%xmm6
movapd %xmm9,%xmm13
movapd %xmm9,%xmm15
jmp    12e4 <math_find_minimum_brent+0x1e4>
xchg   %ax,%ax
movapd %xmm3,%xmm2
cmpnlesd %xmm9,%xmm2
movapd %xmm2,%xmm0
andpd  %xmm3,%xmm0
andnpd 0x80(%rsp),%xmm2
orpd   %xmm0,%xmm2
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
movapd %xmm4,%xmm10
movsd  0x28(%rsp),%xmm6
movapd %xmm3,%xmm13
movapd %xmm2,%xmm15
movapd 0xda4(%rip),%xmm11
movapd 0x70(%rsp),%xmm8
cmp    %r14d,%ebp
je     1602 <math_find_minimum_brent+0x502>
movapd %xmm15,%xmm2
addsd  %xmm12,%xmm2
mulsd  0xda2(%rip),%xmm2
movapd %xmm9,%xmm1
movapd 0xd75(%rip),%xmm5
andpd  %xmm5,%xmm1
mulsd  0x40(%rsp),%xmm1
addsd  0xd8b(%rip),%xmm1
movapd %xmm1,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm9,%xmm4
subsd  %xmm2,%xmm4
andpd  %xmm5,%xmm4
movapd %xmm15,%xmm5
subsd  %xmm12,%xmm5
mulsd  0xd6c(%rip),%xmm5
addsd  %xmm3,%xmm5
lea    0x1(%r14),%ecx
ucomisd %xmm4,%xmm5
movapd %xmm0,%xmm4
movapd 0x90(%rsp),%xmm14
jae    1643 <math_find_minimum_brent+0x543>
mov    %ecx,%r14d
movapd %xmm14,%xmm0
andpd  %xmm11,%xmm0
ucomisd %xmm1,%xmm0
movsd  %xmm6,0x58(%rsp)
movsd  %xmm4,0x8(%rsp)
movsd  %xmm10,0x20(%rsp)
jbe    1430 <math_find_minimum_brent+0x330>
movapd %xmm9,%xmm0
subsd  %xmm13,%xmm0
movapd %xmm4,%xmm7
subsd  (%rsp),%xmm7
mulsd  %xmm0,%xmm7
movapd %xmm9,%xmm5
subsd  %xmm6,%xmm5
movapd %xmm4,%xmm6
subsd  %xmm10,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm7,%xmm0
mulsd  %xmm6,%xmm5
subsd  %xmm0,%xmm5
subsd  %xmm7,%xmm6
addsd  %xmm6,%xmm6
movapd %xmm6,%xmm4
movapd 0xca4(%rip),%xmm10
andpd  %xmm10,%xmm4
movapd %xmm5,%xmm7
andpd  %xmm10,%xmm7
movapd %xmm4,%xmm0
mulsd  0xcaa(%rip),%xmm0
mulsd  %xmm0,%xmm14
andpd  %xmm10,%xmm14
ucomisd %xmm14,%xmm7
jae    1430 <math_find_minimum_brent+0x330>
movapd %xmm5,%xmm0
xorpd  0xc79(%rip),%xmm0
xorpd  %xmm7,%xmm7
cmpltsd %xmm6,%xmm7
andpd  %xmm7,%xmm0
andnpd %xmm5,%xmm7
orpd   %xmm0,%xmm7
movapd %xmm12,%xmm0
subsd  %xmm9,%xmm0
mulsd  %xmm4,%xmm0
ucomisd %xmm7,%xmm0
jae    1430 <math_find_minimum_brent+0x330>
movapd %xmm15,%xmm0
subsd  %xmm9,%xmm0
mulsd  %xmm4,%xmm0
ucomisd %xmm0,%xmm7
jae    1430 <math_find_minimum_brent+0x330>
divsd  %xmm4,%xmm7
movapd %xmm9,%xmm0
addsd  %xmm7,%xmm0
movapd %xmm0,%xmm4
subsd  %xmm12,%xmm4
ucomisd %xmm4,%xmm3
ja     13ff <math_find_minimum_brent+0x2ff>
movapd %xmm15,%xmm4
subsd  %xmm0,%xmm4
ucomisd %xmm4,%xmm3
jbe    141f <math_find_minimum_brent+0x31f>
subsd  %xmm9,%xmm2
ucomisd 0xc34(%rip),%xmm2
movapd %xmm1,%xmm7
andpd  %xmm11,%xmm7
jae    141f <math_find_minimum_brent+0x31f>
xorpd  0xbf1(%rip),%xmm7
movapd %xmm8,%xmm2
jmp    1459 <math_find_minimum_brent+0x359>
cs nopw 0x0(%rax,%rax,1)
cmpnlesd %xmm9,%xmm2
movapd %xmm2,%xmm0
andpd  %xmm15,%xmm0
andnpd %xmm12,%xmm2
orpd   %xmm0,%xmm2
subsd  %xmm9,%xmm2
movapd %xmm2,%xmm7
mulsd  0xbdf(%rip),%xmm7
movsd  %xmm13,0x28(%rsp)
movapd %xmm7,%xmm0
andpd  %xmm11,%xmm0
ucomisd %xmm1,%xmm0
movapd %xmm7,%xmm0
jae    148e <math_find_minimum_brent+0x38e>
ucomisd 0xbc5(%rip),%xmm7
andpd  %xmm11,%xmm1
movapd %xmm1,%xmm0
jae    148e <math_find_minimum_brent+0x38e>
xorpd  0xb82(%rip),%xmm0
movapd %xmm7,0x70(%rsp)
movapd %xmm2,0x90(%rsp)
movapd %xmm15,0x80(%rsp)
movapd %xmm12,0x30(%rsp)
addsd  %xmm9,%xmm0
movapd %xmm0,0x60(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
movapd %xmm9,0x10(%rsp)
call   *%r13
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm4
ucomisd %xmm0,%xmm4
jae    15b0 <math_find_minimum_brent+0x4b0>
movapd 0x60(%rsp),%xmm5
movapd 0x10(%rsp),%xmm9
ucomisd %xmm5,%xmm9
movapd %xmm5,%xmm12
movsd  0x58(%rsp),%xmm3
ja     1503 <math_find_minimum_brent+0x403>
movapd 0x30(%rsp),%xmm12
movapd %xmm5,%xmm0
cmpltsd %xmm9,%xmm0
movapd 0x80(%rsp),%xmm15
andpd  %xmm0,%xmm15
andnpd %xmm5,%xmm0
orpd   %xmm0,%xmm15
movsd  0x20(%rsp),%xmm10
ucomisd %xmm1,%xmm10
movapd 0xac6(%rip),%xmm11
movsd  0x28(%rsp),%xmm13
movapd 0x70(%rsp),%xmm8
jae    15e0 <math_find_minimum_brent+0x4e0>
ucomisd %xmm9,%xmm13
jne    155b <math_find_minimum_brent+0x45b>
jnp    15e0 <math_find_minimum_brent+0x4e0>
movsd  (%rsp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
ucomisd %xmm9,%xmm3
setnp  %cl
sete   %dl
and    %cl,%dl
ucomisd %xmm13,%xmm3
setnp  %cl
sete   %bl
and    %cl,%bl
or     %dl,%bl
or     %al,%bl
jne    158f <math_find_minimum_brent+0x48f>
movapd %xmm0,%xmm1
movapd %xmm3,%xmm5
movsd  %xmm1,(%rsp)
movapd %xmm4,%xmm0
movapd %xmm5,%xmm6
cmp    %r14d,%ebp
jne    126c <math_find_minimum_brent+0x16c>
jmp    1602 <math_find_minimum_brent+0x502>
nopw   0x0(%rax,%rax,1)
movapd 0x60(%rsp),%xmm9
movapd 0x10(%rsp),%xmm3
ucomisd %xmm3,%xmm9
movapd 0x30(%rsp),%xmm12
jb     1210 <math_find_minimum_brent+0x110>
movapd %xmm3,%xmm12
jmp    1210 <math_find_minimum_brent+0x110>
nopl   0x0(%rax)
movsd  %xmm10,(%rsp)
movapd %xmm4,%xmm0
movapd %xmm1,%xmm10
movapd %xmm13,%xmm6
movapd %xmm5,%xmm13
cmp    %r14d,%ebp
jne    126c <math_find_minimum_brent+0x16c>
mov    %ebp,%ecx
jmp    1646 <math_find_minimum_brent+0x546>
mov    %r12,%rdi
movapd %xmm1,%xmm0
mov    %r15,%rsi
movapd %xmm12,0x30(%rsp)
movsd  %xmm3,0x8(%rsp)
call   *%r13
movsd  0x8(%rsp),%xmm3
movapd 0x30(%rsp),%xmm12
test   %ebp,%ebp
jg     1145 <math_find_minimum_brent+0x45>
mov    $0xffffffff,%eax
movapd 0x10(%rsp),%xmm9
jmp    1656 <math_find_minimum_brent+0x556>
add    $0xffffffff,%ecx
cmp    %ebp,%r14d
mov    $0xffffffff,%eax
cmovl  %ecx,%eax
mov    0x50(%rsp),%rbx
mov    0xe0(%rsp),%rcx
test   %rbx,%rbx
je     1668 <math_find_minimum_brent+0x568>
movsd  %xmm9,(%rbx)
test   %rcx,%rcx
je     1671 <math_find_minimum_brent+0x571>
movsd  %xmm0,(%rcx)
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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