#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 ceil(double);
scalar_t__ floor(double);
double integrated_profile(int, int, int, double, double, double *, double *,
                          double *, double *);
double interpolate_2d(double, double, int, double *);
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ resolve_coeffs_2d(int, int, int, double *);
double sqrt(double);
void cu_make_residual(int profile_type, int nx, int ny, int dp, int ds,
                      int n_coeff, int nkernel, int kernel_radius, int *kxindex,
                      int *kyindex, int *ext_basis, double *psf_parameters,
                      double *psf_0, double *psf_xd, double *psf_yd,
                      double *posx, double *posy, double *coeff, double *flux,
                      double *dflux, long gridDimx, int blockDimx,
                      int blockDimy, double *tex0, double *tex1,
                      int *group_boundaries, double *group_positions_x,
                      double *group_positions_y, int ngroups) {
  int id, txa, tyb, txag, tybg;
  int np, ns, i, j, ip, jp, ic, ki, a, b;
  int d1, sidx, l, m, l1, m1, ig, jg;
  int psf_size, ix, jx;
  double x, y, p0, p1, p1g, cpsf_pixel, xpos, ypos, dd;
  double psf_height, psf_sigma_x, psf_sigma_y, psf_sigma_xy, psf_xpos, psf_ypos;
  double psf_rad, psf_rad2, gain, fl, inv_var, px, py;
  double sx2, sy2, sxy2, sx2msy2, sx2psy2;
  double subx, suby, psf_norm, bgnd;
  double pi = 3.14159265, fwtosig = 0.8493218, RON = 5.0;
  double psf_sum;
  double cpsf[256], cpsf0[256], mpsf[256];
  double fsum1, fsum2, fsum3;
  int idx, idy, i_group;
  long blockIdx, i_group_previous;
  printf("Doing photometry for %d groups\n", ngroups);
  np = (dp + 1) * (dp + 2) / 2;
  ns = (ds + 1) * (ds + 2) / 2;
  psf_size = (int)psf_parameters[0];
  psf_height = psf_parameters[1];
  psf_sigma_x = psf_parameters[2];
  psf_sigma_y = psf_parameters[3];
  psf_ypos = psf_parameters[4];
  psf_xpos = psf_parameters[5];
  psf_rad = psf_parameters[6];
  gain = psf_parameters[7];
  if (psf_rad > 7.0) {
    printf("Warning: resetting psf_rad to maximum value 7.0\n");
    psf_rad = 7.0;
  }
  psf_rad2 = psf_rad * psf_rad;
  psf_sum = 0.0;
  for (i = 1; i < psf_size - 1; i++) {
    for (j = 1; j < psf_size - 1; j++) {
      psf_sum += psf_0[i + j * psf_size];
    }
  }
  if (profile_type == 0) {
    psf_norm = 0.25 * psf_sum + psf_height * 2 * pi * fwtosig * fwtosig;
  } else if (profile_type == 1) {
    psf_sigma_xy = psf_parameters[8];
    sx2 = psf_sigma_x * psf_sigma_x;
    sy2 = psf_sigma_y * psf_sigma_y;
    sxy2 = psf_sigma_xy * psf_sigma_xy;
    sx2msy2 = 1.0 / sx2 - 1.0 / sy2;
    sx2psy2 = 1.0 / sx2 + 1.0 / sy2;
    px = 1.0 / sqrt(sx2psy2 + sqrt(sx2msy2 * sx2msy2 + sxy2));
    py = 1.0 / sqrt(sx2psy2 - sqrt(sx2msy2 * sx2msy2 + sxy2));
    psf_norm = 0.25 * psf_sum +
               psf_height * pi * (px * py) / (psf_sigma_x * psf_sigma_y);
  }
  i_group_previous = 0;
  for (i_group = 0; i_group < ngroups; i_group++) {
    for (idx = 0; idx < blockDimx; idx++) {
      for (idy = 0; idy < blockDimy; idy++) {
        id = idx + idy * blockDimx;
        cpsf0[id] = 0.0;
      }
    }
    xpos = group_positions_x[i_group];
    ypos = group_positions_y[i_group];
    x = (xpos - 0.5 * (nx - 1)) / (nx - 1);
    y = (ypos - 0.5 * (ny - 1)) / (ny - 1);
    for (idx = 0; idx < blockDimx; idx++) {
      for (idy = 0; idy < blockDimy; idy++) {
        id = idx + idy * blockDimx;
        p0 = integrated_profile(profile_type, idx, idy, xpos, ypos,
                                psf_parameters, psf_0, psf_xd, psf_yd);
        cpsf_pixel = 0.0;
        for (ic = 0; ic < n_coeff; ic++) {
          ki = ic < np ? 0 : (ic - np) / ns + 1;
          if (ki < nkernel) {
            a = kxindex[ki];
            b = kyindex[ki];
            if (ki == 0) {
              d1 = dp;
              sidx = ic;
            } else {
              d1 = ds;
              sidx = ic - np - (ki - 1) * ns;
            }
            l1 = m1 = 0;
            if (d1 > 0) {
              i = 0;
              for (l = 0; l <= d1; l++) {
                for (m = 0; m <= d1 - l; m++) {
                  if (i == sidx) {
                    l1 = l;
                    m1 = m;
                  }
                  i++;
                }
              }
            }
            if (ki > 0) {
              txa = idx + a;
              tyb = idy + b;
              p1 = integrated_profile(profile_type, txa, tyb, xpos, ypos,
                                      psf_parameters, psf_0, psf_xd, psf_yd);
              if (ext_basis[ki]) {
                p1 = 0.0;
                for (ig = -1; ig < 2; ig++) {
                  for (jg = -1; jg < 2; jg++) {
                    txag = txa + ig;
                    tybg = tyb + jg;
                    p1g = integrated_profile(profile_type, txag, tybg, xpos,
                                             ypos, psf_parameters, psf_0,
                                             psf_xd, psf_yd);
                    p1 += p1g;
                  }
                }
                p1 /= 9.0;
              }
              cpsf_pixel += coeff[ic] * (p1 - p0) * pow(x, l1) * pow(y, m1);
            } else {
              cpsf_pixel += coeff[ic] * p0 * pow(x, l1) * pow(y, m1);
            }
          }
        }
        cpsf0[id] = cpsf_pixel / psf_norm;
      }
    }
    printf("psf computed\n");
    for (blockIdx = i_group_previous; blockIdx < group_boundaries[i_group];
         blockIdx++) {
      for (i = 0; i < 256; i++)
        cpsf[i] = cpsf0[i];
      resolve_coeffs_2d(16, 16, 16, cpsf);
      xpos = posx[blockIdx];
      ypos = posy[blockIdx];
      subx = ceil(xpos + 0.5 + 0.0000000001) - (xpos + 0.5);
      suby = ceil(ypos + 0.5 + 0.0000000001) - (ypos + 0.5);
      for (idx = 0; idx < blockDimx; idx++) {
        for (idy = 0; idy < blockDimy; idy++) {
          id = idx + idy * blockDimx;
          mpsf[id] = 0.0;
          if ((idx > 1) && (idx < 14) && (idy > 1) && (idy < 14)) {
            mpsf[id] = interpolate_2d(subx, suby, 16,
                                      &cpsf[idx - 2 + (idy - 2) * blockDimx]);
          }
        }
      }
      for (idx = 0; idx < 16; idx++) {
        for (idy = 0; idy < 16; idy++) {
          id = idx + idy * blockDimx;
          if (pow(idx - 8.0, 2) + pow(idy - 8.0, 2) < psf_rad2) {
            ix = (int)floor(xpos + 0.5) + idx - 8.0;
            jx = (int)floor(ypos + 0.5) + idy - 8.0;
            tex0[ix + nx * jx] -= flux[blockIdx] * mpsf[id];
          }
        }
      }
    }
    i_group_previous = group_boundaries[i_group];
  }
}


x86 assembly (clang, -O0):
<cu_make_residual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a20,%rsp
mov    0xc0(%rbp),%eax
mov    0xb8(%rbp),%rax
mov    0xb0(%rbp),%rax
mov    0xa8(%rbp),%rax
mov    0xa0(%rbp),%rax
mov    0x98(%rbp),%rax
mov    0x90(%rbp),%eax
mov    0x88(%rbp),%eax
mov    0x80(%rbp),%rax
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movsd  0x1dff(%rip),%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  0x1de7(%rip),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  0x1dcf(%rip),%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
mov    0xc0(%rbp),%esi
lea    0x1e12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    -0x10(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    0x38(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x78(%rbp)
mov    0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  0x1ce5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1343 <cu_make_residual+0x1c3>
lea    0x1d54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  0x1cc5(%rip),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
mulsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x78(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13df <cu_make_residual+0x25f>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x78(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13cc <cu_make_residual+0x24c>
mov    0x40(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%edx
imul   -0x78(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x198(%rbp),%xmm0
ff
movsd  %xmm0,-0x198(%rbp)
ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1385 <cu_make_residual+0x205>
jmp    13d1 <cu_make_residual+0x251>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    136d <cu_make_residual+0x1ed>
cmpl   $0x0,-0x4(%rbp)
jne    1436 <cu_make_residual+0x2b6>
movsd  -0x198(%rbp),%xmm0
ff
movsd  0x1c37(%rip),%xmm1
mulsd  -0xd0(%rbp),%xmm1
mulsd  -0x180(%rbp),%xmm1
ff
mulsd  -0x188(%rbp),%xmm1
ff
mulsd  -0x188(%rbp),%xmm1
ff
movsd  0x1bff(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
jmp    160e <cu_make_residual+0x48e>
cmpl   $0x1,-0x4(%rbp)
jne    1609 <cu_make_residual+0x489>
mov    0x38(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0x1b87(%rip),%xmm0
divsd  -0x138(%rbp),%xmm0
ff
movsd  0x1b77(%rip),%xmm1
divsd  -0x140(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  0x1b5b(%rip),%xmm0
divsd  -0x138(%rbp),%xmm0
ff
movsd  0x1b4b(%rip),%xmm1
divsd  -0x140(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0x19e8(%rbp)
movsd  -0x150(%rbp),%xmm0
ff
movsd  -0x150(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x19e8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0x1ae3(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0x19e0(%rbp)
ff
movsd  -0x150(%rbp),%xmm0
ff
movsd  -0x150(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x19e0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0x1a83(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0x180(%rbp),%xmm1
ff
movsd  -0x128(%rbp),%xmm2
ff
mulsd  -0x130(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
movsd  -0xd8(%rbp),%xmm2
ff
mulsd  -0xe0(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
movsd  0x1a27(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
jmp    160e <cu_make_residual+0x48e>
movq   $0x0,-0x19d8(%rbp)
movl   $0x0,-0x19c4(%rbp)
mov    -0x19c4(%rbp),%eax
cmp    0xc0(%rbp),%eax
jge    2013 <cu_make_residual+0xe93>
movl   $0x0,-0x19bc(%rbp)
mov    -0x19bc(%rbp),%eax
cmp    0x88(%rbp),%eax
jge    16c2 <cu_make_residual+0x542>
movl   $0x0,-0x19c0(%rbp)
mov    -0x19c0(%rbp),%eax
cmp    0x90(%rbp),%eax
jge    16a9 <cu_make_residual+0x529>
mov    -0x19bc(%rbp),%eax
mov    -0x19c0(%rbp),%ecx
imul   0x88(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x11a0(%rbp,%rax,8)
ff ff
mov    -0x19c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c0(%rbp)
jmp    165b <cu_make_residual+0x4db>
jmp    16ae <cu_make_residual+0x52e>
mov    -0x19bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19bc(%rbp)
jmp    163f <cu_make_residual+0x4bf>
mov    0xb0(%rbp),%rax
movslq -0x19c4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0xb8(%rbp),%rax
movslq -0x19c4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0x1926(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xc0(%rbp),%xmm1
ff
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0x18ee(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x19bc(%rbp)
mov    -0x19bc(%rbp),%eax
cmp    0x88(%rbp),%eax
jge    1bd7 <cu_make_residual+0xa57>
movl   $0x0,-0x19c0(%rbp)
mov    -0x19c0(%rbp),%eax
cmp    0x90(%rbp),%eax
jge    1bbe <cu_make_residual+0xa3e>
mov    -0x19bc(%rbp),%eax
mov    -0x19c0(%rbp),%ecx
imul   0x88(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x19bc(%rbp),%esi
mov    -0x19c0(%rbp),%edx
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
mov    0x38(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
mov    0x50(%rbp),%rax
mov    %rax,(%rsp)
call   1060 <integrated_profile@plt>
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1b8d <cu_make_residual+0xa0d>
mov    -0x48(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    182f <cu_make_residual+0x6af>
xor    %eax,%eax
mov    %eax,-0x19ec(%rbp)
jmp    1842 <cu_make_residual+0x6c2>
mov    -0x48(%rbp),%eax
sub    -0x30(%rbp),%eax
cltd
idivl  -0x34(%rbp)
add    $0x1,%eax
mov    %eax,-0x19ec(%rbp)
mov    -0x19ec(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1b7a <cu_make_residual+0x9fa>
mov    0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x50(%rbp)
mov    0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    188e <cu_make_residual+0x70e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x5c(%rbp)
jmp    18a9 <cu_make_residual+0x729>
mov    -0x14(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x48(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x34(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x5c(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x68(%rbp)
cmpl   $0x0,-0x58(%rbp)
jle    193a <cu_make_residual+0x7ba>
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x58(%rbp),%eax
jg     1935 <cu_make_residual+0x7b5>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x58(%rbp),%ecx
sub    -0x60(%rbp),%ecx
cmp    %ecx,%eax
jg     1922 <cu_make_residual+0x7a2>
mov    -0x38(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jne    190b <cu_make_residual+0x78b>
mov    -0x60(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    18e2 <cu_make_residual+0x762>
jmp    1927 <cu_make_residual+0x7a7>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    18cf <cu_make_residual+0x74f>
jmp    193a <cu_make_residual+0x7ba>
cmpl   $0x0,-0x4c(%rbp)
jle    1afe <cu_make_residual+0x97e>
mov    -0x19bc(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x19c0(%rbp),%eax
add    -0x54(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
mov    0x38(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
mov    0x50(%rbp),%rax
mov    %rax,(%rsp)
call   1060 <integrated_profile@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1a76 <cu_make_residual+0x8f6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0xffffffff,-0x70(%rbp)
cmpl   $0x2,-0x70(%rbp)
jge    1a5a <cu_make_residual+0x8da>
movl   $0xffffffff,-0x74(%rbp)
cmpl   $0x2,-0x74(%rbp)
jge    1a47 <cu_make_residual+0x8c7>
mov    -0x20(%rbp),%eax
add    -0x70(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    -0x74(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
mov    0x38(%rbp),%rcx
mov    0x40(%rbp),%r8
mov    0x48(%rbp),%r9
mov    0x50(%rbp),%rax
mov    %rax,(%rsp)
call   1060 <integrated_profile@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    19cb <cu_make_residual+0x84b>
jmp    1a4c <cu_make_residual+0x8cc>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    19ba <cu_make_residual+0x83a>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0x15ee(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x68(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a00(%rbp)
ff
cvttsd2si -0x88(%rbp),%edi
ff
mov    -0x68(%rbp),%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1a00(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x19f8(%rbp)
ff
cvttsd2si -0x90(%rbp),%edi
ff
mov    -0x6c(%rbp),%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x19f8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1b75 <cu_make_residual+0x9f5>
mov    0x68(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a10(%rbp)
ff
cvttsd2si -0x88(%rbp),%edi
ff
mov    -0x68(%rbp),%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1a10(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a08(%rbp)
ff
cvttsd2si -0x90(%rbp),%edi
ff
mov    -0x6c(%rbp),%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x1a08(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1b7a <cu_make_residual+0x9fa>
jmp    1b7f <cu_make_residual+0x9ff>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    180a <cu_make_residual+0x68a>
movsd  -0xb0(%rbp),%xmm0
ff
divsd  -0x170(%rbp),%xmm0
ff
movslq -0x1c(%rbp),%rax
movsd  %xmm0,-0x11a0(%rbp,%rax,8)
ff ff
mov    -0x19c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c0(%rbp)
jmp    178e <cu_make_residual+0x60e>
jmp    1bc3 <cu_make_residual+0xa43>
mov    -0x19bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19bc(%rbp)
jmp    1772 <cu_make_residual+0x5f2>
lea    0x14d3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x19d8(%rbp),%rax
mov    %rax,-0x19d0(%rbp)
mov    -0x19d0(%rbp),%rax
mov    0xa8(%rbp),%rcx
movslq -0x19c4(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
cmp    %rcx,%rax
jge    1fe6 <cu_make_residual+0xe66>
movl   $0x0,-0x38(%rbp)
cmpl   $0x100,-0x38(%rbp)
jge    1c51 <cu_make_residual+0xad1>
movslq -0x38(%rbp),%rax
movsd  -0x11a0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0x9a0(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1c1c <cu_make_residual+0xa9c>
lea    -0x9a0(%rbp),%rcx
mov    $0x10,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1090 <resolve_coeffs_2d@plt>
mov    0x58(%rbp),%rax
mov    -0x19d0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x60(%rbp),%rax
mov    -0x19d0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x13a2(%rip),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  0x139a(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  0x1381(%rip),%xmm1
addsd  -0xb8(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  0x1365(%rip),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  0x135d(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  0x1344(%rip),%xmm1
addsd  -0xc0(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movl   $0x0,-0x19bc(%rbp)
mov    -0x19bc(%rbp),%eax
cmp    0x88(%rbp),%eax
jge    1e28 <cu_make_residual+0xca8>
movl   $0x0,-0x19c0(%rbp)
mov    -0x19c0(%rbp),%eax
cmp    0x90(%rbp),%eax
jge    1e0f <cu_make_residual+0xc8f>
mov    -0x19bc(%rbp),%eax
mov    -0x19c0(%rbp),%ecx
imul   0x88(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x19a0(%rbp,%rax,8)
ff ff
cmpl   $0x1,-0x19bc(%rbp)
jle    1df6 <cu_make_residual+0xc76>
cmpl   $0xe,-0x19bc(%rbp)
jge    1df6 <cu_make_residual+0xc76>
cmpl   $0x1,-0x19c0(%rbp)
jle    1df6 <cu_make_residual+0xc76>
cmpl   $0xe,-0x19c0(%rbp)
jge    1df6 <cu_make_residual+0xc76>
movsd  -0x160(%rbp),%xmm0
ff
movsd  -0x168(%rbp),%xmm1
ff
mov    -0x19bc(%rbp),%eax
sub    $0x2,%eax
mov    -0x19c0(%rbp),%ecx
sub    $0x2,%ecx
imul   0x88(%rbp),%ecx
add    %ecx,%eax
cltq
lea    -0x9a0(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x10,%edi
call   1050 <interpolate_2d@plt>
movslq -0x1c(%rbp),%rax
movsd  %xmm0,-0x19a0(%rbp,%rax,8)
ff ff
jmp    1dfb <cu_make_residual+0xc7b>
mov    -0x19c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c0(%rbp)
jmp    1d36 <cu_make_residual+0xbb6>
jmp    1e14 <cu_make_residual+0xc94>
mov    -0x19bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19bc(%rbp)
jmp    1d1a <cu_make_residual+0xb9a>
movl   $0x0,-0x19bc(%rbp)
cmpl   $0x10,-0x19bc(%rbp)
jge    1fca <cu_make_residual+0xe4a>
movl   $0x0,-0x19c0(%rbp)
cmpl   $0x10,-0x19c0(%rbp)
jge    1fb1 <cu_make_residual+0xe31>
mov    -0x19bc(%rbp),%eax
mov    -0x19c0(%rbp),%ecx
imul   0x88(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x19bc(%rbp),%xmm0
ff
movsd  0x11d2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1070 <pow@plt>
movsd  %xmm0,-0x1a18(%rbp)
ff
cvtsi2sdl -0x19c0(%rbp),%xmm0
ff
movsd  0x11a8(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1070 <pow@plt>
movsd  -0x1a18(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1f98 <cu_make_residual+0xe18>
movsd  0x1160(%rip),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
call   10a0 <floor@plt>
add    -0x19bc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0x1151(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x7c(%rbp)
movsd  0x112e(%rip),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
call   10a0 <floor@plt>
add    -0x19c0(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0x111f(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x80(%rbp)
mov    0x70(%rbp),%rax
mov    -0x19d0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rax
movsd  -0x19a0(%rbp,%rax,8),%xmm2
ff ff
mov    0x98(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1f9d <cu_make_residual+0xe1d>
mov    -0x19c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c0(%rbp)
jmp    1e49 <cu_make_residual+0xcc9>
jmp    1fb6 <cu_make_residual+0xe36>
mov    -0x19bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19bc(%rbp)
jmp    1e32 <cu_make_residual+0xcb2>
jmp    1fcf <cu_make_residual+0xe4f>
mov    -0x19d0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x19d0(%rbp)
jmp    1bf3 <cu_make_residual+0xa73>
mov    0xa8(%rbp),%rax
movslq -0x19c4(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
mov    %rax,-0x19d8(%rbp)
mov    -0x19c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c4(%rbp)
jmp    1623 <cu_make_residual+0x4a3>
add    $0x1a20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cu_make_residual>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1998,%rsp
mov    %r9d,0x8c(%rsp)
mov    %r8,0x100(%rsp)
mov    %rcx,0xf8(%rsp)
mov    %edx,%r15d
mov    %rsi,0x128(%rsp)
mov    %edi,0x3c(%rsp)
mov    0x1a80(%rsp),%esi
mov    0x19f8(%rsp),%rbx
lea    0x1e72(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cvttsd2si (%rbx),%r12d
movsd  0x8(%rbx),%xmm1
movups 0x10(%rbx),%xmm0
movaps %xmm0,0xc0(%rsp)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0xb8(%rsp)
ucomisd 0x1ddf(%rip),%xmm0
jbe    124c <cu_make_residual+0xac>
lea    0x1e63(%rip),%rdi
movsd  %xmm1,0x10(%rsp)
call   1030 <puts@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x1dbd(%rip),%xmm0
movsd  %xmm0,0xb8(%rsp)
mov    0x1a00(%rsp),%r10
xorpd  %xmm2,%xmm2
cmp    $0x3,%r12d
jl     132f <cu_make_residual+0x18f>
mov    %r12d,%r13d
add    $0xffffffff,%r12d
lea    -0x1(%r12),%rcx
lea    -0x2(%r12),%r8
mov    %ecx,%r9d
and    $0x3,%r9d
mov    %r13,%rdi
shl    $0x5,%rdi
lea    0x0(,%r13,8),%rbp
lea    0x0(,%rbp,2),%rdx
add    %rbp,%rdx
mov    %r13,%rax
shl    $0x4,%rax
and    $0xfffffffffffffffc,%rcx
neg    %rcx
xorpd  %xmm2,%xmm2
mov    $0x1,%r11d
jmp    12bd <cu_make_residual+0x11d>
xchg   %ax,%ax
add    $0x1,%r11
add    $0x8,%r10
cmp    %r12,%r11
je     132f <cu_make_residual+0x18f>
mov    $0x1,%esi
cmp    $0x3,%r8
jb     12fe <cu_make_residual+0x15e>
mov    %r10,%rbx
nopl   0x0(%rax,%rax,1)
addsd  0x8(%rbx,%r13,8),%xmm2
addsd  0x8(%rbx,%rax,1),%xmm2
addsd  0x8(%rbx,%rdx,1),%xmm2
addsd  0x8(%rbx,%rdi,1),%xmm2
add    %rdi,%rbx
lea    (%rcx,%rsi,1),%r14
add    $0x4,%r14
add    $0x4,%rsi
cmp    $0x1,%r14
jne    12d0 <cu_make_residual+0x130>
test   %r9,%r9
je     12b0 <cu_make_residual+0x110>
imul   %r13,%rsi
add    %r11,%rsi
mov    0x1a00(%rsp),%rbx
lea    (%rbx,%rsi,8),%rsi
mov    %r9,%rbx
nopl   0x0(%rax)
addsd  (%rsi),%xmm2
add    %rbp,%rsi
add    $0xffffffffffffffff,%rbx
jne    1320 <cu_make_residual+0x180>
jmp    12b0 <cu_make_residual+0x110>
mov    0x3c(%rsp),%ebp
cmp    $0x1,%ebp
je     1378 <cu_make_residual+0x1d8>
test   %ebp,%ebp
mov    0x1a80(%rsp),%ebx
jne    136b <cu_make_residual+0x1cb>
addsd  %xmm1,%xmm1
mulsd  0x1cb9(%rip),%xmm1
movsd  0x1cc1(%rip),%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x1ca9(%rip),%xmm2
addsd  %xmm1,%xmm2
test   %ebx,%ebx
jg     14c6 <cu_make_residual+0x326>
jmp    2208 <cu_make_residual+0x1068>
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x58(%rsp)
mov    0x19f8(%rsp),%rax
movsd  0x40(%rax),%xmm3
movapd 0xc0(%rsp),%xmm1
mulpd  %xmm1,%xmm1
mulsd  %xmm3,%xmm3
movapd 0x1ca6(%rip),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    0x1a80(%rsp),%ebx
movapd %xmm1,0x60(%rsp)
movapd %xmm0,0x40(%rsp)
jb     13ed <cu_make_residual+0x24d>
sqrtsd %xmm0,%xmm0
jmp    13fc <cu_make_residual+0x25c>
call   10a0 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd 0x60(%rsp),%xmm1
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     140f <cu_make_residual+0x26f>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    1418 <cu_make_residual+0x278>
call   10a0 <sqrt@plt>
movapd %xmm0,%xmm1
movapd 0x40(%rsp),%xmm0
movapd %xmm1,0x20(%rsp)
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     1434 <cu_make_residual+0x294>
sqrtsd %xmm0,%xmm0
jmp    143d <cu_make_residual+0x29d>
call   10a0 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd 0x60(%rsp),%xmm1
subsd  %xmm0,%xmm1
ucomisd %xmm2,%xmm1
jb     1456 <cu_make_residual+0x2b6>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    145f <cu_make_residual+0x2bf>
movapd %xmm1,%xmm0
call   10a0 <sqrt@plt>
movsd  0x58(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd 0x20(%rsp),%xmm4
unpcklpd %xmm0,%xmm4
movapd 0x1bd3(%rip),%xmm3
divpd  %xmm4,%xmm3
mulsd  0x1b7f(%rip),%xmm1
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movapd 0xc0(%rsp),%xmm3
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
mulsd  0x1b56(%rip),%xmm2
addsd  %xmm0,%xmm2
test   %ebx,%ebx
jle    2208 <cu_make_residual+0x1068>
mov    0xf8(%rsp),%rcx
lea    0x1(%rcx),%eax
add    $0x2,%ecx
imul   %eax,%ecx
mov    0x100(%rsp),%rdx
lea    0x1(%rdx),%eax
add    $0x2,%edx
imul   %eax,%edx
mov    %ecx,%esi
shr    $0x1f,%esi
mov    %edx,%eax
shr    $0x1f,%eax
add    %ecx,%esi
add    %edx,%eax
sar    %esi
sar    %eax
mov    %eax,0x90(%rsp)
mov    0x128(%rsp),%rax
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xb8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0xb8(%rsp)
add    $0xffffffff,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movslq 0x1a48(%rsp),%rcx
mov    %ebx,%eax
mov    %rcx,%rbx
mov    %rax,0x160(%rsp)
mov    0x1a50(%rsp),%ecx
mov    %ecx,%eax
and    $0x3,%eax
mov    %rax,0xf0(%rsp)
mov    %ecx,%r10d
and    $0xfffffffc,%r10d
mov    %rbx,%r12
shl    $0x4,%r12
mov    %rbx,%r14
shl    $0x5,%r14
lea    (%rbx,%rbx,1),%rax
xor    $0xfffffffffffffffe,%rax
lea    (%rsp,%rax,8),%rax
add    $0x1190,%rax
mov    %rax,0x168(%rsp)
movsd  0x1a8b(%rip),%xmm3
movsd  %xmm0,0x140(%rsp)
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x130(%rsp)
movsd  %xmm1,0x148(%rsp)
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x138(%rsp)
mov    0x1a10(%rsp),%rdi
mov    %esi,0x94(%rsp)
movslq %esi,%rax
mov    %rax,0x188(%rsp)
mov    %ebx,%eax
mov    %rax,0xd8(%rsp)
mov    0x8c(%rsp),%eax
mov    %rax,0x180(%rsp)
lea    -0x1(%rcx),%rax
mov    %rax,0x158(%rsp)
lea    0x0(,%rbx,8),%r13
lea    0x0(,%r13,2),%rax
add    %r13,%rax
mov    %rax,0x150(%rsp)
xor    %ecx,%ecx
xor    %eax,%eax
mov    %rax,0x78(%rsp)
movsd  %xmm2,0x58(%rsp)
mov    %rbx,0xa0(%rsp)
mov    %r10,0xa8(%rsp)
mov    %r12,0x110(%rsp)
mov    %r14,0x108(%rsp)
mov    %r13,0xc0(%rsp)
jmp    16a3 <cu_make_residual+0x503>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x3c(%rsp),%ebp
mov    0xa0(%rsp),%rbx
mov    0xa8(%rsp),%r10
mov    0x110(%rsp),%r12
mov    0x108(%rsp),%r14
add    $0x1,%rcx
mov    %rax,0x78(%rsp)
cmp    0x160(%rsp),%rcx
mov    0x1a10(%rsp),%rdi
je     2208 <cu_make_residual+0x1068>
mov    %rcx,0xd0(%rsp)
cmpl   $0x0,0x1a48(%rsp)
jle    1f30 <cu_make_residual+0xd90>
lea    0x190(%rsp),%r9
xor    %ecx,%ecx
mov    0x158(%rsp),%r8
mov    0x150(%rsp),%rax
jmp    16f6 <cu_make_residual+0x556>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rcx
add    $0x8,%r9
cmp    0xd8(%rsp),%rcx
je     1790 <cu_make_residual+0x5f0>
cmpl   $0x0,0x1a50(%rsp)
jle    16e0 <cu_make_residual+0x540>
cmp    $0x3,%r8
jae    1710 <cu_make_residual+0x570>
xor    %edx,%edx
jmp    174b <cu_make_residual+0x5ab>
nopw   0x0(%rax,%rax,1)
mov    %r9,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movq   $0x0,(%rsi)
movq   $0x0,(%rsi,%rbx,8)
movq   $0x0,(%rsi,%r12,1)
movq   $0x0,(%rsi,%rax,1)
add    $0x4,%rdx
add    %r14,%rsi
cmp    %rdx,%r10
jne    1720 <cu_make_residual+0x580>
cmpq   $0x0,0xf0(%rsp)
je     16e0 <cu_make_residual+0x540>
imul   %rbx,%rdx
add    %rcx,%rdx
lea    (%rsp,%rdx,8),%rdx
add    $0x190,%rdx
mov    0xf0(%rsp),%rsi
movq   $0x0,(%rdx)
add    %r13,%rdx
add    $0xffffffffffffffff,%rsi
jne    1770 <cu_make_residual+0x5d0>
jmp    16e0 <cu_make_residual+0x540>
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,0x1a48(%rsp)
jle    1f30 <cu_make_residual+0xd90>
mov    0x1a70(%rsp),%rax
mov    0xd0(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x1a78(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm1
mov    0x1a08(%rsp),%r9
movsd  0x130(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0x138(%rsp),%xmm3
addsd  %xmm0,%xmm3
divsd  0x148(%rsp),%xmm3
cvttsd2si %xmm3,%eax
mov    %eax,0xec(%rsp)
divsd  0x140(%rsp),%xmm2
cvttsd2si %xmm2,%eax
mov    %eax,0xe8(%rsp)
xor    %eax,%eax
mov    %rax,0x98(%rsp)
movsd  %xmm0,0x40(%rsp)
movsd  %xmm1,0x20(%rsp)
jmp    1855 <cu_make_residual+0x6b5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x98(%rsp),%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x98(%rsp)
cmp    0xd8(%rsp),%rcx
je     1f30 <cu_make_residual+0xd90>
cmpl   $0x0,0x1a50(%rsp)
jle    1830 <cu_make_residual+0x690>
xor    %ecx,%ecx
jmp    18d5 <cu_make_residual+0x735>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%r15d
xorpd  %xmm3,%xmm3
movsd  0x58(%rsp),%xmm2
mov    0x1a10(%rsp),%rdi
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0xb0(%rsp),%rcx
mov    0xa8(%rsp),%r10
divsd  %xmm2,%xmm3
mov    0x170(%rsp),%rax
movsd  %xmm3,0x190(%rsp,%rax,8)
add    $0x1,%rcx
mov    0x1a50(%rsp),%eax
cmp    %rax,%rcx
mov    0x1a08(%rsp),%r9
mov    %r15d,%ebp
je     1830 <cu_make_residual+0x690>
mov    %rcx,%rax
imul   %rbx,%rax
mov    0x98(%rsp),%rsi
add    %rsi,%rax
mov    %rax,0x170(%rsp)
mov    %rdi,(%rsp)
mov    %ebp,%edi
mov    %rcx,0xb0(%rsp)
mov    %ecx,%edx
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
call   1080 <integrated_profile@plt>
movsd  %xmm0,0x118(%rsp)
cmpl   $0x0,0x8c(%rsp)
jle    1870 <cu_make_residual+0x6d0>
mov    %ebp,%r15d
xorpd  %xmm3,%xmm3
xor    %esi,%esi
xor    %ebp,%ebp
movsd  0x58(%rsp),%xmm2
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0xb0(%rsp),%rcx
mov    0xa8(%rsp),%r10
jmp    197d <cu_make_residual+0x7dd>
nopw   0x0(%rax,%rax,1)
mov    0x1a10(%rsp),%rdi
add    $0x1,%rbp
add    $0xffffffff,%esi
cmp    0x180(%rsp),%rbp
je     18a1 <cu_make_residual+0x701>
mov    $0x0,%eax
cmp    0x188(%rsp),%rbp
jl     19a0 <cu_make_residual+0x800>
mov    %ebp,%eax
sub    0x94(%rsp),%eax
cltd
idivl  0x90(%rsp)
add    $0x1,%eax
cmp    0x19d0(%rsp),%eax
jge    1960 <cu_make_residual+0x7c0>
mov    %rbp,0x80(%rsp)
mov    %rsi,0x120(%rsp)
mov    %eax,%r8d
sub    $0x1,%r8d
mov    0x100(%rsp),%r10
cmovb  0xf8(%rsp),%r10d
imul   0x90(%rsp),%r8d
add    0x94(%rsp),%r8d
xor    %r12d,%r12d
mov    %eax,0x18(%rsp)
cmp    $0x1,%eax
cmovb  %r12d,%r8d
mov    $0x0,%r13d
test   %r10d,%r10d
jle    1b00 <cu_make_residual+0x960>
mov    0x80(%rsp),%rax
mov    %eax,%esi
sub    %r8d,%esi
lea    0x1(%r10),%r11d
add    0x120(%rsp),%r8d
xor    %r14d,%r14d
xor    %ebp,%ebp
xor    %r13d,%r13d
xor    %r12d,%r12d
mov    %r8,0x60(%rsp)
jmp    1a42 <cu_make_residual+0x8a2>
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbp),%eax
add    $0xffffffff,%r11d
cmp    %ebp,%r10d
mov    %eax,%ebp
je     1b00 <cu_make_residual+0x960>
mov    %r10d,%edx
sub    %ebp,%edx
jl     1a30 <cu_make_residual+0x890>
xor    %ecx,%ecx
cmp    $0x3,%edx
jb     1ac8 <cu_make_residual+0x928>
mov    %r11d,%edi
and    $0xfffffffc,%edi
lea    (%r8,%r14,1),%r9d
xor    %ecx,%ecx
mov    %r14,0x10(%rsp)
mov    %r14d,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rbx),%edx
lea    0x1(%rcx),%r14d
lea    0x2(%rbx),%r8d
mov    %r9d,%r15d
add    %ecx,%r15d
cmove  %ecx,%r12d
lea    0x2(%rcx),%eax
cmove  %ebp,%r13d
cmp    %esi,%edx
cmove  %r14d,%r12d
cmove  %ebp,%r13d
lea    0x3(%rbx),%edx
cmp    %esi,%r8d
cmove  %eax,%r12d
lea    0x3(%rcx),%eax
cmove  %ebp,%r13d
cmp    %esi,%edx
cmove  %eax,%r12d
cmove  %ebp,%r13d
add    $0x4,%ebx
add    $0x4,%ecx
cmp    %edi,%ecx
jne    1a70 <cu_make_residual+0x8d0>
mov    0x10(%rsp),%r14
add    %ecx,%r14d
mov    0x60(%rsp),%r8
test   $0x3,%r11b
je     1a30 <cu_make_residual+0x890>
mov    %r11d,%edx
and    $0x3,%edx
neg    %edx
lea    (%r8,%r14,1),%ebx
xor    %edi,%edi
cmp    %edi,%ebx
cmove  %ecx,%r12d
cmove  %ebp,%r13d
add    $0x1,%ecx
add    $0xffffffff,%edi
cmp    %edi,%edx
jne    1ae0 <cu_make_residual+0x940>
sub    %edi,%r14d
jmp    1a30 <cu_make_residual+0x890>
nopl   0x0(%rax)
mov    0x18(%rsp),%eax
test   %eax,%eax
movsd  %xmm3,0x178(%rsp)
jle    1e60 <cu_make_residual+0xcc0>
movslq %eax,%rbp
mov    0x19e0(%rsp),%rax
mov    (%rax,%rbp,4),%r15d
add    0x98(%rsp),%r15d
mov    0x19e8(%rsp),%rax
mov    (%rax,%rbp,4),%r14d
add    0xb0(%rsp),%r14d
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    0x3c(%rsp),%ebx
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
mov    0x19f0(%rsp),%rax
cmpl   $0x0,(%rax,%rbp,4)
je     1e2f <cu_make_residual+0xc8f>
lea    -0x1(%r14),%edx
mov    %edx,0x10(%rsp)
lea    -0x1(%r15),%esi
mov    %esi,0xe4(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x1467(%rip),%xmm0
movsd  %xmm0,0x60(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    0xe4(%rsp),%ebp
mov    %ebp,%esi
mov    %r14d,%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x1(%r14),%edx
mov    %edx,0x60(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rbp
mov    %rbp,%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    0x10(%rsp),%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbp,%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x1a10(%rsp),%rbp
mov    %rbp,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbp,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    0x60(%rsp),%ebp
mov    %ebp,%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
add    $0x1,%r15d
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    0x10(%rsp),%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r9
call   1080 <integrated_profile@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    0x1a08(%rsp),%r14
mov    %r14,%r9
call   1080 <integrated_profile@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x1a10(%rsp),%rax
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0x19f8(%rsp),%rcx
mov    0x1a00(%rsp),%r8
mov    %r14,%r9
call   1080 <integrated_profile@plt>
addsd  0x10(%rsp),%xmm0
divsd  0x11f9(%rip),%xmm0
mov    %ebx,%r15d
mov    0xa0(%rsp),%rbx
mov    0x80(%rsp),%rcx
subsd  0x118(%rsp),%xmm0
mov    0x1a28(%rsp),%rax
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rsp)
jmp    1e91 <cu_make_residual+0xcf1>
mov    0x1a28(%rsp),%rax
mov    0x80(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  0x118(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x3c(%rsp),%r15d
mov    0xa0(%rsp),%rbx
mov    0xec(%rsp),%edi
mov    %r13d,%esi
call   1090 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0xe8(%rsp),%edi
mov    %r12d,%esi
call   1090 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x178(%rsp),%xmm3
addsd  %xmm0,%xmm3
movsd  0x58(%rsp),%xmm2
mov    0xa8(%rsp),%r10
mov    0x110(%rsp),%r12
mov    0x108(%rsp),%r14
mov    0x1a10(%rsp),%rdi
mov    0xc0(%rsp),%r13
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    0xb0(%rsp),%rcx
mov    0x120(%rsp),%rsi
mov    0x80(%rsp),%rbp
jmp    1968 <cu_make_residual+0x7c8>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1149(%rip),%rdi
mov    %r10,%r15
call   1030 <puts@plt>
mov    %r15,%r10
mov    0x1a68(%rsp),%rax
mov    0xd0(%rsp),%rcx
movslq (%rax,%rcx,4),%rax
mov    0x78(%rsp),%rdx
cmp    %rax,%rdx
jge    1684 <cu_make_residual+0x4e4>
mov    %rdx,%rbp
jmp    1f96 <cu_make_residual+0xdf6>
nopl   0x0(%rax)
mov    0x78(%rsp),%rbp
add    $0x1,%rbp
mov    0x1a68(%rsp),%rax
mov    0xd0(%rsp),%rcx
movslq (%rax,%rcx,4),%rax
cmp    %rax,%rbp
jge    1660 <cu_make_residual+0x4c0>
mov    $0x800,%edx
lea    0x1190(%rsp),%rbx
mov    %rbx,%rdi
lea    0x190(%rsp),%rsi
call   1060 <memcpy@plt>
mov    $0x10,%edi
mov    $0x10,%esi
mov    $0x10,%edx
mov    %rbx,%rcx
call   10b0 <resolve_coeffs_2d@plt>
mov    0x1a18(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
movsd  0x1051(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movapd %xmm1,%xmm0
movsd  0x1043(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <ceil@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x1a20(%rsp),%rax
mov    %rbp,0x78(%rsp)
movsd  (%rax,%rbp,8),%xmm0
addsd  0x1012(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
addsd  0x100c(%rip),%xmm0
call   1040 <ceil@plt>
movsd  %xmm0,0x20(%rsp)
cmpl   $0x0,0x1a48(%rsp)
jle    2110 <cu_make_residual+0xf70>
movsd  0x10(%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
subsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x168(%rsp),%r15
lea    0x990(%rsp),%r13
xor    %r14d,%r14d
jmp    2096 <cu_make_residual+0xef6>
xchg   %ax,%ax
add    $0x1,%r14
add    $0x8,%r13
add    $0x8,%r15
cmp    0xd8(%rsp),%r14
je     2110 <cu_make_residual+0xf70>
cmpl   $0x0,0x1a50(%rsp)
jle    2080 <cu_make_residual+0xee0>
lea    -0x2(%r14),%r12d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    20c8 <cu_make_residual+0xf28>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
add    0xc0(%rsp),%rbx
mov    0x1a50(%rsp),%eax
cmp    %rbp,%rax
je     2080 <cu_make_residual+0xee0>
movq   $0x0,0x0(%r13,%rbx,1)
cmp    $0xb,%r12d
ja     20b0 <cu_make_residual+0xf10>
cmp    $0x2,%rbp
jb     20b0 <cu_make_residual+0xf10>
cmp    $0xd,%rbp
ja     20b0 <cu_make_residual+0xf10>
lea    (%r15,%rbx,1),%rsi
movsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    $0x10,%edi
call   1070 <interpolate_2d@plt>
movsd  %xmm0,0x0(%r13,%rbx,1)
jmp    20b0 <cu_make_residual+0xf10>
cs nopw 0x0(%rax,%rax,1)
lea    0x990(%rsp),%r15
xor    %r12d,%r12d
mov    0xc0(%rsp),%r13
jmp    2147 <cu_make_residual+0xfa7>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r12
mov    0x20(%rsp),%r15
add    $0x8,%r15
cmp    $0x10,%r12
je     1f70 <cu_make_residual+0xdd0>
lea    -0x8(%r12),%r14d
mov    $0xfffffff8,%ebp
mov    $0x10,%ebx
mov    %r15,0x20(%rsp)
jmp    216c <cu_make_residual+0xfcc>
nopl   (%rax)
add    $0x1,%ebp
add    %r13,%r15
add    $0xffffffffffffffff,%rbx
je     2130 <cu_make_residual+0xf90>
mov    %r14d,%edi
mov    $0x2,%esi
call   1090 <pow@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebp,%edi
mov    $0x2,%esi
call   1090 <pow@plt>
addsd  0x10(%rsp),%xmm0
movsd  0xb8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    2160 <cu_make_residual+0xfc0>
movsd  0x60(%rsp),%xmm0
call   10c0 <floor@plt>
mov    %rax,%r13
add    %r12d,%r13d
movsd  0x40(%rsp),%xmm0
call   10c0 <floor@plt>
add    %ebp,%eax
mov    0x1a30(%rsp),%rcx
mov    0x78(%rsp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
imul   0x128(%rsp),%eax
add    %r13d,%eax
add    $0xfffffff8,%eax
mov    0xc0(%rsp),%r13
cltq
mov    0x1a58(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm1
mulsd  (%r15),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rax,8)
jmp    2160 <cu_make_residual+0xfc0>
add    $0x1998,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Doing photometry for %d groups\0A\00"
@.str.1 = [49 x i8] c"Warning: resetting psf_rad to maximum value 7.0\0A\00"
@.str.2 = [14 x i8] c"psf computed\0A\00"
define void @cu_make_residual(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8, i32* %9, i32* %10, double* %11, double* %12, double* %13, double* %14, double* %15, double* %16, double* %17, double* %18, double* %19, i64 %20, i32 %21, i32 %22, double* %23, double* %24, i32* %25, double* %26, double* %27, i32 %28) {
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32*
%39 = alloca i32*
%40 = alloca i32*
%41 = alloca double*
%42 = alloca double*
%43 = alloca double*
%44 = alloca double*
%45 = alloca double*
%46 = alloca double*
%47 = alloca double*
%48 = alloca double*
%49 = alloca double*
%50 = alloca i64
%51 = alloca i32
%52 = alloca i32
%53 = alloca double*
%54 = alloca double*
%55 = alloca i32*
%56 = alloca double*
%57 = alloca double*
%58 = alloca i32
%59 = alloca i32
%60 = alloca i32
%61 = alloca i32
%62 = alloca i32
%63 = alloca i32
%64 = alloca i32
%65 = alloca i32
%66 = alloca i32
%67 = alloca i32
%68 = alloca i32
%69 = alloca i32
%70 = alloca i32
%71 = alloca i32
%72 = alloca i32
%73 = alloca i32
%74 = alloca i32
%75 = alloca i32
%76 = alloca i32
%77 = alloca i32
%78 = alloca i32
%79 = alloca i32
%80 = alloca i32
%81 = alloca i32
%82 = alloca i32
%83 = alloca i32
%84 = alloca i32
%85 = alloca double
%86 = alloca double
%87 = alloca double
%88 = alloca double
%89 = alloca double
%90 = alloca double
%91 = alloca double
%92 = alloca double
%93 = alloca double
%94 = alloca double
%95 = alloca double
%96 = alloca double
%97 = alloca double
%98 = alloca double
%99 = alloca double
%100 = alloca double
%101 = alloca double
%102 = alloca double
%103 = alloca double
%104 = alloca double
%105 = alloca double
%106 = alloca double
%107 = alloca double
%108 = alloca double
%109 = alloca double
%110 = alloca double
%111 = alloca double
%112 = alloca double
%113 = alloca double
%114 = alloca double
%115 = alloca double
%116 = alloca double
%117 = alloca double
%118 = alloca double
%119 = alloca double
%120 = alloca [256 x double]
%121 = alloca [256 x double]
%122 = alloca [256 x double]
%123 = alloca double
%124 = alloca double
%125 = alloca double
%126 = alloca i32
%127 = alloca i32
%128 = alloca i32
%129 = alloca i64
%130 = alloca i64
store i32 %0, i32* %30
store i32 %1, i32* %31
store i32 %2, i32* %32
store i32 %3, i32* %33
store i32 %4, i32* %34
store i32 %5, i32* %35
store i32 %6, i32* %36
store i32 %7, i32* %37
store i32* %8, i32** %38
store i32* %9, i32** %39
store i32* %10, i32** %40
store double* %11, double** %41
store double* %12, double** %42
store double* %13, double** %43
store double* %14, double** %44
store double* %15, double** %45
store double* %16, double** %46
store double* %17, double** %47
store double* %18, double** %48
store double* %19, double** %49
store i64 %20, i64* %50
store i32 %21, i32* %51
store i32 %22, i32* %52
store double* %23, double** %53
store double* %24, double** %54
store i32* %25, i32** %55
store double* %26, double** %56
store double* %27, double** %57
store i32 %28, i32* %58
store double 0x400921FB53C8D4F1, double* %116
store double 0x3FEB2DA4E958F48E, double* %117
store double 5.000000e+00, double* %118
%131 = load i32, i32* %58
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %131)
%133 = load i32, i32* %33
%134 = add nsw i32 %133, 1
%135 = load i32, i32* %33
%136 = add nsw i32 %135, 2
%137 = mul nsw i32 %134, %136
%138 = sdiv i32 %137, 2
store i32 %138, i32* %64
%139 = load i32, i32* %34
%140 = add nsw i32 %139, 1
%141 = load i32, i32* %34
%142 = add nsw i32 %141, 2
%143 = mul nsw i32 %140, %142
%144 = sdiv i32 %143, 2
store i32 %144, i32* %65
%145 = load double*, double** %41
%146 = getelementptr inbounds double, double* %145, i64 0
%147 = load double, double* %146
%148 = fptosi double %147 to i32
store i32 %148, i32* %82
%149 = load double*, double** %41
%150 = getelementptr inbounds double, double* %149, i64 1
%151 = load double, double* %150
store double %151, double* %94
%152 = load double*, double** %41
%153 = getelementptr inbounds double, double* %152, i64 2
%154 = load double, double* %153
store double %154, double* %95
%155 = load double*, double** %41
%156 = getelementptr inbounds double, double* %155, i64 3
%157 = load double, double* %156
store double %157, double* %96
%158 = load double*, double** %41
%159 = getelementptr inbounds double, double* %158, i64 4
%160 = load double, double* %159
store double %160, double* %99
%161 = load double*, double** %41
%162 = getelementptr inbounds double, double* %161, i64 5
%163 = load double, double* %162
store double %163, double* %98
%164 = load double*, double** %41
%165 = getelementptr inbounds double, double* %164, i64 6
%166 = load double, double* %165
store double %166, double* %100
%167 = load double*, double** %41
%168 = getelementptr inbounds double, double* %167, i64 7
%169 = load double, double* %168
store double %169, double* %102
%170 = load double, double* %100
%171 = fcmp ogt double %170, 7.000000e+00
br i1 %171, label %172, label %174
172: ; preds = %29
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
store double 7.000000e+00, double* %100
br label %174
174: ; preds = %172, %29
%175 = load double, double* %100
%176 = load double, double* %100
%177 = fmul double %175, %176
store double %177, double* %101
store double 0.000000e+00, double* %119
store i32 1, i32* %66
br label %178
178: ; preds = %205, %174
%179 = load i32, i32* %66
%180 = load i32, i32* %82
%181 = sub nsw i32 %180, 1
%182 = icmp slt i32 %179, %181
br i1 %182, label %183, label %208
183: ; preds = %178
store i32 1, i32* %67
br label %184
184: ; preds = %201, %183
%185 = load i32, i32* %67
%186 = load i32, i32* %82
%187 = sub nsw i32 %186, 1
%188 = icmp slt i32 %185, %187
br i1 %188, label %189, label %204
189: ; preds = %184
%190 = load double*, double** %42
%191 = load i32, i32* %66
%192 = load i32, i32* %67
%193 = load i32, i32* %82
%194 = mul nsw i32 %192, %193
%195 = add nsw i32 %191, %194
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds double, double* %190, i64 %196
%198 = load double, double* %197
%199 = load double, double* %119
%200 = fadd double %199, %198
store double %200, double* %119
br label %201
201: ; preds = %189
%202 = load i32, i32* %67
%203 = add nsw i32 %202, 1
store i32 %203, i32* %67
br label %184
204: ; preds = %184
br label %205
205: ; preds = %204
%206 = load i32, i32* %66
%207 = add nsw i32 %206, 1
store i32 %207, i32* %66
br label %178
208: ; preds = %178
%209 = load i32, i32* %30
%210 = icmp eq i32 %209, 0
br i1 %210, label %211, label %222
211: ; preds = %208
%212 = load double, double* %119
%213 = load double, double* %94
%214 = fmul double %213, 2.000000e+00
%215 = load double, double* %116
%216 = fmul double %214, %215
%217 = load double, double* %117
%218 = fmul double %216, %217
%219 = load double, double* %117
%220 = fmul double %218, %219
%221 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %212, double %220)
store double %221, double* %114
br label %280
222: ; preds = %208
%223 = load i32, i32* %30
%224 = icmp eq i32 %223, 1
br i1 %224, label %225, label %279
225: ; preds = %222
%226 = load double*, double** %41
%227 = getelementptr inbounds double, double* %226, i64 8
%228 = load double, double* %227
store double %228, double* %97
%229 = load double, double* %95
%230 = load double, double* %95
%231 = fmul double %229, %230
store double %231, double* %107
%232 = load double, double* %96
%233 = load double, double* %96
%234 = fmul double %232, %233
store double %234, double* %108
%235 = load double, double* %97
%236 = load double, double* %97
%237 = fmul double %235, %236
store double %237, double* %109
%238 = load double, double* %107
%239 = fdiv double 1.000000e+00, %238
%240 = load double, double* %108
%241 = fdiv double 1.000000e+00, %240
%242 = fsub double %239, %241
store double %242, double* %110
%243 = load double, double* %107
%244 = fdiv double 1.000000e+00, %243
%245 = load double, double* %108
%246 = fdiv double 1.000000e+00, %245
%247 = fadd double %244, %246
store double %247, double* %111
%248 = load double, double* %111
%249 = load double, double* %110
%250 = load double, double* %110
%251 = load double, double* %109
%252 = call double @llvm.fmuladd.f64(double %249, double %250, double %251)
%253 = call double @sqrt(double %252)
%254 = fadd double %248, %253
%255 = call double @sqrt(double %254)
%256 = fdiv double 1.000000e+00, %255
store double %256, double* %105
%257 = load double, double* %111
%258 = load double, double* %110
%259 = load double, double* %110
%260 = load double, double* %109
%261 = call double @llvm.fmuladd.f64(double %258, double %259, double %260)
%262 = call double @sqrt(double %261)
%263 = fsub double %257, %262
%264 = call double @sqrt(double %263)
%265 = fdiv double 1.000000e+00, %264
store double %265, double* %106
%266 = load double, double* %119
%267 = load double, double* %94
%268 = load double, double* %116
%269 = fmul double %267, %268
%270 = load double, double* %105
%271 = load double, double* %106
%272 = fmul double %270, %271
%273 = fmul double %269, %272
%274 = load double, double* %95
%275 = load double, double* %96
%276 = fmul double %274, %275
%277 = fdiv double %273, %276
%278 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %266, double %277)
store double %278, double* %114
br label %279
279: ; preds = %225, %222
br label %280
280: ; preds = %279, %211
store i64 0, i64* %130
store i32 0, i32* %128
br label %281
281: ; preds = %757, %280
%282 = load i32, i32* %128
%283 = load i32, i32* %58
%284 = icmp slt i32 %282, %283
br i1 %284, label %285, label %760
285: ; preds = %281
store i32 0, i32* %126
br label %286
286: ; preds = %308, %285
%287 = load i32, i32* %126
%288 = load i32, i32* %51
%289 = icmp slt i32 %287, %288
br i1 %289, label %290, label %311
290: ; preds = %286
store i32 0, i32* %127
br label %291
291: ; preds = %304, %290
%292 = load i32, i32* %127
%293 = load i32, i32* %52
%294 = icmp slt i32 %292, %293
br i1 %294, label %295, label %307
295: ; preds = %291
%296 = load i32, i32* %126
%297 = load i32, i32* %127
%298 = load i32, i32* %51
%299 = mul nsw i32 %297, %298
%300 = add nsw i32 %296, %299
store i32 %300, i32* %59
%301 = load i32, i32* %59
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds [256 x double], [256 x double]* %121, i64 0, i64 %302
store double 0.000000e+00, double* %303
br label %304
304: ; preds = %295
%305 = load i32, i32* %127
%306 = add nsw i32 %305, 1
store i32 %306, i32* %127
br label %291
307: ; preds = %291
br label %308
308: ; preds = %307
%309 = load i32, i32* %126
%310 = add nsw i32 %309, 1
store i32 %310, i32* %126
br label %286
311: ; preds = %286
%312 = load double*, double** %56
%313 = load i32, i32* %128
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds double, double* %312, i64 %314
%316 = load double, double* %315
store double %316, double* %91
%317 = load double*, double** %57
%318 = load i32, i32* %128
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds double, double* %317, i64 %319
%321 = load double, double* %320
store double %321, double* %92
%322 = load double, double* %91
%323 = load i32, i32* %31
%324 = sub nsw i32 %323, 1
%325 = sitofp i32 %324 to double
%326 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %325, double %322)
%327 = load i32, i32* %31
%328 = sub nsw i32 %327, 1
%329 = sitofp i32 %328 to double
%330 = fdiv double %326, %329
store double %330, double* %85
%331 = load double, double* %92
%332 = load i32, i32* %32
%333 = sub nsw i32 %332, 1
%334 = sitofp i32 %333 to double
%335 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %334, double %331)
%336 = load i32, i32* %32
%337 = sub nsw i32 %336, 1
%338 = sitofp i32 %337 to double
%339 = fdiv double %335, %338
store double %339, double* %86
store i32 0, i32* %126
br label %340
340: ; preds = %565, %311
%341 = load i32, i32* %126
%342 = load i32, i32* %51
%343 = icmp slt i32 %341, %342
br i1 %343, label %344, label %568
344: ; preds = %340
store i32 0, i32* %127
br label %345
345: ; preds = %561, %344
%346 = load i32, i32* %127
%347 = load i32, i32* %52
%348 = icmp slt i32 %346, %347
br i1 %348, label %349, label %564
349: ; preds = %345
%350 = load i32, i32* %126
%351 = load i32, i32* %127
%352 = load i32, i32* %51
%353 = mul nsw i32 %351, %352
%354 = add nsw i32 %350, %353
store i32 %354, i32* %59
%355 = load i32, i32* %30
%356 = load i32, i32* %126
%357 = load i32, i32* %127
%358 = load double, double* %91
%359 = load double, double* %92
%360 = load double*, double** %41
%361 = load double*, double** %42
%362 = load double*, double** %43
%363 = load double*, double** %44
%364 = call double @integrated_profile(i32 %355, i32 %356, i32 %357, double %358, double %359, double* %360, double* %361, double* %362, double* %363)
store double %364, double* %87
store double 0.000000e+00, double* %90
store i32 0, i32* %70
br label %365
365: ; preds = %551, %349
%366 = load i32, i32* %70
%367 = load i32, i32* %35
%368 = icmp slt i32 %366, %367
br i1 %368, label %369, label %554
369: ; preds = %365
%370 = load i32, i32* %70
%371 = load i32, i32* %64
%372 = icmp slt i32 %370, %371
br i1 %372, label %373, label %374
373: ; preds = %369
br label %381
374: ; preds = %369
%375 = load i32, i32* %70
%376 = load i32, i32* %64
%377 = sub nsw i32 %375, %376
%378 = load i32, i32* %65
%379 = sdiv i32 %377, %378
%380 = add nsw i32 %379, 1
br label %381
381: ; preds = %374, %373
%382 = phi i32 [ 0, %373 ], [ %380, %374 ]
store i32 %382, i32* %71
%383 = load i32, i32* %71
%384 = load i32, i32* %36
%385 = icmp slt i32 %383, %384
br i1 %385, label %386, label %550
386: ; preds = %381
%387 = load i32*, i32** %38
%388 = load i32, i32* %71
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds i32, i32* %387, i64 %389
%391 = load i32, i32* %390
store i32 %391, i32* %72
%392 = load i32*, i32** %39
%393 = load i32, i32* %71
%394 = sext i32 %393 to i64
%395 = getelementptr inbounds i32, i32* %392, i64 %394
%396 = load i32, i32* %395
store i32 %396, i32* %73
%397 = load i32, i32* %71
%398 = icmp eq i32 %397, 0
br i1 %398, label %399, label %402
399: ; preds = %386
%400 = load i32, i32* %33
store i32 %400, i32* %74
%401 = load i32, i32* %70
store i32 %401, i32* %75
br label %412
402: ; preds = %386
%403 = load i32, i32* %34
store i32 %403, i32* %74
%404 = load i32, i32* %70
%405 = load i32, i32* %64
%406 = sub nsw i32 %404, %405
%407 = load i32, i32* %71
%408 = sub nsw i32 %407, 1
%409 = load i32, i32* %65
%410 = mul nsw i32 %408, %409
%411 = sub nsw i32 %406, %410
store i32 %411, i32* %75
br label %412
412: ; preds = %402, %399
store i32 0, i32* %79
store i32 0, i32* %78
%413 = load i32, i32* %74
%414 = icmp sgt i32 %413, 0
br i1 %414, label %415, label %445
415: ; preds = %412
store i32 0, i32* %66
store i32 0, i32* %76
br label %416
416: ; preds = %441, %415
%417 = load i32, i32* %76
%418 = load i32, i32* %74
%419 = icmp sle i32 %417, %418
br i1 %419, label %420, label %444
420: ; preds = %416
store i32 0, i32* %77
br label %421
421: ; preds = %437, %420
%422 = load i32, i32* %77
%423 = load i32, i32* %74
%424 = load i32, i32* %76
%425 = sub nsw i32 %423, %424
%426 = icmp sle i32 %422, %425
br i1 %426, label %427, label %440
427: ; preds = %421
%428 = load i32, i32* %66
%429 = load i32, i32* %75
%430 = icmp eq i32 %428, %429
br i1 %430, label %431, label %434
431: ; preds = %427
%432 = load i32, i32* %76
store i32 %432, i32* %78
%433 = load i32, i32* %77
store i32 %433, i32* %79
br label %434
434: ; preds = %431, %427
%435 = load i32, i32* %66
%436 = add nsw i32 %435, 1
store i32 %436, i32* %66
br label %437
437: ; preds = %434
%438 = load i32, i32* %77
%439 = add nsw i32 %438, 1
store i32 %439, i32* %77
br label %421
440: ; preds = %421
br label %441
441: ; preds = %440
%442 = load i32, i32* %76
%443 = add nsw i32 %442, 1
store i32 %443, i32* %76
br label %416
444: ; preds = %416
br label %445
445: ; preds = %444, %412
%446 = load i32, i32* %71
%447 = icmp sgt i32 %446, 0
br i1 %447, label %448, label %530
448: ; preds = %445
%449 = load i32, i32* %126
%450 = load i32, i32* %72
%451 = add nsw i32 %449, %450
store i32 %451, i32* %60
%452 = load i32, i32* %127
%453 = load i32, i32* %73
%454 = add nsw i32 %452, %453
store i32 %454, i32* %61
%455 = load i32, i32* %30
%456 = load i32, i32* %60
%457 = load i32, i32* %61
%458 = load double, double* %91
%459 = load double, double* %92
%460 = load double*, double** %41
%461 = load double*, double** %42
%462 = load double*, double** %43
%463 = load double*, double** %44
%464 = call double @integrated_profile(i32 %455, i32 %456, i32 %457, double %458, double %459, double* %460, double* %461, double* %462, double* %463)
store double %464, double* %88
%465 = load i32*, i32** %40
%466 = load i32, i32* %71
%467 = sext i32 %466 to i64
%468 = getelementptr inbounds i32, i32* %465, i64 %467
%469 = load i32, i32* %468
%470 = icmp ne i32 %469, 0
br i1 %470, label %471, label %509
471: ; preds = %448
store double 0.000000e+00, double* %88
store i32 -1, i32* %80
br label %472
472: ; preds = %503, %471
%473 = load i32, i32* %80
%474 = icmp slt i32 %473, 2
br i1 %474, label %475, label %506
475: ; preds = %472
store i32 -1, i32* %81
br label %476
476: ; preds = %499, %475
%477 = load i32, i32* %81
%478 = icmp slt i32 %477, 2
br i1 %478, label %479, label %502
479: ; preds = %476
%480 = load i32, i32* %60
%481 = load i32, i32* %80
%482 = add nsw i32 %480, %481
store i32 %482, i32* %62
%483 = load i32, i32* %61
%484 = load i32, i32* %81
%485 = add nsw i32 %483, %484
store i32 %485, i32* %63
%486 = load i32, i32* %30
%487 = load i32, i32* %62
%488 = load i32, i32* %63
%489 = load double, double* %91
%490 = load double, double* %92
%491 = load double*, double** %41
%492 = load double*, double** %42
%493 = load double*, double** %43
%494 = load double*, double** %44
%495 = call double @integrated_profile(i32 %486, i32 %487, i32 %488, double %489, double %490, double* %491, double* %492, double* %493, double* %494)
store double %495, double* %89
%496 = load double, double* %89
%497 = load double, double* %88
%498 = fadd double %497, %496
store double %498, double* %88
br label %499
499: ; preds = %479
%500 = load i32, i32* %81
%501 = add nsw i32 %500, 1
store i32 %501, i32* %81
br label %476
502: ; preds = %476
br label %503
503: ; preds = %502
%504 = load i32, i32* %80
%505 = add nsw i32 %504, 1
store i32 %505, i32* %80
br label %472
506: ; preds = %472
%507 = load double, double* %88
%508 = fdiv double %507, 9.000000e+00
store double %508, double* %88
br label %509
509: ; preds = %506, %448
%510 = load double*, double** %47
%511 = load i32, i32* %70
%512 = sext i32 %511 to i64
%513 = getelementptr inbounds double, double* %510, i64 %512
%514 = load double, double* %513
%515 = load double, double* %88
%516 = load double, double* %87
%517 = fsub double %515, %516
%518 = fmul double %514, %517
%519 = load double, double* %85
%520 = fptosi double %519 to i32
%521 = load i32, i32* %78
%522 = call double @pow(i32 %520, i32 %521)
%523 = fmul double %518, %522
%524 = load double, double* %86
%525 = fptosi double %524 to i32
%526 = load i32, i32* %79
%527 = call double @pow(i32 %525, i32 %526)
%528 = load double, double* %90
%529 = call double @llvm.fmuladd.f64(double %523, double %527, double %528)
store double %529, double* %90
br label %549
530: ; preds = %445
%531 = load double*, double** %47
%532 = load i32, i32* %70
%533 = sext i32 %532 to i64
%534 = getelementptr inbounds double, double* %531, i64 %533
%535 = load double, double* %534
%536 = load double, double* %87
%537 = fmul double %535, %536
%538 = load double, double* %85
%539 = fptosi double %538 to i32
%540 = load i32, i32* %78
%541 = call double @pow(i32 %539, i32 %540)
%542 = fmul double %537, %541
%543 = load double, double* %86
%544 = fptosi double %543 to i32
%545 = load i32, i32* %79
%546 = call double @pow(i32 %544, i32 %545)
%547 = load double, double* %90
%548 = call double @llvm.fmuladd.f64(double %542, double %546, double %547)
store double %548, double* %90
br label %549
549: ; preds = %530, %509
br label %550
550: ; preds = %549, %381
br label %551
551: ; preds = %550
%552 = load i32, i32* %70
%553 = add nsw i32 %552, 1
store i32 %553, i32* %70
br label %365
554: ; preds = %365
%555 = load double, double* %90
%556 = load double, double* %114
%557 = fdiv double %555, %556
%558 = load i32, i32* %59
%559 = sext i32 %558 to i64
%560 = getelementptr inbounds [256 x double], [256 x double]* %121, i64 0, i64 %559
store double %557, double* %560
br label %561
561: ; preds = %554
%562 = load i32, i32* %127
%563 = add nsw i32 %562, 1
store i32 %563, i32* %127
br label %345
564: ; preds = %345
br label %565
565: ; preds = %564
%566 = load i32, i32* %126
%567 = add nsw i32 %566, 1
store i32 %567, i32* %126
br label %340
568: ; preds = %340
%569 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%570 = load i64, i64* %130
store i64 %570, i64* %129
br label %571
571: ; preds = %747, %568
%572 = load i64, i64* %129
%573 = load i32*, i32** %55
%574 = load i32, i32* %128
%575 = sext i32 %574 to i64
%576 = getelementptr inbounds i32, i32* %573, i64 %575
%577 = load i32, i32* %576
%578 = sext i32 %577 to i64
%579 = icmp slt i64 %572, %578
br i1 %579, label %580, label %750
580: ; preds = %571
store i32 0, i32* %66
br label %581
581: ; preds = %592, %580
%582 = load i32, i32* %66
%583 = icmp slt i32 %582, 256
br i1 %583, label %584, label %595
584: ; preds = %581
%585 = load i32, i32* %66
%586 = sext i32 %585 to i64
%587 = getelementptr inbounds [256 x double], [256 x double]* %121, i64 0, i64 %586
%588 = load double, double* %587
%589 = load i32, i32* %66
%590 = sext i32 %589 to i64
%591 = getelementptr inbounds [256 x double], [256 x double]* %120, i64 0, i64 %590
store double %588, double* %591
br label %592
592: ; preds = %584
%593 = load i32, i32* %66
%594 = add nsw i32 %593, 1
store i32 %594, i32* %66
br label %581
595: ; preds = %581
%596 = getelementptr inbounds [256 x double], [256 x double]* %120, i64 0, i64 0
%597 = call i32 @resolve_coeffs_2d(i32 16, i32 16, i32 16, double* %596)
%598 = load double*, double** %45
%599 = load i64, i64* %129
%600 = getelementptr inbounds double, double* %598, i64 %599
%601 = load double, double* %600
store double %601, double* %91
%602 = load double*, double** %46
%603 = load i64, i64* %129
%604 = getelementptr inbounds double, double* %602, i64 %603
%605 = load double, double* %604
store double %605, double* %92
%606 = load double, double* %91
%607 = fadd double %606, 5.000000e-01
%608 = fadd double %607, 1.000000e-10
%609 = call double @llvm.ceil.f64(double %608)
%610 = load double, double* %91
%611 = fadd double %610, 5.000000e-01
%612 = fsub double %609, %611
store double %612, double* %112
%613 = load double, double* %92
%614 = fadd double %613, 5.000000e-01
%615 = fadd double %614, 1.000000e-10
%616 = call double @llvm.ceil.f64(double %615)
%617 = load double, double* %92
%618 = fadd double %617, 5.000000e-01
%619 = fsub double %616, %618
store double %619, double* %113
store i32 0, i32* %126
br label %620
620: ; preds = %670, %595
%621 = load i32, i32* %126
%622 = load i32, i32* %51
%623 = icmp slt i32 %621, %622
br i1 %623, label %624, label %673
624: ; preds = %620
store i32 0, i32* %127
br label %625
625: ; preds = %666, %624
%626 = load i32, i32* %127
%627 = load i32, i32* %52
%628 = icmp slt i32 %626, %627
br i1 %628, label %629, label %669
629: ; preds = %625
%630 = load i32, i32* %126
%631 = load i32, i32* %127
%632 = load i32, i32* %51
%633 = mul nsw i32 %631, %632
%634 = add nsw i32 %630, %633
store i32 %634, i32* %59
%635 = load i32, i32* %59
%636 = sext i32 %635 to i64
%637 = getelementptr inbounds [256 x double], [256 x double]* %122, i64 0, i64 %636
store double 0.000000e+00, double* %637
%638 = load i32, i32* %126
%639 = icmp sgt i32 %638, 1
br i1 %639, label %640, label %665
640: ; preds = %629
%641 = load i32, i32* %126
%642 = icmp slt i32 %641, 14
br i1 %642, label %643, label %665
643: ; preds = %640
%644 = load i32, i32* %127
%645 = icmp sgt i32 %644, 1
br i1 %645, label %646, label %665
646: ; preds = %643
%647 = load i32, i32* %127
%648 = icmp slt i32 %647, 14
br i1 %648, label %649, label %665
649: ; preds = %646
%650 = load double, double* %112
%651 = load double, double* %113
%652 = load i32, i32* %126
%653 = sub nsw i32 %652, 2
%654 = load i32, i32* %127
%655 = sub nsw i32 %654, 2
%656 = load i32, i32* %51
%657 = mul nsw i32 %655, %656
%658 = add nsw i32 %653, %657
%659 = sext i32 %658 to i64
%660 = getelementptr inbounds [256 x double], [256 x double]* %120, i64 0, i64 %659
%661 = call double @interpolate_2d(double %650, double %651, i32 16, double* %660)
%662 = load i32, i32* %59
%663 = sext i32 %662 to i64
%664 = getelementptr inbounds [256 x double], [256 x double]* %122, i64 0, i64 %663
store double %661, double* %664
br label %665
665: ; preds = %649, %646, %643, %640, %629
br label %666
666: ; preds = %665
%667 = load i32, i32* %127
%668 = add nsw i32 %667, 1
store i32 %668, i32* %127
br label %625
669: ; preds = %625
br label %670
670: ; preds = %669
%671 = load i32, i32* %126
%672 = add nsw i32 %671, 1
store i32 %672, i32* %126
br label %620
673: ; preds = %620
store i32 0, i32* %126
br label %674
674: ; preds = %743, %673
%675 = load i32, i32* %126
%676 = icmp slt i32 %675, 16
br i1 %676, label %677, label %746
677: ; preds = %674
store i32 0, i32* %127
br label %678
678: ; preds = %739, %677
%679 = load i32, i32* %127
%680 = icmp slt i32 %679, 16
br i1 %680, label %681, label %742
681: ; preds = %678
%682 = load i32, i32* %126
%683 = load i32, i32* %127
%684 = load i32, i32* %51
%685 = mul nsw i32 %683, %684
%686 = add nsw i32 %682, %685
store i32 %686, i32* %59
%687 = load i32, i32* %126
%688 = sitofp i32 %687 to double
%689 = fsub double %688, 8.000000e+00
%690 = fptosi double %689 to i32
%691 = call double @pow(i32 %690, i32 2)
%692 = load i32, i32* %127
%693 = sitofp i32 %692 to double
%694 = fsub double %693, 8.000000e+00
%695 = fptosi double %694 to i32
%696 = call double @pow(i32 %695, i32 2)
%697 = fadd double %691, %696
%698 = load double, double* %101
%699 = fcmp olt double %697, %698
br i1 %699, label %700, label %738
700: ; preds = %681
%701 = load double, double* %91
%702 = fadd double %701, 5.000000e-01
%703 = call i64 @floor(double %702)
%704 = trunc i64 %703 to i32
%705 = load i32, i32* %126
%706 = add nsw i32 %704, %705
%707 = sitofp i32 %706 to double
%708 = fsub double %707, 8.000000e+00
%709 = fptosi double %708 to i32
store i32 %709, i32* %83
%710 = load double, double* %92
%711 = fadd double %710, 5.000000e-01
%712 = call i64 @floor(double %711)
%713 = trunc i64 %712 to i32
%714 = load i32, i32* %127
%715 = add nsw i32 %713, %714
%716 = sitofp i32 %715 to double
%717 = fsub double %716, 8.000000e+00
%718 = fptosi double %717 to i32
store i32 %718, i32* %84
%719 = load double*, double** %48
%720 = load i64, i64* %129
%721 = getelementptr inbounds double, double* %719, i64 %720
%722 = load double, double* %721
%723 = load i32, i32* %59
%724 = sext i32 %723 to i64
%725 = getelementptr inbounds [256 x double], [256 x double]* %122, i64 0, i64 %724
%726 = load double, double* %725
%727 = load double*, double** %53
%728 = load i32, i32* %83
%729 = load i32, i32* %31
%730 = load i32, i32* %84
%731 = mul nsw i32 %729, %730
%732 = add nsw i32 %728, %731
%733 = sext i32 %732 to i64
%734 = getelementptr inbounds double, double* %727, i64 %733
%735 = load double, double* %734
%736 = fneg double %722
%737 = call double @llvm.fmuladd.f64(double %736, double %726, double %735)
store double %737, double* %734
br label %738
738: ; preds = %700, %681
br label %739
739: ; preds = %738
%740 = load i32, i32* %127
%741 = add nsw i32 %740, 1
store i32 %741, i32* %127
br label %678
742: ; preds = %678
br label %743
743: ; preds = %742
%744 = load i32, i32* %126
%745 = add nsw i32 %744, 1
store i32 %745, i32* %126
br label %674
746: ; preds = %674
br label %747
747: ; preds = %746
%748 = load i64, i64* %129
%749 = add nsw i64 %748, 1
store i64 %749, i64* %129
br label %571
750: ; preds = %571
%751 = load i32*, i32** %55
%752 = load i32, i32* %128
%753 = sext i32 %752 to i64
%754 = getelementptr inbounds i32, i32* %751, i64 %753
%755 = load i32, i32* %754
%756 = sext i32 %755 to i64
store i64 %756, i64* %130
br label %757
757: ; preds = %750
%758 = load i32, i32* %128
%759 = add nsw i32 %758, 1
store i32 %759, i32* %128
br label %281
760: ; preds = %281
ret void
}

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