void kEpsilon_k_3D_Evaluate_sd(int nPoints, int nSpace, double sigma_k,
                               double c_mu, double nu, double *velocity,
                               double *gradu, double *gradv, double *gradw,
                               double *k, double *epsilon, double *m_k,
                               double *dm_k, double *phi_k, double *dphi_k,
                               double *f_k, double *df_k, double *a_k,
                               double *da_k_dk, double *r_k, double *dr_k_dk) {
  int i, I;
  double nu_t, dnu_t_dk, PiD4, eval, kval;
  const double div_eps = 1.0e-6;
  for (i = 0; i < nPoints; i++) {
    eval = epsilon[i] >= 0.0 ? epsilon[i] : 0.0;
    kval = k[i] >= 0.0 ? k[i] : 0.0;
    nu_t = c_mu * k[i] * k[i] / (epsilon[i] + div_eps);
    dnu_t_dk = 2.0 * c_mu * k[i] / (epsilon[i] + div_eps);
    if (nu_t < 0.0) {
      nu_t = 0.0;
      dnu_t_dk = 0.0;
    }
    m_k[i] = k[i];
    dm_k[i] = 1.0;
    for (I = 0; I < nSpace; I++) {
      f_k[i * nSpace + I] = k[i] * velocity[i * nSpace + I];
      df_k[i * nSpace + I] = velocity[i * nSpace + I];
    }
    phi_k[i] = k[i];
    dphi_k[i] = 1.0;
    for (I = 0; I < nSpace; I++) {
      a_k[i * nSpace + I] = nu_t / sigma_k + nu;
      da_k_dk[i * nSpace + I] = dnu_t_dk / sigma_k;
    }
    PiD4 = 2.0 * (gradu[i * nSpace + 0] * gradu[i * nSpace + 0] +
                  gradv[i * nSpace + 1] * gradv[i * nSpace + 1] +
                  gradw[i * nSpace + 2] * gradw[i * nSpace + 2]) +
           (gradu[i * nSpace + 1] + gradv[i * nSpace + 0]) *
               (gradu[i * nSpace + 1] + gradv[i * nSpace + 0]) +
           (gradu[i * nSpace + 2] + gradw[i * nSpace + 0]) *
               (gradu[i * nSpace + 2] + gradw[i * nSpace + 0]) +
           (gradv[i * nSpace + 2] + gradw[i * nSpace + 1]) *
               (gradv[i * nSpace + 2] + gradw[i * nSpace + 1]);
    r_k[i] = -nu_t * PiD4 + epsilon[i];
    dr_k_dk[i] = -dnu_t_dk * PiD4;
  }
}


x86 assembly (clang, -O0):
<kEpsilon_k_3D_Evaluate_sd>:
push   %rbp
mov    %rsp,%rbp
push   %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),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    162c <kEpsilon_k_3D_Evaluate_sd+0x52c>
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11ab <kEpsilon_k_3D_Evaluate_sd+0xab>
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    11b8 <kEpsilon_k_3D_Evaluate_sd+0xb8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    11b8 <kEpsilon_k_3D_Evaluate_sd+0xb8>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11f6 <kEpsilon_k_3D_Evaluate_sd+0xf6>
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1206 <kEpsilon_k_3D_Evaluate_sd+0x106>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
jmp    1206 <kEpsilon_k_3D_Evaluate_sd+0x106>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xdbe(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdb0(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xd86(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    12a6 <kEpsilon_k_3D_Evaluate_sd+0x1a6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xd40(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    135b <kEpsilon_k_3D_Evaluate_sd+0x25b>
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12dc <kEpsilon_k_3D_Evaluate_sd+0x1dc>
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xc8b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13f0 <kEpsilon_k_3D_Evaluate_sd+0x2f0>
movsd  -0x50(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x58(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1391 <kEpsilon_k_3D_Evaluate_sd+0x291>
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x60(%rbp),%xmm2
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x60(%rbp),%xmm0
mov    0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    116e <kEpsilon_k_3D_Evaluate_sd+0x6e>
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kEpsilon_k_3D_Evaluate_sd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,0x60(%rsp)
mov    %r8,0x58(%rsp)
mov    %rcx,0x50(%rsp)
mov    %rdx,-0x40(%rsp)
mov    %esi,-0x6c(%rsp)
test   %edi,%edi
jle    18c4 <kEpsilon_k_3D_Evaluate_sd+0x7c4>
mov    0xe8(%rsp),%rdx
mov    0xe0(%rsp),%r11
movapd %xmm1,%xmm11
addsd  %xmm1,%xmm11
movslq -0x6c(%rsp),%r15
mov    %edi,%eax
mov    %rax,0x40(%rsp)
mov    %r15d,%ebx
mov    %ebx,%eax
and    $0xfffffffc,%eax
mov    %rax,-0x30(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %rbx,%rcx
neg    %rcx
mov    %rcx,0x18(%rsp)
mov    %eax,%ecx
and    $0x3,%ecx
and    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rsp)
mov    %ebx,%eax
and    $0x3,%eax
mov    %rax,0x10(%rsp)
lea    0x0(,%rbx,8),%rax
and    $0xffffffffffffffe0,%rax
mov    %rax,0x8(%rsp)
mov    %rcx,-0x8(%rsp)
shl    $0x5,%rcx
mov    %rcx,-0x38(%rsp)
movsd  0xe44(%rip),%xmm8
xorpd  %xmm9,%xmm9
movapd 0xe46(%rip),%xmm10
mov    0xd8(%rsp),%rcx
mov    0xd0(%rsp),%rbp
mov    0xa8(%rsp),%rsi
lea    0x10(%rcx),%r8
lea    0x0(,%r15,8),%rax
mov    %rax,0x38(%rsp)
lea    0x10(%rbp),%rax
mov    %rax,-0x20(%rsp)
mov    -0x40(%rsp),%rax
lea    0x10(%rax),%rdi
lea    0x8(%rax),%r10
lea    0x8(%rbp),%r14
lea    0x8(%rcx),%r13
lea    0x70(%rdx),%rax
mov    %rax,-0x28(%rsp)
lea    0x70(%r11),%r12
lea    0x10(%rdx),%r9
lea    0x10(%r11),%rbp
xor    %ecx,%ecx
mov    %rdx,-0x18(%rsp)
mov    %rsi,%rdx
mov    %r15,0x48(%rsp)
mov    %rbx,-0x78(%rsp)
jmp    1365 <kEpsilon_k_3D_Evaluate_sd+0x265>
nop
movsd  (%r8,%rcx,8),%xmm4
mov    0xc0(%rsp),%rax
movsd  %xmm4,(%rax,%rcx,8)
mov    0xc8(%rsp),%rax
mov    %rdx,(%rax,%rcx,8)
mov    -0x68(%rsp),%rbp
mov    -0x78(%rsp),%rbx
mov    -0x60(%rsp),%r8
mov    0x58(%rsp),%rax
movsd  0x8(%rax,%r15,8),%xmm14
movsd  0x10(%rax,%r15,8),%xmm4
mov    0x50(%rsp),%rdx
movsd  0x8(%rdx,%r15,8),%xmm6
addsd  (%rax,%r15,8),%xmm6
movsd  (%rdx,%r15,8),%xmm7
movsd  0x10(%rdx,%r15,8),%xmm3
mov    0x60(%rsp),%rax
addsd  (%rax,%r15,8),%xmm3
movsd  0x10(%rax,%r15,8),%xmm5
addsd  0x8(%rax,%r15,8),%xmm4
mulsd  %xmm14,%xmm14
mulsd  %xmm7,%xmm7
addsd  %xmm14,%xmm7
mulsd  %xmm5,%xmm5
addsd  %xmm7,%xmm5
mulsd  %xmm6,%xmm6
addsd  %xmm5,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm3,%xmm3
addsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm4
addsd  %xmm3,%xmm4
mov    0xa8(%rsp),%rdx
movsd  (%rdx,%rcx,8),%xmm3
mulsd  %xmm4,%xmm12
subsd  %xmm12,%xmm3
mov    0xf0(%rsp),%rax
movsd  %xmm3,(%rax,%rcx,8)
xorpd  %xmm10,%xmm13
mulsd  %xmm4,%xmm13
mov    0xf8(%rsp),%rax
movsd  %xmm13,(%rax,%rcx,8)
add    $0x1,%rcx
mov    0x38(%rsp),%rax
add    %rax,%r8
add    %rax,-0x20(%rsp)
add    %rax,%rdi
add    %rax,%r10
add    %rax,%r14
add    %rax,%r13
add    %rax,-0x28(%rsp)
add    %rax,%r12
add    %rax,%r9
add    %rax,%rbp
add    %rax,-0x18(%rsp)
add    %rax,%r11
cmp    0x40(%rsp),%rcx
je     18c4 <kEpsilon_k_3D_Evaluate_sd+0x7c4>
mov    %rbp,-0x68(%rsp)
mov    %r8,-0x60(%rsp)
mov    %rcx,%r15
mov    0x48(%rsp),%rbp
imul   %rbp,%r15
mov    0xa0(%rsp),%r8
movsd  (%r8,%rcx,8),%xmm4
movapd %xmm4,%xmm13
mulsd  %xmm1,%xmm13
mulsd  %xmm4,%xmm13
movsd  (%rdx,%rcx,8),%xmm5
addsd  %xmm8,%xmm5
divsd  %xmm5,%xmm13
movapd %xmm11,%xmm6
mulsd  %xmm4,%xmm6
divsd  %xmm5,%xmm6
xorpd  %xmm12,%xmm12
maxsd  %xmm13,%xmm12
cmpltsd %xmm9,%xmm13
andnpd %xmm6,%xmm13
mov    0xb0(%rsp),%rax
movsd  %xmm4,(%rax,%rcx,8)
mov    0xb8(%rsp),%rax
movabs $0x3ff0000000000000,%rdx
mov    %rdx,(%rax,%rcx,8)
test   %ebp,%ebp
jle    1240 <kEpsilon_k_3D_Evaluate_sd+0x140>
lea    (%r15,%rbx,1),%rsi
mov    %rcx,%rax
imul   %rbp,%rax
mov    %rax,-0x58(%rsp)
cmp    $0x4,%ebp
mov    %rsi,0x30(%rsp)
jae    14d0 <kEpsilon_k_3D_Evaluate_sd+0x3d0>
xor    %r8d,%r8d
mov    0xa0(%rsp),%rdx
mov    -0x68(%rsp),%rbp
mov    %r8,%rax
test   $0x1,%bl
je     146f <kEpsilon_k_3D_Evaluate_sd+0x36f>
movsd  (%rdx,%rcx,8),%xmm4
mov    -0x58(%rsp),%rax
add    %r8,%rax
mov    -0x40(%rsp),%rsi
mulsd  (%rsi,%rax,8),%xmm4
mov    0xd0(%rsp),%rdx
movsd  %xmm4,(%rdx,%rax,8)
movsd  (%rsi,%rax,8),%xmm4
mov    0xd8(%rsp),%rdx
movsd  %xmm4,(%rdx,%rax,8)
mov    0xa0(%rsp),%rdx
mov    %r8,%rax
or     $0x1,%rax
not    %r8
cmp    0x18(%rsp),%r8
je     1660 <kEpsilon_k_3D_Evaluate_sd+0x560>
nopl   (%rax)
movsd  (%rdx,%rcx,8),%xmm4
mulsd  -0x8(%r10,%rax,8),%xmm4
movsd  %xmm4,-0x8(%r14,%rax,8)
movsd  -0x8(%r10,%rax,8),%xmm4
movsd  %xmm4,-0x8(%r13,%rax,8)
movsd  (%rdx,%rcx,8),%xmm4
mulsd  (%r10,%rax,8),%xmm4
movsd  %xmm4,(%r14,%rax,8)
movsd  (%r10,%rax,8),%xmm4
movsd  %xmm4,0x0(%r13,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbx
jne    1480 <kEpsilon_k_3D_Evaluate_sd+0x380>
jmp    1660 <kEpsilon_k_3D_Evaluate_sd+0x560>
nopl   (%rax)
mov    0xd0(%rsp),%rdx
lea    (%rdx,%r15,8),%r8
lea    (%rdx,%rsi,8),%rbx
mov    0xd8(%rsp),%rdx
lea    (%rdx,%r15,8),%rax
mov    %rax,0x20(%rsp)
lea    (%rdx,%rsi,8),%rax
mov    %rax,-0x48(%rsp)
mov    0xa0(%rsp),%rdx
lea    (%rdx,%rcx,8),%rbp
mov    %rbp,0x28(%rsp)
lea    0x8(%rdx,%rcx,8),%rdx
mov    %rdx,-0x50(%rsp)
mov    -0x40(%rsp),%rbp
lea    0x0(,%rsi,8),%rsi
add    %rbp,%rsi
cmp    %rax,%r8
setb   -0x79(%rsp)
mov    0x20(%rsp),%rax
cmp    %rbx,%rax
setb   -0x7a(%rsp)
cmp    %rdx,%r8
setb   -0x7b(%rsp)
mov    0x28(%rsp),%rdx
cmp    %rbx,%rdx
setb   -0x7c(%rsp)
cmp    %rsi,%r8
lea    0x0(%rbp,%r15,8),%rbp
setb   -0x7d(%rsp)
cmp    %rbx,%rbp
setb   -0x7e(%rsp)
cmp    -0x50(%rsp),%rax
setb   %bl
mov    -0x48(%rsp),%r8
cmp    %r8,%rdx
setb   -0x50(%rsp)
cmp    %rsi,%rax
setb   %sil
cmp    %r8,%rbp
setb   -0x48(%rsp)
mov    -0x7a(%rsp),%al
test   %al,-0x79(%rsp)
mov    -0x68(%rsp),%rbp
jne    18af <kEpsilon_k_3D_Evaluate_sd+0x7af>
mov    -0x7d(%rsp),%al
mov    -0x7c(%rsp),%dl
and    %dl,-0x7b(%rsp)
mov    0xa0(%rsp),%rdx
jne    17b7 <kEpsilon_k_3D_Evaluate_sd+0x6b7>
and    -0x7e(%rsp),%al
jne    17b7 <kEpsilon_k_3D_Evaluate_sd+0x6b7>
and    -0x50(%rsp),%bl
jne    17b7 <kEpsilon_k_3D_Evaluate_sd+0x6b7>
mov    $0x0,%r8d
and    -0x48(%rsp),%sil
mov    -0x78(%rsp),%rbx
jne    1422 <kEpsilon_k_3D_Evaluate_sd+0x322>
movsd  (%rdx,%rcx,8),%xmm4
unpcklpd %xmm4,%xmm4
xor    %eax,%eax
mov    0x8(%rsp),%rdx
mov    -0x60(%rsp),%rsi
mov    -0x20(%rsp),%rbp
nopl   0x0(%rax)
movupd -0x10(%rdi,%rax,1),%xmm5
movupd (%rdi,%rax,1),%xmm6
mulpd  %xmm4,%xmm5
mulpd  %xmm4,%xmm6
movupd %xmm5,-0x10(%rbp,%rax,1)
movupd %xmm6,0x0(%rbp,%rax,1)
movupd -0x10(%rdi,%rax,1),%xmm5
movupd (%rdi,%rax,1),%xmm6
movupd %xmm5,-0x10(%rsi,%rax,1)
movupd %xmm6,(%rsi,%rax,1)
add    $0x20,%rax
cmp    %rax,%rdx
jne    1600 <kEpsilon_k_3D_Evaluate_sd+0x500>
mov    -0x30(%rsp),%rax
mov    %rax,%r8
cmp    %rbx,%rax
mov    0xa0(%rsp),%rdx
mov    -0x68(%rsp),%rbp
jne    1422 <kEpsilon_k_3D_Evaluate_sd+0x322>
nopl   0x0(%rax)
movsd  (%rdx,%rcx,8),%xmm4
mov    0xc0(%rsp),%rax
movsd  %xmm4,(%rax,%rcx,8)
mov    0xc8(%rsp),%rax
movabs $0x3ff0000000000000,%rdx
mov    %rdx,(%rax,%rcx,8)
cmpl   $0x0,-0x6c(%rsp)
mov    0xe8(%rsp),%rbx
mov    0xe0(%rsp),%r8
jle    1264 <kEpsilon_k_3D_Evaluate_sd+0x164>
movapd %xmm12,%xmm5
divsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm13,%xmm6
divsd  %xmm0,%xmm6
cmpl   $0x4,-0x6c(%rsp)
jb     16e7 <kEpsilon_k_3D_Evaluate_sd+0x5e7>
lea    (%r8,%r15,8),%rax
mov    0x30(%rsp),%rsi
lea    (%rbx,%rsi,8),%rdx
cmp    %rdx,%rax
jae    1794 <kEpsilon_k_3D_Evaluate_sd+0x694>
lea    (%r8,%rsi,8),%rax
lea    (%rbx,%r15,8),%rdx
cmp    %rax,%rdx
jae    1794 <kEpsilon_k_3D_Evaluate_sd+0x694>
xor    %eax,%eax
mov    -0x78(%rsp),%rbx
mov    -0x60(%rsp),%r8
mov    %rax,%rdx
not    %rdx
add    %rbx,%rdx
mov    0x10(%rsp),%rbx
test   %rbx,%rbx
je     1726 <kEpsilon_k_3D_Evaluate_sd+0x626>
mov    -0x18(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
movsd  %xmm5,(%r11,%rax,8)
movsd  %xmm6,0x0(%rbp,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rbx
jne    1710 <kEpsilon_k_3D_Evaluate_sd+0x610>
cmp    $0x3,%rdx
jae    1740 <kEpsilon_k_3D_Evaluate_sd+0x640>
mov    -0x58(%rsp),%r15
mov    -0x78(%rsp),%rbx
mov    -0x68(%rsp),%rbp
jmp    126e <kEpsilon_k_3D_Evaluate_sd+0x16e>
mov    -0x78(%rsp),%rbx
mov    -0x68(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
movsd  %xmm5,(%r11,%rax,8)
movsd  %xmm6,-0x10(%r9,%rax,8)
movsd  %xmm5,0x8(%r11,%rax,8)
movsd  %xmm6,-0x8(%r9,%rax,8)
movsd  %xmm5,0x10(%r11,%rax,8)
movsd  %xmm6,(%r9,%rax,8)
movsd  %xmm5,0x18(%r11,%rax,8)
movsd  %xmm6,0x8(%r9,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbx
jne    1750 <kEpsilon_k_3D_Evaluate_sd+0x650>
jmp    18a5 <kEpsilon_k_3D_Evaluate_sd+0x7a5>
movapd %xmm5,%xmm4
unpcklpd %xmm5,%xmm4
movapd %xmm6,%xmm7
unpcklpd %xmm6,%xmm7
cmpq   $0xc,(%rsp)
jae    17c4 <kEpsilon_k_3D_Evaluate_sd+0x6c4>
xor    %eax,%eax
mov    -0x38(%rsp),%r15
jmp    1850 <kEpsilon_k_3D_Evaluate_sd+0x750>
xor    %r8d,%r8d
mov    -0x78(%rsp),%rbx
jmp    1422 <kEpsilon_k_3D_Evaluate_sd+0x322>
mov    -0x10(%rsp),%rdx
xor    %eax,%eax
mov    -0x38(%rsp),%r15
mov    -0x28(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movupd %xmm4,-0x70(%r12,%rax,8)
movupd %xmm4,-0x60(%r12,%rax,8)
movupd %xmm7,-0x70(%rbx,%rax,8)
movupd %xmm7,-0x60(%rbx,%rax,8)
movupd %xmm4,-0x50(%r12,%rax,8)
movupd %xmm4,-0x40(%r12,%rax,8)
movupd %xmm7,-0x50(%rbx,%rax,8)
movupd %xmm7,-0x40(%rbx,%rax,8)
movupd %xmm4,-0x30(%r12,%rax,8)
movupd %xmm4,-0x20(%r12,%rax,8)
movupd %xmm7,-0x30(%rbx,%rax,8)
movupd %xmm7,-0x20(%rbx,%rax,8)
movupd %xmm4,-0x10(%r12,%rax,8)
movupd %xmm4,(%r12,%rax,8)
movupd %xmm7,-0x10(%rbx,%rax,8)
movupd %xmm7,(%rbx,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rdx
jne    17e0 <kEpsilon_k_3D_Evaluate_sd+0x6e0>
cmpq   $0x0,-0x8(%rsp)
mov    -0x60(%rsp),%r8
je     188f <kEpsilon_k_3D_Evaluate_sd+0x78f>
lea    (%r9,%rax,8),%rdx
lea    0x0(,%rax,8),%rax
add    %rbp,%rax
xor    %ebx,%ebx
xchg   %ax,%ax
movupd %xmm4,-0x10(%rax,%rbx,1)
movupd %xmm4,(%rax,%rbx,1)
movupd %xmm7,-0x10(%rdx,%rbx,1)
movupd %xmm7,(%rdx,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r15
jne    1870 <kEpsilon_k_3D_Evaluate_sd+0x770>
mov    -0x30(%rsp),%rdx
mov    %rdx,%rax
mov    -0x78(%rsp),%rbx
cmp    %rbx,%rdx
jne    16f3 <kEpsilon_k_3D_Evaluate_sd+0x5f3>
mov    -0x58(%rsp),%r15
jmp    126e <kEpsilon_k_3D_Evaluate_sd+0x16e>
xor    %r8d,%r8d
mov    -0x78(%rsp),%rbx
mov    0xa0(%rsp),%rdx
jmp    1422 <kEpsilon_k_3D_Evaluate_sd+0x322>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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