#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double *dvector(int, int);
double fabs(double);
int /*<<< orphan*/ free_dvector(double *, int, int);
int /*<<< orphan*/ nrerror(char *);
double stub1(double *);
void amoeba(double **p, double y[], int ndim, double ftol,
            double (*funk)(double[]), int *nfunk) {
  double amotry(double **p, double y[], double psum[], int ndim,
                double (*funk)(double[]), int ihi, double fac);
  int i, ihi, ilo, inhi, j, mpts = ndim + 1;
  double rtol, sum, swap, ysave, ytry, *psum;
  psum = dvector(1, ndim);
  *nfunk = 0;
  for (j = 1; j <= ndim; j++) {
    for (sum = 0.0, i = 1; 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] && i != ihi)
        inhi = i;
    }
    rtol = 2.0 * fabs(y[ihi] - y[ilo]) / (fabs(y[ihi]) + fabs(y[ilo]));
    if (rtol < ftol) {
      {
        swap = (y[1]);
        (y[1]) = (y[ilo]);
        (y[ilo]) = swap;
      }
      for (i = 1; i <= ndim; i++) {
        swap = (p[1][i]);
        (p[1][i]) = (p[ilo][i]);
        (p[ilo][i]) = swap;
      }
      break;
    }
    if (*nfunk >= 1000000)
      nrerror("NMAX exceeded");
    *nfunk += 2;
    ytry = amotry(p, y, psum, ndim, funk, ihi, -1.0);
    if (ytry <= y[ilo])
      ytry = amotry(p, y, psum, ndim, funk, ihi, 2.0);
    else if (ytry >= y[inhi]) {
      ysave = y[ihi];
      ytry = amotry(p, y, psum, ndim, funk, ihi, 0.5);
      if (ytry >= ysave) {
        for (i = 1; i <= mpts; i++) {
          if (i != ilo) {
            for (j = 1; j <= ndim; j++)
              p[i][j] = psum[j] = 0.5 * (p[i][j] + p[ilo][j]);
            y[i] = (*funk)(psum);
          }
        }
        *nfunk += ndim;
        for (j = 1; j <= ndim; j++) {
          for (sum = 0.0, i = 1; i <= mpts; i++)
            sum += p[i][j];
          psum[j] = sum;
        }
      }
    } else
      --(*nfunk);
  }
  free_dvector(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
call   1040 <dvector@plt>
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1202 <amoeba+0xc2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     11e2 <amoeba+0xa2>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a9 <amoeba+0x69>
movsd  -0x58(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    118e <amoeba+0x4e>
jmp    1207 <amoeba+0xc7>
movl   $0x1,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x10(%rax),%xmm0
jbe    123a <amoeba+0xfa>
movl   $0x2,-0x40(%rbp)
mov    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1249 <amoeba+0x109>
movl   $0x1,-0x40(%rbp)
mov    $0x2,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     1307 <amoeba+0x1c7>
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
jb     128c <amoeba+0x14c>
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 -0x38(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12bd <amoeba+0x17d>
mov    -0x38(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    12f4 <amoeba+0x1b4>
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    12ef <amoeba+0x1af>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
je     12ef <amoeba+0x1af>
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    12f4 <amoeba+0x1b4>
jmp    12f9 <amoeba+0x1b9>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1256 <amoeba+0x116>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movaps 0xcd8(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xcdc(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xcb4(%rip),%xmm2
pand   %xmm2,%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movaps 0xc9c(%rip),%xmm3
pand   %xmm3,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    143b <amoeba+0x2fb>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1436 <amoeba+0x2f6>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13c6 <amoeba+0x286>
jmp    169f <amoeba+0x55f>
mov    -0x30(%rbp),%rax
cmpl   $0xf4240,(%rax)
jl     1457 <amoeba+0x317>
lea    0xbd6(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x38(%rbp),%r9d
movsd  0xb97(%rip),%xmm0
call   1050 <amotry@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     14d5 <amoeba+0x395>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x38(%rbp),%r9d
movsd  0xb4a(%rip),%xmm0
call   1050 <amotry@plt>
movsd  %xmm0,-0x70(%rbp)
jmp    169a <amoeba+0x55a>
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     168a <amoeba+0x54a>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x38(%rbp),%r9d
movsd  0xb02(%rip),%xmm0
call   1050 <amotry@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jb     1685 <amoeba+0x545>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     15fa <amoeba+0x4ba>
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     15e7 <amoeba+0x4a7>
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15d0 <amoeba+0x490>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xa84(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    155e <amoeba+0x41e>
mov    -0x28(%rbp),%rax
mov    -0x78(%rbp),%rdi
call   *%rax
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15ec <amoeba+0x4ac>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    153f <amoeba+0x3ff>
mov    -0x14(%rbp),%ecx
mov    -0x30(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1680 <amoeba+0x540>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     1660 <amoeba+0x520>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1627 <amoeba+0x4e7>
movsd  -0x58(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    160c <amoeba+0x4cc>
jmp    1685 <amoeba+0x545>
jmp    1695 <amoeba+0x555>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
jmp    169a <amoeba+0x55a>
jmp    1207 <amoeba+0xc7>
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
call   1060 <free_dvector@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    $0x98,%rsp
mov    %r8,%r14
mov    %rcx,0x30(%rsp)
movsd  %xmm0,0x80(%rsp)
mov    %edx,%ebp
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x1,%edi
mov    %edx,%esi
call   1040 <dvector@plt>
mov    %rbp,%r10
mov    %rax,%r15
mov    %rax,%r11
mov    %r14,0x28(%rsp)
movl   $0x0,(%r14)
test   %r10d,%r10d
mov    %rbp,0x8(%rsp)
jle    124e <amoeba+0x10e>
lea    0x2(%r10),%r8d
lea    0x1(%r10),%r9d
mov    %r10d,%r10d
lea    0x1(%r10),%rsi
mov    %esi,%edi
and    $0x3,%edi
and    $0xfffffffffffffffc,%rsi
mov    $0x1,%ebp
jmp    11cf <amoeba+0x8f>
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %r9,%rbp
je     1247 <amoeba+0x107>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
cmp    $0x3,%r10d
jb     1225 <amoeba+0xe5>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
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>
mov    0x8(%rsp),%r10
jmp    1256 <amoeba+0x116>
lea    0x1(%r10),%r9d
lea    0x2(%r10),%r8d
cmp    $0x2,%r9d
mov    $0x1,%eax
cmovge %r9d,%eax
mov    %rax,0x68(%rsp)
mov    %r8d,%eax
mov    %r9d,%r12d
lea    (%r11,%r12,8),%rcx
mov    %rcx,0x58(%rsp)
add    $0x8,%r11
mov    %r11,0x60(%rsp)
lea    -0x1(%r12),%r9
lea    -0x1(%rax),%rcx
mov    %rax,0x90(%rsp)
add    $0xfffffffffffffffe,%rax
mov    %rax,0x88(%rsp)
mov    %r9,0x38(%rsp)
and    $0xfffffffffffffffc,%r9
lea    0x1(%r9),%rax
mov    %rax,0x50(%rsp)
mov    %r12,%rax
neg    %rax
mov    %rax,0x70(%rsp)
mov    %ecx,%ebp
and    $0x3,%ebp
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x78(%rsp)
mov    %r15,(%rsp)
mov    %r12,0x10(%rsp)
mov    %r9,0x20(%rsp)
mov    %rbp,0x40(%rsp)
jmp    1309 <amoeba+0x1c9>
nopl   (%rax)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    (%rsp),%rdx
mov    %ebp,%ecx
mov    0x30(%rsp),%r8
mov    %r12d,%r9d
movsd  0xd2c(%rip),%xmm0
call   1050 <amotry@plt>
mov    %rbp,%r10
mov    0x20(%rsp),%r9
movsd  0x8(%r13),%xmm0
xor    %r15d,%r15d
ucomisd 0x10(%r13),%xmm0
seta   %r15b
mov    $0x2,%r12d
sub    %r15d,%r12d
add    $0x1,%r15d
test   %r10d,%r10d
js     13d0 <amoeba+0x290>
mov    $0x1,%r14d
mov    $0x1,%eax
movapd %xmm0,%xmm2
movapd %xmm0,%xmm1
mov    0x28(%rsp),%rdi
mov    0x68(%rsp),%rsi
ucomisd %xmm1,%xmm2
jb     1363 <amoeba+0x223>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%r14d
movslq %r12d,%rcx
ucomisd 0x0(%r13,%rcx,8),%xmm1
jbe    1380 <amoeba+0x240>
mov    %r12d,%r15d
mov    %eax,%r12d
jmp    139a <amoeba+0x25a>
nopw   0x0(%rax,%rax,1)
movslq %r15d,%rdx
mov    %r12d,%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 %r14d,%rcx
movsd  0x0(%r13,%rcx,8),%xmm2
add    $0x1,%rax
ucomisd %xmm1,%xmm2
jae    1360 <amoeba+0x220>
jmp    1363 <amoeba+0x223>
nopl   0x0(%rax)
movslq %r14d,%rax
movsd  0x0(%r13,%rax,8),%xmm1
jmp    13df <amoeba+0x29f>
nopl   0x0(%rax)
movapd %xmm0,%xmm1
mov    $0x1,%r14d
mov    0x28(%rsp),%rdi
movslq %r12d,%rax
movsd  0x0(%r13,%rax,8),%xmm2
movslq %r14d,%rcx
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
movapd 0xc04(%rip),%xmm5
andpd  %xmm5,%xmm3
addsd  %xmm3,%xmm3
andpd  %xmm5,%xmm2
movapd %xmm1,%xmm4
andpd  %xmm5,%xmm4
addsd  %xmm2,%xmm4
divsd  %xmm4,%xmm3
movsd  0x80(%rsp),%xmm2
ucomisd %xmm3,%xmm2
ja     17f7 <amoeba+0x6b7>
mov    %rax,0x18(%rsp)
mov    %rcx,0x48(%rsp)
mov    (%rdi),%eax
cmp    $0xf4240,%eax
jl     1453 <amoeba+0x313>
mov    %rdi,%rbp
lea    0xbf0(%rip),%rdi
call   1030 <nrerror@plt>
mov    %rbp,%rdi
mov    0x0(%rbp),%eax
add    $0x2,%eax
mov    %eax,(%rdi)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    (%rsp),%rdx
mov    0x8(%rsp),%rbp
mov    %ebp,%ecx
mov    0x30(%rsp),%r8
mov    %r12d,%r9d
movsd  0xba7(%rip),%xmm0
call   1050 <amotry@plt>
mov    0x48(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    12e0 <amoeba+0x1a0>
movslq %r15d,%rax
ucomisd 0x0(%r13,%rax,8),%xmm0
jae    14c0 <amoeba+0x380>
mov    0x28(%rsp),%rax
addl   $0xffffffff,(%rax)
mov    0x8(%rsp),%r10
mov    0x20(%rsp),%r9
jmp    1309 <amoeba+0x1c9>
nopw   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    (%rsp),%r15
mov    %r15,%rdx
mov    0x8(%rsp),%rbp
mov    %ebp,%ecx
mov    0x30(%rsp),%r8
mov    %r12d,%r9d
movsd  0xb3a(%rip),%xmm0
call   1050 <amotry@plt>
mov    %rbp,%r10
movsd  0xb2a(%rip),%xmm3
ucomisd 0x18(%rsp),%xmm0
mov    0x10(%rsp),%r12
mov    0x20(%rsp),%r9
mov    0x40(%rsp),%rbp
movapd 0xaed(%rip),%xmm4
jb     1309 <amoeba+0x1c9>
test   %r10d,%r10d
js     1714 <amoeba+0x5d4>
mov    %r14d,%eax
mov    $0x1,%r14d
mov    %rax,0x18(%rsp)
jmp    158f <amoeba+0x44f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
call   *0x30(%rsp)
movapd 0xab1(%rip),%xmm4
movsd  0xac9(%rip),%xmm3
mov    0x20(%rsp),%r9
movsd  %xmm0,0x0(%r13,%r14,8)
mov    0x40(%rsp),%rbp
mov    0x18(%rsp),%rax
add    $0x1,%r14
cmp    0x90(%rsp),%r14
je     1714 <amoeba+0x5d4>
cmp    %rax,%r14
je     157d <amoeba+0x43d>
cmpl   $0x0,0x8(%rsp)
jle    1550 <amoeba+0x410>
mov    (%rbx,%r14,8),%rax
mov    0x48(%rsp),%rcx
mov    (%rbx,%rcx,8),%rcx
mov    $0x1,%edx
cmpq   $0x4,0x38(%rsp)
jb     1690 <amoeba+0x550>
lea    0x8(%rax),%rdi
lea    (%rax,%r12,8),%r9
lea    0x8(%rcx),%r11
lea    (%rcx,%r12,8),%rsi
mov    0x60(%rsp),%r8
cmp    %r9,%r8
setb   %r15b
mov    0x58(%rsp),%rbp
cmp    %rbp,%rdi
setb   %r12b
cmp    %rsi,%r8
setb   %r10b
cmp    %rbp,%r11
setb   %r8b
cmp    %rsi,%rdi
setb   %dil
cmp    %r9,%r11
setb   %r9b
test   %r12b,%r15b
jne    167d <amoeba+0x53d>
and    %r8b,%r10b
jne    167d <amoeba+0x53d>
and    %r9b,%dil
mov    (%rsp),%r15
mov    0x10(%rsp),%r12
mov    0x20(%rsp),%rsi
jne    1690 <amoeba+0x550>
xor    %edx,%edx
nopl   0x0(%rax)
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(%r15,%rdx,8)
movupd %xmm0,0x18(%r15,%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    0x50(%rsp),%rdx
cmp    %rsi,0x38(%rsp)
je     1550 <amoeba+0x410>
jmp    1690 <amoeba+0x550>
mov    (%rsp),%r15
mov    0x10(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
mov    %rdx,%rsi
test   $0x1,%r12b
jne    16b6 <amoeba+0x576>
movsd  (%rax,%rdx,8),%xmm0
addsd  (%rcx,%rdx,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r15,%rdx,8)
movsd  %xmm0,(%rax,%rdx,8)
lea    0x1(%rdx),%rsi
not    %rdx
cmp    0x70(%rsp),%rdx
je     1550 <amoeba+0x410>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rax,%rsi,8),%xmm0
addsd  (%rcx,%rsi,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r15,%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(%r15,%rsi,8)
movsd  %xmm0,0x8(%rax,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%r12
jne    16d0 <amoeba+0x590>
jmp    1550 <amoeba+0x410>
mov    0x8(%rsp),%r10
mov    0x28(%rsp),%rax
add    %r10d,(%rax)
test   %r10d,%r10d
jle    1309 <amoeba+0x1c9>
mov    $0x1,%eax
jmp    1757 <amoeba+0x617>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
cmp    %r12,%rax
je     1309 <amoeba+0x1c9>
test   %r10d,%r10d
js     1740 <amoeba+0x600>
cmpq   $0x3,0x88(%rsp)
jae    1780 <amoeba+0x640>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
test   %rbp,%rbp
jne    17ce <amoeba+0x68e>
jmp    1744 <amoeba+0x604>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
mov    0x78(%rsp),%rdi
nopl   0x0(%rax,%rax,1)
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,%rdi
jne    1790 <amoeba+0x650>
add    $0x1,%rcx
test   %rbp,%rbp
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,%rbp
jne    17e0 <amoeba+0x6a0>
jmp    1744 <amoeba+0x604>
movsd  %xmm1,0x8(%r13)
movsd  %xmm0,0x0(%r13,%rcx,8)
mov    0x8(%rsp),%rdx
test   %edx,%edx
mov    (%rsp),%rdi
mov    0x10(%rsp),%r8
jle    1985 <amoeba+0x845>
mov    0x8(%rbx),%rax
mov    (%rbx,%rcx,8),%rcx
mov    $0x1,%esi
mov    0x38(%rsp),%r10
cmp    $0x4,%r10
jb     191b <amoeba+0x7db>
lea    0x8(%rax),%rbp
lea    (%rcx,%r8,8),%rbx
cmp    %rbx,%rbp
jae    1854 <amoeba+0x714>
lea    (%rax,%r8,8),%rbp
lea    0x8(%rcx),%rbx
cmp    %rbp,%rbx
jb     191b <amoeba+0x7db>
lea    -0x4(%r9),%rsi
mov    %rsi,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     19a0 <amoeba+0x860>
mov    %rbx,%rsi
and    $0xfffffffffffffffe,%rsi
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
movups (%rax,%rbp,8),%xmm0
movups 0x10(%rax,%rbp,8),%xmm1
movups (%rcx,%rbp,8),%xmm2
movups 0x10(%rcx,%rbp,8),%xmm3
movups %xmm2,(%rax,%rbp,8)
movups %xmm3,0x10(%rax,%rbp,8)
movups %xmm0,(%rcx,%rbp,8)
movups %xmm1,0x10(%rcx,%rbp,8)
movupd 0x20(%rax,%rbp,8),%xmm0
movupd 0x30(%rax,%rbp,8),%xmm1
movupd 0x20(%rcx,%rbp,8),%xmm2
movupd 0x30(%rcx,%rbp,8),%xmm3
movupd %xmm2,0x20(%rax,%rbp,8)
movupd %xmm3,0x30(%rax,%rbp,8)
movupd %xmm0,0x20(%rcx,%rbp,8)
movupd %xmm1,0x30(%rcx,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%rsi
jne    1880 <amoeba+0x740>
test   $0x1,%bl
je     190f <amoeba+0x7cf>
movupd (%rax,%rbp,8),%xmm0
movupd 0x10(%rax,%rbp,8),%xmm1
movupd (%rcx,%rbp,8),%xmm2
movupd 0x10(%rcx,%rbp,8),%xmm3
movupd %xmm2,(%rax,%rbp,8)
movupd %xmm3,0x10(%rax,%rbp,8)
movupd %xmm0,(%rcx,%rbp,8)
movupd %xmm1,0x10(%rcx,%rbp,8)
cmp    %r9,%r10
je     1985 <amoeba+0x845>
or     $0x1,%r9
mov    %r9,%rsi
mov    %rsi,%rbp
not    %rbp
test   $0x1,%r8b
jne    193f <amoeba+0x7ff>
movsd  (%rax,%rsi,8),%xmm0
movsd  (%rcx,%rsi,8),%xmm1
movsd  %xmm1,(%rax,%rsi,8)
movsd  %xmm0,(%rcx,%rsi,8)
add    $0x1,%rsi
add    %r8,%rbp
je     1985 <amoeba+0x845>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rax,%rsi,8),%xmm0
movsd  (%rcx,%rsi,8),%xmm1
movsd  %xmm1,(%rax,%rsi,8)
movsd  %xmm0,(%rcx,%rsi,8)
movsd  0x8(%rax,%rsi,8),%xmm0
movsd  0x8(%rcx,%rsi,8),%xmm1
movsd  %xmm1,0x8(%rax,%rsi,8)
movsd  %xmm0,0x8(%rcx,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%r8
jne    1950 <amoeba+0x810>
mov    $0x1,%esi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <free_dvector@plt>
mov    $0x1,%ebp
test   $0x1,%bl
jne    18e3 <amoeba+0x7a3>
jmp    190f <amoeba+0x7cf>

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

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