void nextremum(double x[], int n, double eps, int k, int js[], double (*ff)()) {
  double y[10], b[10], z, t, h1, h2, f, dx;
  int i, j, m, l;
  int done = 0;
  js[0] = 0;
  h2 = 0.0;
  while (!done && js[0] < k) {
    t = 0.0;
    for (i = 1; i <= n; i++) {
      f = (*ff)(x, i);
      t = t + fabs(f);
    }
    if (t < eps)
      done = 1;
    else {
      for (i = 0; i < n; i++) {
        m = 0;
        while (m++ < 5) {
          j = 0;
          t = x[i];
          while (j <= 7) {
            if (j <= 2)
              z = t + j * 0.01;
            else
              z = h2;
            x[i] = z;
            f = (*ff)(x, i + 1);
            if (fabs(f) < eps) {
              m = 5;
              break;
            } else {
              h1 = f;
              h2 = z;
              if (j == 0) {
                y[0] = h1;
                b[0] = h2;
              } else {
                y[j] = h1;
                for (l = 0; l < j; l++) {
                  if (fabs(h2 - b[l]) < eps) {
                    b[j] = 1.0e+35;
                    break;
                  }
                  b[j] = h2 = (h1 - y[l]) / (h2 - b[l]);
                }
                h2 = 0.0;
                for (l = j - 1; l >= 0; l--)
                  h2 = -y[1] / (b[l + 1] + h2);
                h2 = h2 + b[0];
              }
              j = j + 1;
            }
          }
          x[i] = h2;
        }
        x[i] = z;
      }
      js[0]++;
    }
  }
  f = (*ff)(x, 0);
  x[n] = f;
  dx = 0.00001;
  t = x[0];
  x[0] = t + dx;
  h1 = (*ff)(x, 0);
  x[0] = t - dx;
  h2 = (*ff)(x, 0);
  x[0] = t;
  t = h1 + h2 - 2.0 * f;
  if (t > 0.0)
    js[1] = -1;
  else
    js[1] = 1;
  j = 1;
  do {
    j++;
    dx = 0.00001;
    t = x[j - 1];
    x[j - 1] = t + dx;
    h2 = (*ff)(x, 0);
    x[j - 1] = t - dx;
    h1 = (*ff)(x, 0);
    x[j - 1] = t;
    t = h1 + h2 - 2.0 * f;
  } while ((t * js[1] < 0.0) && (j < n));
  if (t * js[1] > 0.0)
    js[1] = 0;
}


x86 assembly (clang, -O0):
<nextremum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movl   $0x0,-0x114(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
xor    %eax,%eax
cmpl   $0x0,-0x114(%rbp)
mov    %al,-0x115(%rbp)
jne    1168 <nextremum+0x68>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
cmp    -0x1c(%rbp),%eax
setl   %al
mov    %al,-0x115(%rbp)
mov    -0x115(%rbp),%al
test   $0x1,%al
jne    117b <nextremum+0x7b>
jmp    1566 <nextremum+0x466>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x1,-0x104(%rbp)
mov    -0x104(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11f4 <nextremum+0xf4>
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x104(%rbp),%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm1
ff
movaps 0xe50(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1190 <nextremum+0x90>
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    121a <nextremum+0x11a>
movl   $0x1,-0x114(%rbp)
jmp    1561 <nextremum+0x461>
movl   $0x0,-0x104(%rbp)
mov    -0x104(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1556 <nextremum+0x456>
movl   $0x0,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10c(%rbp)
cmp    $0x5,%eax
jge    152a <nextremum+0x42a>
movl   $0x0,-0x108(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
cmpl   $0x7,-0x108(%rbp)
jg     150d <nextremum+0x40d>
cmpl   $0x2,-0x108(%rbp)
jg     12c0 <nextremum+0x1c0>
movsd  -0xe0(%rbp),%xmm1
ff
cvtsi2sdl -0x108(%rbp),%xmm0
ff
movsd  0xd5d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    12d0 <nextremum+0x1d0>
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x104(%rbp),%esi
add    $0x1,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm1
ff
movaps 0xd0c(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1336 <nextremum+0x236>
movl   $0x5,-0x10c(%rbp)
jmp    150d <nextremum+0x40d>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
cmpl   $0x0,-0x108(%rbp)
jne    1385 <nextremum+0x285>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    14f9 <nextremum+0x3f9>
movsd  -0xe8(%rbp),%xmm0
ff
movslq -0x108(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
movl   $0x0,-0x110(%rbp)
mov    -0x110(%rbp),%eax
cmp    -0x108(%rbp),%eax
jge    1462 <nextremum+0x362>
movsd  -0xf0(%rbp),%xmm1
ff
movslq -0x110(%rbp),%rax
subsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
movaps 0xc4b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1405 <nextremum+0x305>
movslq -0x108(%rbp),%rax
movsd  0xc19(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
jmp    1462 <nextremum+0x362>
movsd  -0xe8(%rbp),%xmm0
ff
movslq -0x110(%rbp),%rax
subsd  -0x80(%rbp,%rax,8),%xmm0
movsd  -0xf0(%rbp),%xmm1
ff
movslq -0x110(%rbp),%rax
subsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movslq -0x108(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x110(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x110(%rbp)
jmp    13a4 <nextremum+0x2a4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x108(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x110(%rbp)
cmpl   $0x0,-0x110(%rbp)
jl     14e1 <nextremum+0x3e1>
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x110(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
addsd  -0xf0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x110(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x110(%rbp)
jmp    147c <nextremum+0x37c>
movsd  -0xf0(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1279 <nextremum+0x179>
movsd  -0xf0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    123d <nextremum+0x13d>
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1224 <nextremum+0x124>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1141 <nextremum+0x41>
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xa67(%rip),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
addsd  -0x100(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
subsd  -0x100(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xe8(%rbp),%xmm0
ff
addsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    166a <nextremum+0x56a>
mov    -0x28(%rbp),%rax
movl   $0xffffffff,0x4(%rax)
jmp    1675 <nextremum+0x575>
mov    -0x28(%rbp),%rax
movl   $0x1,0x4(%rax)
movl   $0x1,-0x108(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
movsd  0x96a(%rip),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    -0x108(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
addsd  -0x100(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0x108(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
subsd  -0x100(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0x108(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   *%rcx
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0x108(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xe8(%rbp),%xmm0
ff
addsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
mov    -0x28(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm0
mulsd  %xmm0,%xmm1
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x116(%rbp)
jbe    17b2 <nextremum+0x6b2>
mov    -0x108(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0x116(%rbp)
mov    -0x116(%rbp),%al
test   $0x1,%al
jne    167f <nextremum+0x57f>
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm1
mulsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    17ed <nextremum+0x6ed>
mov    -0x28(%rbp),%rax
movl   $0x0,0x4(%rax)
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextremum>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %r8,%r15
mov    %rcx,%r12
movsd  %xmm0,0x8(%rsp)
mov    %esi,%r14d
mov    %rdi,%rbx
movl   $0x0,(%rcx)
mov    %edx,0x34(%rsp)
test   %edx,%edx
jle    162d <nextremum+0x52d>
mov    %r14d,%eax
mov    %rax,0xb8(%rsp)
mov    %r14d,%r13d
neg    %r13d
xorpd  %xmm2,%xmm2
mov    %r12,0xb0(%rsp)
mov    %r14d,0x30(%rsp)
mov    %r13,0xa8(%rsp)
jmp    1183 <nextremum+0x83>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addl   $0x1,(%r12)
mov    0x34(%rsp),%eax
cmp    %eax,(%r12)
jge    162d <nextremum+0x52d>
movapd %xmm2,0x90(%rsp)
xorpd  %xmm0,%xmm0
test   %r14d,%r14d
jle    11df <nextremum+0xdf>
xorpd  %xmm0,%xmm0
mov    $0x1,%ebp
xchg   %ax,%ax
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   *%r15
andpd  0xe48(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x18(%rsp),%xmm0
lea    0x1(%r13,%rbp,1),%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    11a0 <nextremum+0xa0>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
movapd 0x90(%rsp),%xmm2
ja     162d <nextremum+0x52d>
test   %r14d,%r14d
jle    1170 <nextremum+0x70>
xor    %r12d,%r12d
nopl   0x0(%rax)
mov    %r12,%rbp
add    $0x1,%r12
movsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    $0x1,%r13d
movsd  0xc0(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %r14d,%r14d
jmp    1254 <nextremum+0x154>
nopl   0x0(%rax)
addsd  0x20(%rsp),%xmm2
add    $0x1,%r14
cmp    $0x8,%r14
je     15a0 <nextremum+0x4a0>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xdbc(%rip),%xmm0
cmp    $0x3,%r14
movapd %xmm2,0x90(%rsp)
jb     1280 <nextremum+0x180>
movapd %xmm2,%xmm0
jmp    1286 <nextremum+0x186>
nopl   0x0(%rax)
addsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,(%rbx,%rbp,8)
mov    %rbx,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   *%r15
movapd %xmm0,%xmm1
movapd 0xd58(%rip),%xmm4
andpd  %xmm4,%xmm1
movsd  0x8(%rsp),%xmm2
ucomisd %xmm1,%xmm2
ja     15d0 <nextremum+0x4d0>
test   %r14,%r14
je     1360 <nextremum+0x260>
movsd  %xmm0,0xc0(%rsp,%r14,8)
movsd  0x10(%rsp),%xmm5
movapd %xmm5,%xmm2
subsd  0x20(%rsp),%xmm2
movapd %xmm2,%xmm1
andpd  %xmm4,%xmm1
movsd  0x8(%rsp),%xmm3
ucomisd %xmm1,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm1
subsd  0x28(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x40(%rsp,%r14,8)
cmp    $0x1,%r14
je     14d7 <nextremum+0x3d7>
subsd  0x48(%rsp),%xmm1
movapd %xmm1,%xmm2
andpd  %xmm4,%xmm2
movsd  0x8(%rsp),%xmm3
ucomisd %xmm2,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm2
subsd  0xc8(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp,%r14,8)
cmp    $0x2,%r14
jne    1381 <nextremum+0x281>
movapd %xmm2,%xmm1
jmp    14d7 <nextremum+0x3d7>
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rsp),%xmm5
movsd  %xmm5,0x40(%rsp)
movsd  %xmm0,0x28(%rsp)
movsd  %xmm5,0x20(%rsp)
movapd %xmm5,%xmm2
jmp    1246 <nextremum+0x146>
subsd  0x50(%rsp),%xmm2
movapd %xmm2,%xmm1
andpd  %xmm4,%xmm1
movsd  0x8(%rsp),%xmm3
ucomisd %xmm1,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm1
subsd  0xd0(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x40(%rsp,%r14,8)
cmp    $0x3,%r14
je     14d7 <nextremum+0x3d7>
subsd  0x58(%rsp),%xmm1
movapd %xmm1,%xmm2
andpd  %xmm4,%xmm2
movsd  0x8(%rsp),%xmm3
ucomisd %xmm2,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm2
subsd  0xd8(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp,%r14,8)
cmp    $0x4,%r14
je     1352 <nextremum+0x252>
subsd  0x60(%rsp),%xmm2
movapd %xmm2,%xmm1
andpd  %xmm4,%xmm1
movsd  0x8(%rsp),%xmm3
ucomisd %xmm1,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm1
subsd  0xe0(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x40(%rsp,%r14,8)
cmp    $0x5,%r14
je     14d7 <nextremum+0x3d7>
subsd  0x68(%rsp),%xmm1
movapd %xmm1,%xmm2
andpd  %xmm4,%xmm2
movsd  0x8(%rsp),%xmm3
ucomisd %xmm2,%xmm3
ja     14c0 <nextremum+0x3c0>
movapd %xmm0,%xmm2
subsd  0xe8(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp,%r14,8)
cmp    $0x6,%r14
je     1352 <nextremum+0x252>
subsd  0x70(%rsp),%xmm2
movapd %xmm2,%xmm1
andpd  %xmm4,%xmm1
movsd  0x8(%rsp),%xmm3
ucomisd %xmm1,%xmm3
ja     14c0 <nextremum+0x3c0>
movsd  0xf0(%rsp),%xmm1
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,0x40(%rsp,%r14,8)
movapd %xmm0,%xmm1
cmp    $0x7,%r14
je     14d7 <nextremum+0x3d7>
nopl   0x0(%rax)
movabs $0x4733426172c74d82,%rax
42 33 47
mov    %rax,0x40(%rsp,%r14,8)
movsd  0xb51(%rip),%xmm1
movsd  0xc8(%rsp),%xmm0
xorpd  0xb28(%rip),%xmm0
addsd  0xb50(%rip),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cmp    $0x2,%r14
jb     1240 <nextremum+0x140>
movapd %xmm2,%xmm1
addsd  0x38(%rsp,%r14,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cmp    $0x3,%r14
jb     1240 <nextremum+0x140>
movapd %xmm2,%xmm1
addsd  0x30(%rsp,%r14,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
je     1240 <nextremum+0x140>
movapd %xmm2,%xmm1
addsd  0x28(%rsp,%r14,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cmp    $0x5,%r14
jb     1240 <nextremum+0x140>
movapd %xmm2,%xmm1
addsd  0x20(%rsp,%r14,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
je     1240 <nextremum+0x140>
movapd %xmm2,%xmm1
addsd  0x18(%rsp,%r14,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cmp    $0x7,%r14
jb     1240 <nextremum+0x140>
addsd  0x10(%rsp,%r14,8),%xmm2
divsd  %xmm2,%xmm0
movapd %xmm0,%xmm2
jmp    1240 <nextremum+0x140>
nop
movsd  %xmm2,(%rbx,%rbp,8)
lea    0x1(%r13),%eax
movsd  %xmm2,0x38(%rsp)
cmp    $0x5,%r13d
mov    %eax,%r13d
jb     1237 <nextremum+0x137>
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0xc0(%rsp)
jmp    15ee <nextremum+0x4ee>
nopl   (%rax)
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0xc0(%rsp)
movsd  0x10(%rsp),%xmm5
movapd 0x90(%rsp),%xmm2
movsd  %xmm5,(%rbx,%rbp,8)
cmp    0xb8(%rsp),%r12
jne    1210 <nextremum+0x110>
mov    0xb0(%rsp),%r12
addl   $0x1,(%r12)
movsd  0x8(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
mov    0x30(%rsp),%r14d
mov    0xa8(%rsp),%r13
jbe    1175 <nextremum+0x75>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   *%r15
movsd  %xmm0,0x20(%rsp)
movslq %r14d,%r14
movsd  %xmm0,(%rbx,%r14,8)
movsd  (%rbx),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x9d8(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   *%r15
movsd  %xmm0,0x8(%rsp)
movsd  0x9c0(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   *%r15
addsd  0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,0x20(%rsp)
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
setbe  %al
add    %eax,%eax
add    $0xffffffff,%eax
mov    %eax,0x4(%r12)
mov    $0x2,%ebp
nopl   0x0(%rax)
movsd  -0x8(%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  0x94c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbx,%rbp,8)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   *%r15
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x930(%rip),%xmm0
movsd  %xmm0,-0x8(%rbx,%rbp,8)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   *%r15
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,-0x8(%rbx,%rbp,8)
addsd  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x4(%r12),%xmm1
subsd  0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1758 <nextremum+0x658>
lea    0x1(%rbp),%rax
cmp    %r14,%rbp
mov    %rax,%rbp
jl     16d0 <nextremum+0x5d0>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    176b <nextremum+0x66b>
movl   $0x0,0x4(%r12)
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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