void compute_color_sf(double p[3], double value, double n[3],
                      int color_mapping_style, double *interval_point,
                      double view_point_d[3], int interval_mapping_num,
                      int color_system_type, int num_of_lights,
                      double *light_point, double k_ads[3],
                      double accum_rgba[4], double mincolor, double maxcolor,
                      int display_method) {
  int i, j;
  double cosalpha, costheta;
  double color[3];
  double lp[3], vp[3], lp_norm, vp_norm, norm, hp[3], hp_norm;
  double inprodLN, inprodVN, inprodHN;
  double r, g, b;
  if (display_method != 4) {
    if (color_mapping_style == 1) {
      if (fabs(maxcolor - mincolor) > 0.00000001)
        value = (value - mincolor) / (maxcolor - mincolor);
    }
    if (color_mapping_style == 2) {
      mincolor = interval_point[0];
      maxcolor = interval_point[1];
      if (fabs(maxcolor - mincolor) > 0.00000001)
        value = (value - mincolor) / (maxcolor - mincolor);
    }
    if ((color_mapping_style == 3) || (color_mapping_style == 4)) {
      if (value < interval_point[0])
        value = 0.0;
      else if (value > interval_point[interval_mapping_num * 2])
        value = 1.0;
      else {
        for (i = 1; i < interval_mapping_num + 1; i++) {
          if ((value <= interval_point[i * 2]) &&
              (value > interval_point[(i - 1) * 2])) {
            value = (value - interval_point[(i - 1) * 2]) /
                        (interval_point[i * 2] - interval_point[(i - 1) * 2]) *
                        (interval_point[i * 2 + 1] -
                         interval_point[(i - 1) * 2 + 1]) +
                    interval_point[(i - 1) * 2 + 1];
            break;
          }
        }
      }
    }
  }
  if (color_system_type == 1) {
    if (value < 0.0)
      value = 0.0;
    if (value > 1.0)
      value = 1.0;
    if (value <= 0.25) {
      r = 0.0;
      g = value * 4.0;
      b = 1.0;
    } else if ((value > 0.25) && (value <= 0.5)) {
      r = 0.0;
      g = 1.0;
      b = (0.5 - value) * 4.0;
    } else if ((value > 0.5) && (value <= 0.75)) {
      r = (value - 0.5) * 4.0;
      g = 1.0;
      b = 0.0;
    } else if (value > 0.75) {
      r = 1.0;
      g = (1.0 - value) * 4.0;
      b = 0.0;
    }
  } else if (color_system_type == 2) {
    if (value < 0.0)
      value = 0.0;
    if (value > 1.0)
      value = 1.0;
    if (value <= 0.2) {
      g = 0.0;
      b = 1.0;
      r = (0.2 - value) * 5.0;
    } else if ((value > 0.2) && (value <= 0.4)) {
      r = 0.0;
      b = 1.0;
      g = (value - 0.2) * 5.0;
    } else if ((value > 0.4) && (value <= 0.6)) {
      r = 0.0;
      g = 1.0;
      b = 1.0 - (value - 0.4) * 5.0;
    } else if ((value > 0.6) && (value <= 0.8)) {
      r = (value - 0.6) * 5.0;
      g = 1.0;
      b = 0.0;
    } else if (value > 0.0) {
      r = 1.0;
      g = 1.0 - (value - 0.8) * 5.0;
      b = 0.0;
    }
  } else if (color_system_type == 3) {
    r = g = b = value;
  }
  color[0] = r;
  color[1] = g;
  color[2] = b;
  r = 0.0;
  g = 0.0;
  b = 0.0;
  for (j = 0; j < num_of_lights; j++) {
    for (i = 0; i < 3; i++) {
      lp[i] = light_point[j * 3 + i] - p[i];
      vp[i] = view_point_d[i] - p[i];
      hp[i] = (lp[i] + vp[i]) / 2.0;
    }
    lp_norm = sqrt((lp[0]) * (lp[0]) + (lp[1]) * (lp[1]) + (lp[2]) * (lp[2]));
    vp_norm = sqrt((vp[0]) * (vp[0]) + (vp[1]) * (vp[1]) + (vp[2]) * (vp[2]));
    hp_norm = sqrt((hp[0]) * (hp[0]) + (hp[1]) * (hp[1]) + (hp[2]) * (hp[2]));
    if (fabs(lp_norm) > 0.00000001) {
      for (i = 0; i < 3; i++)
        lp[i] /= lp_norm;
    }
    if (fabs(vp_norm) > 0.00000001) {
      for (i = 0; i < 3; i++)
        vp[i] /= vp_norm;
    }
    if (fabs(hp_norm) > 0.00000001) {
      for (i = 0; i < 3; i++)
        hp[i] /= hp_norm;
    }
    norm = sqrt((n[0]) * (n[0]) + (n[1]) * (n[1]) + (n[2]) * (n[2]));
    if (fabs(norm) > 0.00000001) {
      for (i = 0; i < 3; i++)
        n[i] /= norm;
    }
    inprodLN = n[0] * lp[0] + n[1] * lp[1] + n[2] * lp[2];
    inprodVN = n[0] * vp[0] + n[1] * vp[1] + n[2] * vp[2];
    inprodHN = n[0] * hp[0] + n[1] * hp[1] + n[2] * hp[2];
    cosalpha = inprodLN;
    costheta = inprodLN * inprodVN - sqrt(1.0 - inprodLN * inprodLN) *
                                         sqrt(1.0 - inprodVN * inprodVN);
    cosalpha = fabs(cosalpha);
    if (cosalpha > 0) {
      r += color[0] * (k_ads[0] + k_ads[1] * cosalpha +
                       k_ads[2] * costheta * costheta * costheta * costheta *
                           costheta * costheta);
      g += color[1] * (k_ads[0] + k_ads[1] * cosalpha +
                       k_ads[2] * costheta * costheta * costheta * costheta *
                           costheta * costheta);
      b += color[2] * (k_ads[0] + k_ads[1] * cosalpha +
                       k_ads[2] * costheta * costheta * costheta * costheta *
                           costheta * costheta);
    } else {
      r += k_ads[0] * color[0];
      g += k_ads[0] * color[1];
      b += k_ads[0] * color[2];
    }
  }
  accum_rgba[0] = r;
  accum_rgba[1] = g;
  accum_rgba[2] = b;
  accum_rgba[3] = 1.0;
  return;
}


x86 assembly (clang, -O0):
<compute_color_sf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
cmpl   $0x4,0x38(%rbp)
je     13a4 <compute_color_sf+0x294>
cmpl   $0x1,-0x1c(%rbp)
jne    11b3 <compute_color_sf+0xa3>
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movaps 0x1ee5(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x1e79(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ae <compute_color_sf+0x9e>
movsd  -0x10(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11b3 <compute_color_sf+0xa3>
cmpl   $0x2,-0x1c(%rbp)
jne    1221 <compute_color_sf+0x111>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movaps 0x1e77(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x1e0b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    121c <compute_color_sf+0x10c>
movsd  -0x10(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1221 <compute_color_sf+0x111>
cmpl   $0x3,-0x1c(%rbp)
je     1235 <compute_color_sf+0x125>
cmpl   $0x4,-0x1c(%rbp)
jne    139f <compute_color_sf+0x28f>
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1259 <compute_color_sf+0x149>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    139a <compute_color_sf+0x28a>
movsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1288 <compute_color_sf+0x178>
movsd  0x1d8a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1395 <compute_color_sf+0x285>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1390 <compute_color_sf+0x280>
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     137d <compute_color_sf+0x26d>
movsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    137d <compute_color_sf+0x26d>
movsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1390 <compute_color_sf+0x280>
jmp    1382 <compute_color_sf+0x272>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    128f <compute_color_sf+0x17f>
jmp    1395 <compute_color_sf+0x285>
jmp    139a <compute_color_sf+0x28a>
jmp    139f <compute_color_sf+0x28f>
jmp    13a4 <compute_color_sf+0x294>
cmpl   $0x1,0x10(%rbp)
jne    1571 <compute_color_sf+0x461>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    13c4 <compute_color_sf+0x2b4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0x1c37(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13e8 <compute_color_sf+0x2d8>
movsd  0x1c25(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0x1c48(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1430 <compute_color_sf+0x320>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x1c42(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x1be5(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    156c <compute_color_sf+0x45c>
movsd  -0x10(%rbp),%xmm0
movsd  0x1bfb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    149b <compute_color_sf+0x38b>
movsd  0x1bf1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     149b <compute_color_sf+0x38b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x1b9b(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x1bc3(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0x1bc6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1567 <compute_color_sf+0x457>
movsd  -0x10(%rbp),%xmm0
movsd  0x1b98(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    150a <compute_color_sf+0x3fa>
movsd  0x1b8e(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     150a <compute_color_sf+0x3fa>
movsd  -0x10(%rbp),%xmm0
movsd  0x1b6e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0x1b72(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x1b16(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1562 <compute_color_sf+0x452>
movsd  -0x10(%rbp),%xmm0
movsd  0x1b31(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    155d <compute_color_sf+0x44d>
movsd  0x1adf(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x1acf(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0x1b0a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1562 <compute_color_sf+0x452>
jmp    1567 <compute_color_sf+0x457>
jmp    156c <compute_color_sf+0x45c>
jmp    1838 <compute_color_sf+0x728>
cmpl   $0x2,0x10(%rbp)
jne    1807 <compute_color_sf+0x6f7>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1591 <compute_color_sf+0x481>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0x1a6a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15b5 <compute_color_sf+0x4a5>
movsd  0x1a58(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0x1a53(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1609 <compute_color_sf+0x4f9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x1a2d(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  0x1a25(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0x1a38(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1802 <compute_color_sf+0x6f2>
movsd  -0x10(%rbp),%xmm0
movsd  0x19fa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1678 <compute_color_sf+0x568>
movsd  0x19f0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1678 <compute_color_sf+0x568>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x19c2(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  0x19b5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0x19c9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
jmp    17fd <compute_color_sf+0x6ed>
movsd  -0x10(%rbp),%xmm0
movsd  0x1993(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    170a <compute_color_sf+0x5fa>
movsd  0x1989(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     170a <compute_color_sf+0x5fa>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x1953(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  0x194e(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x1943(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x190f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    17f8 <compute_color_sf+0x6e8>
movsd  -0x10(%rbp),%xmm0
movsd  0x1909(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1779 <compute_color_sf+0x669>
movsd  0x18ff(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1779 <compute_color_sf+0x669>
movsd  -0x10(%rbp),%xmm0
movsd  0x18df(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0x18e3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x18a7(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    17f3 <compute_color_sf+0x6e3>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    17ee <compute_color_sf+0x6de>
movsd  0x1875(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  0x1880(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x1865(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x1831(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    17f3 <compute_color_sf+0x6e3>
jmp    17f8 <compute_color_sf+0x6e8>
jmp    17fd <compute_color_sf+0x6ed>
jmp    1802 <compute_color_sf+0x6f2>
jmp    1833 <compute_color_sf+0x723>
cmpl   $0x3,0x10(%rbp)
jne    182e <compute_color_sf+0x71e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1833 <compute_color_sf+0x723>
jmp    1838 <compute_color_sf+0x728>
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1fd3 <compute_color_sf+0xec3>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1939 <compute_color_sf+0x829>
mov    0x20(%rbp),%rax
imul   $0x3,-0x50(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movslq -0x4c(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movslq -0x4c(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movslq -0x4c(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x4c(%rbp),%rax
addsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  0x173e(%rip),%xmm1
divsd  %xmm1,%xmm0
movslq -0x4c(%rbp),%rax
movsd  %xmm0,-0xf0(%rbp,%rax,8)
ff ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    189a <compute_color_sf+0x78a>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm2
ff
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movaps 0x1631(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x15c5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1a8b <compute_color_sf+0x97b>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1a86 <compute_color_sf+0x976>
movsd  -0xc8(%rbp),%xmm1
ff
movslq -0x4c(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1a4c <compute_color_sf+0x93c>
jmp    1a8b <compute_color_sf+0x97b>
movsd  -0xd0(%rbp),%xmm0
ff
movaps 0x15c6(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x155a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1af6 <compute_color_sf+0x9e6>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1af1 <compute_color_sf+0x9e1>
movsd  -0xd0(%rbp),%xmm1
ff
movslq -0x4c(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1ab7 <compute_color_sf+0x9a7>
jmp    1af6 <compute_color_sf+0x9e6>
movsd  -0xf8(%rbp),%xmm0
ff
movaps 0x155b(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x14ef(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1b61 <compute_color_sf+0xa51>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1b5c <compute_color_sf+0xa4c>
movsd  -0xf8(%rbp),%xmm1
ff
movslq -0x4c(%rbp),%rax
movsd  -0xf0(%rbp,%rax,8),%xmm0
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp,%rax,8)
ff ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1b22 <compute_color_sf+0xa12>
jmp    1b61 <compute_color_sf+0xa51>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movaps 0x149f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x1433(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1c19 <compute_color_sf+0xb09>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1c14 <compute_color_sf+0xb04>
movsd  -0xd8(%rbp),%xmm1
ff
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1bde <compute_color_sf+0xace>
jmp    1c19 <compute_color_sf+0xb09>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0xa0(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0xc0(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0xf0(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0xe0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x12b1(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x126d(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x140(%rbp),%xmm1
ff
movsd  -0x138(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movaps 0x126d(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1f51 <compute_color_sf+0xe41>
movsd  -0x80(%rbp),%xmm0
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mov    0x28(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x118(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mov    0x28(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x120(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mov    0x28(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x60(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x128(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1fc0 <compute_color_sf+0xeb0>
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x118(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x120(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x128(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    1fc5 <compute_color_sf+0xeb5>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1887 <compute_color_sf+0x777>
movsd  -0x118(%rbp),%xmm0
ff
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x120(%rbp),%xmm0
ff
mov    0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x128(%rbp),%xmm0
ff
mov    0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    0x30(%rbp),%rax
movsd  0xff7(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_color_sf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r8,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    0xf0(%rsp),%esi
cmpl   $0x4,0x118(%rsp)
04
jne    11c3 <compute_color_sf+0xb3>
movapd %xmm0,%xmm2
mov    0xf8(%rsp),%eax
cmp    $0x2,%esi
je     1200 <compute_color_sf+0xf0>
cmp    $0x1,%esi
jne    1267 <compute_color_sf+0x157>
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
maxsd  %xmm2,%xmm0
movsd  0xea8(%rip),%xmm2
movapd %xmm2,%xmm3
minsd  %xmm0,%xmm3
movsd  0xef0(%rip),%xmm0
ucomisd %xmm3,%xmm0
jae    1274 <compute_color_sf+0x164>
ucomisd 0xede(%rip),%xmm3
jbe    1302 <compute_color_sf+0x1f2>
movsd  0xee0(%rip),%xmm2
ucomisd %xmm3,%xmm2
jb     1302 <compute_color_sf+0x1f2>
subsd  %xmm3,%xmm2
mulsd  0xec2(%rip),%xmm2
movsd  0xe5a(%rip),%xmm3
jmp    14ad <compute_color_sf+0x39d>
cmp    $0x2,%edx
je     1281 <compute_color_sf+0x171>
cmp    $0x1,%edx
jne    12b5 <compute_color_sf+0x1a5>
subsd  %xmm1,%xmm2
movapd 0xe1f(%rip),%xmm3
andpd  %xmm2,%xmm3
ucomisd 0xe23(%rip),%xmm3
jbe    113f <compute_color_sf+0x2f>
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
jmp    113f <compute_color_sf+0x2f>
xorpd  %xmm3,%xmm3
xorpd  %xmm1,%xmm1
maxsd  %xmm2,%xmm1
movsd  0xe04(%rip),%xmm2
movapd %xmm2,%xmm0
minsd  %xmm1,%xmm0
movsd  0xdfc(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    12f1 <compute_color_sf+0x1e1>
ucomisd 0xdea(%rip),%xmm0
jbe    133f <compute_color_sf+0x22f>
movsd  0xdec(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     133f <compute_color_sf+0x22f>
addsd  0xe12(%rip),%xmm0
mulsd  0xdca(%rip),%xmm0
xorpd  %xmm1,%xmm1
jmp    14a9 <compute_color_sf+0x399>
movapd %xmm2,%xmm1
movapd %xmm2,%xmm3
jmp    14ad <compute_color_sf+0x39d>
mulsd  0xdfc(%rip),%xmm3
jmp    14ad <compute_color_sf+0x39d>
movsd  (%rcx),%xmm2
movsd  0x8(%rcx),%xmm1
subsd  %xmm2,%xmm1
movapd 0xd6a(%rip),%xmm3
andpd  %xmm1,%xmm3
ucomisd 0xd6e(%rip),%xmm3
jbe    113f <compute_color_sf+0x2f>
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
jmp    113f <compute_color_sf+0x2f>
add    $0xfffffffd,%edx
cmp    $0x1,%edx
ja     113f <compute_color_sf+0x2f>
movsd  (%rcx),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm1
ja     1143 <compute_color_sf+0x33>
lea    (%r9,%r9,1),%eax
cltq
ucomisd (%rcx,%rax,8),%xmm0
jbe    13f4 <compute_color_sf+0x2e4>
movsd  0xd2c(%rip),%xmm2
jmp    1143 <compute_color_sf+0x33>
subsd  %xmm0,%xmm1
mulsd  0xd2b(%rip),%xmm1
jmp    14ad <compute_color_sf+0x39d>
ucomisd 0xd76(%rip),%xmm3
jbe    1380 <compute_color_sf+0x270>
movsd  0xd74(%rip),%xmm0
ucomisd %xmm3,%xmm0
jb     1380 <compute_color_sf+0x270>
addsd  0xd6e(%rip),%xmm3
mulsd  0xd4e(%rip),%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm3,%xmm1
movsd  0xcde(%rip),%xmm3
jmp    14ad <compute_color_sf+0x39d>
ucomisd 0xce9(%rip),%xmm0
jbe    13af <compute_color_sf+0x29f>
movsd  0xce7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     13af <compute_color_sf+0x29f>
addsd  0xd01(%rip),%xmm0
mulsd  0xce9(%rip),%xmm0
movsd  0xca9(%rip),%xmm3
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
jmp    14ad <compute_color_sf+0x39d>
ucomisd 0xd00(%rip),%xmm3
jbe    14ad <compute_color_sf+0x39d>
movsd  0xc82(%rip),%xmm1
movapd %xmm1,%xmm0
subsd  %xmm3,%xmm0
mulsd  0xcd2(%rip),%xmm0
xorpd  %xmm2,%xmm2
jmp    14a9 <compute_color_sf+0x399>
ucomisd 0xc81(%rip),%xmm0
jbe    1483 <compute_color_sf+0x373>
movsd  0xc7b(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1483 <compute_color_sf+0x373>
addsd  0xc81(%rip),%xmm0
mulsd  0xc49(%rip),%xmm0
xorpd  %xmm2,%xmm2
movsd  0xc2d(%rip),%xmm3
movapd %xmm0,%xmm1
jmp    14ad <compute_color_sf+0x39d>
test   %r9d,%r9d
jle    113f <compute_color_sf+0x2f>
mov    %r9d,%edi
shl    $0x4,%rdi
add    $0x10,%rdi
movabs $0x100000000,%rax
mov    $0x10,%edx
movabs $0x200000000,%rbp
jmp    1440 <compute_color_sf+0x330>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %rbp,%rax
add    $0x10,%rdx
cmp    %rdx,%rdi
je     113f <compute_color_sf+0x2f>
movsd  (%rcx,%rdx,1),%xmm1
ucomisd %xmm0,%xmm1
jb     1430 <compute_color_sf+0x320>
movsd  -0x10(%rcx,%rdx,1),%xmm2
ucomisd %xmm2,%xmm0
jbe    1430 <compute_color_sf+0x320>
subsd  %xmm2,%xmm0
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0x8(%rcx,%rdx,1),%xmm2
sar    $0x1d,%rax
movsd  (%rcx,%rax,1),%xmm1
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
jmp    1143 <compute_color_sf+0x33>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jbe    14ad <compute_color_sf+0x39d>
addsd  0xbb3(%rip),%xmm0
mulsd  0xbb3(%rip),%xmm0
movsd  0xb73(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm0,%xmm3
test   %eax,%eax
jle    1978 <compute_color_sf+0x868>
mov    0x108(%rsp),%r13
mov    %eax,%eax
shl    $0x3,%rax
lea    (%rax,%rax,2),%r12
xorpd  %xmm8,%xmm8
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
xorpd  %xmm4,%xmm4
xorpd  %xmm9,%xmm9
movsd  %xmm2,0x60(%rsp)
movsd  %xmm3,0x58(%rsp)
movsd  %xmm1,0x50(%rsp)
jmp    1534 <compute_color_sf+0x424>
nop
movsd  0x0(%r13),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm1,%xmm9
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
movsd  0x70(%rsp),%xmm4
addsd  %xmm1,%xmm4
mulsd  %xmm2,%xmm0
movsd  0x78(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rbp
cmp    %rbp,%r12
je     1985 <compute_color_sf+0x875>
movsd  %xmm0,0x78(%rsp)
mov    0x100(%rsp),%rax
movsd  (%rax,%rbp,1),%xmm1
movsd  (%r15),%xmm3
subsd  %xmm3,%xmm1
movsd  (%r14),%xmm5
movupd 0x8(%r15),%xmm7
movupd 0x8(%r14),%xmm6
movupd 0x8(%rax,%rbp,1),%xmm0
subpd  %xmm7,%xmm0
movapd %xmm0,0x30(%rsp)
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
mulsd  %xmm0,%xmm0
movsd  %xmm1,0x20(%rsp)
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm2,0x40(%rsp)
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
movsd  %xmm4,0x70(%rsp)
movsd  %xmm9,0x68(%rsp)
jb     15c0 <compute_color_sf+0x4b0>
sqrtsd %xmm0,%xmm0
jmp    1606 <compute_color_sf+0x4f6>
nopw   0x0(%rax,%rax,1)
movapd %xmm6,0x10(%rsp)
movsd  %xmm5,0x8(%rsp)
movsd  %xmm3,0x90(%rsp)
movapd %xmm7,0xa0(%rsp)
call   1030 <sqrt@plt>
movapd 0xa0(%rsp),%xmm7
movsd  0x90(%rsp),%xmm3
movsd  0x8(%rsp),%xmm5
movapd 0x10(%rsp),%xmm6
xorpd  %xmm8,%xmm8
movapd %xmm0,0x80(%rsp)
subsd  %xmm3,%xmm5
subpd  %xmm7,%xmm6
movapd %xmm6,%xmm7
unpckhpd %xmm6,%xmm7
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
movapd %xmm6,0x10(%rsp)
movsd  %xmm5,0x8(%rsp)
jb     1660 <compute_color_sf+0x550>
xorps  %xmm9,%xmm9
sqrtsd %xmm0,%xmm9
jmp    168d <compute_color_sf+0x57d>
nopl   (%rax)
movapd %xmm7,0x90(%rsp)
call   1030 <sqrt@plt>
movapd 0x90(%rsp),%xmm7
movsd  0x8(%rsp),%xmm5
movapd 0x10(%rsp),%xmm6
xorpd  %xmm8,%xmm8
movapd %xmm0,%xmm9
movapd 0x30(%rsp),%xmm3
movapd 0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm4
addsd  %xmm5,%xmm4
movsd  0x9d5(%rip),%xmm2
mulsd  %xmm2,%xmm4
movapd %xmm3,%xmm1
addsd  %xmm6,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm7,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm4,%xmm4
addsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm0
addsd  %xmm4,%xmm0
ucomisd %xmm8,%xmm0
jae    1708 <compute_color_sf+0x5f8>
movapd %xmm9,0x40(%rsp)
call   1030 <sqrt@plt>
movapd 0x40(%rsp),%xmm9
movsd  0x8(%rsp),%xmm5
movapd 0x10(%rsp),%xmm6
movapd 0x30(%rsp),%xmm3
xorpd  %xmm8,%xmm8
movapd 0x80(%rsp),%xmm1
movapd %xmm1,%xmm0
andpd  0x8e3(%rip),%xmm0
ucomisd 0x8eb(%rip),%xmm0
jbe    173f <compute_color_sf+0x62f>
movsd  0x20(%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm3
movapd %xmm9,%xmm0
andpd  0x8b4(%rip),%xmm0
ucomisd 0x8bc(%rip),%xmm0
jbe    1765 <compute_color_sf+0x655>
divsd  %xmm9,%xmm5
unpcklpd %xmm9,%xmm9
divpd  %xmm9,%xmm6
movsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rbx),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
movapd %xmm6,0x10(%rsp)
movsd  %xmm5,0x8(%rsp)
jb     17a0 <compute_color_sf+0x690>
sqrtsd %xmm0,%xmm0
jmp    17b6 <compute_color_sf+0x6a6>
movapd %xmm3,0x30(%rsp)
call   1030 <sqrt@plt>
movapd 0x30(%rsp),%xmm3
xorpd  %xmm8,%xmm8
movapd %xmm0,%xmm1
andpd  0x83e(%rip),%xmm1
ucomisd 0x846(%rip),%xmm1
movsd  (%rbx),%xmm2
jbe    17f0 <compute_color_sf+0x6e0>
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
movupd 0x8(%rbx),%xmm4
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm4
movupd %xmm4,0x8(%rbx)
jmp    17f5 <compute_color_sf+0x6e5>
nopl   0x0(%rax)
movupd 0x8(%rbx),%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm3,%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
unpckhpd %xmm3,%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movsd  0x7e9(%rip),%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
movapd %xmm3,0x30(%rsp)
jb     1850 <compute_color_sf+0x740>
sqrtsd %xmm0,%xmm7
jmp    1888 <compute_color_sf+0x778>
cs nopw 0x0(%rax,%rax,1)
movapd %xmm5,0x20(%rsp)
movsd  %xmm2,0x40(%rsp)
movapd %xmm4,0x80(%rsp)
call   1030 <sqrt@plt>
movapd 0x80(%rsp),%xmm4
movsd  0x40(%rsp),%xmm2
movapd 0x20(%rsp),%xmm5
xorpd  %xmm8,%xmm8
movapd %xmm0,%xmm7
movapd 0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
unpckhpd %xmm0,%xmm0
mulsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
movsd  0x75c(%rip),%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
jb     18d0 <compute_color_sf+0x7c0>
sqrtsd %xmm0,%xmm0
jmp    18f2 <compute_color_sf+0x7e2>
nopl   (%rax)
movapd %xmm5,0x20(%rsp)
movsd  %xmm7,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm7
movapd 0x20(%rsp),%xmm5
xorpd  %xmm8,%xmm8
movsd  0x60(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
movsd  0x50(%rsp),%xmm4
movsd  0x68(%rsp),%xmm9
movapd 0x30(%rsp),%xmm1
ucomisd %xmm8,%xmm1
je     14f0 <compute_color_sf+0x3e0>
mulsd  %xmm7,%xmm0
mulsd  %xmm1,%xmm5
subsd  %xmm0,%xmm5
andpd  0x6d0(%rip),%xmm1
mulsd  0x8(%r13),%xmm1
addsd  0x0(%r13),%xmm1
movsd  0x10(%r13),%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm4,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm9
movapd %xmm3,%xmm1
mulsd  %xmm0,%xmm1
jmp    150b <compute_color_sf+0x3fb>
xorpd  %xmm9,%xmm9
xorpd  %xmm4,%xmm4
xorpd  %xmm0,%xmm0
mov    0x110(%rsp),%rcx
movsd  %xmm9,(%rcx)
movsd  %xmm4,0x8(%rcx)
movsd  %xmm0,0x10(%rcx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x18(%rcx)
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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