void amoeba(p, y, ndim, ftol, funk, nfunk) double **p, y[], ftol, (*funk)();
int ndim, *nfunk;
{
  int i, j, ilo, ihi, inhi, mpts = ndim + 1;
  double ytry, ysave, sum, rtol, amotry(), *psum, *vector();
  void nrerror(), free_vector();
  psum = vector(1, ndim);
  *nfunk = 0;
  for (j = 1; j <= ndim; j++) {
    for (i = 1, sum = 0.0; i <= mpts; i++)
      sum += p[i][j];
    psum[j] = sum;
  }
  for (;;) {
    ilo = 1;
    ihi = y[1] > y[2] ? (inhi = 2, 1) : (inhi = 1, 2);
    for (i = 1; i <= mpts; i++) {
      if (y[i] < y[ilo])
        ilo = i;
      if (y[i] > y[ihi]) {
        inhi = ihi;
        ihi = i;
      } else if (y[i] > y[inhi])
        if (i != ihi)
          inhi = i;
    }
    rtol = 2.0 * fabs(y[ihi] - y[ilo]) / (fabs(y[ihi]) + fabs(y[ilo]));
    if (rtol < ftol)
      break;
    if (*nfunk >= 5000)
      nrerror("Too many iterations in AMOEBA");
    ytry = amotry(p, y, psum, ndim, funk, ihi, nfunk, -1.0);
    if (ytry <= y[ilo])
      ytry = amotry(p, y, psum, ndim, funk, ihi, nfunk, 2.0);
    else if (ytry >= y[inhi]) {
      ysave = y[ihi];
      ytry = amotry(p, y, psum, ndim, funk, ihi, nfunk, 0.5);
      if (ytry >= ysave) {
        for (i = 1; i <= mpts; i++) {
          if (i != ilo) {
            for (j = 1; j <= ndim; j++) {
              psum[j] = 0.5 * (p[i][j] + p[ilo][j]);
              p[i][j] = psum[j];
            }
            y[i] = (*funk)(psum);
          }
        }
        *nfunk += ndim;
        for (j = 1; j <= ndim; j++) {
          for (i = 1, sum = 0.0; i <= mpts; i++)
            sum += p[i][j];
          psum[j] = sum;
        }
      }
    }
  }
  free_vector(psum, 1, ndim);
}


x86 assembly (clang, -O0):
<amoeba>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
mov    $0x0,%al
call   1050 <vector@plt>
mov    %rax,-0x70(%rbp)
mov    -0x30(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1204 <amoeba+0xc4>
movl   $0x1,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     11e4 <amoeba+0xa4>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11ab <amoeba+0x6b>
movsd  -0x60(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1190 <amoeba+0x50>
jmp    1209 <amoeba+0xc9>
movl   $0x1,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x10(%rax),%xmm0
jbe    123c <amoeba+0xfc>
movl   $0x2,-0x44(%rbp)
mov    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    124b <amoeba+0x10b>
movl   $0x1,-0x44(%rbp)
mov    $0x2,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     130e <amoeba+0x1ce>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    128e <amoeba+0x14e>
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12bf <amoeba+0x17f>
mov    -0x40(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    12fb <amoeba+0x1bb>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12f6 <amoeba+0x1b6>
mov    -0x34(%rbp),%eax
cmp    -0x40(%rbp),%eax
je     12f1 <amoeba+0x1b1>
mov    -0x34(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    12f6 <amoeba+0x1b6>
jmp    12fb <amoeba+0x1bb>
jmp    1300 <amoeba+0x1c0>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1258 <amoeba+0x118>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movaps 0xcd1(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xcd5(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xcad(%rip),%xmm2
pand   %xmm2,%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movaps 0xc95(%rip),%xmm3
pand   %xmm3,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1395 <amoeba+0x255>
jmp    1612 <amoeba+0x4d2>
mov    -0x30(%rbp),%rax
cmpl   $0x1388,(%rax)
jl     13b3 <amoeba+0x273>
lea    0xc7c(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x40(%rbp),%r9d
mov    -0x30(%rbp),%rax
movsd  0xc42(%rip),%xmm0
mov    %rax,(%rsp)
mov    $0x1,%al
call   1060 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     143a <amoeba+0x2fa>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x40(%rbp),%r9d
mov    -0x30(%rbp),%rax
movsd  0xbeb(%rip),%xmm0
mov    %rax,(%rsp)
mov    $0x1,%al
call   1060 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
jmp    160d <amoeba+0x4cd>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     1608 <amoeba+0x4c8>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x40(%rbp),%r9d
mov    -0x30(%rbp),%rax
movsd  0xb99(%rip),%xmm0
mov    %rax,(%rsp)
mov    $0x1,%al
call   1060 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jb     1603 <amoeba+0x4c3>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     1578 <amoeba+0x438>
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     1565 <amoeba+0x425>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     154c <amoeba+0x40c>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xb15(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14cd <amoeba+0x38d>
mov    -0x28(%rbp),%rcx
mov    -0x70(%rbp),%rdi
mov    $0x0,%al
call   *%rcx
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    156a <amoeba+0x42a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14ae <amoeba+0x36e>
mov    -0x14(%rbp),%ecx
mov    -0x30(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15fe <amoeba+0x4be>
movl   $0x1,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     15de <amoeba+0x49e>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15a5 <amoeba+0x465>
movsd  -0x60(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    158a <amoeba+0x44a>
jmp    1603 <amoeba+0x4c3>
jmp    1608 <amoeba+0x4c8>
jmp    160d <amoeba+0x4cd>
jmp    1209 <amoeba+0xc9>
mov    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <free_vector@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<amoeba>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r8,%rbp
mov    %r8,0x30(%rsp)
mov    %rcx,0x38(%rsp)
movsd  %xmm0,0x90(%rsp)
mov    %edx,%r15d
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x1,%edi
mov    %edx,%esi
xor    %eax,%eax
call   1050 <vector@plt>
mov    %rax,%r11
mov    %rax,%r14
movl   $0x0,0x0(%rbp)
test   %r15d,%r15d
jle    1247 <amoeba+0x107>
lea    0x2(%r15),%r8d
lea    0x1(%r15),%r9d
mov    %r15d,%r10d
lea    0x1(%r10),%rsi
mov    %esi,%edi
and    $0x3,%edi
and    $0xfffffffffffffffc,%rsi
mov    $0x1,%ebp
jmp    11d3 <amoeba+0x93>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm0,(%r11,%rbp,8)
add    $0x1,%rbp
cmp    %r9,%rbp
je     124f <amoeba+0x10f>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
cmp    $0x3,%r10d
jb     1225 <amoeba+0xe5>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbx,%rcx,8),%rax
mov    0x10(%rbx,%rcx,8),%rdx
addsd  (%rax,%rbp,8),%xmm0
addsd  (%rdx,%rbp,8),%xmm0
mov    0x18(%rbx,%rcx,8),%rax
addsd  (%rax,%rbp,8),%xmm0
mov    0x20(%rbx,%rcx,8),%rax
addsd  (%rax,%rbp,8),%xmm0
add    $0x4,%rcx
cmp    %rcx,%rsi
jne    11f0 <amoeba+0xb0>
add    $0x1,%rcx
test   %rdi,%rdi
je     11c0 <amoeba+0x80>
lea    (%rbx,%rcx,8),%rcx
xor    %eax,%eax
mov    (%rcx,%rax,8),%rdx
addsd  (%rdx,%rbp,8),%xmm0
add    $0x1,%rax
cmp    %rax,%rdi
jne    1230 <amoeba+0xf0>
jmp    11c0 <amoeba+0x80>
lea    0x1(%r15),%r9d
lea    0x2(%r15),%r8d
cmp    $0x2,%r9d
mov    $0x1,%eax
cmovge %r9d,%eax
mov    %rax,0x78(%rsp)
mov    %r8d,%eax
mov    %r9d,%edi
lea    (%r14,%rdi,8),%rcx
mov    %rcx,0x68(%rsp)
add    $0x8,%r14
mov    %r14,0x70(%rsp)
lea    -0x1(%rdi),%rcx
lea    -0x1(%rax),%rdx
mov    %rax,0xa0(%rsp)
add    $0xfffffffffffffffe,%rax
mov    %rax,0x98(%rsp)
mov    %rcx,0x48(%rsp)
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x60(%rsp)
lea    0x1(%rcx),%rax
mov    %rax,0x58(%rsp)
mov    %rdi,%rax
neg    %rax
mov    %rax,0x80(%rsp)
mov    %edx,%r12d
and    $0x3,%r12d
and    $0xfffffffffffffffc,%rdx
mov    %rdx,0x88(%rsp)
mov    %r11,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %rdi,0x28(%rsp)
jmp    1319 <amoeba+0x1d9>
xchg   %ax,%ax
mov    0x30(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdx
mov    0x18(%rsp),%r15
mov    %r15d,%ecx
mov    0x38(%rsp),%r8
mov    %r14d,%r9d
movsd  0xd19(%rip),%xmm0
mov    $0x1,%al
call   1060 <amotry@plt>
mov    %rbp,%r11
movsd  0x8(%r13),%xmm0
mov    %r15,%rax
xor    %r15d,%r15d
ucomisd 0x10(%r13),%xmm0
seta   %r15b
mov    $0x2,%r14d
sub    %r15d,%r14d
add    $0x1,%r15d
test   %eax,%eax
js     13d0 <amoeba+0x290>
mov    $0x1,%ecx
mov    $0x1,%eax
movapd %xmm0,%xmm1
mov    0x78(%rsp),%rsi
nopw   0x0(%rax,%rax,1)
ucomisd %xmm1,%xmm0
mov    %eax,%ebp
ja     136a <amoeba+0x22a>
mov    %ecx,%ebp
movslq %r14d,%rcx
ucomisd 0x0(%r13,%rcx,8),%xmm1
jbe    1380 <amoeba+0x240>
mov    %r14d,%r15d
mov    %eax,%r14d
jmp    139a <amoeba+0x25a>
xchg   %ax,%ax
movslq %r15d,%rdx
mov    %r14d,%ecx
cmp    %rcx,%rax
mov    %edx,%ecx
cmovne %eax,%ecx
ucomisd 0x0(%r13,%rdx,8),%xmm1
jbe    139a <amoeba+0x25a>
mov    %ecx,%r15d
cmp    %rax,%rsi
je     13c0 <amoeba+0x280>
movsd  0x8(%r13,%rax,8),%xmm1
movslq %ebp,%rcx
movsd  0x0(%r13,%rcx,8),%xmm0
add    $0x1,%rax
mov    %ebp,%ecx
jmp    1360 <amoeba+0x220>
nopl   0x0(%rax,%rax,1)
movslq %ebp,%rax
movsd  0x0(%r13,%rax,8),%xmm0
jmp    13d5 <amoeba+0x295>
nopl   0x0(%rax)
mov    $0x1,%ebp
movslq %r14d,%rax
movsd  0x0(%r13,%rax,8),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
movapd 0xc11(%rip),%xmm3
andpd  %xmm3,%xmm2
addsd  %xmm2,%xmm2
andpd  %xmm3,%xmm1
andpd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
movsd  0x90(%rsp),%xmm0
ucomisd %xmm2,%xmm0
ja     17f7 <amoeba+0x6b7>
mov    %rax,0x20(%rsp)
mov    0x30(%rsp),%rax
cmpl   $0x1388,(%rax)
jl     1444 <amoeba+0x304>
lea    0xc05(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
mov    0x30(%rsp),%rax
mov    0x10(%rsp),%r11
movslq %ebp,%rcx
mov    %rcx,0x50(%rsp)
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r11,%rdx
mov    0x18(%rsp),%rcx
mov    0x38(%rsp),%r8
mov    %r14d,%r9d
movsd  0xbb2(%rip),%xmm0
mov    $0x1,%al
call   1060 <amotry@plt>
mov    0x50(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    12e0 <amoeba+0x1a0>
movslq %r15d,%rax
ucomisd 0x0(%r13,%rax,8),%xmm0
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r11
movsd  0xb89(%rip),%xmm0
jb     1319 <amoeba+0x1d9>
mov    0x20(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm1
movsd  %xmm1,0x20(%rsp)
mov    0x30(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r11,%rdx
mov    %r15d,%ecx
mov    0x38(%rsp),%r8
mov    %r14d,%r9d
mov    $0x1,%al
call   1060 <amotry@plt>
movapd 0xb25(%rip),%xmm4
movsd  0xb3d(%rip),%xmm3
mov    0x28(%rsp),%rdi
mov    0x10(%rsp),%r11
ucomisd 0x20(%rsp),%xmm0
jb     1319 <amoeba+0x1d9>
test   %r15d,%r15d
js     1724 <amoeba+0x5e4>
mov    %ebp,%ebp
mov    $0x1,%r14d
mov    %rbp,0x40(%rsp)
jmp    156c <amoeba+0x42c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r11,%rdi
xor    %eax,%eax
call   *0x38(%rsp)
movapd 0xacf(%rip),%xmm4
movsd  0xae7(%rip),%xmm3
mov    0x28(%rsp),%rdi
mov    0x10(%rsp),%r11
movsd  %xmm0,0x0(%r13,%r14,8)
add    $0x1,%r14
cmp    0xa0(%rsp),%r14
je     1724 <amoeba+0x5e4>
cmp    %rbp,%r14
je     155a <amoeba+0x41a>
test   %r15d,%r15d
jle    1530 <amoeba+0x3f0>
mov    (%rbx,%r14,8),%rax
mov    0x50(%rsp),%rcx
mov    (%rbx,%rcx,8),%rcx
mov    $0x1,%edx
cmpq   $0x4,0x48(%rsp)
jb     16a0 <amoeba+0x560>
lea    0x8(%rax),%r10
lea    (%rax,%rdi,8),%r9
lea    0x8(%rcx),%rsi
lea    (%rcx,%rdi,8),%rbp
mov    0x70(%rsp),%r8
cmp    %r9,%r8
setb   %r11b
mov    0x68(%rsp),%rdi
cmp    %rdi,%r10
setb   %r15b
cmp    %rbp,%r8
setb   %r8b
cmp    %rdi,%rsi
setb   0x20(%rsp)
cmp    %rbp,%r10
setb   %dil
cmp    %r9,%rsi
setb   %r9b
test   %r15b,%r11b
jne    167d <amoeba+0x53d>
and    0x20(%rsp),%r8b
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r11
mov    0x60(%rsp),%rsi
mov    0x40(%rsp),%rbp
jne    1693 <amoeba+0x553>
and    %r9b,%dil
mov    0x28(%rsp),%rdi
jne    16a0 <amoeba+0x560>
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd 0x8(%rax,%rdx,8),%xmm0
movupd 0x18(%rax,%rdx,8),%xmm1
movupd 0x8(%rcx,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x18(%rcx,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
mulpd  %xmm4,%xmm2
mulpd  %xmm4,%xmm0
movupd %xmm2,0x8(%r11,%rdx,8)
movupd %xmm0,0x18(%r11,%rdx,8)
movupd %xmm2,0x8(%rax,%rdx,8)
movupd %xmm0,0x18(%rax,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1620 <amoeba+0x4e0>
mov    0x58(%rsp),%rdx
cmp    %rsi,0x48(%rsp)
je     1530 <amoeba+0x3f0>
jmp    16a0 <amoeba+0x560>
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r11
mov    0x28(%rsp),%rdi
mov    0x40(%rsp),%rbp
jmp    16a0 <amoeba+0x560>
mov    0x28(%rsp),%rdi
nopl   0x0(%rax,%rax,1)
mov    %rdx,%rsi
test   $0x1,%dil
jne    16c6 <amoeba+0x586>
movsd  (%rax,%rdx,8),%xmm0
addsd  (%rcx,%rdx,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r11,%rdx,8)
movsd  %xmm0,(%rax,%rdx,8)
lea    0x1(%rdx),%rsi
not    %rdx
cmp    0x80(%rsp),%rdx
je     1530 <amoeba+0x3f0>
nopw   0x0(%rax,%rax,1)
movsd  (%rax,%rsi,8),%xmm0
addsd  (%rcx,%rsi,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r11,%rsi,8)
movsd  %xmm0,(%rax,%rsi,8)
movsd  0x8(%rax,%rsi,8),%xmm0
addsd  0x8(%rcx,%rsi,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%r11,%rsi,8)
movsd  %xmm0,0x8(%rax,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rdi
jne    16e0 <amoeba+0x5a0>
jmp    1530 <amoeba+0x3f0>
mov    0x30(%rsp),%rax
add    %r15d,(%rax)
test   %r15d,%r15d
jle    1319 <amoeba+0x1d9>
mov    $0x1,%eax
jmp    1757 <amoeba+0x617>
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%r11,%rax,8)
add    $0x1,%rax
cmp    %rdi,%rax
je     1319 <amoeba+0x1d9>
test   %r15d,%r15d
js     1740 <amoeba+0x600>
cmpq   $0x3,0x98(%rsp)
jae    1780 <amoeba+0x640>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
test   %r12,%r12
jne    17ce <amoeba+0x68e>
jmp    1744 <amoeba+0x604>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
mov    0x88(%rsp),%rbp
xchg   %ax,%ax
mov    0x8(%rbx,%rcx,8),%rdx
mov    0x10(%rbx,%rcx,8),%rsi
addsd  (%rdx,%rax,8),%xmm0
addsd  (%rsi,%rax,8),%xmm0
mov    0x18(%rbx,%rcx,8),%rdx
addsd  (%rdx,%rax,8),%xmm0
mov    0x20(%rbx,%rcx,8),%rdx
addsd  (%rdx,%rax,8),%xmm0
add    $0x4,%rcx
cmp    %rcx,%rbp
jne    1790 <amoeba+0x650>
add    $0x1,%rcx
test   %r12,%r12
je     1744 <amoeba+0x604>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rcx,%rdx,8),%rsi
addsd  (%rsi,%rax,8),%xmm0
add    $0x1,%rdx
cmp    %rdx,%r12
jne    17e0 <amoeba+0x6a0>
jmp    1744 <amoeba+0x604>
mov    %r11,%rdi
mov    $0x1,%esi
mov    0x18(%rsp),%rdx
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <free_vector@plt>

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

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