double integrated_profile(int profile_type, int idx, int idy, double xpos,
                          double ypos, double *psf_parameters, double *lut_0,
                          double *lut_xd, double *lut_yd) {
  int psf_size;
  double psf_height, psf_sigma_x, psf_sigma_y, psf_xpos, psf_ypos;
  double p0;
  int ip, jp;
  double pi = 3.14159265, fwtosig = 0.8493218;
  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];
  if (profile_type == 0) {
    p0 = 0.5 * psf_height * pi * fwtosig * fwtosig *
         (erf((idx - 7.5 + 0.5) / (1.41421356 * psf_sigma_x)) -
          erf((idx - 7.5 - 0.5) / (1.41421356 * psf_sigma_x))) *
         (erf((idy - 7.5 + 0.5) / (1.41421356 * psf_sigma_y)) -
          erf((idy - 7.5 - 0.5) / (1.41421356 * psf_sigma_y)));
    ip = psf_size / 2 + 2 * idx - 15;
    jp = psf_size / 2 + 2 * idy - 15;
    if ((ip >= 0) && (ip <= psf_size - 1) && (jp >= 0) &&
        (jp <= psf_size - 1)) {
      p0 += lut_0[ip + psf_size * jp] +
            lut_xd[ip + psf_size * jp] * (xpos - psf_xpos) +
            lut_yd[ip + psf_size * jp] * (ypos - psf_ypos);
    }
    return p0;
  } else if (profile_type == 1) {
    double d[4][4] = {{0.0, 0.0, 0.0, 0.0},
                      {-0.28867513, 0.28867513, 0.0, 0.0},
                      {-0.38729833, 0.0, 0.38729833, 0.0},
                      {-0.43056816, -0.16999052, 0.16999052, 0.43056816}};
    double w[4][4] = {{1.0, 0.0, 0.0, 0.0},
                      {0.5, 0.5, 0.0, 0.0},
                      {0.27777778, 0.44444444, 0.27777778, 0.0},
                      {0.17392742, 0.32607258, 0.32607258, 0.17392742}};
    double alpha = 0.3195079;
    double p1sq, p2sq, p1p2, dx, dy, xy, denom, func, x[4], xsq[4], p1xsq[4];
    double y, ysq, p2ysq, wt, p4fod, wp4fod, wf;
    int npt, ix, iy;
    p1sq = psf_parameters[2] * psf_parameters[2];
    p2sq = psf_parameters[3] * psf_parameters[3];
    p1p2 = psf_parameters[2] * psf_parameters[3];
    dx = idx - 7.5 + 0.5;
    dy = idy - 7.5 + 0.5;
    xy = dx * dy;
    denom = 1.0 +
            alpha * (dx * dx / p1sq + dy * dy / p2sq + xy * psf_parameters[4]);
    if (denom > 1.0e4) {
      return 0.0;
    }
    p0 = 0.0;
    func = 1.0 / (p1p2 * pow(denom, 2.5));
    if (func >= 0.046) {
      npt = 4;
    } else if (func >= 0.0022) {
      npt = 3;
    } else if (func >= 0.0001) {
      npt = 2;
    } else if (func >= 1.0e-10) {
      p0 = (2.5 - 1.0) * func;
    }
    if (func >= 0.0001) {
      for (ix = 0; ix < npt; ix++) {
        x[ix] = dx + d[npt][ix];
        xsq[ix] = x[ix] * x[ix];
        p1xsq[ix] = xsq[ix] / p1sq;
      }
      for (iy = 0; iy < npt; iy++) {
        y = dy + d[npt][iy];
        ysq = y * y;
        p2ysq = ysq / p2sq;
        for (ix = 0; ix < npt; ix++) {
          wt = w[npt][iy] * w[npt][ix];
          xy = x[ix] * y;
          denom = 1.0 + alpha * (p1xsq[ix] + p2ysq + xy * psf_parameters[4]);
          func = (2.5 - 1.0) / (p1p2 * pow(denom, 2.5));
          p4fod = 2.5 * alpha * func / denom;
          wp4fod = wt * p4fod;
          wf = wt * func;
          p0 += wf;
        }
      }
    }
    p0 *= psf_parameters[1];
    ip = psf_size / 2 + 2 * idx - 15;
    jp = psf_size / 2 + 2 * idy - 15;
    if ((ip >= 0) && (ip <= psf_size - 1) && (jp >= 0) &&
        (jp <= psf_size - 1)) {
      p0 += lut_0[ip + psf_size * jp] +
            lut_xd[ip + psf_size * jp] * (xpos - psf_xpos) +
            lut_yd[ip + psf_size * jp] * (ypos - psf_ypos);
    }
    return p0;
  } else {
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<integrated_profile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movsd  0xea2(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe8a(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x30(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1412 <integrated_profile+0x2e2>
movsd  0xe3f(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x2a0(%rbp)
ff
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xe15(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe01(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe3d(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <erf@plt>
movsd  %xmm0,-0x2a8(%rbp)
ff
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xdda(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdc6(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe02(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <erf@plt>
movsd  -0x2a8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x2a0(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x290(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xd84(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd70(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xdac(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <erf@plt>
movsd  %xmm0,-0x298(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xd49(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd35(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd71(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <erf@plt>
movsd  -0x298(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x290(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
sub    $0xf,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
sub    $0xf,%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x7c(%rbp)
jl     1403 <integrated_profile+0x2d3>
mov    -0x7c(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1403 <integrated_profile+0x2d3>
cmpl   $0x0,-0x80(%rbp)
jl     1403 <integrated_profile+0x2d3>
mov    -0x80(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1403 <integrated_profile+0x2d3>
mov    -0x38(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x20(%rbp),%xmm2
subsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    0x10(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1abe <integrated_profile+0x98e>
cmpl   $0x1,-0xc(%rbp)
jne    1ab6 <integrated_profile+0x986>
lea    -0x110(%rbp),%rdi
lea    0xc46(%rip),%rsi
mov    $0x80,%edx
call   1030 <memcpy@plt>
lea    -0x190(%rbp),%rdi
lea    0xcae(%rip),%rsi
mov    $0x80,%edx
call   1030 <memcpy@plt>
movsd  0xbdc(%rip),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x1a8(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x1b0(%rbp)
ff
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xb71(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xb5d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xb4c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xb38(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1c0(%rbp)
ff
movsd  -0x1b8(%rbp),%xmm0
ff
mulsd  -0x1c0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1c8(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movsd  -0x1b8(%rbp),%xmm2
ff
mulsd  -0x1b8(%rbp),%xmm2
ff
divsd  -0x1a0(%rbp),%xmm2
ff
movsd  -0x1c0(%rbp),%xmm1
ff
mulsd  -0x1c0(%rbp),%xmm1
ff
divsd  -0x1a8(%rbp),%xmm1
ff
addsd  %xmm1,%xmm2
movsd  -0x1c8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaab(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movsd  -0x1d0(%rbp),%xmm0
ff
movsd  0xa87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15a0 <integrated_profile+0x470>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1abe <integrated_profile+0x98e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x1b0(%rbp),%xmm0
ff
movsd  %xmm0,-0x2b0(%rbp)
ff
movsd  -0x1d0(%rbp),%xmm0
ff
movsd  0xa78(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x2b0(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  0xa37(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  0xa3b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1616 <integrated_profile+0x4e6>
movl   $0x4,-0x27c(%rbp)
jmp    16a6 <integrated_profile+0x576>
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  0xa22(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     163f <integrated_profile+0x50f>
movl   $0x3,-0x27c(%rbp)
jmp    16a1 <integrated_profile+0x571>
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  0xa01(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1668 <integrated_profile+0x538>
movl   $0x2,-0x27c(%rbp)
jmp    169c <integrated_profile+0x56c>
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  0x9e0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1697 <integrated_profile+0x567>
movsd  0x9d6(%rip),%xmm0
mulsd  -0x1d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    169c <integrated_profile+0x56c>
jmp    16a1 <integrated_profile+0x571>
jmp    16a6 <integrated_profile+0x576>
movsd  -0x1d8(%rbp),%xmm0
ff
movsd  0x99a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     19b6 <integrated_profile+0x886>
movl   $0x0,-0x280(%rbp)
mov    -0x280(%rbp),%eax
cmp    -0x27c(%rbp),%eax
jge    1781 <integrated_profile+0x651>
movsd  -0x1b8(%rbp),%xmm0
ff
movslq -0x27c(%rbp),%rcx
lea    -0x110(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x280(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movslq -0x280(%rbp),%rax
movsd  %xmm0,-0x200(%rbp,%rax,8)
ff ff
movslq -0x280(%rbp),%rax
movsd  -0x200(%rbp,%rax,8),%xmm0
ff ff
movslq -0x280(%rbp),%rax
mulsd  -0x200(%rbp,%rax,8),%xmm0
ff ff
movslq -0x280(%rbp),%rax
movsd  %xmm0,-0x220(%rbp,%rax,8)
ff ff
movslq -0x280(%rbp),%rax
movsd  -0x220(%rbp,%rax,8),%xmm0
ff ff
divsd  -0x1a0(%rbp),%xmm0
ff
movslq -0x280(%rbp),%rax
movsd  %xmm0,-0x240(%rbp,%rax,8)
ff ff
mov    -0x280(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x280(%rbp)
jmp    16ca <integrated_profile+0x59a>
movl   $0x0,-0x284(%rbp)
mov    -0x284(%rbp),%eax
cmp    -0x27c(%rbp),%eax
jge    19b1 <integrated_profile+0x881>
movsd  -0x1c0(%rbp),%xmm0
ff
movslq -0x27c(%rbp),%rcx
lea    -0x110(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x284(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x248(%rbp)
ff
movsd  -0x248(%rbp),%xmm0
ff
mulsd  -0x248(%rbp),%xmm0
ff
movsd  %xmm0,-0x250(%rbp)
ff
movsd  -0x250(%rbp),%xmm0
ff
divsd  -0x1a8(%rbp),%xmm0
ff
movsd  %xmm0,-0x258(%rbp)
ff
movl   $0x0,-0x280(%rbp)
mov    -0x280(%rbp),%eax
cmp    -0x27c(%rbp),%eax
jge    1998 <integrated_profile+0x868>
movslq -0x27c(%rbp),%rcx
lea    -0x190(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x284(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x27c(%rbp),%rcx
lea    -0x190(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x280(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x260(%rbp)
ff
movslq -0x280(%rbp),%rax
movsd  -0x200(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x248(%rbp),%xmm0
ff
movsd  %xmm0,-0x1c8(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movslq -0x280(%rbp),%rax
movsd  -0x240(%rbp,%rax,8),%xmm2
ff ff
addsd  -0x258(%rbp),%xmm2
ff
movsd  -0x1c8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x74f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movsd  -0x1b0(%rbp),%xmm0
ff
movsd  %xmm0,-0x2b8(%rbp)
ff
movsd  -0x1d0(%rbp),%xmm0
ff
movsd  0x74b(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x2b8(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  0x752(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movsd  0x71e(%rip),%xmm0
mulsd  -0x198(%rbp),%xmm0
ff
mulsd  -0x1d8(%rbp),%xmm0
ff
divsd  -0x1d0(%rbp),%xmm0
ff
movsd  %xmm0,-0x268(%rbp)
ff
movsd  -0x260(%rbp),%xmm0
ff
mulsd  -0x268(%rbp),%xmm0
ff
movsd  %xmm0,-0x270(%rbp)
ff
movsd  -0x260(%rbp),%xmm0
ff
mulsd  -0x1d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x278(%rbp)
ff
movsd  -0x278(%rbp),%xmm0
ff
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x280(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x280(%rbp)
jmp    1808 <integrated_profile+0x6d8>
jmp    199d <integrated_profile+0x86d>
mov    -0x284(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x284(%rbp)
jmp    178b <integrated_profile+0x65b>
jmp    19b6 <integrated_profile+0x886>
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
sub    $0xf,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
sub    $0xf,%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x7c(%rbp)
jl     1aa7 <integrated_profile+0x977>
mov    -0x7c(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1aa7 <integrated_profile+0x977>
cmpl   $0x0,-0x80(%rbp)
jl     1aa7 <integrated_profile+0x977>
mov    -0x80(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1aa7 <integrated_profile+0x977>
mov    -0x38(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x20(%rbp),%xmm2
subsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    0x10(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x44(%rbp),%edx
imul   -0x80(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1abe <integrated_profile+0x98e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrated_profile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,%rbx
movapd %xmm0,%xmm4
mov    %edx,%r13d
cvttsd2si (%rcx),%ebp
mov    0x130(%rsp),%r14
movsd  0x20(%rcx),%xmm5
movsd  0x28(%rcx),%xmm6
cmp    $0x1,%edi
je     130c <integrated_profile+0x1ec>
xorpd  %xmm3,%xmm3
test   %edi,%edi
jne    17ad <integrated_profile+0x68d>
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x38(%rsp)
movsd  %xmm4,0x40(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  0xedc(%rip),%xmm0
movsd  0x8(%rbx),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
mulsd  0xecf(%rip),%xmm2
movsd  0xecf(%rip),%xmm0
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x20(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
addsd  0xeba(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
addsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
movsd  0x10(%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x50(%rsp)
divsd  %xmm2,%xmm0
mulsd  0x18(%rbx),%xmm1
movsd  %xmm1,0x18(%rsp)
mov    %rsi,%rbx
call   1040 <erf@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
addsd  0xe7e(%rip),%xmm1
divsd  0x50(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1040 <erf@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
mulsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
addsd  0xe35(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe0f(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0x18(%rsp),%xmm0
call   1040 <erf@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xe14(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
call   1040 <erf@plt>
movsd  0x20(%rsp),%xmm3
subsd  %xmm0,%xmm3
mulsd  0x10(%rsp),%xmm3
mov    %ebp,%eax
shr    $0x1f,%eax
add    %ebp,%eax
sar    %eax
lea    (%rax,%rbx,2),%ecx
cmp    $0xf,%ecx
jl     17ad <integrated_profile+0x68d>
lea    (%rax,%rbx,2),%ecx
add    $0xfffffff1,%ecx
cmp    %ebp,%ecx
jge    17ad <integrated_profile+0x68d>
lea    (%rax,%r13,2),%edx
cmp    $0xf,%edx
jl     17ad <integrated_profile+0x68d>
lea    (%rax,%r13,2),%eax
add    $0xfffffff1,%eax
cmp    %ebp,%eax
jge    17ad <integrated_profile+0x68d>
imul   %ebp,%eax
add    %ecx,%eax
cltq
movsd  0x40(%rsp),%xmm1
subsd  0x30(%rsp),%xmm1
mulsd  (%r15,%rax,8),%xmm1
addsd  (%r12,%rax,8),%xmm1
movsd  0x48(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
mulsd  (%r14,%rax,8),%xmm0
jmp    17a5 <integrated_profile+0x685>
movsd  %xmm1,0x48(%rsp)
movupd 0x10(%rbx),%xmm8
movapd %xmm8,%xmm7
mulpd  %xmm8,%xmm7
movd   %r13d,%xmm0
movd   %esi,%xmm2
punpckldq %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm1
addpd  0xcc5(%rip),%xmm1
addpd  0xccd(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movapd %xmm1,%xmm0
movapd %xmm2,0xe0(%rsp)
mulsd  %xmm2,%xmm0
movapd %xmm1,%xmm2
mulpd  %xmm1,%xmm2
divpd  %xmm7,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm5,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xc9c(%rip),%xmm0
addsd  0xc9c(%rip),%xmm0
xorpd  %xmm3,%xmm3
ucomisd 0xc98(%rip),%xmm0
ja     17ad <integrated_profile+0x68d>
movapd %xmm1,0x20(%rsp)
movapd %xmm7,0x60(%rsp)
mov    %rsi,0x88(%rsp)
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x38(%rsp)
movsd  %xmm4,0x40(%rsp)
movapd %xmm8,%xmm1
unpckhpd %xmm8,%xmm1
mulsd  %xmm8,%xmm1
movapd %xmm1,0x90(%rsp)
movsd  0xc54(%rip),%xmm1
call   1030 <pow@plt>
movapd 0x90(%rsp),%xmm5
mulsd  %xmm5,%xmm0
movsd  0xc2a(%rip),%xmm6
movapd %xmm6,%xmm1
divsd  %xmm0,%xmm1
mov    $0x4,%r8d
mov    $0x1,%al
xorpd  %xmm3,%xmm3
ucomisd 0xc26(%rip),%xmm1
mov    %ebp,0x5c(%rsp)
jae    1466 <integrated_profile+0x346>
mov    $0x3,%r8d
ucomisd 0xc1a(%rip),%xmm1
movapd 0x60(%rsp),%xmm4
movapd 0x20(%rsp),%xmm7
jae    1472 <integrated_profile+0x352>
mov    $0x2,%r8d
ucomisd 0xc06(%rip),%xmm1
jae    1472 <integrated_profile+0x352>
ucomisd 0xc04(%rip),%xmm1
jb     1462 <integrated_profile+0x342>
movsd  0xc02(%rip),%xmm3
mulsd  %xmm1,%xmm3
xor    %eax,%eax
jmp    1472 <integrated_profile+0x352>
movapd 0x60(%rsp),%xmm4
movapd 0x20(%rsp),%xmm7
test   %al,%al
mov    %r12,0x78(%rsp)
mov    %r15,0x70(%rsp)
mov    %r13,0x80(%rsp)
je     171f <integrated_profile+0x5ff>
ucomisd 0xbbc(%rip),%xmm1
jb     171f <integrated_profile+0x5ff>
mov    %r8d,%r14d
mov    %r14d,%edx
and    $0xfffffffe,%edx
movapd %xmm7,%xmm0
unpcklpd %xmm7,%xmm0
movapd %xmm4,%xmm1
unpcklpd %xmm4,%xmm1
lea    -0x2(%rdx),%rcx
mov    %rcx,%rbp
shr    %rbp
add    $0x1,%rbp
test   %rcx,%rcx
je     17c3 <integrated_profile+0x6a3>
mov    %rbp,%rdi
and    $0xfffffffffffffffe,%rdi
mov    %r14,%rcx
shl    $0x5,%rcx
lea    0xbc1(%rip),%rsi
add    %rsi,%rcx
add    $0x10,%rcx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movapd -0x10(%rcx,%rsi,8),%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0xc0(%rsp,%rsi,8)
mulpd  %xmm2,%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0xa0(%rsp,%rsi,8)
movapd (%rcx,%rsi,8),%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,0xd0(%rsp,%rsi,8)
mulpd  %xmm2,%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0xb0(%rsp,%rsi,8)
add    $0x4,%rsi
add    $0xfffffffffffffffe,%rdi
jne    14f0 <integrated_profile+0x3d0>
test   $0x1,%bpl
je     1577 <integrated_profile+0x457>
mov    %r14,%rcx
shl    $0x5,%rcx
lea    0xb4b(%rip),%rdi
add    %rcx,%rdi
addpd  (%rdi,%rsi,8),%xmm0
movapd %xmm0,0xc0(%rsp,%rsi,8)
mulpd  %xmm0,%xmm0
divpd  %xmm1,%xmm0
movapd %xmm0,0xa0(%rsp,%rsi,8)
cmp    %r14,%rdx
je     15e4 <integrated_profile+0x4c4>
lea    (%rsp,%rdx,8),%rcx
add    $0xa0,%rcx
lea    (%rsp,%rdx,8),%rsi
add    $0xc0,%rsi
mov    %r14,%rdi
shl    $0x5,%rdi
lea    0xb00(%rip),%rbp
add    %rdi,%rbp
lea    0x0(,%rdx,8),%rdi
add    %rbp,%rdi
mov    %r14,%rbp
sub    %rdx,%rbp
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rdx,8),%xmm0
addsd  %xmm7,%xmm0
movsd  %xmm0,(%rsi,%rdx,8)
mulsd  %xmm0,%xmm0
divsd  %xmm4,%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rbp
jne    15c0 <integrated_profile+0x4a0>
test   %al,%al
je     171f <integrated_profile+0x5ff>
movslq %r8d,%rax
unpckhpd %xmm4,%xmm4
shl    $0x5,%rax
lea    0xb22(%rip),%r15
add    %rax,%r15
xor    %r12d,%r12d
lea    0xa95(%rip),%rbp
add    %rax,%rbp
movsd  0xa0a(%rip),%xmm2
movsd  0xa1a(%rip),%xmm1
movapd %xmm4,0x60(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%rbp,%r12,8),%xmm0
addsd  0xe0(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm0,%xmm0
divsd  %xmm4,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15,%r12,8),%xmm0
movsd  %xmm0,0x50(%rsp)
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm3,0x20(%rsp)
movsd  (%r15,%r13,8),%xmm0
mulsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xc0(%rsp,%r13,8),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  0xa0(%rsp,%r13,8),%xmm3
mulsd  0x20(%rbx),%xmm0
addsd  0x8(%rsp),%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm6,%xmm0
call   1030 <pow@plt>
movsd  0x99a(%rip),%xmm4
movsd  0x96a(%rip),%xmm1
movsd  0x94a(%rip),%xmm2
movsd  0x94a(%rip),%xmm6
movapd 0x90(%rsp),%xmm5
movsd  0x20(%rsp),%xmm3
mulsd  %xmm5,%xmm0
divsd  %xmm0,%xmm4
mulsd  0x10(%rsp),%xmm4
addsd  %xmm4,%xmm3
add    $0x1,%r13
cmp    %r13,%r14
jne    1670 <integrated_profile+0x550>
add    $0x1,%r12
cmp    %r14,%r12
movapd 0x60(%rsp),%xmm4
jne    1630 <integrated_profile+0x510>
mulsd  0x8(%rbx),%xmm3
mov    0x5c(%rsp),%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
mov    0x88(%rsp),%rdx
lea    (%rax,%rdx,2),%ecx
cmp    $0xf,%ecx
jl     17ad <integrated_profile+0x68d>
lea    (%rax,%rdx,2),%ecx
add    $0xfffffff1,%ecx
cmp    %esi,%ecx
jge    17ad <integrated_profile+0x68d>
mov    0x80(%rsp),%rdi
lea    (%rax,%rdi,2),%edx
cmp    $0xf,%edx
jl     17ad <integrated_profile+0x68d>
lea    (%rax,%rdi,2),%eax
add    $0xfffffff1,%eax
cmp    %esi,%eax
jge    17ad <integrated_profile+0x68d>
imul   %esi,%eax
add    %ecx,%eax
cltq
movsd  0x40(%rsp),%xmm1
subsd  0x30(%rsp),%xmm1
mov    0x70(%rsp),%rcx
mulsd  (%rcx,%rax,8),%xmm1
mov    0x78(%rsp),%rcx
addsd  (%rcx,%rax,8),%xmm1
movsd  0x48(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
mov    0x130(%rsp),%rcx
mulsd  (%rcx,%rax,8),%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm3
movapd %xmm3,%xmm0
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %esi,%esi
test   $0x1,%bpl
jne    1547 <integrated_profile+0x427>
jmp    1577 <integrated_profile+0x457>

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

LLVM IR (-O2):
@__const.integrated_profile.d = [4 x [4 x double]] [[4 x double] zeroinitializer, [4 x double] [double 0xBFD279A740A12FE6, double 0x3FD279A740A12FE6, double 0.000000e+00, double 0.000000e+00], [4 x double] [double 0xBFD8C97EEF494E7E, double 0.000000e+00, double 0x3FD8C97EEF494E7E, double 0.000000e+00], [4 x double] [double 0xBFDB8E6DC1798780, double 0xBFC5C23FD603D827, double 0x3FC5C23FD603D827, double 0x3FDB8E6DC1798780]]
@__const.integrated_profile.w = [4 x [4 x double]] [[4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00], [4 x double] [double 5.000000e-01, double 5.000000e-01, double 0.000000e+00, double 0.000000e+00], [4 x double] [double 0x3FD1C71C7429F36E, double 0x3FDC71C717AC1923, double 0x3FD1C71C7429F36E, double 0.000000e+00], [4 x double] [double 0x3FC64340F2638A3E, double 0x3FD4DE5F86CE3AE1, double 0x3FD4DE5F86CE3AE1, double 0x3FC64340F2638A3E]]
define double @integrated_profile(i32 %0, i32 %1, i32 %2, double %3, double %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8) {
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = load double, double* %5
%13 = fptosi double %12 to i32
%14 = getelementptr inbounds double, double* %5, i64 1
%15 = getelementptr inbounds double, double* %5, i64 2
%16 = getelementptr inbounds double, double* %5, i64 4
%17 = load double, double* %16
%18 = getelementptr inbounds double, double* %5, i64 5
%19 = load double, double* %18
switch i32 %0, label %267 [
i32 0, label %20
i32 1, label %80
]
20: ; preds = %9
%21 = getelementptr inbounds double, double* %5, i64 3
%22 = load double, double* %21
%23 = load double, double* %15
%24 = load double, double* %14
%25 = fmul double %24, 5.000000e-01
%26 = fmul double %25, 0x400921FB53C8D4F1
%27 = fmul double %26, 0x3FEB2DA4E958F48E
%28 = fmul double %27, 0x3FEB2DA4E958F48E
%29 = sitofp i32 %1 to double
%30 = fadd double %29, -7.500000e+00
%31 = fadd double %30, 5.000000e-01
%32 = fmul double %23, 0x3FF6A09E65DC27DF
%33 = fdiv double %31, %32
%34 = tail call double @erf(double %33)
%35 = fadd double %30, -5.000000e-01
%36 = fdiv double %35, %32
%37 = tail call double @erf(double %36)
%38 = fsub double %34, %37
%39 = fmul double %38, %28
%40 = sitofp i32 %2 to double
%41 = fadd double %40, -7.500000e+00
%42 = fadd double %41, 5.000000e-01
%43 = fmul double %22, 0x3FF6A09E65DC27DF
%44 = fdiv double %42, %43
%45 = tail call double @erf(double %44)
%46 = fadd double %41, -5.000000e-01
%47 = fdiv double %46, %43
%48 = tail call double @erf(double %47)
%49 = fsub double %45, %48
%50 = fmul double %39, %49
%51 = sdiv i32 %13, 2
%52 = shl nsw i32 %1, 1
%53 = add nsw i32 %51, %52
%54 = add nsw i32 %53, -15
%55 = shl nsw i32 %2, 1
%56 = add nsw i32 %51, %55
%57 = add nsw i32 %56, -15
%58 = icmp sgt i32 %53, 14
br i1 %58, label %59, label %267
59: ; preds = %20
%60 = icmp slt i32 %54, %13
%61 = icmp sgt i32 %56, 14
%62 = select i1 %60, i1 %61, i1 false
%63 = icmp slt i32 %57, %13
%64 = select i1 %62, i1 %63, i1 false
br i1 %64, label %65, label %267
65: ; preds = %59
%66 = mul nsw i32 %57, %13
%67 = add nsw i32 %66, %54
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %6, i64 %68
%70 = load double, double* %69
%71 = getelementptr inbounds double, double* %7, i64 %68
%72 = load double, double* %71
%73 = fsub double %3, %19
%74 = tail call double @llvm.fmuladd.f64(double %72, double %73, double %70)
%75 = getelementptr inbounds double, double* %8, i64 %68
%76 = load double, double* %75
%77 = fsub double %4, %17
%78 = tail call double @llvm.fmuladd.f64(double %76, double %77, double %74)
%79 = fadd double %50, %78
br label %267
80: ; preds = %9
%81 = bitcast [4 x double]* %10 to i8*
%82 = bitcast [4 x double]* %11 to i8*
%83 = bitcast double* %15 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = fmul <2 x double> %84, %84
%86 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%87 = fmul <2 x double> %84, %86
%88 = extractelement <2 x double> %87, i64 0
%89 = insertelement <2 x i32> poison, i32 %1, i64 0
%90 = insertelement <2 x i32> %89, i32 %2, i64 1
%91 = sitofp <2 x i32> %90 to <2 x double>
%92 = fadd <2 x double> %91, <double -7.500000e+00, double -7.500000e+00>
%93 = fadd <2 x double> %92, <double 5.000000e-01, double 5.000000e-01>
%94 = extractelement <2 x double> %93, i64 0
%95 = extractelement <2 x double> %93, i64 1
%96 = fmul double %94, %95
%97 = fmul <2 x double> %93, %93
%98 = fdiv <2 x double> %97, %85
%99 = shufflevector <2 x double> %98, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%100 = fadd <2 x double> %98, %99
%101 = extractelement <2 x double> %100, i64 0
%102 = tail call double @llvm.fmuladd.f64(double %96, double %17, double %101)
%103 = tail call double @llvm.fmuladd.f64(double %102, double 0x3FD472D1435412A7, double 1.000000e+00)
%104 = fcmp ogt double %103, 1.000000e+04
br i1 %104, label %265, label %105
105: ; preds = %80
%106 = tail call double @pow(double %103, double 2.500000e+00)
%107 = fmul double %88, %106
%108 = fdiv double 1.000000e+00, %107
%109 = fcmp ult double %108, 4.600000e-02
br i1 %109, label %110, label %118
110: ; preds = %105
%111 = fcmp ult double %108, 2.200000e-03
br i1 %111, label %112, label %118
112: ; preds = %110
%113 = fcmp ult double %108, 1.000000e-04
br i1 %113, label %114, label %118
114: ; preds = %112
%115 = fcmp ult double %108, 1.000000e-10
br i1 %115, label %118, label %116
116: ; preds = %114
%117 = fmul double %108, 1.500000e+00
br label %118
118: ; preds = %112, %110, %105, %114, %116
%119 = phi double [ %117, %116 ], [ 0.000000e+00, %114 ], [ 0.000000e+00, %105 ], [ 0.000000e+00, %110 ], [ 0.000000e+00, %112 ]
%120 = phi i1 [ false, %116 ], [ false, %114 ], [ true, %105 ], [ true, %110 ], [ true, %112 ]
%121 = phi i32 [ undef, %116 ], [ undef, %114 ], [ 4, %105 ], [ 3, %110 ], [ 2, %112 ]
%122 = fcmp oge double %108, 1.000000e-04
%123 = and i1 %120, %122
br i1 %123, label %124, label %232
124: ; preds = %118
%125 = zext i32 %121 to i64
%126 = zext i32 %121 to i64
%127 = and i64 %126, 4294967294
%128 = shufflevector <2 x double> %93, <2 x double> poison, <2 x i32> zeroinitializer
%129 = extractelement <2 x double> %85, i64 0
%130 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
%131 = add nsw i64 %127, -2
%132 = lshr exact i64 %131, 1
%133 = add nuw i64 %132, 1
%134 = and i64 %133, 1
%135 = icmp eq i64 %131, 0
br i1 %135, label %165, label %136
136: ; preds = %124
%137 = and i64 %133, -2
br label %138
138: ; preds = %138, %136
%139 = phi i64 [ 0, %136 ], [ %162, %138 ]
%140 = phi i64 [ 0, %136 ], [ %163, %138 ]
%141 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.d, i64 0, i64 %125, i64 %139
%142 = bitcast double* %141 to <2 x double>*
%143 = load <2 x double>, <2 x double>* %142
%144 = fadd <2 x double> %128, %143
%145 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 %139
%146 = bitcast double* %145 to <2 x double>*
store <2 x double> %144, <2 x double>* %146
%147 = fmul <2 x double> %144, %144
%148 = fdiv <2 x double> %147, %130
%149 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 %139
%150 = bitcast double* %149 to <2 x double>*
store <2 x double> %148, <2 x double>* %150
%151 = or i64 %139, 2
%152 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.d, i64 0, i64 %125, i64 %151
%153 = bitcast double* %152 to <2 x double>*
%154 = load <2 x double>, <2 x double>* %153
%155 = fadd <2 x double> %128, %154
%156 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 %151
%157 = bitcast double* %156 to <2 x double>*
store <2 x double> %155, <2 x double>* %157
%158 = fmul <2 x double> %155, %155
%159 = fdiv <2 x double> %158, %130
%160 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 %151
%161 = bitcast double* %160 to <2 x double>*
store <2 x double> %159, <2 x double>* %161
%162 = add nuw i64 %139, 4
%163 = add nuw i64 %140, 2
%164 = icmp eq i64 %163, %137
br i1 %164, label %165, label %138
165: ; preds = %138, %124
%166 = phi i64 [ 0, %124 ], [ %162, %138 ]
%167 = icmp eq i64 %134, 0
br i1 %167, label %179, label %168
168: ; preds = %165
%169 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.d, i64 0, i64 %125, i64 %166
%170 = bitcast double* %169 to <2 x double>*
%171 = load <2 x double>, <2 x double>* %170
%172 = fadd <2 x double> %128, %171
%173 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 %166
%174 = bitcast double* %173 to <2 x double>*
store <2 x double> %172, <2 x double>* %174
%175 = fmul <2 x double> %172, %172
%176 = fdiv <2 x double> %175, %130
%177 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 %166
%178 = bitcast double* %177 to <2 x double>*
store <2 x double> %176, <2 x double>* %178
br label %179
179: ; preds = %165, %168
%180 = icmp eq i64 %127, %126
br i1 %180, label %181, label %186
181: ; preds = %186, %179
br i1 %120, label %182, label %232
182: ; preds = %181
%183 = sext i32 %121 to i64
%184 = zext i32 %121 to i64
%185 = extractelement <2 x double> %85, i64 1
br label %197
186: ; preds = %179, %186
%187 = phi i64 [ %195, %186 ], [ %127, %179 ]
%188 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.d, i64 0, i64 %125, i64 %187
%189 = load double, double* %188
%190 = fadd double %94, %189
%191 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 %187
store double %190, double* %191
%192 = fmul double %190, %190
%193 = fdiv double %192, %129
%194 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 %187
store double %193, double* %194
%195 = add nuw nsw i64 %187, 1
%196 = icmp eq i64 %195, %126
br i1 %196, label %181, label %186
197: ; preds = %229, %182
%198 = phi i64 [ 0, %182 ], [ %230, %229 ]
%199 = phi double [ %119, %182 ], [ %226, %229 ]
%200 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.d, i64 0, i64 %183, i64 %198
%201 = load double, double* %200
%202 = fadd double %95, %201
%203 = fmul double %202, %202
%204 = fdiv double %203, %185
%205 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.w, i64 0, i64 %183, i64 %198
%206 = load double, double* %205
br label %207
207: ; preds = %197, %207
%208 = phi i64 [ 0, %197 ], [ %227, %207 ]
%209 = phi double [ %199, %197 ], [ %226, %207 ]
%210 = getelementptr inbounds [4 x [4 x double]], [4 x [4 x double]]* @__const.integrated_profile.w, i64 0, i64 %183, i64 %208
%211 = load double, double* %210
%212 = fmul double %206, %211
%213 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 %208
%214 = load double, double* %213
%215 = fmul double %202, %214
%216 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 %208
%217 = load double, double* %216
%218 = fadd double %204, %217
%219 = load double, double* %16
%220 = tail call double @llvm.fmuladd.f64(double %215, double %219, double %218)
%221 = tail call double @llvm.fmuladd.f64(double %220, double 0x3FD472D1435412A7, double 1.000000e+00)
%222 = tail call double @pow(double %221, double 2.500000e+00)
%223 = fmul double %88, %222
%224 = fdiv double 1.500000e+00, %223
%225 = fmul double %212, %224
%226 = fadd double %209, %225
%227 = add nuw nsw i64 %208, 1
%228 = icmp eq i64 %227, %184
br i1 %228, label %229, label %207
229: ; preds = %207
%230 = add nuw nsw i64 %198, 1
%231 = icmp eq i64 %230, %184
br i1 %231, label %232, label %197
232: ; preds = %229, %118, %181
%233 = phi double [ %119, %118 ], [ %119, %181 ], [ %226, %229 ]
%234 = load double, double* %14
%235 = fmul double %233, %234
%236 = sdiv i32 %13, 2
%237 = shl nsw i32 %1, 1
%238 = add nsw i32 %236, %237
%239 = add nsw i32 %238, -15
%240 = shl nsw i32 %2, 1
%241 = add nsw i32 %236, %240
%242 = add nsw i32 %241, -15
%243 = icmp sgt i32 %238, 14
br i1 %243, label %244, label %265
244: ; preds = %232
%245 = icmp slt i32 %239, %13
%246 = icmp sgt i32 %241, 14
%247 = select i1 %245, i1 %246, i1 false
%248 = icmp slt i32 %242, %13
%249 = select i1 %247, i1 %248, i1 false
br i1 %249, label %250, label %265
250: ; preds = %244
%251 = mul nsw i32 %242, %13
%252 = add nsw i32 %251, %239
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %6, i64 %253
%255 = load double, double* %254
%256 = getelementptr inbounds double, double* %7, i64 %253
%257 = load double, double* %256
%258 = fsub double %3, %19
%259 = tail call double @llvm.fmuladd.f64(double %257, double %258, double %255)
%260 = getelementptr inbounds double, double* %8, i64 %253
%261 = load double, double* %260
%262 = fsub double %4, %17
%263 = tail call double @llvm.fmuladd.f64(double %261, double %262, double %259)
%264 = fadd double %235, %263
br label %265
265: ; preds = %232, %244, %250, %80
%266 = phi double [ 0.000000e+00, %80 ], [ %264, %250 ], [ %235, %244 ], [ %235, %232 ]
br label %267
267: ; preds = %9, %20, %59, %65, %265
%268 = phi double [ %266, %265 ], [ %79, %65 ], [ %50, %59 ], [ %50, %20 ], [ 0.000000e+00, %9 ]
ret double %268
}