void kEpsilon_epsilon_2D_Evaluate_sd(int nPoints, int nSpace, double sigma_e,
                                     double c_1, double c_2, double c_mu,
                                     double c_e, double nu, double *velocity,
                                     double *gradu, double *gradv, double *k,
                                     double *epsilon, double *m_e, double *dm_e,
                                     double *phi_e, double *dphi_e, double *f_e,
                                     double *df_e, double *a_e, double *da_e_de,
                                     double *r_e, double *dr_e_de) {
  int i, I;
  double nu_t, dnu_t_de, PiD4, eval, kval, disp, ddisp_de;
  const double div_eps = 1.0e-3;
  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_de = -c_mu * k[i] * k[i] / (epsilon[i] * epsilon[i] + div_eps);
    if (nu_t < 0.0) {
      nu_t = 0.0;
      dnu_t_de = 0.0;
    }
    m_e[i] = epsilon[i];
    dm_e[i] = 1.0;
    for (I = 0; I < nSpace; I++) {
      f_e[i * nSpace + I] = epsilon[i] * velocity[i * nSpace + I];
      df_e[i * nSpace + I] = velocity[i * nSpace + I];
    }
    phi_e[i] = epsilon[i];
    dphi_e[i] = 1.0;
    for (I = 0; I < nSpace; I++) {
      a_e[i * 2 + I] = nu_t / sigma_e + nu;
      da_e_de[i * 2 + I] = dnu_t_de / sigma_e;
    }
    PiD4 = 2.0 * (gradu[i * nSpace + 0] * gradu[i * nSpace + 0] +
                  gradv[i * nSpace + 1] * gradv[i * nSpace + 1]) +
           (gradu[i * nSpace + 1] + gradv[i * nSpace + 0]) *
               (gradu[i * nSpace + 1] + gradv[i * nSpace + 0]);
    disp = c_2 * epsilon[i] * epsilon[i] / (k[i] + div_eps);
    ddisp_de = 2.0 * c_2 * epsilon[i] / (k[i] + div_eps);
    if (disp < 0.0) {
      disp = 0.0;
      ddisp_de = 0.0;
    }
    r_e[i] = -c_1 * k[i] * PiD4 + disp;
    dr_e_de[i] = ddisp_de;
  }
}


x86 assembly (clang, -O0):
<kEpsilon_epsilon_2D_Evaluate_sd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
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)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1615 <kEpsilon_epsilon_2D_Evaluate_sd+0x515>
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11bf <kEpsilon_epsilon_2D_Evaluate_sd+0xbf>
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    11cf <kEpsilon_epsilon_2D_Evaluate_sd+0xcf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    11cf <kEpsilon_epsilon_2D_Evaluate_sd+0xcf>
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1210 <kEpsilon_epsilon_2D_Evaluate_sd+0x110>
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1220 <kEpsilon_epsilon_2D_Evaluate_sd+0x120>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1220 <kEpsilon_epsilon_2D_Evaluate_sd+0x120>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xda1(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd37(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    12f4 <kEpsilon_epsilon_2D_Evaluate_sd+0x1f4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xcea(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13a9 <kEpsilon_epsilon_2D_Evaluate_sd+0x2a9>
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    132a <kEpsilon_epsilon_2D_Evaluate_sd+0x22a>
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xc35(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    143c <kEpsilon_epsilon_2D_Evaluate_sd+0x33c>
movsd  -0x68(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
mov    0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    13df <kEpsilon_epsilon_2D_Evaluate_sd+0x2df>
mov    -0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x50(%rbp),%rax
mov    -0x5c(%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
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xacc(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xac3(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xa91(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x90(%rbp),%xmm0
ff
jbe    15a7 <kEpsilon_epsilon_2D_Evaluate_sd+0x4a7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
mov    0x60(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    117f <kEpsilon_epsilon_2D_Evaluate_sd+0x7f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kEpsilon_epsilon_2D_Evaluate_sd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,0x50(%rsp)
mov    %rcx,0x48(%rsp)
mov    %rdx,-0x58(%rsp)
test   %edi,%edi
jle    18d6 <kEpsilon_epsilon_2D_Evaluate_sd+0x7d6>
mov    0xd0(%rsp),%r12
mov    0xc8(%rsp),%r11
movapd 0xec3(%rip),%xmm4
movapd %xmm3,%xmm8
xorpd  %xmm4,%xmm8
movapd %xmm2,%xmm11
addsd  %xmm2,%xmm11
xorpd  %xmm4,%xmm1
movslq %esi,%rax
mov    %edi,%edx
mov    %rdx,0x30(%rsp)
mov    %eax,%ebx
mov    %ebx,%edx
and    $0xfffffffc,%edx
mov    %rdx,-0x48(%rsp)
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x8(%rsp)
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rbx,%rdi
neg    %rdi
mov    %rdi,0x10(%rsp)
mov    %edx,%edi
and    $0x3,%edi
and    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x18(%rsp)
mov    %ebx,%edx
and    $0x3,%edx
mov    %rdx,0x8(%rsp)
lea    0x0(,%rbx,8),%rdx
and    $0xffffffffffffffe0,%rdx
mov    %rdx,(%rsp)
mov    %rdi,-0x10(%rsp)
shl    $0x5,%rdi
mov    %rdi,-0x50(%rsp)
movsd  0xe4a(%rip),%xmm10
xorpd  %xmm9,%xmm9
mov    %r9,%r10
mov    0xc0(%rsp),%rcx
mov    0xb8(%rsp),%rbp
mov    0x90(%rsp),%rdx
lea    0x10(%rcx),%rdi
mov    %rdi,-0x60(%rsp)
mov    %rax,0x38(%rsp)
lea    0x0(,%rax,8),%rax
mov    %rax,0x28(%rsp)
lea    0x10(%rbp),%rdi
mov    -0x58(%rsp),%rax
lea    0x10(%rax),%r14
lea    0x8(%rax),%r9
lea    0x8(%rbp),%r15
lea    0x8(%rcx),%r13
lea    0x70(%r12),%rax
mov    %rax,-0x30(%rsp)
lea    0x70(%r11),%rax
mov    %rax,-0x40(%rsp)
lea    0x10(%r12),%r8
mov    %r12,%rcx
lea    0x10(%r11),%rax
mov    %rax,-0x38(%rsp)
xor    %r12d,%r12d
mov    %rcx,-0x28(%rsp)
mov    -0x60(%rsp),%rbp
mov    %r10,0x40(%rsp)
mov    %esi,-0x7c(%rsp)
mov    %rbx,-0x68(%rsp)
jmp    138e <kEpsilon_epsilon_2D_Evaluate_sd+0x28e>
xchg   %ax,%ax
movsd  (%rdx,%r12,8),%xmm4
mov    0xa8(%rsp),%rax
movsd  %xmm4,(%rax,%r12,8)
mov    0xb0(%rsp),%rax
mov    %r10,(%rax,%r12,8)
mov    -0x70(%rsp),%rdi
mov    0x50(%rsp),%rax
movsd  0x8(%rax,%rdi,8),%xmm6
mov    0x48(%rsp),%rcx
movsd  (%rcx,%rdi,8),%xmm12
movsd  0x8(%rcx,%rdi,8),%xmm7
addsd  (%rax,%rdi,8),%xmm7
mulsd  %xmm6,%xmm6
mulsd  %xmm12,%xmm12
addsd  %xmm6,%xmm12
mulsd  %xmm7,%xmm7
addsd  %xmm12,%xmm12
addsd  %xmm7,%xmm12
mov    0x90(%rsp),%rdx
movsd  (%rdx,%r12,8),%xmm6
movapd %xmm6,%xmm7
mulsd  %xmm2,%xmm7
mulsd  %xmm6,%xmm7
mov    0x40(%rsp),%r10
movsd  (%r10,%r12,8),%xmm4
movapd %xmm4,%xmm13
addsd  %xmm10,%xmm13
divsd  %xmm13,%xmm7
mulsd  %xmm11,%xmm6
divsd  %xmm13,%xmm6
xorpd  %xmm13,%xmm13
maxsd  %xmm7,%xmm13
cmpltsd %xmm9,%xmm7
andnpd %xmm6,%xmm7
mulsd  %xmm1,%xmm4
mulsd  %xmm12,%xmm4
addsd  %xmm13,%xmm4
mov    0xd8(%rsp),%rax
movsd  %xmm4,(%rax,%r12,8)
mov    0xe0(%rsp),%rax
movlpd %xmm7,(%rax,%r12,8)
add    $0x1,%r12
mov    -0x60(%rsp),%rbp
mov    0x28(%rsp),%rax
add    %rax,%rbp
mov    -0x20(%rsp),%rdi
add    %rax,%rdi
add    %rax,%r14
add    %rax,%r9
add    %rax,%r15
add    %rax,%r13
addq   $0x10,-0x30(%rsp)
addq   $0x10,-0x40(%rsp)
add    $0x10,%r8
addq   $0x10,-0x38(%rsp)
addq   $0x10,-0x28(%rsp)
add    $0x10,%r11
cmp    0x30(%rsp),%r12
je     18d6 <kEpsilon_epsilon_2D_Evaluate_sd+0x7d6>
mov    %r12,%rcx
mov    0x38(%rsp),%rax
imul   %rax,%rcx
mov    %rcx,-0x70(%rsp)
movsd  (%rdx,%r12,8),%xmm14
movsd  (%r10,%r12,8),%xmm13
mov    0x98(%rsp),%rcx
movsd  %xmm14,(%rcx,%r12,8)
mov    0xa0(%rsp),%rcx
movabs $0x3ff0000000000000,%r10
mov    %r10,(%rcx,%r12,8)
test   %eax,%eax
mov    %rbp,-0x60(%rsp)
mov    %rdi,-0x20(%rsp)
jle    1260 <kEpsilon_epsilon_2D_Evaluate_sd+0x160>
cmp    $0x4,%esi
jae    14b0 <kEpsilon_epsilon_2D_Evaluate_sd+0x3b0>
xor    %eax,%eax
mov    -0x70(%rsp),%rdi
mov    %rax,%rcx
test   $0x1,%bl
je     144d <kEpsilon_epsilon_2D_Evaluate_sd+0x34d>
movsd  (%rdx,%r12,8),%xmm4
lea    (%rax,%rdi,1),%r10
mov    -0x58(%rsp),%rsi
mulsd  (%rsi,%r10,8),%xmm4
mov    0xb8(%rsp),%rcx
movsd  %xmm4,(%rcx,%r10,8)
movsd  (%rsi,%r10,8),%xmm4
mov    -0x7c(%rsp),%esi
mov    0xc0(%rsp),%rcx
movsd  %xmm4,(%rcx,%r10,8)
movabs $0x3ff0000000000000,%r10
mov    0x90(%rsp),%rdx
mov    %rax,%rcx
or     $0x1,%rcx
not    %rax
cmp    0x10(%rsp),%rax
je     1630 <kEpsilon_epsilon_2D_Evaluate_sd+0x530>
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%r12,8),%xmm4
mulsd  -0x8(%r9,%rcx,8),%xmm4
movsd  %xmm4,-0x8(%r15,%rcx,8)
movsd  -0x8(%r9,%rcx,8),%xmm4
movsd  %xmm4,-0x8(%r13,%rcx,8)
movsd  (%rdx,%r12,8),%xmm4
mulsd  (%r9,%rcx,8),%xmm4
movsd  %xmm4,(%r15,%rcx,8)
movsd  (%r9,%rcx,8),%xmm4
movsd  %xmm4,0x0(%r13,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rbx
jne    1460 <kEpsilon_epsilon_2D_Evaluate_sd+0x360>
jmp    1630 <kEpsilon_epsilon_2D_Evaluate_sd+0x530>
nop
mov    -0x70(%rsp),%rax
lea    (%rax,%rbx,1),%rsi
mov    0xb8(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
lea    (%rcx,%rsi,8),%rbp
mov    0xc0(%rsp),%rbx
lea    (%rbx,%rax,8),%rcx
mov    %rcx,0x18(%rsp)
lea    (%rbx,%rsi,8),%rcx
mov    %rcx,0x20(%rsp)
lea    (%rdx,%r12,8),%r10
lea    (%rdx,%r12,8),%rdx
add    $0x8,%rdx
mov    -0x58(%rsp),%rbx
lea    (%rbx,%rsi,8),%rsi
cmp    %rcx,%rdi
setb   -0x71(%rsp)
mov    0x18(%rsp),%rcx
cmp    %rbp,%rcx
setb   -0x72(%rsp)
cmp    %rdx,%rdi
setb   -0x74(%rsp)
cmp    %rbp,%r10
setb   -0x73(%rsp)
cmp    %rsi,%rdi
lea    (%rbx,%rax,8),%rdi
setb   -0x75(%rsp)
cmp    %rbp,%rdi
setb   %al
cmp    %rdx,%rcx
setb   %dl
mov    0x20(%rsp),%rbx
cmp    %rbx,%r10
setb   -0x76(%rsp)
cmp    %rsi,%rcx
setb   %bpl
cmp    %rbx,%rdi
setb   %dil
mov    -0x72(%rsp),%cl
test   %cl,-0x71(%rsp)
jne    18b4 <kEpsilon_epsilon_2D_Evaluate_sd+0x7b4>
mov    %eax,%esi
mov    %edx,%ecx
mov    -0x75(%rsp),%al
mov    -0x74(%rsp),%dl
and    -0x73(%rsp),%dl
mov    -0x68(%rsp),%rbx
mov    0x90(%rsp),%rdx
movabs $0x3ff0000000000000,%r10
jne    173f <kEpsilon_epsilon_2D_Evaluate_sd+0x63f>
and    %sil,%al
jne    173f <kEpsilon_epsilon_2D_Evaluate_sd+0x63f>
and    -0x76(%rsp),%cl
jne    173f <kEpsilon_epsilon_2D_Evaluate_sd+0x63f>
mov    $0x0,%eax
and    %dil,%bpl
mov    -0x7c(%rsp),%esi
mov    -0x70(%rsp),%rdi
jne    13f1 <kEpsilon_epsilon_2D_Evaluate_sd+0x2f1>
movsd  (%rdx,%r12,8),%xmm7
unpcklpd %xmm7,%xmm7
xor    %eax,%eax
mov    (%rsp),%rcx
mov    -0x60(%rsp),%rbp
mov    -0x20(%rsp),%rdi
nop
movupd -0x10(%r14,%rax,1),%xmm6
movupd (%r14,%rax,1),%xmm4
mulpd  %xmm7,%xmm6
mulpd  %xmm7,%xmm4
movupd %xmm6,-0x10(%rdi,%rax,1)
movupd %xmm4,(%rdi,%rax,1)
movupd -0x10(%r14,%rax,1),%xmm4
movupd (%r14,%rax,1),%xmm6
movupd %xmm4,-0x10(%rbp,%rax,1)
movupd %xmm6,0x0(%rbp,%rax,1)
add    $0x20,%rax
cmp    %rax,%rcx
jne    15d0 <kEpsilon_epsilon_2D_Evaluate_sd+0x4d0>
mov    -0x48(%rsp),%rcx
mov    %rcx,%rax
cmp    %rbx,%rcx
mov    -0x70(%rsp),%rdi
jne    13f1 <kEpsilon_epsilon_2D_Evaluate_sd+0x2f1>
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%r12,8),%xmm4
mov    0xa8(%rsp),%rax
movsd  %xmm4,(%rax,%r12,8)
mov    0xb0(%rsp),%rax
mov    %r10,(%rax,%r12,8)
test   %esi,%esi
jle    1285 <kEpsilon_epsilon_2D_Evaluate_sd+0x185>
movapd %xmm13,%xmm12
mulsd  %xmm3,%xmm12
mulsd  %xmm13,%xmm12
movapd %xmm14,%xmm4
addsd  %xmm10,%xmm4
divsd  %xmm4,%xmm12
movapd %xmm13,%xmm6
mulsd  %xmm8,%xmm6
mulsd  %xmm13,%xmm6
mulsd  %xmm14,%xmm14
addsd  %xmm10,%xmm14
divsd  %xmm14,%xmm6
xorpd  %xmm4,%xmm4
maxsd  %xmm12,%xmm4
cmpltsd %xmm9,%xmm12
andnpd %xmm6,%xmm12
divsd  %xmm0,%xmm4
addsd  %xmm5,%xmm4
divsd  %xmm0,%xmm12
cmp    $0x4,%esi
jae    16c7 <kEpsilon_epsilon_2D_Evaluate_sd+0x5c7>
xor    %r10d,%r10d
mov    -0x68(%rsp),%rbx
jmp    1820 <kEpsilon_epsilon_2D_Evaluate_sd+0x720>
mov    %r12,%rax
shl    $0x4,%rax
mov    0xc8(%rsp),%rdx
lea    (%rdx,%rax,1),%r10
mov    -0x68(%rsp),%rcx
lea    (%rcx,%r12,2),%rcx
mov    0xd0(%rsp),%rbx
lea    (%rbx,%rcx,8),%rsi
cmp    %rsi,%r10
jae    1714 <kEpsilon_epsilon_2D_Evaluate_sd+0x614>
mov    %rbx,%rsi
add    %rbx,%rax
lea    (%rdx,%rcx,8),%rcx
cmp    %rcx,%rax
jae    1714 <kEpsilon_epsilon_2D_Evaluate_sd+0x614>
xor    %r10d,%r10d
mov    -0x7c(%rsp),%esi
mov    -0x68(%rsp),%rbx
jmp    1820 <kEpsilon_epsilon_2D_Evaluate_sd+0x720>
movapd %xmm4,%xmm6
unpcklpd %xmm4,%xmm6
movapd %xmm12,%xmm7
unpcklpd %xmm12,%xmm7
cmpq   $0xc,-0x8(%rsp)
mov    -0x30(%rsp),%rdx
jae    174a <kEpsilon_epsilon_2D_Evaluate_sd+0x64a>
xor    %ecx,%ecx
mov    -0x50(%rsp),%rbx
jmp    17c8 <kEpsilon_epsilon_2D_Evaluate_sd+0x6c8>
xor    %eax,%eax
mov    -0x7c(%rsp),%esi
jmp    13ec <kEpsilon_epsilon_2D_Evaluate_sd+0x2ec>
mov    -0x18(%rsp),%rax
xor    %ecx,%ecx
mov    -0x50(%rsp),%rbx
mov    -0x40(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movupd %xmm6,-0x70(%rsi,%rcx,8)
movupd %xmm6,-0x60(%rsi,%rcx,8)
movupd %xmm7,-0x70(%rdx,%rcx,8)
movupd %xmm7,-0x60(%rdx,%rcx,8)
movupd %xmm6,-0x50(%rsi,%rcx,8)
movupd %xmm6,-0x40(%rsi,%rcx,8)
movupd %xmm7,-0x50(%rdx,%rcx,8)
movupd %xmm7,-0x40(%rdx,%rcx,8)
movupd %xmm6,-0x30(%rsi,%rcx,8)
movupd %xmm6,-0x20(%rsi,%rcx,8)
movupd %xmm7,-0x30(%rdx,%rcx,8)
movupd %xmm7,-0x20(%rdx,%rcx,8)
movupd %xmm6,-0x10(%rsi,%rcx,8)
movupd %xmm6,(%rsi,%rcx,8)
movupd %xmm7,-0x10(%rdx,%rcx,8)
movupd %xmm7,(%rdx,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rax
jne    1760 <kEpsilon_epsilon_2D_Evaluate_sd+0x660>
cmpq   $0x0,-0x10(%rsp)
je     17ff <kEpsilon_epsilon_2D_Evaluate_sd+0x6ff>
lea    (%r8,%rcx,8),%rax
mov    -0x38(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
xor    %esi,%esi
nop
movupd %xmm6,-0x10(%rcx,%rsi,1)
movupd %xmm6,(%rcx,%rsi,1)
movupd %xmm7,-0x10(%rax,%rsi,1)
movupd %xmm7,(%rax,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rbx
jne    17e0 <kEpsilon_epsilon_2D_Evaluate_sd+0x6e0>
mov    -0x48(%rsp),%rax
mov    %rax,%r10
mov    -0x68(%rsp),%rbx
cmp    %rbx,%rax
mov    -0x7c(%rsp),%esi
je     1285 <kEpsilon_epsilon_2D_Evaluate_sd+0x185>
nopl   0x0(%rax)
mov    %r10,%rax
not    %rax
add    %rbx,%rax
mov    0x8(%rsp),%rcx
test   %rcx,%rcx
je     1856 <kEpsilon_epsilon_2D_Evaluate_sd+0x756>
mov    -0x28(%rsp),%rdx
nopl   0x0(%rax,%rax,1)
movsd  %xmm4,(%r11,%r10,8)
movsd  %xmm12,(%rdx,%r10,8)
add    $0x1,%r10
add    $0xffffffffffffffff,%rcx
jne    1840 <kEpsilon_epsilon_2D_Evaluate_sd+0x740>
cmp    $0x3,%rax
mov    -0x68(%rsp),%rbx
jb     1285 <kEpsilon_epsilon_2D_Evaluate_sd+0x185>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm4,(%r11,%r10,8)
movsd  %xmm12,-0x10(%r8,%r10,8)
movsd  %xmm4,0x8(%r11,%r10,8)
movsd  %xmm12,-0x8(%r8,%r10,8)
movsd  %xmm4,0x10(%r11,%r10,8)
movsd  %xmm12,(%r8,%r10,8)
movsd  %xmm4,0x18(%r11,%r10,8)
movsd  %xmm12,0x8(%r8,%r10,8)
add    $0x4,%r10
cmp    %r10,%rbx
jne    1870 <kEpsilon_epsilon_2D_Evaluate_sd+0x770>
jmp    1285 <kEpsilon_epsilon_2D_Evaluate_sd+0x185>
xor    %eax,%eax
mov    -0x7c(%rsp),%esi
mov    -0x68(%rsp),%rbx
mov    0x90(%rsp),%rdx
movabs $0x3ff0000000000000,%r10
jmp    13ec <kEpsilon_epsilon_2D_Evaluate_sd+0x2ec>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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