#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__ ceil(double);
int /*<<< orphan*/ do_vect(double **, unsigned long);
int /*<<< orphan*/ error_underflow(int, char *);
scalar_t__ floor(double);
int gidz_general(int, int, int, unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, double, double, double, ...);
void interpolate_map(double **outmap, unsigned *out_extx, unsigned *out_exty,
                     unsigned *out_extz, double *out_origx, double *out_origy,
                     double *out_origz, double out_widthx, double out_widthy,
                     double out_widthz, double *inmap, unsigned in_extx,
                     unsigned in_exty, unsigned in_extz, double in_origx,
                     double in_origy, double in_origz, double in_widthx,
                     double in_widthy, double in_widthz) {
  int isx_out, isy_out, isz_out;
  int iex_out, iey_out, iez_out;
  double deltax, deltay, deltaz;
  unsigned long out_nvox;
  unsigned indx, indy, indz;
  unsigned sx, sy, sz;
  double xpos, ypos, zpos, gx, gy, gz, a, b, c;
  int x0, y0, z0, x1, y1, z1;
  isx_out = (int)ceil(in_origx / out_widthx);
  isy_out = (int)ceil(in_origy / out_widthy);
  isz_out = (int)ceil(in_origz / out_widthz);
  iex_out = (int)floor((in_origx + in_widthx * (in_extx - 1)) / out_widthx);
  iey_out = (int)floor((in_origy + in_widthy * (in_exty - 1)) / out_widthy);
  iez_out = (int)floor((in_origz + in_widthz * (in_extz - 1)) / out_widthz);
  sx = in_extx;
  sy = in_exty;
  sz = in_extz;
  *out_extx = iex_out - isx_out + 1;
  *out_exty = iey_out - isy_out + 1;
  *out_extz = iez_out - isz_out + 1;
  if (*out_extx < 2 || *out_exty < 2 || *out_extz < 2) {
    error_underflow(17005, "lib_vwk");
  }
  deltax = isx_out * out_widthx - in_origx;
  deltay = isy_out * out_widthy - in_origy;
  deltaz = isz_out * out_widthz - in_origz;
  out_nvox = (*out_extx) * (*out_exty) * (*out_extz);
  do_vect(outmap, out_nvox);
  for (indz = 0; indz < *out_extz; indz++)
    for (indy = 0; indy < *out_exty; indy++)
      for (indx = 0; indx < *out_extx; indx++) {
        xpos = deltax + indx * out_widthx;
        ypos = deltay + indy * out_widthy;
        zpos = deltaz + indz * out_widthz;
        gx = (xpos / in_widthx);
        gy = (ypos / in_widthy);
        gz = (zpos / in_widthz);
        x0 = (int)floor(gx);
        y0 = (int)floor(gy);
        z0 = (int)floor(gz);
        x1 = (int)ceil(gx);
        y1 = (int)ceil(gy);
        z1 = (int)ceil(gz);
        a = gx - x0;
        b = gy - y0;
        c = gz - z0;
        *(*outmap + gidz_general(indz, indy, indx, *out_exty, *out_extx)) =
            a * b * c * *(inmap + gidz_general(z1, y1, x1, sy, sx)) +
            (1 - a) * b * c * *(inmap + gidz_general(z1, y1, x0, sy, sx)) +
            a * (1 - b) * c * *(inmap + gidz_general(z1, y0, x1, sy, sx)) +
            a * b * (1 - c) * *(inmap + gidz_general(z0, y1, x1, sy, sx)) +
            a * (1 - b) * (1 - c) *
                *(inmap + gidz_general(z0, y0, x1, sy, sx)) +
            (1 - a) * b * (1 - c) *
                *(inmap + gidz_general(z0, y1, x0, sy, sx)) +
            (1 - a) * (1 - b) * c *
                *(inmap + gidz_general(z1, y0, x0, sy, sx)) +
            (1 - a) * (1 - b) * (1 - c) *
                *(inmap + gidz_general(z0, y0, x0, sy, sx));
      }
  *out_origx = in_origx + deltax;
  *out_origy = in_origy + deltay;
  *out_origz = in_origz + deltaz;
  if (sx != *out_extx || sy != *out_exty || sz != *out_extz)
    printf("lib_vwk> Map interpolated from %d x %d x %d to %d x %d x %d.\n", sx,
           sy, sz, *out_extx, *out_exty, *out_extz);
  if (in_widthx != out_widthx || in_widthy != out_widthy ||
      in_widthz != out_widthz)
    printf("lib_vwk> Voxel spacings interpolated from (%.3f,%.3f,%.3f) to "
           "(%.3f,%.3f,%.3f).\n",
           in_widthx, in_widthy, in_widthz, out_widthx, out_widthy, out_widthz);
  if (deltax != 0.0 || deltay != 0.0 || deltaz != 0.0)
    printf("lib_vwk> New map origin (coord of first voxel), in register with "
           "coordinate system origin: (%.3f,%.3f,%.3f)\n",
           *out_origx, *out_origy, *out_origz);
}


x86 assembly (clang, -O0):
<interpolate_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movsd  0x38(%rbp),%xmm8
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
movsd  %xmm3,-0x50(%rbp)
movsd  %xmm4,-0x58(%rbp)
movsd  %xmm5,-0x60(%rbp)
movsd  %xmm6,-0x68(%rbp)
movsd  %xmm7,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x74(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x7c(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
mov    0x20(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1080 <floor@plt>
mov    %eax,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
mov    0x28(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1080 <floor@plt>
mov    %eax,-0x84(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  0x38(%rbp),%xmm0
mov    0x30(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
call   1080 <floor@plt>
mov    %eax,-0x88(%rbp)
mov    0x20(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    0x28(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    0x30(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x80(%rbp),%ecx
sub    -0x74(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x84(%rbp),%ecx
sub    -0x78(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x88(%rbp),%ecx
sub    -0x7c(%rbp),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jb     1305 <interpolate_map+0x1a5>
mov    -0x18(%rbp),%rax
cmpl   $0x2,(%rax)
jb     1305 <interpolate_map+0x1a5>
mov    -0x20(%rbp),%rax
cmpl   $0x2,(%rax)
jae    1316 <interpolate_map+0x1b6>
mov    $0x426d,%edi
lea    0xcf7(%rip),%rsi
call   1070 <error_underflow@plt>
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x78(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl -0x7c(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
imul   (%rcx),%eax
mov    -0x20(%rbp),%rcx
imul   (%rcx),%eax
mov    %eax,%eax
mov    %rax,-0xa8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
call   1060 <do_vect@plt>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jae    1ab7 <interpolate_map+0x957>
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jae    1a9e <interpolate_map+0x93e>
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jae    1a85 <interpolate_map+0x925>
movsd  -0x90(%rbp),%xmm1
ff
mov    -0xac(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
mov    -0xb0(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
mov    -0xb4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
divsd  0x38(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
call   1080 <floor@plt>
mov    %eax,-0x10c(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
call   1080 <floor@plt>
mov    %eax,-0x110(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
call   1080 <floor@plt>
mov    %eax,-0x114(%rbp)
movsd  -0xe0(%rbp),%xmm0
ff
call   1030 <ceil@plt>
mov    %eax,-0x118(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
call   1030 <ceil@plt>
mov    %eax,-0x11c(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
call   1030 <ceil@plt>
mov    %eax,-0x120(%rbp)
movsd  -0xe0(%rbp),%xmm0
ff
cvtsi2sdl -0x10c(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
cvtsi2sdl -0x110(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
cvtsi2sdl -0x114(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0x100(%rbp),%xmm0
ff
mulsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x1d8(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x1e8(%rbp)
mov    -0x120(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    -0x118(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
mov    %eax,%ecx
mov    -0x1e8(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movsd  0x9da(%rip),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0x100(%rbp),%xmm0
ff
mulsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x1e0(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x1c8(%rbp)
mov    -0x120(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    -0x10c(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x1e0(%rbp),%xmm1
ff
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  -0x1d0(%rbp),%xmm2
ff
mov    %eax,%ecx
mov    -0x1c8(%rbp),%rax
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  0x942(%rip),%xmm1
subsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
mulsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x1c0(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
mov    -0x120(%rbp),%edi
mov    -0x110(%rbp),%esi
mov    -0x118(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x1c0(%rbp),%xmm0
ff
movsd  -0x1b8(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x1b0(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0x100(%rbp),%xmm0
ff
movsd  0x8ae(%rip),%xmm1
subsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a8(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x198(%rbp)
mov    -0x114(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    -0x118(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x1a8(%rbp),%xmm0
ff
movsd  -0x1a0(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x198(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  0x82a(%rip),%xmm1
subsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x816(%rip),%xmm1
subsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x180(%rbp)
mov    -0x114(%rbp),%edi
mov    -0x110(%rbp),%esi
mov    -0x118(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x190(%rbp),%xmm0
ff
movsd  -0x188(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x180(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  0x79a(%rip),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0x100(%rbp),%xmm0
ff
movsd  0x782(%rip),%xmm1
subsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x114(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    -0x10c(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x178(%rbp),%xmm0
ff
movsd  -0x170(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x168(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  0x706(%rip),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  0x6f6(%rip),%xmm1
subsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
mulsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x120(%rbp),%edi
mov    -0x110(%rbp),%esi
mov    -0x10c(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x160(%rbp),%xmm0
ff
movsd  -0x158(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x150(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0x672(%rip),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  0x662(%rip),%xmm1
subsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x64e(%rip),%xmm1
subsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
mov    0x18(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x114(%rbp),%edi
mov    -0x110(%rbp),%esi
mov    -0x10c(%rbp),%edx
mov    -0xbc(%rbp),%ecx
mov    -0xb8(%rbp),%r8d
call   1050 <gidz_general@plt>
movsd  -0x148(%rbp),%xmm0
ff
movsd  -0x140(%rbp),%xmm1
ff
mov    %eax,%ecx
mov    -0x138(%rbp),%rax
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x128(%rbp)
mov    -0xb4(%rbp),%edi
mov    -0xb0(%rbp),%esi
mov    -0xac(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%r8d
call   1050 <gidz_general@plt>
movsd  -0x130(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0x128(%rbp),%rax
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1427 <interpolate_map+0x2c7>
jmp    1a8a <interpolate_map+0x92a>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    140b <interpolate_map+0x2ab>
jmp    1aa3 <interpolate_map+0x943>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    13ef <interpolate_map+0x28f>
movsd  -0x50(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xb8(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    1b2c <interpolate_map+0x9cc>
mov    -0xbc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1b2c <interpolate_map+0x9cc>
mov    -0xc0(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
je     1b6d <interpolate_map+0xa0d>
mov    -0xb8(%rbp),%eax
cvtsi2sd %rax,%xmm0
mov    -0xbc(%rbp),%eax
cvtsi2sd %rax,%xmm1
mov    -0xc0(%rbp),%eax
cvtsi2sd %rax,%xmm2
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
lea    0x4aa(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x68(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jne    1bb4 <interpolate_map+0xa54>
jp     1bb4 <interpolate_map+0xa54>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    1bb4 <interpolate_map+0xa54>
jp     1bb4 <interpolate_map+0xa54>
movsd  0x38(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jne    1bb4 <interpolate_map+0xa54>
jp     1bb4 <interpolate_map+0xa54>
jmp    1be0 <interpolate_map+0xa80>
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  0x38(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
lea    0x475(%rip),%rdi
mov    $0x6,%al
call   1040 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c36 <interpolate_map+0xad6>
jp     1c36 <interpolate_map+0xad6>
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c36 <interpolate_map+0xad6>
jp     1c36 <interpolate_map+0xad6>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c36 <interpolate_map+0xad6>
jp     1c36 <interpolate_map+0xad6>
jmp    1c5c <interpolate_map+0xafc>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm2
lea    0x44a(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_map>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
movsd  %xmm7,0x88(%rsp)
movsd  %xmm6,0x50(%rsp)
movsd  %xmm5,0x78(%rsp)
movsd  %xmm4,0x70(%rsp)
movsd  %xmm3,0x98(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x30(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,0x38(%rsp)
mov    %r9,0xd8(%rsp)
mov    %r8,0xd0(%rsp)
mov    %rcx,0xe0(%rsp)
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,0xe8(%rsp)
movsd  0x1a8(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
mov    0x1a0(%rsp),%r13d
mov    0x198(%rsp),%ebp
mov    0x190(%rsp),%ebx
mov    0x188(%rsp),%rax
mov    %rax,0x118(%rsp)
mov    0x180(%rsp),%rax
mov    %rax,0xc8(%rsp)
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %rax,%r12
movsd  0x70(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
call   1030 <ceil@plt>
mov    %rax,(%rsp)
movsd  0x78(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
call   1030 <ceil@plt>
mov    %rbx,0xf0(%rsp)
lea    -0x1(%rbx),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
mov    %rax,0x8(%rsp)
mulsd  0x50(%rsp),%xmm0
addsd  0x98(%rsp),%xmm0
divsd  0x38(%rsp),%xmm0
call   1080 <floor@plt>
mov    %rbp,0x90(%rsp)
lea    -0x1(%rbp),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
mov    %rax,%rbp
mulsd  0x88(%rsp),%xmm0
addsd  0x70(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
call   1080 <floor@plt>
mov    %r13,0xc0(%rsp)
lea    -0x1(%r13),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
mov    %rax,%rbx
mulsd  0x80(%rsp),%xmm0
addsd  0x78(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
call   1080 <floor@plt>
mov    %r12,0x10(%rsp)
sub    %r12d,%ebp
add    $0x1,%ebp
mov    %ebp,(%r14)
mov    0xe0(%rsp),%r12
sub    (%rsp),%ebx
add    $0x1,%ebx
mov    %r15,%r13
mov    %ebx,(%r15)
mov    0x8(%rsp),%rbx
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,(%r12)
mov    %r14,%rbp
mov    (%r14),%ecx
cmp    $0x2,%ecx
jae    133b <interpolate_map+0x1db>
lea    0xce4(%rip),%rsi
mov    $0x426d,%edi
call   1070 <error_underflow@plt>
mov    0x0(%rbp),%ecx
mov    0x0(%r13),%edx
mov    (%r12),%eax
jmp    1349 <interpolate_map+0x1e9>
mov    0x0(%r13),%edx
cmp    $0x2,%edx
jb     131d <interpolate_map+0x1bd>
cmp    $0x1,%eax
jbe    131d <interpolate_map+0x1bd>
imul   %ecx,%eax
imul   %edx,%eax
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
subsd  0x98(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
subsd  0x70(%rsp),%xmm0
movsd  %xmm0,0xa8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x28(%rsp),%xmm0
subsd  0x78(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
mov    0xe8(%rsp),%rdi
mov    %rax,%rsi
call   1060 <do_vect@plt>
mov    (%r12),%ecx
test   %ecx,%ecx
je     18c7 <interpolate_map+0x767>
mov    0x0(%r13),%eax
xor    %esi,%esi
mov    %eax,%edx
movsd  0x50(%rsp),%xmm1
movsd  0x38(%rsp),%xmm3
mov    0x90(%rsp),%rdi
movsd  0x48(%rsp),%xmm2
mov    %r13,0x110(%rsp)
mov    %rbp,0x108(%rsp)
jmp    1417 <interpolate_map+0x2b7>
cs nopw 0x0(%rax,%rax,1)
mov    0xe0(%rsp),%rcx
mov    (%rcx),%ecx
mov    %eax,%edx
add    $0x1,%esi
cmp    %ecx,%esi
jae    18e3 <interpolate_map+0x783>
test   %edx,%edx
je     18c0 <interpolate_map+0x760>
mov    %esi,%ecx
xorps  %xmm4,%xmm4
cvtsi2sd %rcx,%xmm4
mulsd  0x28(%rsp),%xmm4
addsd  0xa0(%rsp),%xmm4
divsd  0x80(%rsp),%xmm4
mov    0x0(%rbp),%ecx
xor    %edx,%edx
mov    %esi,0x68(%rsp)
movsd  %xmm4,0xb0(%rsp)
jmp    1467 <interpolate_map+0x307>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%edx
cmp    %eax,%edx
jae    1400 <interpolate_map+0x2a0>
test   %ecx,%ecx
mov    $0x0,%ecx
je     1460 <interpolate_map+0x300>
mov    %edx,%eax
cvtsi2sd %rax,%xmm5
mulsd  0x30(%rsp),%xmm5
addsd  0xa8(%rsp),%xmm5
divsd  0x88(%rsp),%xmm5
movsd  %xmm5,0xb8(%rsp)
xor    %eax,%eax
mov    %edx,0x6c(%rsp)
xchg   %ax,%ax
mov    %eax,0x24(%rsp)
mov    0x24(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
call   1080 <floor@plt>
mov    %rax,%r15
mov    %rax,0x100(%rsp)
movsd  0xb8(%rsp),%xmm0
call   1080 <floor@plt>
mov    %rax,%r14
movsd  0xb0(%rsp),%xmm0
call   1080 <floor@plt>
mov    %rax,%rbx
mov    %rax,0x130(%rsp)
movsd  (%rsp),%xmm0
call   1030 <ceil@plt>
mov    %rax,%r12
mov    %rax,0x128(%rsp)
movsd  0xb8(%rsp),%xmm0
call   1030 <ceil@plt>
mov    %rax,%rbp
movsd  0xb0(%rsp),%xmm0
call   1030 <ceil@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  (%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
movsd  0xb8(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
subsd  %xmm0,%xmm3
movsd  %xmm3,0x40(%rsp)
movsd  0xb0(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm2,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x58(%rsp)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %eax,%edi
mov    %rax,%rbx
mov    %ebp,%esi
mov    %rbp,0xf8(%rsp)
mov    %r12d,%edx
mov    0x90(%rsp),%r15
mov    %r15d,%ecx
mov    0xf0(%rsp),%r13
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0xa37(%rip),%xmm0
subsd  (%rsp),%xmm0
movsd  %xmm0,0x140(%rsp)
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x118(%rsp),%r12
movsd  0x8(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbx,0x138(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
mov    0x100(%rsp),%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x18(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x9b6(%rip),%xmm1
subsd  0x40(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
mov    %r14,%rbp
mov    0x128(%rsp),%r14
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x40(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x94c(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x58(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
mov    0x130(%rsp),%rbx
mov    %ebx,%edi
mov    0xf8(%rsp),%rsi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x58(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %rbp,0x120(%rsp)
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  (%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x58(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x60(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
mov    %ebx,%edi
mov    0xf8(%rsp),%rsi
mov    0x100(%rsp),%r14
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x60(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x8(%rsp),%xmm1
mulsd  0x140(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x138(%rsp),%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x10(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%edi
mov    0x108(%rsp),%rbx
mov    0x110(%rsp),%rbp
mov    0x120(%rsp),%rsi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
call   1050 <gidz_general@plt>
cltq
movsd  0x8(%rsp),%xmm0
mulsd  (%r12,%rax,8),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0xe8(%rsp),%rax
mov    (%rax),%r14
mov    %rbp,%r13
mov    0x0(%rbp),%ecx
mov    (%rbx),%r8d
mov    0x68(%rsp),%edi
mov    0x6c(%rsp),%esi
mov    0x24(%rsp),%edx
call   1050 <gidz_general@plt>
movsd  0x48(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
movsd  0x50(%rsp),%xmm1
cltq
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14,%rax,8)
mov    0x24(%rsp),%eax
add    $0x1,%eax
mov    (%rbx),%ecx
cmp    %ecx,%eax
jb     14a0 <interpolate_map+0x340>
mov    %rbx,%rbp
mov    0x0(%r13),%eax
mov    0x90(%rsp),%rdi
mov    0x68(%rsp),%esi
mov    0x6c(%rsp),%edx
jmp    1460 <interpolate_map+0x300>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edx,%edx
jmp    140c <interpolate_map+0x2ac>
xor    %ecx,%ecx
movsd  0x50(%rsp),%xmm1
movsd  0x38(%rsp),%xmm3
mov    0x90(%rsp),%rdi
movsd  0x48(%rsp),%xmm2
movsd  0x98(%rsp),%xmm0
addsd  %xmm2,%xmm0
mov    0xd0(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  0x70(%rsp),%xmm0
addsd  0xa8(%rsp),%xmm0
mov    0xd8(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  0x78(%rsp),%xmm0
addsd  0xa0(%rsp),%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax)
mov    0x0(%rbp),%esi
mov    0x0(%r13),%edx
mov    0xf0(%rsp),%rax
cmp    %eax,%esi
jne    1952 <interpolate_map+0x7f2>
cmp    %edi,%edx
jne    1952 <interpolate_map+0x7f2>
cmp    0xc0(%rsp),%ecx
je     1995 <interpolate_map+0x835>
mov    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    %edi,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mov    0xc0(%rsp),%eax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
lea    0x694(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  0x48(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
movsd  0x50(%rsp),%xmm1
ucomisd %xmm3,%xmm1
jne    19c3 <interpolate_map+0x863>
jp     19c3 <interpolate_map+0x863>
movsd  0x88(%rsp),%xmm0
ucomisd 0x30(%rsp),%xmm0
jne    19c3 <interpolate_map+0x863>
jp     19c3 <interpolate_map+0x863>
movsd  0x80(%rsp),%xmm0
ucomisd 0x28(%rsp),%xmm0
jne    19c3 <interpolate_map+0x863>
jnp    19f9 <interpolate_map+0x899>
lea    0x684(%rip),%rdi
movapd %xmm1,%xmm0
movsd  0x88(%rsp),%xmm1
movsd  0x80(%rsp),%xmm2
movsd  0x30(%rsp),%xmm4
movsd  0x28(%rsp),%xmm5
mov    $0x6,%al
call   1040 <printf@plt>
movsd  0x48(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jne    1a3d <interpolate_map+0x8dd>
jp     1a3d <interpolate_map+0x8dd>
movsd  0xa8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    1a3d <interpolate_map+0x8dd>
jp     1a3d <interpolate_map+0x8dd>
xorpd  %xmm0,%xmm0
movsd  0xa0(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    1a3d <interpolate_map+0x8dd>
jp     1a3d <interpolate_map+0x8dd>
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0xd0(%rsp),%rax
movsd  (%rax),%xmm0
mov    0xd8(%rsp),%rax
movsd  (%rax),%xmm1
mov    0xc8(%rsp),%rax
movsd  (%rax),%xmm2
lea    0x637(%rip),%rdi
mov    $0x3,%al
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

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

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