#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 */
scalar_t__ floor(int);
int interpDblArray(double **dataArray, double **interpArray, int numDataX,
                   int numDataY, int numInterpX, int numInterpY, double gain,
                   double offset) {
  int interpX, interpY, dataX, dataY;
  int nextActualInterpX, nextActualInterpY;
  double ratioA, ratioB, ratioC, ratioA_preCalc, newValue;
  double interpolationX, interpolationY;
  interpolationX = (double)((double)numInterpX) / ((double)(numDataX));
  interpolationY = (double)((double)numInterpY) / ((double)(numDataY));
  for (interpY = 0; interpY < numInterpY; interpY++) {
    dataY = (int)floor(interpY / interpolationY);
    if (dataY > numDataY - 2)
      dataY = numDataY - 2;
    nextActualInterpY = (int)floor(dataY * interpolationY);
    ratioA_preCalc =
        (nextActualInterpY + interpolationY - interpY) / interpolationY;
    for (interpX = 0; interpX < numInterpX; interpX++) {
      dataX = (int)floor((interpX / interpolationX));
      if (dataX > numDataX - 2)
        dataX = numDataX - 2;
      nextActualInterpX = (int)floor(dataX * interpolationX);
      if (interpX - nextActualInterpX > interpY - nextActualInterpY) {
        ratioA = 1.0 - ratioA_preCalc;
        ratioC =
            (nextActualInterpX + interpolationX - interpX) / interpolationX;
        ratioB = 1.0 - ratioA - ratioC;
        newValue = ratioA * dataArray[dataX + 1][dataY + 1] +
                   ratioB * dataArray[dataX + 1][dataY] +
                   ratioC * dataArray[dataX][dataY];
        interpArray[interpX][interpY] = (newValue * gain) + offset;
      } else {
        ratioA = ratioA_preCalc;
        ratioC = 1.0 - (nextActualInterpX + interpolationX - interpX) /
                           interpolationX;
        ratioB = 1.0 - ratioA - ratioC;
        newValue = ratioA * dataArray[dataX][dataY] +
                   ratioB * dataArray[dataX][dataY + 1] +
                   ratioC * dataArray[dataX + 1][dataY + 1];
        interpArray[interpX][interpY] = (newValue * gain) + offset;
      }
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<interpDblArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
cvtsi2sdl -0x20(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    143b <interpDblArray+0x32b>
cvtsi2sdl -0x38(%rbp),%xmm0
divsd  -0x80(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jle    11a4 <interpDblArray+0x94>
mov    -0x18(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x40(%rbp)
cvtsi2sdl -0x40(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x48(%rbp)
cvtsi2sdl -0x48(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1428 <interpDblArray+0x318>
cvtsi2sdl -0x34(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jle    121a <interpDblArray+0x10a>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x3c(%rbp)
cvtsi2sdl -0x3c(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
sub    -0x44(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x48(%rbp),%ecx
cmp    %ecx,%eax
jle    132d <interpDblArray+0x21d>
movsd  0xdb4(%rip),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdl -0x44(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd85(%rip),%xmm0
subsd  -0x50(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1415 <interpDblArray+0x305>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdl -0x44(%rbp),%xmm1
addsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x34(%rbp),%xmm0
subsd  %xmm0,%xmm1
divsd  -0x78(%rbp),%xmm1
movsd  0xca9(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc98(%rip),%xmm0
subsd  -0x50(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    141a <interpDblArray+0x30a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11de <interpDblArray+0xce>
jmp    142d <interpDblArray+0x31d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1168 <interpDblArray+0x58>
mov    $0x1,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpDblArray>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movsd  %xmm1,0x70(%rsp)
movsd  %xmm0,0x68(%rsp)
mov    %r8d,0xc(%rsp)
mov    %rsi,0x60(%rsp)
test   %r9d,%r9d
jle    1368 <interpDblArray+0x258>
mov    %edx,%r13d
mov    %rdi,%rbp
mov    0xc(%rsp),%eax
cvtsi2sd %eax,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
cvtsi2sd %r9d,%xmm3
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
divsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rsp)
divsd  %xmm1,%xmm3
movsd  %xmm3,0x10(%rsp)
add    $0xfffffffe,%ecx
mov    %ecx,0x30(%rsp)
add    $0xfffffffe,%r13d
mov    %r9d,%ecx
mov    %rcx,0x40(%rsp)
mov    %eax,%eax
mov    %rax,0x58(%rsp)
xor    %ecx,%ecx
jmp    119f <interpDblArray+0x8f>
add    $0x1,%rcx
cmp    0x40(%rsp),%rcx
je     1368 <interpDblArray+0x258>
mov    %rcx,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x20(%rsp)
divsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %rax,%rbx
mov    0x30(%rsp),%eax
cmp    %ebx,%eax
cmovl  %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    0x18(%rsp),%rcx
cmpl   $0x0,0xc(%rsp)
jle    1190 <interpDblArray+0x80>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm1
subsd  0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
sub    %eax,%ecx
mov    %ecx,0x34(%rsp)
movsd  0xde9(%rip),%xmm0
movapd %xmm0,%xmm2
movsd  %xmm1,0x50(%rsp)
subsd  %xmm1,%xmm2
movslq %ebx,%r14
add    $0x1,%ebx
movslq %ebx,%r15
movsd  %xmm2,0x38(%rsp)
subsd  %xmm2,%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %r12d,%r12d
jmp    12c5 <interpDblArray+0x1b5>
cs nopw 0x0(%rax,%rax,1)
movsd  0xda8(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
movslq %ebx,%rax
mov    0x0(%rbp,%rax,8),%rcx
mov    0x8(%rbp,%rax,8),%rax
mulsd  (%rcx,%r15,8),%xmm0
movsd  (%rcx,%r14,8),%xmm2
mulsd  0x50(%rsp),%xmm2
addsd  %xmm0,%xmm2
mulsd  (%rax,%r15,8),%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
mov    0x18(%rsp),%rcx
mulsd  0x68(%rsp),%xmm0
addsd  0x70(%rsp),%xmm0
mov    0x60(%rsp),%rax
mov    (%rax,%r12,8),%rax
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%r12
cmp    %r12,0x58(%rsp)
je     1190 <interpDblArray+0x80>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x20(%rsp)
divsd  0x28(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %rax,%rbx
cmp    %ebx,%r13d
cmovl  %r13d,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x28(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %r12d,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x28(%rsp),%xmm1
addsd  %xmm1,%xmm0
subsd  0x20(%rsp),%xmm0
divsd  %xmm1,%xmm0
cmp    0x34(%rsp),%ecx
jle    1250 <interpDblArray+0x140>
movsd  0x48(%rsp),%xmm1
subsd  %xmm0,%xmm1
movslq %ebx,%rax
mov    0x0(%rbp,%rax,8),%rcx
mov    0x8(%rbp,%rax,8),%rax
mulsd  (%rax,%r14,8),%xmm1
movsd  (%rax,%r15,8),%xmm2
mulsd  0x38(%rsp),%xmm2
addsd  %xmm1,%xmm2
mulsd  (%rcx,%r14,8),%xmm0
addsd  %xmm2,%xmm0
jmp    1297 <interpDblArray+0x187>
mov    $0x1,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @interpDblArray(double** nocapture %0, double** nocapture %1, i32 %2, i32 %3, i32 %4, i32 %5, double %6, double %7) {
%9 = sitofp i32 %4 to double
%10 = sitofp i32 %2 to double
%11 = fdiv double %9, %10
%12 = sitofp i32 %5 to double
%13 = sitofp i32 %3 to double
%14 = fdiv double %12, %13
%15 = icmp sgt i32 %5, 0
br i1 %15, label %16, label %117
16: ; preds = %8
%17 = add nsw i32 %3, -2
%18 = icmp sgt i32 %4, 0
%19 = add nsw i32 %2, -2
%20 = zext i32 %5 to i64
%21 = zext i32 %4 to i64
br label %22
22: ; preds = %16, %114
%23 = phi i64 [ 0, %16 ], [ %115, %114 ]
%24 = trunc i64 %23 to i32
%25 = sitofp i32 %24 to double
%26 = fdiv double %25, %14
%27 = fptosi double %26 to i32
%28 = tail call i64 @floor(i32 %27)
%29 = trunc i64 %28 to i32
%30 = icmp slt i32 %17, %29
%31 = select i1 %30, i32 %17, i32 %29
%32 = sitofp i32 %31 to double
%33 = fmul double %14, %32
%34 = fptosi double %33 to i32
%35 = tail call i64 @floor(i32 %34)
%36 = trunc i64 %35 to i32
%37 = sitofp i32 %36 to double
%38 = fadd double %14, %37
%39 = fsub double %38, %25
%40 = fdiv double %39, %14
br i1 %18, label %41, label %114
41: ; preds = %22
%42 = sub nsw i32 %24, %36
%43 = fsub double 1.000000e+00, %40
%44 = sext i32 %31 to i64
%45 = add nsw i32 %31, 1
%46 = sext i32 %45 to i64
%47 = fsub double 1.000000e+00, %43
br label %48
48: ; preds = %41, %106
%49 = phi i64 [ 0, %41 ], [ %112, %106 ]
%50 = trunc i64 %49 to i32
%51 = sitofp i32 %50 to double
%52 = fdiv double %51, %11
%53 = fptosi double %52 to i32
%54 = tail call i64 @floor(i32 %53)
%55 = trunc i64 %54 to i32
%56 = icmp slt i32 %19, %55
%57 = select i1 %56, i32 %19, i32 %55
%58 = sitofp i32 %57 to double
%59 = fmul double %11, %58
%60 = fptosi double %59 to i32
%61 = tail call i64 @floor(i32 %60)
%62 = trunc i64 %61 to i32
%63 = sub nsw i32 %50, %62
%64 = icmp sgt i32 %63, %42
%65 = sitofp i32 %62 to double
%66 = fadd double %11, %65
%67 = fsub double %66, %51
%68 = fdiv double %67, %11
br i1 %64, label %69, label %87
69: ; preds = %48
%70 = fsub double %47, %68
%71 = add nsw i32 %57, 1
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double*, double** %0, i64 %72
%74 = load double*, double** %73
%75 = getelementptr inbounds double, double* %74, i64 %46
%76 = load double, double* %75
%77 = getelementptr inbounds double, double* %74, i64 %44
%78 = load double, double* %77
%79 = fmul double %70, %78
%80 = tail call double @llvm.fmuladd.f64(double %43, double %76, double %79)
%81 = sext i32 %57 to i64
%82 = getelementptr inbounds double*, double** %0, i64 %81
%83 = load double*, double** %82
%84 = getelementptr inbounds double, double* %83, i64 %44
%85 = load double, double* %84
%86 = tail call double @llvm.fmuladd.f64(double %68, double %85, double %80)
br label %106
87: ; preds = %48
%88 = fsub double 1.000000e+00, %68
%89 = fsub double %43, %88
%90 = sext i32 %57 to i64
%91 = getelementptr inbounds double*, double** %0, i64 %90
%92 = load double*, double** %91
%93 = getelementptr inbounds double, double* %92, i64 %44
%94 = load double, double* %93
%95 = getelementptr inbounds double, double* %92, i64 %46
%96 = load double, double* %95
%97 = fmul double %89, %96
%98 = tail call double @llvm.fmuladd.f64(double %40, double %94, double %97)
%99 = add nsw i32 %57, 1
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double*, double** %0, i64 %100
%102 = load double*, double** %101
%103 = getelementptr inbounds double, double* %102, i64 %46
%104 = load double, double* %103
%105 = tail call double @llvm.fmuladd.f64(double %88, double %104, double %98)
br label %106
106: ; preds = %69, %87
%107 = phi double [ %86, %69 ], [ %105, %87 ]
%108 = tail call double @llvm.fmuladd.f64(double %107, double %6, double %7)
%109 = getelementptr inbounds double*, double** %1, i64 %49
%110 = load double*, double** %109
%111 = getelementptr inbounds double, double* %110, i64 %23
store double %108, double* %111
%112 = add nuw nsw i64 %49, 1
%113 = icmp eq i64 %112, %21
br i1 %113, label %114, label %48
114: ; preds = %106, %22
%115 = add nuw nsw i64 %23, 1
%116 = icmp eq i64 %115, %20
br i1 %116, label %117, label %22
117: ; preds = %114, %8
ret i32 1
}