#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 amotry(double **, double *, double *, double (*)(double *), int, double);
double fabs(double);
double stub1(double *);
void amoeba(double p[3][2], double *y, double ftol, double (*funk)(double[]),
            int *nfunk) {
  int ii, ihi, ilo, inhi;
  double rtol, ysave, ytry, psum[2], tempzz;
  *nfunk = 0;
  psum[0] = p[0][0] + p[1][0] + p[2][0];
  psum[1] = p[0][1] + p[1][1] + p[2][1];
  for (;;) {
    ilo = 0;
    ihi = y[0] > y[1] ? (inhi = 1, 0) : (inhi = 0, 1);
    for (ii = 0; ii <= 2; ii++) {
      if (y[ii] <= y[ilo])
        ilo = ii;
      if (y[ii] > y[ihi]) {
        inhi = ihi;
        ihi = ii;
      } else if (y[ii] > y[inhi] && ii != ihi)
        inhi = ii;
    }
    rtol =
        2.0 * fabs(y[ihi] - y[ilo]) / (fabs(y[ihi]) + fabs(y[ilo]) + 1.0e-15);
    if (rtol < ftol) {
      tempzz = (y[0]);
      (y[0]) = (y[ilo]);
      (y[ilo]) = tempzz;
      tempzz = (p[0][0]);
      (p[0][0]) = (p[ilo][0]);
      (p[ilo][0]) = tempzz;
      tempzz = (p[0][1]);
      (p[0][1]) = (p[ilo][1]);
      (p[ilo][1]) = tempzz;
      break;
    }
    if (*nfunk >= 5000) {
      return;
    }
    *nfunk += 2;
    ytry = amotry(p, y, psum, funk, ihi, -1.0);
    if (ytry <= y[ilo])
      ytry = amotry(p, y, psum, funk, ihi, 2.0);
    else if (ytry >= y[inhi]) {
      ysave = y[ihi];
      ytry = amotry(p, y, psum, funk, ihi, 0.5);
      if (ytry >= ysave) {
        for (ii = 0; ii <= 2; ii++) {
          if (ii != ilo) {
            p[ii][0] = psum[0] = 0.5 * (p[ii][0] + p[ilo][0]);
            p[ii][1] = psum[1] = 0.5 * (p[ii][1] + p[ilo][1]);
            y[ii] = (*funk)(psum);
          }
        }
        *nfunk += 2;
        psum[0] = p[0][0] + p[1][0] + p[2][0];
        psum[1] = p[0][1] + p[1][1] + p[2][1];
      }
    } else
      --(*nfunk);
  }
}


x86 assembly (clang, -O0):
<amoeba>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    11a5 <amoeba+0x95>
movl   $0x1,-0x38(%rbp)
xor    %eax,%eax
mov    %eax,-0x6c(%rbp)
jmp    11b4 <amoeba+0xa4>
movl   $0x0,-0x38(%rbp)
mov    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x2,-0x2c(%rbp)
jg     1270 <amoeba+0x160>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     11f5 <amoeba+0xe5>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1226 <amoeba+0x116>
mov    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    125d <amoeba+0x14d>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1258 <amoeba+0x148>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
je     1258 <amoeba+0x148>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    125d <amoeba+0x14d>
jmp    1262 <amoeba+0x152>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11c1 <amoeba+0xb1>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movaps 0xd8f(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd6b(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd6b(%rip),%xmm2
pand   %xmm2,%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movaps 0xd53(%rip),%xmm3
pand   %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  0xd23(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13bb <amoeba+0x2ab>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
jmp    15ea <amoeba+0x4da>
mov    -0x28(%rbp),%rax
cmpl   $0x1388,(%rax)
jl     13d0 <amoeba+0x2c0>
jmp    15ea <amoeba+0x4da>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
movsd  0xc19(%rip),%xmm0
call   1030 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1448 <amoeba+0x338>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
movsd  0xbcf(%rip),%xmm0
call   1030 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
jmp    15e5 <amoeba+0x4d5>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     15d5 <amoeba+0x4c5>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
movsd  0xb8a(%rip),%xmm0
call   1030 <amotry@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     15d0 <amoeba+0x4c0>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x2,-0x2c(%rbp)
jg     1586 <amoeba+0x476>
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     1573 <amoeba+0x463>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm1
movsd  0xb25(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
addsd  0x8(%rax),%xmm1
movsd  0xad9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
lea    -0x60(%rbp),%rdi
call   *%rax
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1578 <amoeba+0x468>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14af <amoeba+0x39f>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    15e0 <amoeba+0x4d0>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
jmp    15e5 <amoeba+0x4d5>
jmp    1176 <amoeba+0x66>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<amoeba>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,0x30(%rsp)
movsd  %xmm0,0x40(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r12
movl   $0x0,(%rcx)
movupd (%rdi),%xmm0
movupd 0x10(%rdi),%xmm1
addpd  %xmm0,%xmm1
movupd 0x20(%rdi),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rdi,0x28(%rsp)
jmp    1181 <amoeba+0x71>
nopl   (%rax)
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
mov    %ebp,%r8d
movsd  0xeb9(%rip),%xmm0
call   1030 <amotry@plt>
mov    0x8(%rsp),%rcx
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setbe  %al
movsd  (%rbx,%rax,8),%xmm2
ucomisd %xmm2,%xmm0
jbe    11b0 <amoeba+0xa0>
movapd %xmm0,%xmm2
mov    %eax,%edi
xor    %eax,%eax
jmp    11cb <amoeba+0xbb>
nopl   0x0(%rax,%rax,1)
xor    %esi,%esi
ucomisd %xmm1,%xmm0
seta   %sil
ucomisd (%rbx,%rsi,8),%xmm0
setbe  %dl
or     %sil,%dl
and    %sil,%dl
movzbl %dl,%edi
lea    0x10(%rsp),%rdx
xor    %r9d,%r9d
ucomisd %xmm1,%xmm0
setae  %r8b
ucomisd %xmm2,%xmm1
jbe    11f0 <amoeba+0xe0>
movapd %xmm1,%xmm2
mov    %eax,%edi
mov    $0x1,%eax
jmp    120c <amoeba+0xfc>
xchg   %ax,%ax
test   %eax,%eax
mov    $0x1,%ebp
cmovne %edi,%ebp
mov    %edi,%esi
ucomisd (%rbx,%rsi,8),%xmm1
jbe    1205 <amoeba+0xf5>
mov    %ebp,%edi
mov    %eax,%esi
movsd  (%rbx,%rsi,8),%xmm2
xor    %esi,%esi
ucomisd %xmm1,%xmm0
setae  %sil
movsd  0x10(%rbx),%xmm1
movsd  (%rbx,%rsi,8),%xmm3
ucomisd %xmm1,%xmm3
jb     1250 <amoeba+0x140>
mov    $0x2,%r9d
ucomisd %xmm2,%xmm1
ja     1259 <amoeba+0x149>
mov    %edi,%esi
ucomisd (%rbx,%rsi,8),%xmm1
jbe    1264 <amoeba+0x154>
mov    $0x2,%edi
jmp    1264 <amoeba+0x154>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r8b,%r9b
ucomisd %xmm2,%xmm1
jbe    1232 <amoeba+0x122>
movapd %xmm1,%xmm2
mov    %eax,%edi
mov    $0x2,%eax
mov    %r9d,%r15d
movsd  (%rbx,%r15,8),%xmm1
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
movapd 0xd83(%rip),%xmm5
andpd  %xmm5,%xmm3
addsd  %xmm3,%xmm3
andpd  %xmm5,%xmm2
movapd %xmm1,%xmm4
andpd  %xmm5,%xmm4
addsd  %xmm2,%xmm4
addsd  0xd83(%rip),%xmm4
divsd  %xmm4,%xmm3
movsd  0x40(%rsp),%xmm2
ucomisd %xmm3,%xmm2
ja     1446 <amoeba+0x336>
mov    (%rcx),%esi
cmp    $0x1387,%esi
jg     146d <amoeba+0x35d>
mov    %edi,0x38(%rsp)
mov    %r9d,0x4(%rsp)
mov    %eax,%ebp
add    $0x2,%esi
mov    %esi,(%rcx)
mov    0x28(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rdx,%r14
mov    0x30(%rsp),%r13
mov    %r13,%rcx
mov    %ebp,%r8d
movsd  0xd38(%rip),%xmm0
call   1030 <amotry@plt>
movsd  (%rbx,%r15,8),%xmm1
ucomisd %xmm0,%xmm1
jae    1160 <amoeba+0x50>
mov    0x38(%rsp),%eax
ucomisd (%rbx,%rax,8),%xmm0
jae    1320 <amoeba+0x210>
mov    0x8(%rsp),%rcx
addl   $0xffffffff,(%rcx)
jmp    1181 <amoeba+0x71>
nopl   (%rax)
movsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    0x28(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
lea    0x10(%rsp),%rdx
mov    0x30(%rsp),%rcx
mov    %ebp,%r8d
movsd  0xced(%rip),%xmm0
call   1030 <amotry@plt>
ucomisd 0x38(%rsp),%xmm0
mov    0x8(%rsp),%rcx
jb     1181 <amoeba+0x71>
shl    $0x4,%r15
add    %r12,%r15
mov    0x4(%rsp),%eax
test   %eax,%eax
mov    0x30(%rsp),%r13
lea    0x10(%rsp),%r14
je     13b0 <amoeba+0x2a0>
movupd (%r12),%xmm0
movupd (%r15),%xmm1
addpd  %xmm0,%xmm1
mulpd  0xc7f(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movupd %xmm1,(%r12)
mov    %r14,%rdi
call   *%r13
mov    0x4(%rsp),%eax
movsd  %xmm0,(%rbx)
cmp    $0x1,%eax
je     13e7 <amoeba+0x2d7>
movupd 0x10(%r12),%xmm0
movupd (%r15),%xmm1
addpd  %xmm0,%xmm1
mulpd  0xc48(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movupd %xmm1,0x10(%r12)
mov    %r14,%rdi
mov    %eax,%ebp
call   *%r13
movsd  %xmm0,0x8(%rbx)
cmp    $0x2,%ebp
je     1417 <amoeba+0x307>
movupd 0x20(%r12),%xmm0
movupd (%r15),%xmm1
addpd  %xmm0,%xmm1
mulpd  0xc11(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movupd %xmm1,0x20(%r12)
mov    %r14,%rdi
call   *%r13
movsd  %xmm0,0x10(%rbx)
mov    0x8(%rsp),%rcx
addl   $0x2,(%rcx)
movupd (%r12),%xmm0
movupd 0x10(%r12),%xmm1
addpd  %xmm0,%xmm1
movupd 0x20(%r12),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
jmp    1181 <amoeba+0x71>
movsd  %xmm1,(%rbx)
movsd  %xmm0,(%rbx,%r15,8)
shl    $0x4,%r15
mov    0x28(%rsp),%rax
movupd (%rax),%xmm0
movupd (%rax,%r15,1),%xmm1
movupd %xmm1,(%rax)
movupd %xmm0,(%rax,%r15,1)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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