#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double fabs(double);
double sqrt(double);
int find_surface_point(double fp[3][3], double point_o[3],
                       double view_point_d[3], double point[3], double n_f[4],
                       double v_f[9], double c_value[3], double *value,
                       double normal[9], int normal_flag, int smooth_shading) {
  int i, j, n1, n2, flag_inside;
  double s[3], sina, cosa, ss, t, dis[3], dist, n_norm, v_norm, nv_sign;
  double tmp_p[7];
  flag_inside = 0;
  if (normal_flag == 1) {
    n_f[0] = (fp[1][1] - fp[0][1]) * (fp[2][2] - fp[0][2]) -
             (fp[2][1] - fp[0][1]) * (fp[1][2] - fp[0][2]);
    n_f[1] = -(fp[1][0] - fp[0][0]) * (fp[2][2] - fp[0][2]) +
             (fp[2][0] - fp[0][0]) * (fp[1][2] - fp[0][2]);
    n_f[2] = (fp[1][0] - fp[0][0]) * (fp[2][1] - fp[0][1]) -
             (fp[2][0] - fp[0][0]) * (fp[1][1] - fp[0][1]);
    n_norm = sqrt(n_f[0] * n_f[0] + n_f[1] * n_f[1] + n_f[2] * n_f[2]);
    if (fabs(n_norm) > 0.00000001) {
      for (j = 0; j < 3; j++)
        n_f[j] /= n_norm;
    }
  }
  for (i = 0; i < 3; i++)
    v_f[i] = view_point_d[i] - point_o[i];
  v_norm = sqrt(v_f[0] * v_f[0] + v_f[1] * v_f[1] + v_f[2] * v_f[2]);
  if (fabs(v_norm) > 0.00000001) {
    for (i = 0; i < 3; i++)
      v_f[i] /= v_norm;
  }
  nv_sign = n_f[0] * v_f[0] + n_f[1] * v_f[1] + n_f[2] * v_f[2];
  if (nv_sign < 0.0) {
    for (i = 0; i < 3; i++)
      n_f[i] = -n_f[i];
  }
  if (normal_flag == 1)
    n_f[3] = -n_f[0] * fp[0][0] - n_f[1] * fp[0][1] - n_f[2] * fp[0][2];
  if (smooth_shading == 0)
    for (i = 0; i < 3; i++)
      normal[i] = n_f[i];
  if (fabs(n_f[0] * (point_o[0] - view_point_d[0]) +
           n_f[1] * (point_o[1] - view_point_d[1]) +
           n_f[2] * (point_o[2] - view_point_d[2])) > 0.00000001) {
    t = (-n_f[3] - n_f[0] * view_point_d[0] - n_f[1] * view_point_d[1] -
         n_f[2] * view_point_d[2]) /
        (n_f[0] * (point_o[0] - view_point_d[0]) +
         n_f[1] * (point_o[1] - view_point_d[1]) +
         n_f[2] * (point_o[2] - view_point_d[2]));
    if (t > -0.00000001) {
      for (j = 0; j < 3; j++)
        point[j] = view_point_d[j] + t * (point_o[j] - view_point_d[j]);
      for (j = 0; j < 3; j++) {
        n1 = j;
        n2 = j + 1;
        if (n2 == 3)
          n2 = 0;
        if ((fabs(point[0] - fp[n1][0]) < 0.00000001) &&
            (fabs(point[1] - fp[n1][1]) < 0.00000001) &&
            (fabs(point[2] - fp[n1][2]) < 0.00000001)) {
          flag_inside = 1;
          *value = c_value[n1];
          if (smooth_shading == 1) {
            tmp_p[0] = normal[n1 * 3 + 0];
            tmp_p[1] = normal[n1 * 3 + 1];
            tmp_p[2] = normal[n1 * 3 + 2];
            normal[0] = tmp_p[0];
            normal[1] = tmp_p[1];
            normal[2] = tmp_p[2];
          }
          break;
        }
        cosa = ((point[0] - fp[n1][0]) * (fp[n2][0] - fp[n1][0]) +
                (point[1] - fp[n1][1]) * (fp[n2][1] - fp[n1][1]) +
                (point[2] - fp[n1][2]) * (fp[n2][2] - fp[n1][2])) /
               (sqrt((point[0] - fp[n1][0]) * (point[0] - fp[n1][0]) +
                     (point[1] - fp[n1][1]) * (point[1] - fp[n1][1]) +
                     (point[2] - fp[n1][2]) * (point[2] - fp[n1][2])) *
                sqrt((fp[n2][0] - fp[n1][0]) * (fp[n2][0] - fp[n1][0]) +
                     (fp[n2][1] - fp[n1][1]) * (fp[n2][1] - fp[n1][1]) +
                     (fp[n2][2] - fp[n1][2]) * (fp[n2][2] - fp[n1][2])));
        sina = sqrt(1 - cosa * cosa);
        s[j] = sqrt((fp[n2][0] - fp[n1][0]) * (fp[n2][0] - fp[n1][0]) +
                    (fp[n2][1] - fp[n1][1]) * (fp[n2][1] - fp[n1][1]) +
                    (fp[n2][2] - fp[n1][2]) * (fp[n2][2] - fp[n1][2])) *
               sqrt((point[0] - fp[n1][0]) * (point[0] - fp[n1][0]) +
                    (point[1] - fp[n1][1]) * (point[1] - fp[n1][1]) +
                    (point[2] - fp[n1][2]) * (point[2] - fp[n1][2])) *
               sina / 2.0;
      }
      if (flag_inside == 0) {
        cosa = ((fp[2][0] - fp[0][0]) * (fp[1][0] - fp[0][0]) +
                (fp[2][1] - fp[0][1]) * (fp[1][1] - fp[0][1]) +
                (fp[2][2] - fp[0][2]) * (fp[1][2] - fp[0][2])) /
               (sqrt((fp[2][0] - fp[0][0]) * (fp[2][0] - fp[0][0]) +
                     (fp[2][1] - fp[0][1]) * (fp[2][1] - fp[0][1]) +
                     (fp[2][2] - fp[0][2]) * (fp[2][2] - fp[0][2])) *
                sqrt((fp[1][0] - fp[0][0]) * (fp[1][0] - fp[0][0]) +
                     (fp[1][1] - fp[0][1]) * (fp[1][1] - fp[0][1]) +
                     (fp[1][2] - fp[0][2]) * (fp[1][2] - fp[0][2])));
        sina = sqrt(1 - cosa * cosa);
        ss = sqrt((fp[1][0] - fp[0][0]) * (fp[1][0] - fp[0][0]) +
                  (fp[1][1] - fp[0][1]) * (fp[1][1] - fp[0][1]) +
                  (fp[1][2] - fp[0][2]) * (fp[1][2] - fp[0][2])) *
             sqrt((fp[2][0] - fp[0][0]) * (fp[2][0] - fp[0][0]) +
                  (fp[2][1] - fp[0][1]) * (fp[2][1] - fp[0][1]) +
                  (fp[2][2] - fp[0][2]) * (fp[2][2] - fp[0][2])) *
             sina / 2.0;
        if (fabs(ss - s[0] - s[1] - s[2]) < 0.00000001) {
          flag_inside = 1;
          for (j = 0; j < 3; j++)
            dis[j] = sqrt((point[0] - fp[j][0]) * (point[0] - fp[j][0]) +
                          (point[1] - fp[j][1]) * (point[1] - fp[j][1]) +
                          (point[2] - fp[j][2]) * (point[2] - fp[j][2]));
          dist = 1.0 / dis[0] + 1.0 / dis[1] + 1.0 / dis[2];
          *value = c_value[0] / (dis[0] * dist) + c_value[1] / (dis[1] * dist) +
                   c_value[2] / (dis[2] * dist);
          if (smooth_shading == 1) {
            for (j = 0; j < 3; j++) {
              tmp_p[j] = normal[0 * 3 + j] / (dis[0] * dist) +
                         normal[1 * 3 + j] / (dis[1] * dist) +
                         normal[2 * 3 + j] / (dis[2] * dist);
            }
            for (j = 0; j < 3; j++)
              normal[j] = tmp_p[j];
          }
        }
      }
    }
  }
  return (flag_inside);
}


x86 assembly (clang, -O0):
<find_surface_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x1,0x28(%rbp)
jne    136a <find_surface_point+0x25a>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0x1d13(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x1ce7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1365 <find_surface_point+0x255>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    1360 <find_surface_point+0x250>
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    132a <find_surface_point+0x21a>
jmp    1365 <find_surface_point+0x255>
jmp    136a <find_surface_point+0x25a>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    13b0 <find_surface_point+0x2a0>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1371 <find_surface_point+0x261>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
movsd  -0xb8(%rbp),%xmm0
ff
movaps 0x1c10(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x1be4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1468 <find_surface_point+0x358>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    1463 <find_surface_point+0x353>
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    142d <find_surface_point+0x31d>
jmp    1468 <find_surface_point+0x358>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    151a <find_surface_point+0x40a>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    1515 <find_surface_point+0x405>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14cc <find_surface_point+0x3bc>
jmp    151a <find_surface_point+0x40a>
cmpl   $0x1,0x28(%rbp)
jne    15b6 <find_surface_point+0x4a6>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x18(%rax)
cmpl   $0x0,0x30(%rbp)
jne    15fe <find_surface_point+0x4ee>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    15f9 <find_surface_point+0x4e9>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15c7 <find_surface_point+0x4b7>
jmp    15fe <find_surface_point+0x4ee>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0x19b9(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x198d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    24b0 <find_surface_point+0x13a0>
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm4
mulsd  %xmm4,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0x1862(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    24ab <find_surface_point+0x139b>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    1810 <find_surface_point+0x700>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    17b7 <find_surface_point+0x6a7>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    1eb5 <find_surface_point+0xda5>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x3,-0x40(%rbp)
jne    1841 <find_surface_point+0x731>
movl   $0x0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
movaps 0x17bd(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x1791(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    199b <find_surface_point+0x88b>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm1
movaps 0x1783(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x1757(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    199b <find_surface_point+0x88b>
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm1
movaps 0x1749(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x171d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    199b <find_surface_point+0x88b>
movl   $0x1,-0x44(%rbp)
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x1,0x30(%rbp)
jne    1996 <find_surface_point+0x886>
mov    0x20(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    0x20(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    0x20(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf8(%rbp),%xmm0
ff
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xf0(%rbp),%xmm0
ff
mov    0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    1eb5 <find_surface_point+0xda5>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x118(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x1379(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  0x1177(%rip),%xmm1
divsd  %xmm1,%xmm0
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1817 <find_surface_point+0x707>
cmpl   $0x0,-0x44(%rbp)
jne    24a6 <find_surface_point+0x1396>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x130(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xf78(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  0xe38(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movaps 0xe24(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xdf8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    24a1 <find_surface_point+0x1391>
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    2308 <find_surface_point+0x11f8>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    2220 <find_surface_point+0x1110>
movsd  0xd08(%rip),%xmm0
divsd  -0xa0(%rbp),%xmm0
ff
movsd  0xcf8(%rip),%xmm1
divsd  -0x98(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  0xce4(%rip),%xmm1
divsd  -0x90(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xa8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x1,0x30(%rbp)
jne    249c <find_surface_point+0x138c>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    245e <find_surface_point+0x134e>
mov    0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xa8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mulsd  -0xa8(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movslq -0x38(%rbp),%rax
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    23bf <find_surface_point+0x12af>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    2497 <find_surface_point+0x1387>
movslq -0x38(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
mov    0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    2465 <find_surface_point+0x1355>
jmp    249c <find_surface_point+0x138c>
jmp    24a1 <find_surface_point+0x1391>
jmp    24a6 <find_surface_point+0x1396>
jmp    24ab <find_surface_point+0x139b>
jmp    24b0 <find_surface_point+0x13a0>
mov    -0x44(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_surface_point>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%rbp
mov    %r8,%rbx
mov    %rcx,%r14
mov    %rdx,%r13
mov    %rsi,%r12
mov    %rdi,%r15
mov    0xd8(%rsp),%eax
cmp    $0x1,%eax
jne    1279 <find_surface_point+0x169>
movsd  0x20(%r15),%xmm0
movsd  0x8(%r15),%xmm2
movsd  0x10(%r15),%xmm3
subsd  %xmm2,%xmm0
movsd  0x40(%r15),%xmm1
subsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x38(%r15),%xmm0
subsd  %xmm2,%xmm0
movsd  0x28(%r15),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rbx)
movsd  0x18(%r15),%xmm0
movsd  (%r15),%xmm2
movsd  0x10(%r15),%xmm3
subsd  %xmm2,%xmm0
movsd  0x40(%r15),%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movupd 0x28(%r15),%xmm0
unpcklpd %xmm2,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm4,%xmm2
movsd  %xmm2,0x8(%rbx)
movsd  0x18(%r15),%xmm3
movsd  (%r15),%xmm4
movsd  0x8(%r15),%xmm5
subsd  %xmm4,%xmm3
movsd  0x38(%r15),%xmm0
subsd  %xmm5,%xmm0
mulsd  %xmm3,%xmm0
movsd  0x30(%r15),%xmm3
subsd  %xmm4,%xmm3
movsd  0x20(%r15),%xmm4
subsd  %xmm5,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm4,%xmm0
movsd  %xmm0,0x10(%rbx)
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1235 <find_surface_point+0x125>
sqrtsd %xmm0,%xmm0
jmp    1241 <find_surface_point+0x131>
call   1030 <sqrt@plt>
mov    0xd8(%rsp),%eax
movapd 0xdb7(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd 0xdcb(%rip),%xmm1
jbe    1279 <find_surface_point+0x169>
movupd (%rbx),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
divpd  %xmm2,%xmm1
movupd %xmm1,(%rbx)
movsd  0x10(%rbx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rbx)
movsd  0x0(%r13),%xmm1
subsd  (%r12),%xmm1
movsd  %xmm1,0x0(%rbp)
movsd  0x8(%r13),%xmm2
subsd  0x8(%r12),%xmm2
movsd  %xmm2,0x8(%rbp)
movsd  0x10(%r13),%xmm0
subsd  0x10(%r12),%xmm0
movsd  %xmm0,0x10(%rbp)
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12d2 <find_surface_point+0x1c2>
sqrtsd %xmm0,%xmm0
jmp    12e9 <find_surface_point+0x1d9>
mov    %rbp,(%rsp)
mov    %rbx,%rbp
mov    %eax,%ebx
call   1030 <sqrt@plt>
mov    %ebx,%eax
mov    %rbp,%rbx
mov    (%rsp),%rbp
movapd 0xd0f(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd 0xd23(%rip),%xmm1
movsd  0x0(%rbp),%xmm3
jbe    1321 <find_surface_point+0x211>
divsd  %xmm0,%xmm3
movsd  %xmm3,0x0(%rbp)
movupd 0x8(%rbp),%xmm4
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm4
movupd %xmm4,0x8(%rbp)
jmp    1326 <find_surface_point+0x216>
movupd 0x8(%rbp),%xmm4
movupd (%rbx),%xmm0
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  0x10(%rbx),%xmm1
unpckhpd %xmm4,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
xorpd  %xmm3,%xmm3
ucomisd %xmm4,%xmm3
jbe    137b <find_surface_point+0x26b>
movapd 0xcab(%rip),%xmm2
xorpd  %xmm2,%xmm0
movupd %xmm0,(%rbx)
xorpd  %xmm2,%xmm1
movlpd %xmm1,0x10(%rbx)
pshufd $0xee,%xmm0,%xmm2
cmp    $0x1,%eax
jne    13b2 <find_surface_point+0x2a2>
movapd 0xc88(%rip),%xmm3
xorpd  %xmm0,%xmm3
movsd  0x8(%r15),%xmm4
mulsd  %xmm2,%xmm4
mulsd  (%r15),%xmm3
subsd  %xmm4,%xmm3
movsd  0x10(%r15),%xmm4
mulsd  %xmm1,%xmm4
subsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%rbx)
mov    0xd0(%rsp),%rax
cmpl   $0x0,0xe0(%rsp)
jne    13ea <find_surface_point+0x2da>
movsd  %xmm0,(%rax)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%rax)
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm2
movsd  0x10(%rbx),%xmm1
movsd  0x0(%r13),%xmm8
movsd  0x8(%r13),%xmm4
movsd  (%r12),%xmm3
movsd  0x8(%r12),%xmm5
subsd  %xmm8,%xmm3
subsd  %xmm4,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm0,%xmm7
mulsd  %xmm3,%xmm7
addsd  %xmm5,%xmm7
movsd  0x10(%r12),%xmm5
movsd  0x10(%r13),%xmm6
subsd  %xmm6,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm7,%xmm5
movapd 0xbc3(%rip),%xmm7
andpd  %xmm5,%xmm7
xor    %eax,%eax
ucomisd 0xbd5(%rip),%xmm7
jbe    1c5c <find_surface_point+0xb4c>
xorpd  0xbb7(%rip),%xmm0
mulsd  %xmm8,%xmm0
subsd  0x18(%rbx),%xmm0
mulsd  %xmm4,%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm6,%xmm1
subsd  %xmm1,%xmm0
divsd  %xmm5,%xmm0
ucomisd 0xba9(%rip),%xmm0
jbe    1c5c <find_surface_point+0xb4c>
mulsd  %xmm0,%xmm3
addsd  %xmm8,%xmm3
movsd  %xmm3,(%r14)
movsd  0x8(%r13),%xmm1
movsd  0x8(%r12),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%r14)
movsd  0x10(%r13),%xmm1
movsd  0x10(%r12),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%r14)
mov    $0x1,%r12d
mov    $0x2,%ebp
movsd  0xb3c(%rip),%xmm1
xorpd  %xmm2,%xmm2
nopl   0x0(%rax,%rax,1)
movsd  -0x10(%r15,%rbp,8),%xmm6
movsd  -0x8(%r15,%rbp,8),%xmm4
subsd  %xmm6,%xmm3
movapd %xmm3,%xmm0
andpd  0xaf2(%rip),%xmm0
ucomisd %xmm0,%xmm1
movsd  0x8(%r14),%xmm5
subsd  %xmm4,%xmm5
jbe    154e <find_surface_point+0x43e>
movapd %xmm5,%xmm0
andpd  0xad6(%rip),%xmm0
ucomisd %xmm0,%xmm1
jbe    154e <find_surface_point+0x43e>
movsd  0x10(%r14),%xmm0
subsd  (%r15,%rbp,8),%xmm0
andpd  0xabc(%rip),%xmm0
ucomisd %xmm0,%xmm1
ja     1875 <find_surface_point+0x765>
cmp    $0x3,%r12
mov    %r12,%rax
mov    $0x0,%ecx
cmove  %rcx,%rax
lea    (%rax,%rax,2),%rbx
movsd  (%r15,%rbx,8),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%r15,%rbx,8),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x10(%r14),%xmm7
movsd  (%r15,%rbp,8),%xmm0
movsd  %xmm0,0x50(%rsp)
subsd  %xmm0,%xmm7
movsd  0x10(%r15,%rbx,8),%xmm0
movsd  %xmm0,0x40(%rsp)
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm7,0x58(%rsp)
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
movapd %xmm3,(%rsp)
movsd  %xmm4,0x10(%rsp)
movapd %xmm5,0x60(%rsp)
movsd  %xmm6,0x28(%rsp)
jb     15f0 <find_surface_point+0x4e0>
xorps  %xmm6,%xmm6
sqrtsd %xmm0,%xmm6
jmp    15fd <find_surface_point+0x4ed>
nopw   0x0(%rax,%rax,1)
call   1030 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm6
lea    (%r15,%rbx,8),%r13
movsd  0x0(%r13),%xmm1
subsd  -0x10(%r15,%rbp,8),%xmm1
movsd  0x8(%r13),%xmm0
subsd  -0x8(%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13),%xmm0
subsd  (%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1650 <find_surface_point+0x540>
sqrtsd %xmm0,%xmm0
jmp    1665 <find_surface_point+0x555>
nopw   0x0(%rax,%rax,1)
movsd  %xmm6,0x30(%rsp)
call   1030 <sqrt@plt>
movsd  0x30(%rsp),%xmm6
xorpd  %xmm2,%xmm2
movapd (%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
movapd 0x60(%rsp),%xmm4
movsd  0x28(%rsp),%xmm5
mulsd  %xmm0,%xmm6
movsd  0x48(%rsp),%xmm0
subsd  %xmm5,%xmm0
movsd  0x38(%rsp),%xmm5
subsd  %xmm3,%xmm5
mulsd  %xmm5,%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm4,%xmm1
movsd  0x40(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  0x58(%rsp),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm6,%xmm3
mulsd  %xmm3,%xmm3
movsd  0x966(%rip),%xmm0
subsd  %xmm3,%xmm0
ucomisd %xmm2,%xmm0
jb     16e0 <find_surface_point+0x5d0>
sqrtsd %xmm0,%xmm0
jmp    16e9 <find_surface_point+0x5d9>
nopw   0x0(%rax,%rax,1)
call   1030 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,(%rsp)
movsd  0x0(%r13),%xmm1
subsd  -0x10(%r15,%rbp,8),%xmm1
movsd  0x8(%r13),%xmm0
subsd  -0x8(%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r13),%xmm0
subsd  (%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1740 <find_surface_point+0x630>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
jmp    174d <find_surface_point+0x63d>
nopw   0x0(%rax,%rax,1)
call   1030 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
subsd  -0x10(%r15,%rbp,8),%xmm1
subsd  -0x8(%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r14),%xmm0
subsd  (%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     17a0 <find_surface_point+0x690>
sqrtsd %xmm0,%xmm0
jmp    17b5 <find_surface_point+0x6a5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm3,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
xorpd  %xmm2,%xmm2
movsd  0x863(%rip),%xmm1
mulsd  %xmm0,%xmm3
movsd  (%rsp),%xmm0
mulsd  %xmm3,%xmm0
mulsd  0x866(%rip),%xmm0
movsd  %xmm0,0x68(%rsp,%r12,8)
cmp    $0x3,%r12
je     17f1 <find_surface_point+0x6e1>
movsd  (%r14),%xmm3
add    $0x1,%r12
add    $0x3,%rbp
jmp    14f0 <find_surface_point+0x3e0>
movsd  0x30(%r15),%xmm1
movsd  (%r15),%xmm0
movsd  0x8(%r15),%xmm2
subsd  %xmm0,%xmm1
movsd  0x18(%r15),%xmm5
subsd  %xmm0,%xmm5
movsd  0x38(%r15),%xmm3
subsd  %xmm2,%xmm3
movsd  0x20(%r15),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm5
addsd  %xmm0,%xmm5
movsd  0x40(%r15),%xmm0
movsd  0x10(%r15),%xmm2
subsd  %xmm2,%xmm0
movsd  0x28(%r15),%xmm4
subsd  %xmm2,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm3,%xmm3
mulsd  %xmm1,%xmm1
addsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     18c4 <find_surface_point+0x7b4>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    18e7 <find_surface_point+0x7d7>
mov    0xc0(%rsp),%rax
movsd  -0x8(%rax,%r12,8),%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax)
mov    $0x1,%eax
cmpl   $0x1,0xe0(%rsp)
01
jne    1c5c <find_surface_point+0xb4c>
mov    0xd0(%rsp),%rcx
movupd -0x10(%rcx,%rbp,8),%xmm0
movsd  (%rcx,%rbp,8),%xmm1
movupd %xmm0,(%rcx)
movsd  %xmm1,0x10(%rcx)
jmp    1c5c <find_surface_point+0xb4c>
movsd  %xmm4,(%rsp)
movsd  %xmm5,0x10(%rsp)
call   1030 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x10(%rsp),%xmm5
movsd  (%rsp),%xmm4
movapd %xmm0,%xmm2
mov    0xd0(%rsp),%rbx
mov    0xe0(%rsp),%ebp
addsd  %xmm5,%xmm4
movsd  0x18(%r15),%xmm1
movsd  0x20(%r15),%xmm0
subsd  (%r15),%xmm1
subsd  0x8(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x28(%r15),%xmm0
subsd  0x10(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     193d <find_surface_point+0x82d>
sqrtsd %xmm0,%xmm0
jmp    1958 <find_surface_point+0x848>
movsd  %xmm4,(%rsp)
movsd  %xmm2,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm4
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm4
mulsd  %xmm4,%xmm4
movsd  0x6c4(%rip),%xmm0
subsd  %xmm4,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     1983 <find_surface_point+0x873>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    1990 <find_surface_point+0x880>
call   1030 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm2
movsd  0x18(%r15),%xmm1
movsd  0x20(%r15),%xmm0
subsd  (%r15),%xmm1
subsd  0x8(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x28(%r15),%xmm0
subsd  0x10(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
movapd %xmm2,(%rsp)
jb     19db <find_surface_point+0x8cb>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
jmp    19e4 <find_surface_point+0x8d4>
call   1030 <sqrt@plt>
movapd %xmm0,%xmm3
movsd  0x30(%r15),%xmm1
movsd  0x38(%r15),%xmm0
subsd  (%r15),%xmm1
subsd  0x8(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x40(%r15),%xmm0
subsd  0x10(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1a2b <find_surface_point+0x91b>
sqrtsd %xmm0,%xmm0
jmp    1a3c <find_surface_point+0x92c>
movsd  %xmm3,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x5dc(%rip),%xmm1
movapd (%rsp),%xmm2
mulsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm2
mulsd  0x5df(%rip),%xmm2
subsd  0x70(%rsp),%xmm2
subsd  0x78(%rsp),%xmm2
subsd  0x80(%rsp),%xmm2
andpd  0x58a(%rip),%xmm2
xor    %eax,%eax
ucomisd %xmm2,%xmm1
jbe    1c5c <find_surface_point+0xb4c>
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
subsd  (%r15),%xmm1
subsd  0x8(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r14),%xmm0
subsd  0x10(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     1acb <find_surface_point+0x9bb>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    1ad8 <find_surface_point+0x9c8>
call   1030 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm2
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
subsd  0x18(%r15),%xmm1
subsd  0x20(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r14),%xmm0
subsd  0x28(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
movapd %xmm2,(%rsp)
jb     1b20 <find_surface_point+0xa10>
sqrtsd %xmm0,%xmm5
jmp    1b29 <find_surface_point+0xa19>
call   1030 <sqrt@plt>
movapd %xmm0,%xmm5
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
subsd  0x30(%r15),%xmm1
subsd  0x38(%r15),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r14),%xmm0
subsd  0x40(%r15),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1b70 <find_surface_point+0xa60>
sqrtsd %xmm0,%xmm0
jmp    1b81 <find_surface_point+0xa71>
movapd %xmm5,0x10(%rsp)
call   1030 <sqrt@plt>
movapd 0x10(%rsp),%xmm5
movapd (%rsp),%xmm4
movsd  0x4a2(%rip),%xmm3
movapd %xmm3,%xmm1
divsd  %xmm4,%xmm1
movapd %xmm3,%xmm2
divsd  %xmm5,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm4
mov    0xc0(%rsp),%rax
movsd  (%rax),%xmm1
movsd  0x8(%rax),%xmm2
divsd  %xmm4,%xmm1
mulsd  %xmm3,%xmm5
divsd  %xmm5,%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rax),%xmm1
mulsd  %xmm0,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mov    0xc8(%rsp),%rax
movsd  %xmm1,(%rax)
mov    $0x1,%eax
cmp    $0x1,%ebp
jne    1c5c <find_surface_point+0xb4c>
movupd (%rbx),%xmm0
movapd %xmm4,%xmm1
unpcklpd %xmm4,%xmm1
divpd  %xmm1,%xmm0
movupd 0x18(%rbx),%xmm1
movapd %xmm5,%xmm2
unpcklpd %xmm5,%xmm2
divpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movupd 0x30(%rbx),%xmm0
movapd %xmm3,%xmm2
unpcklpd %xmm3,%xmm2
divpd  %xmm2,%xmm0
addpd  %xmm1,%xmm0
movsd  0x10(%rbx),%xmm1
divsd  %xmm4,%xmm1
movsd  0x28(%rbx),%xmm2
divsd  %xmm5,%xmm2
addsd  %xmm1,%xmm2
movsd  0x40(%rbx),%xmm1
divsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movupd %xmm0,(%rbx)
movsd  %xmm1,0x10(%rbx)
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @find_surface_point([3 x double]* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, i32 %9, i32 %10) {
%12 = alloca [3 x double]*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca [3 x double]
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca [3 x double]
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca [7 x double]
store [3 x double]* %0, [3 x double]** %12
store double* %1, double** %13
store double* %2, double** %14
store double* %3, double** %15
store double* %4, double** %16
store double* %5, double** %17
store double* %6, double** %18
store double* %7, double** %19
store double* %8, double** %20
store i32 %9, i32* %21
store i32 %10, i32* %22
store i32 0, i32* %27
%39 = load i32, i32* %21
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %207
41: ; preds = %11
%42 = load [3 x double]*, [3 x double]** %12
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 1
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0, i64 1
%45 = load double, double* %44
%46 = load [3 x double]*, [3 x double]** %12
%47 = getelementptr inbounds [3 x double], [3 x double]* %46, i64 0
%48 = getelementptr inbounds [3 x double], [3 x double]* %47, i64 0, i64 1
%49 = load double, double* %48
%50 = fsub double %45, %49
%51 = load [3 x double]*, [3 x double]** %12
%52 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 2
%53 = getelementptr inbounds [3 x double], [3 x double]* %52, i64 0, i64 2
%54 = load double, double* %53
%55 = load [3 x double]*, [3 x double]** %12
%56 = getelementptr inbounds [3 x double], [3 x double]* %55, i64 0
%57 = getelementptr inbounds [3 x double], [3 x double]* %56, i64 0, i64 2
%58 = load double, double* %57
%59 = fsub double %54, %58
%60 = load [3 x double]*, [3 x double]** %12
%61 = getelementptr inbounds [3 x double], [3 x double]* %60, i64 2
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 0, i64 1
%63 = load double, double* %62
%64 = load [3 x double]*, [3 x double]** %12
%65 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0
%66 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0, i64 1
%67 = load double, double* %66
%68 = fsub double %63, %67
%69 = load [3 x double]*, [3 x double]** %12
%70 = getelementptr inbounds [3 x double], [3 x double]* %69, i64 1
%71 = getelementptr inbounds [3 x double], [3 x double]* %70, i64 0, i64 2
%72 = load double, double* %71
%73 = load [3 x double]*, [3 x double]** %12
%74 = getelementptr inbounds [3 x double], [3 x double]* %73, i64 0
%75 = getelementptr inbounds [3 x double], [3 x double]* %74, i64 0, i64 2
%76 = load double, double* %75
%77 = fsub double %72, %76
%78 = fmul double %68, %77
%79 = fneg double %78
%80 = call double @llvm.fmuladd.f64(double %50, double %59, double %79)
%81 = load double*, double** %16
%82 = getelementptr inbounds double, double* %81, i64 0
store double %80, double* %82
%83 = load [3 x double]*, [3 x double]** %12
%84 = getelementptr inbounds [3 x double], [3 x double]* %83, i64 1
%85 = getelementptr inbounds [3 x double], [3 x double]* %84, i64 0, i64 0
%86 = load double, double* %85
%87 = load [3 x double]*, [3 x double]** %12
%88 = getelementptr inbounds [3 x double], [3 x double]* %87, i64 0
%89 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 0
%90 = load double, double* %89
%91 = fsub double %86, %90
%92 = fneg double %91
%93 = load [3 x double]*, [3 x double]** %12
%94 = getelementptr inbounds [3 x double], [3 x double]* %93, i64 2
%95 = getelementptr inbounds [3 x double], [3 x double]* %94, i64 0, i64 2
%96 = load double, double* %95
%97 = load [3 x double]*, [3 x double]** %12
%98 = getelementptr inbounds [3 x double], [3 x double]* %97, i64 0
%99 = getelementptr inbounds [3 x double], [3 x double]* %98, i64 0, i64 2
%100 = load double, double* %99
%101 = fsub double %96, %100
%102 = load [3 x double]*, [3 x double]** %12
%103 = getelementptr inbounds [3 x double], [3 x double]* %102, i64 2
%104 = getelementptr inbounds [3 x double], [3 x double]* %103, i64 0, i64 0
%105 = load double, double* %104
%106 = load [3 x double]*, [3 x double]** %12
%107 = getelementptr inbounds [3 x double], [3 x double]* %106, i64 0
%108 = getelementptr inbounds [3 x double], [3 x double]* %107, i64 0, i64 0
%109 = load double, double* %108
%110 = fsub double %105, %109
%111 = load [3 x double]*, [3 x double]** %12
%112 = getelementptr inbounds [3 x double], [3 x double]* %111, i64 1
%113 = getelementptr inbounds [3 x double], [3 x double]* %112, i64 0, i64 2
%114 = load double, double* %113
%115 = load [3 x double]*, [3 x double]** %12
%116 = getelementptr inbounds [3 x double], [3 x double]* %115, i64 0
%117 = getelementptr inbounds [3 x double], [3 x double]* %116, i64 0, i64 2
%118 = load double, double* %117
%119 = fsub double %114, %118
%120 = fmul double %110, %119
%121 = call double @llvm.fmuladd.f64(double %92, double %101, double %120)
%122 = load double*, double** %16
%123 = getelementptr inbounds double, double* %122, i64 1
store double %121, double* %123
%124 = load [3 x double]*, [3 x double]** %12
%125 = getelementptr inbounds [3 x double], [3 x double]* %124, i64 1
%126 = getelementptr inbounds [3 x double], [3 x double]* %125, i64 0, i64 0
%127 = load double, double* %126
%128 = load [3 x double]*, [3 x double]** %12
%129 = getelementptr inbounds [3 x double], [3 x double]* %128, i64 0
%130 = getelementptr inbounds [3 x double], [3 x double]* %129, i64 0, i64 0
%131 = load double, double* %130
%132 = fsub double %127, %131
%133 = load [3 x double]*, [3 x double]** %12
%134 = getelementptr inbounds [3 x double], [3 x double]* %133, i64 2
%135 = getelementptr inbounds [3 x double], [3 x double]* %134, i64 0, i64 1
%136 = load double, double* %135
%137 = load [3 x double]*, [3 x double]** %12
%138 = getelementptr inbounds [3 x double], [3 x double]* %137, i64 0
%139 = getelementptr inbounds [3 x double], [3 x double]* %138, i64 0, i64 1
%140 = load double, double* %139
%141 = fsub double %136, %140
%142 = load [3 x double]*, [3 x double]** %12
%143 = getelementptr inbounds [3 x double], [3 x double]* %142, i64 2
%144 = getelementptr inbounds [3 x double], [3 x double]* %143, i64 0, i64 0
%145 = load double, double* %144
%146 = load [3 x double]*, [3 x double]** %12
%147 = getelementptr inbounds [3 x double], [3 x double]* %146, i64 0
%148 = getelementptr inbounds [3 x double], [3 x double]* %147, i64 0, i64 0
%149 = load double, double* %148
%150 = fsub double %145, %149
%151 = load [3 x double]*, [3 x double]** %12
%152 = getelementptr inbounds [3 x double], [3 x double]* %151, i64 1
%153 = getelementptr inbounds [3 x double], [3 x double]* %152, i64 0, i64 1
%154 = load double, double* %153
%155 = load [3 x double]*, [3 x double]** %12
%156 = getelementptr inbounds [3 x double], [3 x double]* %155, i64 0
%157 = getelementptr inbounds [3 x double], [3 x double]* %156, i64 0, i64 1
%158 = load double, double* %157
%159 = fsub double %154, %158
%160 = fmul double %150, %159
%161 = fneg double %160
%162 = call double @llvm.fmuladd.f64(double %132, double %141, double %161)
%163 = load double*, double** %16
%164 = getelementptr inbounds double, double* %163, i64 2
store double %162, double* %164
%165 = load double*, double** %16
%166 = getelementptr inbounds double, double* %165, i64 0
%167 = load double, double* %166
%168 = load double*, double** %16
%169 = getelementptr inbounds double, double* %168, i64 0
%170 = load double, double* %169
%171 = load double*, double** %16
%172 = getelementptr inbounds double, double* %171, i64 1
%173 = load double, double* %172
%174 = load double*, double** %16
%175 = getelementptr inbounds double, double* %174, i64 1
%176 = load double, double* %175
%177 = fmul double %173, %176
%178 = call double @llvm.fmuladd.f64(double %167, double %170, double %177)
%179 = load double*, double** %16
%180 = getelementptr inbounds double, double* %179, i64 2
%181 = load double, double* %180
%182 = load double*, double** %16
%183 = getelementptr inbounds double, double* %182, i64 2
%184 = load double, double* %183
%185 = call double @llvm.fmuladd.f64(double %181, double %184, double %178)
%186 = call double @sqrt(double %185)
store double %186, double* %35
%187 = load double, double* %35
%188 = call double @llvm.fabs.f64(double %187)
%189 = fcmp ogt double %188, 1.000000e-08
br i1 %189, label %190, label %206
190: ; preds = %41
store i32 0, i32* %24
br label %191
191: ; preds = %202, %190
%192 = load i32, i32* %24
%193 = icmp slt i32 %192, 3
br i1 %193, label %194, label %205
194: ; preds = %191
%195 = load double, double* %35
%196 = load double*, double** %16
%197 = load i32, i32* %24
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %196, i64 %198
%200 = load double, double* %199
%201 = fdiv double %200, %195
store double %201, double* %199
br label %202
202: ; preds = %194
%203 = load i32, i32* %24
%204 = add nsw i32 %203, 1
store i32 %204, i32* %24
br label %191
205: ; preds = %191
br label %206
206: ; preds = %205, %41
br label %207
207: ; preds = %206, %11
store i32 0, i32* %23
br label %208
208: ; preds = %227, %207
%209 = load i32, i32* %23
%210 = icmp slt i32 %209, 3
br i1 %210, label %211, label %230
211: ; preds = %208
%212 = load double*, double** %14
%213 = load i32, i32* %23
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %212, i64 %214
%216 = load double, double* %215
%217 = load double*, double** %13
%218 = load i32, i32* %23
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds double, double* %217, i64 %219
%221 = load double, double* %220
%222 = fsub double %216, %221
%223 = load double*, double** %17
%224 = load i32, i32* %23
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %223, i64 %225
store double %222, double* %226
br label %227
227: ; preds = %211
%228 = load i32, i32* %23
%229 = add nsw i32 %228, 1
store i32 %229, i32* %23
br label %208
230: ; preds = %208
%231 = load double*, double** %17
%232 = getelementptr inbounds double, double* %231, i64 0
%233 = load double, double* %232
%234 = load double*, double** %17
%235 = getelementptr inbounds double, double* %234, i64 0
%236 = load double, double* %235
%237 = load double*, double** %17
%238 = getelementptr inbounds double, double* %237, i64 1
%239 = load double, double* %238
%240 = load double*, double** %17
%241 = getelementptr inbounds double, double* %240, i64 1
%242 = load double, double* %241
%243 = fmul double %239, %242
%244 = call double @llvm.fmuladd.f64(double %233, double %236, double %243)
%245 = load double*, double** %17
%246 = getelementptr inbounds double, double* %245, i64 2
%247 = load double, double* %246
%248 = load double*, double** %17
%249 = getelementptr inbounds double, double* %248, i64 2
%250 = load double, double* %249
%251 = call double @llvm.fmuladd.f64(double %247, double %250, double %244)
%252 = call double @sqrt(double %251)
store double %252, double* %36
%253 = load double, double* %36
%254 = call double @llvm.fabs.f64(double %253)
%255 = fcmp ogt double %254, 1.000000e-08
br i1 %255, label %256, label %272
256: ; preds = %230
store i32 0, i32* %23
br label %257
257: ; preds = %268, %256
%258 = load i32, i32* %23
%259 = icmp slt i32 %258, 3
br i1 %259, label %260, label %271
260: ; preds = %257
%261 = load double, double* %36
%262 = load double*, double** %17
%263 = load i32, i32* %23
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds double, double* %262, i64 %264
%266 = load double, double* %265
%267 = fdiv double %266, %261
store double %267, double* %265
br label %268
268: ; preds = %260
%269 = load i32, i32* %23
%270 = add nsw i32 %269, 1
store i32 %270, i32* %23
br label %257
271: ; preds = %257
br label %272
272: ; preds = %271, %230
%273 = load double*, double** %16
%274 = getelementptr inbounds double, double* %273, i64 0
%275 = load double, double* %274
%276 = load double*, double** %17
%277 = getelementptr inbounds double, double* %276, i64 0
%278 = load double, double* %277
%279 = load double*, double** %16
%280 = getelementptr inbounds double, double* %279, i64 1
%281 = load double, double* %280
%282 = load double*, double** %17
%283 = getelementptr inbounds double, double* %282, i64 1
%284 = load double, double* %283
%285 = fmul double %281, %284
%286 = call double @llvm.fmuladd.f64(double %275, double %278, double %285)
%287 = load double*, double** %16
%288 = getelementptr inbounds double, double* %287, i64 2
%289 = load double, double* %288
%290 = load double*, double** %17
%291 = getelementptr inbounds double, double* %290, i64 2
%292 = load double, double* %291
%293 = call double @llvm.fmuladd.f64(double %289, double %292, double %286)
store double %293, double* %37
%294 = load double, double* %37
%295 = fcmp olt double %294, 0.000000e+00
br i1 %295, label %296, label %315
296: ; preds = %272
store i32 0, i32* %23
br label %297
297: ; preds = %311, %296
%298 = load i32, i32* %23
%299 = icmp slt i32 %298, 3
br i1 %299, label %300, label %314
300: ; preds = %297
%301 = load double*, double** %16
%302 = load i32, i32* %23
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds double, double* %301, i64 %303
%305 = load double, double* %304
%306 = fneg double %305
%307 = load double*, double** %16
%308 = load i32, i32* %23
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds double, double* %307, i64 %309
store double %306, double* %310
br label %311
311: ; preds = %300
%312 = load i32, i32* %23
%313 = add nsw i32 %312, 1
store i32 %313, i32* %23
br label %297
314: ; preds = %297
br label %315
315: ; preds = %314, %272
%316 = load i32, i32* %21
%317 = icmp eq i32 %316, 1
br i1 %317, label %318, label %348
318: ; preds = %315
%319 = load double*, double** %16
%320 = getelementptr inbounds double, double* %319, i64 0
%321 = load double, double* %320
%322 = fneg double %321
%323 = load [3 x double]*, [3 x double]** %12
%324 = getelementptr inbounds [3 x double], [3 x double]* %323, i64 0
%325 = getelementptr inbounds [3 x double], [3 x double]* %324, i64 0, i64 0
%326 = load double, double* %325
%327 = load double*, double** %16
%328 = getelementptr inbounds double, double* %327, i64 1
%329 = load double, double* %328
%330 = load [3 x double]*, [3 x double]** %12
%331 = getelementptr inbounds [3 x double], [3 x double]* %330, i64 0
%332 = getelementptr inbounds [3 x double], [3 x double]* %331, i64 0, i64 1
%333 = load double, double* %332
%334 = fmul double %329, %333
%335 = fneg double %334
%336 = call double @llvm.fmuladd.f64(double %322, double %326, double %335)
%337 = load double*, double** %16
%338 = getelementptr inbounds double, double* %337, i64 2
%339 = load double, double* %338
%340 = load [3 x double]*, [3 x double]** %12
%341 = getelementptr inbounds [3 x double], [3 x double]* %340, i64 0
%342 = getelementptr inbounds [3 x double], [3 x double]* %341, i64 0, i64 2
%343 = load double, double* %342
%344 = fneg double %339
%345 = call double @llvm.fmuladd.f64(double %344, double %343, double %336)
%346 = load double*, double** %16
%347 = getelementptr inbounds double, double* %346, i64 3
store double %345, double* %347
br label %348
348: ; preds = %318, %315
%349 = load i32, i32* %22
%350 = icmp eq i32 %349, 0
br i1 %350, label %351, label %369
351: ; preds = %348
store i32 0, i32* %23
br label %352
352: ; preds = %365, %351
%353 = load i32, i32* %23
%354 = icmp slt i32 %353, 3
br i1 %354, label %355, label %368
355: ; preds = %352
%356 = load double*, double** %16
%357 = load i32, i32* %23
%358 = sext i32 %357 to i64
%359 = getelementptr inbounds double, double* %356, i64 %358
%360 = load double, double* %359
%361 = load double*, double** %20
%362 = load i32, i32* %23
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds double, double* %361, i64 %363
store double %360, double* %364
br label %365
365: ; preds = %355
%366 = load i32, i32* %23
%367 = add nsw i32 %366, 1
store i32 %367, i32* %23
br label %352
368: ; preds = %352
br label %369
369: ; preds = %368, %348
%370 = load double*, double** %16
%371 = getelementptr inbounds double, double* %370, i64 0
%372 = load double, double* %371
%373 = load double*, double** %13
%374 = getelementptr inbounds double, double* %373, i64 0
%375 = load double, double* %374
%376 = load double*, double** %14
%377 = getelementptr inbounds double, double* %376, i64 0
%378 = load double, double* %377
%379 = fsub double %375, %378
%380 = load double*, double** %16
%381 = getelementptr inbounds double, double* %380, i64 1
%382 = load double, double* %381
%383 = load double*, double** %13
%384 = getelementptr inbounds double, double* %383, i64 1
%385 = load double, double* %384
%386 = load double*, double** %14
%387 = getelementptr inbounds double, double* %386, i64 1
%388 = load double, double* %387
%389 = fsub double %385, %388
%390 = fmul double %382, %389
%391 = call double @llvm.fmuladd.f64(double %372, double %379, double %390)
%392 = load double*, double** %16
%393 = getelementptr inbounds double, double* %392, i64 2
%394 = load double, double* %393
%395 = load double*, double** %13
%396 = getelementptr inbounds double, double* %395, i64 2
%397 = load double, double* %396
%398 = load double*, double** %14
%399 = getelementptr inbounds double, double* %398, i64 2
%400 = load double, double* %399
%401 = fsub double %397, %400
%402 = call double @llvm.fmuladd.f64(double %394, double %401, double %391)
%403 = call double @llvm.fabs.f64(double %402)
%404 = fcmp ogt double %403, 1.000000e-08
br i1 %404, label %405, label %1478
405: ; preds = %369
%406 = load double*, double** %16
%407 = getelementptr inbounds double, double* %406, i64 3
%408 = load double, double* %407
%409 = fneg double %408
%410 = load double*, double** %16
%411 = getelementptr inbounds double, double* %410, i64 0
%412 = load double, double* %411
%413 = load double*, double** %14
%414 = getelementptr inbounds double, double* %413, i64 0
%415 = load double, double* %414
%416 = fneg double %412
%417 = call double @llvm.fmuladd.f64(double %416, double %415, double %409)
%418 = load double*, double** %16
%419 = getelementptr inbounds double, double* %418, i64 1
%420 = load double, double* %419
%421 = load double*, double** %14
%422 = getelementptr inbounds double, double* %421, i64 1
%423 = load double, double* %422
%424 = fneg double %420
%425 = call double @llvm.fmuladd.f64(double %424, double %423, double %417)
%426 = load double*, double** %16
%427 = getelementptr inbounds double, double* %426, i64 2
%428 = load double, double* %427
%429 = load double*, double** %14
%430 = getelementptr inbounds double, double* %429, i64 2
%431 = load double, double* %430
%432 = fneg double %428
%433 = call double @llvm.fmuladd.f64(double %432, double %431, double %425)
%434 = load double*, double** %16
%435 = getelementptr inbounds double, double* %434, i64 0
%436 = load double, double* %435
%437 = load double*, double** %13
%438 = getelementptr inbounds double, double* %437, i64 0
%439 = load double, double* %438
%440 = load double*, double** %14
%441 = getelementptr inbounds double, double* %440, i64 0
%442 = load double, double* %441
%443 = fsub double %439, %442
%444 = load double*, double** %16
%445 = getelementptr inbounds double, double* %444, i64 1
%446 = load double, double* %445
%447 = load double*, double** %13
%448 = getelementptr inbounds double, double* %447, i64 1
%449 = load double, double* %448
%450 = load double*, double** %14
%451 = getelementptr inbounds double, double* %450, i64 1
%452 = load double, double* %451
%453 = fsub double %449, %452
%454 = fmul double %446, %453
%455 = call double @llvm.fmuladd.f64(double %436, double %443, double %454)
%456 = load double*, double** %16
%457 = getelementptr inbounds double, double* %456, i64 2
%458 = load double, double* %457
%459 = load double*, double** %13
%460 = getelementptr inbounds double, double* %459, i64 2
%461 = load double, double* %460
%462 = load double*, double** %14
%463 = getelementptr inbounds double, double* %462, i64 2
%464 = load double, double* %463
%465 = fsub double %461, %464
%466 = call double @llvm.fmuladd.f64(double %458, double %465, double %455)
%467 = fdiv double %433, %466
store double %467, double* %32
%468 = load double, double* %32
%469 = fcmp ogt double %468, -1.000000e-08
br i1 %469, label %470, label %1477
470: ; preds = %405
store i32 0, i32* %24
br label %471
471: ; preds = %497, %470
%472 = load i32, i32* %24
%473 = icmp slt i32 %472, 3
br i1 %473, label %474, label %500
474: ; preds = %471
%475 = load double*, double** %14
%476 = load i32, i32* %24
%477 = sext i32 %476 to i64
%478 = getelementptr inbounds double, double* %475, i64 %477
%479 = load double, double* %478
%480 = load double, double* %32
%481 = load double*, double** %13
%482 = load i32, i32* %24
%483 = sext i32 %482 to i64
%484 = getelementptr inbounds double, double* %481, i64 %483
%485 = load double, double* %484
%486 = load double*, double** %14
%487 = load i32, i32* %24
%488 = sext i32 %487 to i64
%489 = getelementptr inbounds double, double* %486, i64 %488
%490 = load double, double* %489
%491 = fsub double %485, %490
%492 = call double @llvm.fmuladd.f64(double %480, double %491, double %479)
%493 = load double*, double** %15
%494 = load i32, i32* %24
%495 = sext i32 %494 to i64
%496 = getelementptr inbounds double, double* %493, i64 %495
store double %492, double* %496
br label %497
497: ; preds = %474
%498 = load i32, i32* %24
%499 = add nsw i32 %498, 1
store i32 %499, i32* %24
br label %471
500: ; preds = %471
store i32 0, i32* %24
br label %501
501: ; preds = %976, %500
%502 = load i32, i32* %24
%503 = icmp slt i32 %502, 3
br i1 %503, label %504, label %979
504: ; preds = %501
%505 = load i32, i32* %24
store i32 %505, i32* %25
%506 = load i32, i32* %24
%507 = add nsw i32 %506, 1
store i32 %507, i32* %26
%508 = load i32, i32* %26
%509 = icmp eq i32 %508, 3
br i1 %509, label %510, label %511
510: ; preds = %504
store i32 0, i32* %26
br label %511
511: ; preds = %510, %504
%512 = load double*, double** %15
%513 = getelementptr inbounds double, double* %512, i64 0
%514 = load double, double* %513
%515 = load [3 x double]*, [3 x double]** %12
%516 = load i32, i32* %25
%517 = sext i32 %516 to i64
%518 = getelementptr inbounds [3 x double], [3 x double]* %515, i64 %517
%519 = getelementptr inbounds [3 x double], [3 x double]* %518, i64 0, i64 0
%520 = load double, double* %519
%521 = fsub double %514, %520
%522 = call double @llvm.fabs.f64(double %521)
%523 = fcmp olt double %522, 1.000000e-08
br i1 %523, label %524, label %597
524: ; preds = %511
%525 = load double*, double** %15
%526 = getelementptr inbounds double, double* %525, i64 1
%527 = load double, double* %526
%528 = load [3 x double]*, [3 x double]** %12
%529 = load i32, i32* %25
%530 = sext i32 %529 to i64
%531 = getelementptr inbounds [3 x double], [3 x double]* %528, i64 %530
%532 = getelementptr inbounds [3 x double], [3 x double]* %531, i64 0, i64 1
%533 = load double, double* %532
%534 = fsub double %527, %533
%535 = call double @llvm.fabs.f64(double %534)
%536 = fcmp olt double %535, 1.000000e-08
br i1 %536, label %537, label %597
537: ; preds = %524
%538 = load double*, double** %15
%539 = getelementptr inbounds double, double* %538, i64 2
%540 = load double, double* %539
%541 = load [3 x double]*, [3 x double]** %12
%542 = load i32, i32* %25
%543 = sext i32 %542 to i64
%544 = getelementptr inbounds [3 x double], [3 x double]* %541, i64 %543
%545 = getelementptr inbounds [3 x double], [3 x double]* %544, i64 0, i64 2
%546 = load double, double* %545
%547 = fsub double %540, %546
%548 = call double @llvm.fabs.f64(double %547)
%549 = fcmp olt double %548, 1.000000e-08
br i1 %549, label %550, label %597
550: ; preds = %537
store i32 1, i32* %27
%551 = load double*, double** %18
%552 = load i32, i32* %25
%553 = sext i32 %552 to i64
%554 = getelementptr inbounds double, double* %551, i64 %553
%555 = load double, double* %554
%556 = load double*, double** %19
store double %555, double* %556
%557 = load i32, i32* %22
%558 = icmp eq i32 %557, 1
br i1 %558, label %559, label %596
559: ; preds = %550
%560 = load double*, double** %20
%561 = load i32, i32* %25
%562 = mul nsw i32 %561, 3
%563 = add nsw i32 %562, 0
%564 = sext i32 %563 to i64
%565 = getelementptr inbounds double, double* %560, i64 %564
%566 = load double, double* %565
%567 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 0
store double %566, double* %567
%568 = load double*, double** %20
%569 = load i32, i32* %25
%570 = mul nsw i32 %569, 3
%571 = add nsw i32 %570, 1
%572 = sext i32 %571 to i64
%573 = getelementptr inbounds double, double* %568, i64 %572
%574 = load double, double* %573
%575 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 1
store double %574, double* %575
%576 = load double*, double** %20
%577 = load i32, i32* %25
%578 = mul nsw i32 %577, 3
%579 = add nsw i32 %578, 2
%580 = sext i32 %579 to i64
%581 = getelementptr inbounds double, double* %576, i64 %580
%582 = load double, double* %581
%583 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 2
store double %582, double* %583
%584 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 0
%585 = load double, double* %584
%586 = load double*, double** %20
%587 = getelementptr inbounds double, double* %586, i64 0
store double %585, double* %587
%588 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 1
%589 = load double, double* %588
%590 = load double*, double** %20
%591 = getelementptr inbounds double, double* %590, i64 1
store double %589, double* %591
%592 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 2
%593 = load double, double* %592
%594 = load double*, double** %20
%595 = getelementptr inbounds double, double* %594, i64 2
store double %593, double* %595
br label %596
596: ; preds = %559, %550
br label %979
597: ; preds = %537, %524, %511
%598 = load double*, double** %15
%599 = getelementptr inbounds double, double* %598, i64 0
%600 = load double, double* %599
%601 = load [3 x double]*, [3 x double]** %12
%602 = load i32, i32* %25
%603 = sext i32 %602 to i64
%604 = getelementptr inbounds [3 x double], [3 x double]* %601, i64 %603
%605 = getelementptr inbounds [3 x double], [3 x double]* %604, i64 0, i64 0
%606 = load double, double* %605
%607 = fsub double %600, %606
%608 = load [3 x double]*, [3 x double]** %12
%609 = load i32, i32* %26
%610 = sext i32 %609 to i64
%611 = getelementptr inbounds [3 x double], [3 x double]* %608, i64 %610
%612 = getelementptr inbounds [3 x double], [3 x double]* %611, i64 0, i64 0
%613 = load double, double* %612
%614 = load [3 x double]*, [3 x double]** %12
%615 = load i32, i32* %25
%616 = sext i32 %615 to i64
%617 = getelementptr inbounds [3 x double], [3 x double]* %614, i64 %616
%618 = getelementptr inbounds [3 x double], [3 x double]* %617, i64 0, i64 0
%619 = load double, double* %618
%620 = fsub double %613, %619
%621 = load double*, double** %15
%622 = getelementptr inbounds double, double* %621, i64 1
%623 = load double, double* %622
%624 = load [3 x double]*, [3 x double]** %12
%625 = load i32, i32* %25
%626 = sext i32 %625 to i64
%627 = getelementptr inbounds [3 x double], [3 x double]* %624, i64 %626
%628 = getelementptr inbounds [3 x double], [3 x double]* %627, i64 0, i64 1
%629 = load double, double* %628
%630 = fsub double %623, %629
%631 = load [3 x double]*, [3 x double]** %12
%632 = load i32, i32* %26
%633 = sext i32 %632 to i64
%634 = getelementptr inbounds [3 x double], [3 x double]* %631, i64 %633
%635 = getelementptr inbounds [3 x double], [3 x double]* %634, i64 0, i64 1
%636 = load double, double* %635
%637 = load [3 x double]*, [3 x double]** %12
%638 = load i32, i32* %25
%639 = sext i32 %638 to i64
%640 = getelementptr inbounds [3 x double], [3 x double]* %637, i64 %639
%641 = getelementptr inbounds [3 x double], [3 x double]* %640, i64 0, i64 1
%642 = load double, double* %641
%643 = fsub double %636, %642
%644 = fmul double %630, %643
%645 = call double @llvm.fmuladd.f64(double %607, double %620, double %644)
%646 = load double*, double** %15
%647 = getelementptr inbounds double, double* %646, i64 2
%648 = load double, double* %647
%649 = load [3 x double]*, [3 x double]** %12
%650 = load i32, i32* %25
%651 = sext i32 %650 to i64
%652 = getelementptr inbounds [3 x double], [3 x double]* %649, i64 %651
%653 = getelementptr inbounds [3 x double], [3 x double]* %652, i64 0, i64 2
%654 = load double, double* %653
%655 = fsub double %648, %654
%656 = load [3 x double]*, [3 x double]** %12
%657 = load i32, i32* %26
%658 = sext i32 %657 to i64
%659 = getelementptr inbounds [3 x double], [3 x double]* %656, i64 %658
%660 = getelementptr inbounds [3 x double], [3 x double]* %659, i64 0, i64 2
%661 = load double, double* %660
%662 = load [3 x double]*, [3 x double]** %12
%663 = load i32, i32* %25
%664 = sext i32 %663 to i64
%665 = getelementptr inbounds [3 x double], [3 x double]* %662, i64 %664
%666 = getelementptr inbounds [3 x double], [3 x double]* %665, i64 0, i64 2
%667 = load double, double* %666
%668 = fsub double %661, %667
%669 = call double @llvm.fmuladd.f64(double %655, double %668, double %645)
%670 = load double*, double** %15
%671 = getelementptr inbounds double, double* %670, i64 0
%672 = load double, double* %671
%673 = load [3 x double]*, [3 x double]** %12
%674 = load i32, i32* %25
%675 = sext i32 %674 to i64
%676 = getelementptr inbounds [3 x double], [3 x double]* %673, i64 %675
%677 = getelementptr inbounds [3 x double], [3 x double]* %676, i64 0, i64 0
%678 = load double, double* %677
%679 = fsub double %672, %678
%680 = load double*, double** %15
%681 = getelementptr inbounds double, double* %680, i64 0
%682 = load double, double* %681
%683 = load [3 x double]*, [3 x double]** %12
%684 = load i32, i32* %25
%685 = sext i32 %684 to i64
%686 = getelementptr inbounds [3 x double], [3 x double]* %683, i64 %685
%687 = getelementptr inbounds [3 x double], [3 x double]* %686, i64 0, i64 0
%688 = load double, double* %687
%689 = fsub double %682, %688
%690 = load double*, double** %15
%691 = getelementptr inbounds double, double* %690, i64 1
%692 = load double, double* %691
%693 = load [3 x double]*, [3 x double]** %12
%694 = load i32, i32* %25
%695 = sext i32 %694 to i64
%696 = getelementptr inbounds [3 x double], [3 x double]* %693, i64 %695
%697 = getelementptr inbounds [3 x double], [3 x double]* %696, i64 0, i64 1
%698 = load double, double* %697
%699 = fsub double %692, %698
%700 = load double*, double** %15
%701 = getelementptr inbounds double, double* %700, i64 1
%702 = load double, double* %701
%703 = load [3 x double]*, [3 x double]** %12
%704 = load i32, i32* %25
%705 = sext i32 %704 to i64
%706 = getelementptr inbounds [3 x double], [3 x double]* %703, i64 %705
%707 = getelementptr inbounds [3 x double], [3 x double]* %706, i64 0, i64 1
%708 = load double, double* %707
%709 = fsub double %702, %708
%710 = fmul double %699, %709
%711 = call double @llvm.fmuladd.f64(double %679, double %689, double %710)
%712 = load double*, double** %15
%713 = getelementptr inbounds double, double* %712, i64 2
%714 = load double, double* %713
%715 = load [3 x double]*, [3 x double]** %12
%716 = load i32, i32* %25
%717 = sext i32 %716 to i64
%718 = getelementptr inbounds [3 x double], [3 x double]* %715, i64 %717
%719 = getelementptr inbounds [3 x double], [3 x double]* %718, i64 0, i64 2
%720 = load double, double* %719
%721 = fsub double %714, %720
%722 = load double*, double** %15
%723 = getelementptr inbounds double, double* %722, i64 2
%724 = load double, double* %723
%725 = load [3 x double]*, [3 x double]** %12
%726 = load i32, i32* %25
%727 = sext i32 %726 to i64
%728 = getelementptr inbounds [3 x double], [3 x double]* %725, i64 %727
%729 = getelementptr inbounds [3 x double], [3 x double]* %728, i64 0, i64 2
%730 = load double, double* %729
%731 = fsub double %724, %730
%732 = call double @llvm.fmuladd.f64(double %721, double %731, double %711)
%733 = call double @sqrt(double %732)
%734 = load [3 x double]*, [3 x double]** %12
%735 = load i32, i32* %26
%736 = sext i32 %735 to i64
%737 = getelementptr inbounds [3 x double], [3 x double]* %734, i64 %736
%738 = getelementptr inbounds [3 x double], [3 x double]* %737, i64 0, i64 0
%739 = load double, double* %738
%740 = load [3 x double]*, [3 x double]** %12
%741 = load i32, i32* %25
%742 = sext i32 %741 to i64
%743 = getelementptr inbounds [3 x double], [3 x double]* %740, i64 %742
%744 = getelementptr inbounds [3 x double], [3 x double]* %743, i64 0, i64 0
%745 = load double, double* %744
%746 = fsub double %739, %745
%747 = load [3 x double]*, [3 x double]** %12
%748 = load i32, i32* %26
%749 = sext i32 %748 to i64
%750 = getelementptr inbounds [3 x double], [3 x double]* %747, i64 %749
%751 = getelementptr inbounds [3 x double], [3 x double]* %750, i64 0, i64 0
%752 = load double, double* %751
%753 = load [3 x double]*, [3 x double]** %12
%754 = load i32, i32* %25
%755 = sext i32 %754 to i64
%756 = getelementptr inbounds [3 x double], [3 x double]* %753, i64 %755
%757 = getelementptr inbounds [3 x double], [3 x double]* %756, i64 0, i64 0
%758 = load double, double* %757
%759 = fsub double %752, %758
%760 = load [3 x double]*, [3 x double]** %12
%761 = load i32, i32* %26
%762 = sext i32 %761 to i64
%763 = getelementptr inbounds [3 x double], [3 x double]* %760, i64 %762
%764 = getelementptr inbounds [3 x double], [3 x double]* %763, i64 0, i64 1
%765 = load double, double* %764
%766 = load [3 x double]*, [3 x double]** %12
%767 = load i32, i32* %25
%768 = sext i32 %767 to i64
%769 = getelementptr inbounds [3 x double], [3 x double]* %766, i64 %768
%770 = getelementptr inbounds [3 x double], [3 x double]* %769, i64 0, i64 1
%771 = load double, double* %770
%772 = fsub double %765, %771
%773 = load [3 x double]*, [3 x double]** %12
%774 = load i32, i32* %26
%775 = sext i32 %774 to i64
%776 = getelementptr inbounds [3 x double], [3 x double]* %773, i64 %775
%777 = getelementptr inbounds [3 x double], [3 x double]* %776, i64 0, i64 1
%778 = load double, double* %777
%779 = load [3 x double]*, [3 x double]** %12
%780 = load i32, i32* %25
%781 = sext i32 %780 to i64
%782 = getelementptr inbounds [3 x double], [3 x double]* %779, i64 %781
%783 = getelementptr inbounds [3 x double], [3 x double]* %782, i64 0, i64 1
%784 = load double, double* %783
%785 = fsub double %778, %784
%786 = fmul double %772, %785
%787 = call double @llvm.fmuladd.f64(double %746, double %759, double %786)
%788 = load [3 x double]*, [3 x double]** %12
%789 = load i32, i32* %26
%790 = sext i32 %789 to i64
%791 = getelementptr inbounds [3 x double], [3 x double]* %788, i64 %790
%792 = getelementptr inbounds [3 x double], [3 x double]* %791, i64 0, i64 2
%793 = load double, double* %792
%794 = load [3 x double]*, [3 x double]** %12
%795 = load i32, i32* %25
%796 = sext i32 %795 to i64
%797 = getelementptr inbounds [3 x double], [3 x double]* %794, i64 %796
%798 = getelementptr inbounds [3 x double], [3 x double]* %797, i64 0, i64 2
%799 = load double, double* %798
%800 = fsub double %793, %799
%801 = load [3 x double]*, [3 x double]** %12
%802 = load i32, i32* %26
%803 = sext i32 %802 to i64
%804 = getelementptr inbounds [3 x double], [3 x double]* %801, i64 %803
%805 = getelementptr inbounds [3 x double], [3 x double]* %804, i64 0, i64 2
%806 = load double, double* %805
%807 = load [3 x double]*, [3 x double]** %12
%808 = load i32, i32* %25
%809 = sext i32 %808 to i64
%810 = getelementptr inbounds [3 x double], [3 x double]* %807, i64 %809
%811 = getelementptr inbounds [3 x double], [3 x double]* %810, i64 0, i64 2
%812 = load double, double* %811
%813 = fsub double %806, %812
%814 = call double @llvm.fmuladd.f64(double %800, double %813, double %787)
%815 = call double @sqrt(double %814)
%816 = fmul double %733, %815
%817 = fdiv double %669, %816
store double %817, double* %30
%818 = load double, double* %30
%819 = load double, double* %30
%820 = fneg double %818
%821 = call double @llvm.fmuladd.f64(double %820, double %819, double 1.000000e+00)
%822 = call double @sqrt(double %821)
store double %822, double* %29
%823 = load [3 x double]*, [3 x double]** %12
%824 = load i32, i32* %26
%825 = sext i32 %824 to i64
%826 = getelementptr inbounds [3 x double], [3 x double]* %823, i64 %825
%827 = getelementptr inbounds [3 x double], [3 x double]* %826, i64 0, i64 0
%828 = load double, double* %827
%829 = load [3 x double]*, [3 x double]** %12
%830 = load i32, i32* %25
%831 = sext i32 %830 to i64
%832 = getelementptr inbounds [3 x double], [3 x double]* %829, i64 %831
%833 = getelementptr inbounds [3 x double], [3 x double]* %832, i64 0, i64 0
%834 = load double, double* %833
%835 = fsub double %828, %834
%836 = load [3 x double]*, [3 x double]** %12
%837 = load i32, i32* %26
%838 = sext i32 %837 to i64
%839 = getelementptr inbounds [3 x double], [3 x double]* %836, i64 %838
%840 = getelementptr inbounds [3 x double], [3 x double]* %839, i64 0, i64 0
%841 = load double, double* %840
%842 = load [3 x double]*, [3 x double]** %12
%843 = load i32, i32* %25
%844 = sext i32 %843 to i64
%845 = getelementptr inbounds [3 x double], [3 x double]* %842, i64 %844
%846 = getelementptr inbounds [3 x double], [3 x double]* %845, i64 0, i64 0
%847 = load double, double* %846
%848 = fsub double %841, %847
%849 = load [3 x double]*, [3 x double]** %12
%850 = load i32, i32* %26
%851 = sext i32 %850 to i64
%852 = getelementptr inbounds [3 x double], [3 x double]* %849, i64 %851
%853 = getelementptr inbounds [3 x double], [3 x double]* %852, i64 0, i64 1
%854 = load double, double* %853
%855 = load [3 x double]*, [3 x double]** %12
%856 = load i32, i32* %25
%857 = sext i32 %856 to i64
%858 = getelementptr inbounds [3 x double], [3 x double]* %855, i64 %857
%859 = getelementptr inbounds [3 x double], [3 x double]* %858, i64 0, i64 1
%860 = load double, double* %859
%861 = fsub double %854, %860
%862 = load [3 x double]*, [3 x double]** %12
%863 = load i32, i32* %26
%864 = sext i32 %863 to i64
%865 = getelementptr inbounds [3 x double], [3 x double]* %862, i64 %864
%866 = getelementptr inbounds [3 x double], [3 x double]* %865, i64 0, i64 1
%867 = load double, double* %866
%868 = load [3 x double]*, [3 x double]** %12
%869 = load i32, i32* %25
%870 = sext i32 %869 to i64
%871 = getelementptr inbounds [3 x double], [3 x double]* %868, i64 %870
%872 = getelementptr inbounds [3 x double], [3 x double]* %871, i64 0, i64 1
%873 = load double, double* %872
%874 = fsub double %867, %873
%875 = fmul double %861, %874
%876 = call double @llvm.fmuladd.f64(double %835, double %848, double %875)
%877 = load [3 x double]*, [3 x double]** %12
%878 = load i32, i32* %26
%879 = sext i32 %878 to i64
%880 = getelementptr inbounds [3 x double], [3 x double]* %877, i64 %879
%881 = getelementptr inbounds [3 x double], [3 x double]* %880, i64 0, i64 2
%882 = load double, double* %881
%883 = load [3 x double]*, [3 x double]** %12
%884 = load i32, i32* %25
%885 = sext i32 %884 to i64
%886 = getelementptr inbounds [3 x double], [3 x double]* %883, i64 %885
%887 = getelementptr inbounds [3 x double], [3 x double]* %886, i64 0, i64 2
%888 = load double, double* %887
%889 = fsub double %882, %888
%890 = load [3 x double]*, [3 x double]** %12
%891 = load i32, i32* %26
%892 = sext i32 %891 to i64
%893 = getelementptr inbounds [3 x double], [3 x double]* %890, i64 %892
%894 = getelementptr inbounds [3 x double], [3 x double]* %893, i64 0, i64 2
%895 = load double, double* %894
%896 = load [3 x double]*, [3 x double]** %12
%897 = load i32, i32* %25
%898 = sext i32 %897 to i64
%899 = getelementptr inbounds [3 x double], [3 x double]* %896, i64 %898
%900 = getelementptr inbounds [3 x double], [3 x double]* %899, i64 0, i64 2
%901 = load double, double* %900
%902 = fsub double %895, %901
%903 = call double @llvm.fmuladd.f64(double %889, double %902, double %876)
%904 = call double @sqrt(double %903)
%905 = load double*, double** %15
%906 = getelementptr inbounds double, double* %905, i64 0
%907 = load double, double* %906
%908 = load [3 x double]*, [3 x double]** %12
%909 = load i32, i32* %25
%910 = sext i32 %909 to i64
%911 = getelementptr inbounds [3 x double], [3 x double]* %908, i64 %910
%912 = getelementptr inbounds [3 x double], [3 x double]* %911, i64 0, i64 0
%913 = load double, double* %912
%914 = fsub double %907, %913
%915 = load double*, double** %15
%916 = getelementptr inbounds double, double* %915, i64 0
%917 = load double, double* %916
%918 = load [3 x double]*, [3 x double]** %12
%919 = load i32, i32* %25
%920 = sext i32 %919 to i64
%921 = getelementptr inbounds [3 x double], [3 x double]* %918, i64 %920
%922 = getelementptr inbounds [3 x double], [3 x double]* %921, i64 0, i64 0
%923 = load double, double* %922
%924 = fsub double %917, %923
%925 = load double*, double** %15
%926 = getelementptr inbounds double, double* %925, i64 1
%927 = load double, double* %926
%928 = load [3 x double]*, [3 x double]** %12
%929 = load i32, i32* %25
%930 = sext i32 %929 to i64
%931 = getelementptr inbounds [3 x double], [3 x double]* %928, i64 %930
%932 = getelementptr inbounds [3 x double], [3 x double]* %931, i64 0, i64 1
%933 = load double, double* %932
%934 = fsub double %927, %933
%935 = load double*, double** %15
%936 = getelementptr inbounds double, double* %935, i64 1
%937 = load double, double* %936
%938 = load [3 x double]*, [3 x double]** %12
%939 = load i32, i32* %25
%940 = sext i32 %939 to i64
%941 = getelementptr inbounds [3 x double], [3 x double]* %938, i64 %940
%942 = getelementptr inbounds [3 x double], [3 x double]* %941, i64 0, i64 1
%943 = load double, double* %942
%944 = fsub double %937, %943
%945 = fmul double %934, %944
%946 = call double @llvm.fmuladd.f64(double %914, double %924, double %945)
%947 = load double*, double** %15
%948 = getelementptr inbounds double, double* %947, i64 2
%949 = load double, double* %948
%950 = load [3 x double]*, [3 x double]** %12
%951 = load i32, i32* %25
%952 = sext i32 %951 to i64
%953 = getelementptr inbounds [3 x double], [3 x double]* %950, i64 %952
%954 = getelementptr inbounds [3 x double], [3 x double]* %953, i64 0, i64 2
%955 = load double, double* %954
%956 = fsub double %949, %955
%957 = load double*, double** %15
%958 = getelementptr inbounds double, double* %957, i64 2
%959 = load double, double* %958
%960 = load [3 x double]*, [3 x double]** %12
%961 = load i32, i32* %25
%962 = sext i32 %961 to i64
%963 = getelementptr inbounds [3 x double], [3 x double]* %960, i64 %962
%964 = getelementptr inbounds [3 x double], [3 x double]* %963, i64 0, i64 2
%965 = load double, double* %964
%966 = fsub double %959, %965
%967 = call double @llvm.fmuladd.f64(double %956, double %966, double %946)
%968 = call double @sqrt(double %967)
%969 = fmul double %904, %968
%970 = load double, double* %29
%971 = fmul double %969, %970
%972 = fdiv double %971, 2.000000e+00
%973 = load i32, i32* %24
%974 = sext i32 %973 to i64
%975 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 %974
store double %972, double* %975
br label %976
976: ; preds = %597
%977 = load i32, i32* %24
%978 = add nsw i32 %977, 1
store i32 %978, i32* %24
br label %501
979: ; preds = %596, %501
%980 = load i32, i32* %27
%981 = icmp eq i32 %980, 0
br i1 %981, label %982, label %1476
982: ; preds = %979
%983 = load [3 x double]*, [3 x double]** %12
%984 = getelementptr inbounds [3 x double], [3 x double]* %983, i64 2
%985 = getelementptr inbounds [3 x double], [3 x double]* %984, i64 0, i64 0
%986 = load double, double* %985
%987 = load [3 x double]*, [3 x double]** %12
%988 = getelementptr inbounds [3 x double], [3 x double]* %987, i64 0
%989 = getelementptr inbounds [3 x double], [3 x double]* %988, i64 0, i64 0
%990 = load double, double* %989
%991 = fsub double %986, %990
%992 = load [3 x double]*, [3 x double]** %12
%993 = getelementptr inbounds [3 x double], [3 x double]* %992, i64 1
%994 = getelementptr inbounds [3 x double], [3 x double]* %993, i64 0, i64 0
%995 = load double, double* %994
%996 = load [3 x double]*, [3 x double]** %12
%997 = getelementptr inbounds [3 x double], [3 x double]* %996, i64 0
%998 = getelementptr inbounds [3 x double], [3 x double]* %997, i64 0, i64 0
%999 = load double, double* %998
%1000 = fsub double %995, %999
%1001 = load [3 x double]*, [3 x double]** %12
%1002 = getelementptr inbounds [3 x double], [3 x double]* %1001, i64 2
%1003 = getelementptr inbounds [3 x double], [3 x double]* %1002, i64 0, i64 1
%1004 = load double, double* %1003
%1005 = load [3 x double]*, [3 x double]** %12
%1006 = getelementptr inbounds [3 x double], [3 x double]* %1005, i64 0
%1007 = getelementptr inbounds [3 x double], [3 x double]* %1006, i64 0, i64 1
%1008 = load double, double* %1007
%1009 = fsub double %1004, %1008
%1010 = load [3 x double]*, [3 x double]** %12
%1011 = getelementptr inbounds [3 x double], [3 x double]* %1010, i64 1
%1012 = getelementptr inbounds [3 x double], [3 x double]* %1011, i64 0, i64 1
%1013 = load double, double* %1012
%1014 = load [3 x double]*, [3 x double]** %12
%1015 = getelementptr inbounds [3 x double], [3 x double]* %1014, i64 0
%1016 = getelementptr inbounds [3 x double], [3 x double]* %1015, i64 0, i64 1
%1017 = load double, double* %1016
%1018 = fsub double %1013, %1017
%1019 = fmul double %1009, %1018
%1020 = call double @llvm.fmuladd.f64(double %991, double %1000, double %1019)
%1021 = load [3 x double]*, [3 x double]** %12
%1022 = getelementptr inbounds [3 x double], [3 x double]* %1021, i64 2
%1023 = getelementptr inbounds [3 x double], [3 x double]* %1022, i64 0, i64 2
%1024 = load double, double* %1023
%1025 = load [3 x double]*, [3 x double]** %12
%1026 = getelementptr inbounds [3 x double], [3 x double]* %1025, i64 0
%1027 = getelementptr inbounds [3 x double], [3 x double]* %1026, i64 0, i64 2
%1028 = load double, double* %1027
%1029 = fsub double %1024, %1028
%1030 = load [3 x double]*, [3 x double]** %12
%1031 = getelementptr inbounds [3 x double], [3 x double]* %1030, i64 1
%1032 = getelementptr inbounds [3 x double], [3 x double]* %1031, i64 0, i64 2
%1033 = load double, double* %1032
%1034 = load [3 x double]*, [3 x double]** %12
%1035 = getelementptr inbounds [3 x double], [3 x double]* %1034, i64 0
%1036 = getelementptr inbounds [3 x double], [3 x double]* %1035, i64 0, i64 2
%1037 = load double, double* %1036
%1038 = fsub double %1033, %1037
%1039 = call double @llvm.fmuladd.f64(double %1029, double %1038, double %1020)
%1040 = load [3 x double]*, [3 x double]** %12
%1041 = getelementptr inbounds [3 x double], [3 x double]* %1040, i64 2
%1042 = getelementptr inbounds [3 x double], [3 x double]* %1041, i64 0, i64 0
%1043 = load double, double* %1042
%1044 = load [3 x double]*, [3 x double]** %12
%1045 = getelementptr inbounds [3 x double], [3 x double]* %1044, i64 0
%1046 = getelementptr inbounds [3 x double], [3 x double]* %1045, i64 0, i64 0
%1047 = load double, double* %1046
%1048 = fsub double %1043, %1047
%1049 = load [3 x double]*, [3 x double]** %12
%1050 = getelementptr inbounds [3 x double], [3 x double]* %1049, i64 2
%1051 = getelementptr inbounds [3 x double], [3 x double]* %1050, i64 0, i64 0
%1052 = load double, double* %1051
%1053 = load [3 x double]*, [3 x double]** %12
%1054 = getelementptr inbounds [3 x double], [3 x double]* %1053, i64 0
%1055 = getelementptr inbounds [3 x double], [3 x double]* %1054, i64 0, i64 0
%1056 = load double, double* %1055
%1057 = fsub double %1052, %1056
%1058 = load [3 x double]*, [3 x double]** %12
%1059 = getelementptr inbounds [3 x double], [3 x double]* %1058, i64 2
%1060 = getelementptr inbounds [3 x double], [3 x double]* %1059, i64 0, i64 1
%1061 = load double, double* %1060
%1062 = load [3 x double]*, [3 x double]** %12
%1063 = getelementptr inbounds [3 x double], [3 x double]* %1062, i64 0
%1064 = getelementptr inbounds [3 x double], [3 x double]* %1063, i64 0, i64 1
%1065 = load double, double* %1064
%1066 = fsub double %1061, %1065
%1067 = load [3 x double]*, [3 x double]** %12
%1068 = getelementptr inbounds [3 x double], [3 x double]* %1067, i64 2
%1069 = getelementptr inbounds [3 x double], [3 x double]* %1068, i64 0, i64 1
%1070 = load double, double* %1069
%1071 = load [3 x double]*, [3 x double]** %12
%1072 = getelementptr inbounds [3 x double], [3 x double]* %1071, i64 0
%1073 = getelementptr inbounds [3 x double], [3 x double]* %1072, i64 0, i64 1
%1074 = load double, double* %1073
%1075 = fsub double %1070, %1074
%1076 = fmul double %1066, %1075
%1077 = call double @llvm.fmuladd.f64(double %1048, double %1057, double %1076)
%1078 = load [3 x double]*, [3 x double]** %12
%1079 = getelementptr inbounds [3 x double], [3 x double]* %1078, i64 2
%1080 = getelementptr inbounds [3 x double], [3 x double]* %1079, i64 0, i64 2
%1081 = load double, double* %1080
%1082 = load [3 x double]*, [3 x double]** %12
%1083 = getelementptr inbounds [3 x double], [3 x double]* %1082, i64 0
%1084 = getelementptr inbounds [3 x double], [3 x double]* %1083, i64 0, i64 2
%1085 = load double, double* %1084
%1086 = fsub double %1081, %1085
%1087 = load [3 x double]*, [3 x double]** %12
%1088 = getelementptr inbounds [3 x double], [3 x double]* %1087, i64 2
%1089 = getelementptr inbounds [3 x double], [3 x double]* %1088, i64 0, i64 2
%1090 = load double, double* %1089
%1091 = load [3 x double]*, [3 x double]** %12
%1092 = getelementptr inbounds [3 x double], [3 x double]* %1091, i64 0
%1093 = getelementptr inbounds [3 x double], [3 x double]* %1092, i64 0, i64 2
%1094 = load double, double* %1093
%1095 = fsub double %1090, %1094
%1096 = call double @llvm.fmuladd.f64(double %1086, double %1095, double %1077)
%1097 = call double @sqrt(double %1096)
%1098 = load [3 x double]*, [3 x double]** %12
%1099 = getelementptr inbounds [3 x double], [3 x double]* %1098, i64 1
%1100 = getelementptr inbounds [3 x double], [3 x double]* %1099, i64 0, i64 0
%1101 = load double, double* %1100
%1102 = load [3 x double]*, [3 x double]** %12
%1103 = getelementptr inbounds [3 x double], [3 x double]* %1102, i64 0
%1104 = getelementptr inbounds [3 x double], [3 x double]* %1103, i64 0, i64 0
%1105 = load double, double* %1104
%1106 = fsub double %1101, %1105
%1107 = load [3 x double]*, [3 x double]** %12
%1108 = getelementptr inbounds [3 x double], [3 x double]* %1107, i64 1
%1109 = getelementptr inbounds [3 x double], [3 x double]* %1108, i64 0, i64 0
%1110 = load double, double* %1109
%1111 = load [3 x double]*, [3 x double]** %12
%1112 = getelementptr inbounds [3 x double], [3 x double]* %1111, i64 0
%1113 = getelementptr inbounds [3 x double], [3 x double]* %1112, i64 0, i64 0
%1114 = load double, double* %1113
%1115 = fsub double %1110, %1114
%1116 = load [3 x double]*, [3 x double]** %12
%1117 = getelementptr inbounds [3 x double], [3 x double]* %1116, i64 1
%1118 = getelementptr inbounds [3 x double], [3 x double]* %1117, i64 0, i64 1
%1119 = load double, double* %1118
%1120 = load [3 x double]*, [3 x double]** %12
%1121 = getelementptr inbounds [3 x double], [3 x double]* %1120, i64 0
%1122 = getelementptr inbounds [3 x double], [3 x double]* %1121, i64 0, i64 1
%1123 = load double, double* %1122
%1124 = fsub double %1119, %1123
%1125 = load [3 x double]*, [3 x double]** %12
%1126 = getelementptr inbounds [3 x double], [3 x double]* %1125, i64 1
%1127 = getelementptr inbounds [3 x double], [3 x double]* %1126, i64 0, i64 1
%1128 = load double, double* %1127
%1129 = load [3 x double]*, [3 x double]** %12
%1130 = getelementptr inbounds [3 x double], [3 x double]* %1129, i64 0
%1131 = getelementptr inbounds [3 x double], [3 x double]* %1130, i64 0, i64 1
%1132 = load double, double* %1131
%1133 = fsub double %1128, %1132
%1134 = fmul double %1124, %1133
%1135 = call double @llvm.fmuladd.f64(double %1106, double %1115, double %1134)
%1136 = load [3 x double]*, [3 x double]** %12
%1137 = getelementptr inbounds [3 x double], [3 x double]* %1136, i64 1
%1138 = getelementptr inbounds [3 x double], [3 x double]* %1137, i64 0, i64 2
%1139 = load double, double* %1138
%1140 = load [3 x double]*, [3 x double]** %12
%1141 = getelementptr inbounds [3 x double], [3 x double]* %1140, i64 0
%1142 = getelementptr inbounds [3 x double], [3 x double]* %1141, i64 0, i64 2
%1143 = load double, double* %1142
%1144 = fsub double %1139, %1143
%1145 = load [3 x double]*, [3 x double]** %12
%1146 = getelementptr inbounds [3 x double], [3 x double]* %1145, i64 1
%1147 = getelementptr inbounds [3 x double], [3 x double]* %1146, i64 0, i64 2
%1148 = load double, double* %1147
%1149 = load [3 x double]*, [3 x double]** %12
%1150 = getelementptr inbounds [3 x double], [3 x double]* %1149, i64 0
%1151 = getelementptr inbounds [3 x double], [3 x double]* %1150, i64 0, i64 2
%1152 = load double, double* %1151
%1153 = fsub double %1148, %1152
%1154 = call double @llvm.fmuladd.f64(double %1144, double %1153, double %1135)
%1155 = call double @sqrt(double %1154)
%1156 = fmul double %1097, %1155
%1157 = fdiv double %1039, %1156
store double %1157, double* %30
%1158 = load double, double* %30
%1159 = load double, double* %30
%1160 = fneg double %1158
%1161 = call double @llvm.fmuladd.f64(double %1160, double %1159, double 1.000000e+00)
%1162 = call double @sqrt(double %1161)
store double %1162, double* %29
%1163 = load [3 x double]*, [3 x double]** %12
%1164 = getelementptr inbounds [3 x double], [3 x double]* %1163, i64 1
%1165 = getelementptr inbounds [3 x double], [3 x double]* %1164, i64 0, i64 0
%1166 = load double, double* %1165
%1167 = load [3 x double]*, [3 x double]** %12
%1168 = getelementptr inbounds [3 x double], [3 x double]* %1167, i64 0
%1169 = getelementptr inbounds [3 x double], [3 x double]* %1168, i64 0, i64 0
%1170 = load double, double* %1169
%1171 = fsub double %1166, %1170
%1172 = load [3 x double]*, [3 x double]** %12
%1173 = getelementptr inbounds [3 x double], [3 x double]* %1172, i64 1
%1174 = getelementptr inbounds [3 x double], [3 x double]* %1173, i64 0, i64 0
%1175 = load double, double* %1174
%1176 = load [3 x double]*, [3 x double]** %12
%1177 = getelementptr inbounds [3 x double], [3 x double]* %1176, i64 0
%1178 = getelementptr inbounds [3 x double], [3 x double]* %1177, i64 0, i64 0
%1179 = load double, double* %1178
%1180 = fsub double %1175, %1179
%1181 = load [3 x double]*, [3 x double]** %12
%1182 = getelementptr inbounds [3 x double], [3 x double]* %1181, i64 1
%1183 = getelementptr inbounds [3 x double], [3 x double]* %1182, i64 0, i64 1
%1184 = load double, double* %1183
%1185 = load [3 x double]*, [3 x double]** %12
%1186 = getelementptr inbounds [3 x double], [3 x double]* %1185, i64 0
%1187 = getelementptr inbounds [3 x double], [3 x double]* %1186, i64 0, i64 1
%1188 = load double, double* %1187
%1189 = fsub double %1184, %1188
%1190 = load [3 x double]*, [3 x double]** %12
%1191 = getelementptr inbounds [3 x double], [3 x double]* %1190, i64 1
%1192 = getelementptr inbounds [3 x double], [3 x double]* %1191, i64 0, i64 1
%1193 = load double, double* %1192
%1194 = load [3 x double]*, [3 x double]** %12
%1195 = getelementptr inbounds [3 x double], [3 x double]* %1194, i64 0
%1196 = getelementptr inbounds [3 x double], [3 x double]* %1195, i64 0, i64 1
%1197 = load double, double* %1196
%1198 = fsub double %1193, %1197
%1199 = fmul double %1189, %1198
%1200 = call double @llvm.fmuladd.f64(double %1171, double %1180, double %1199)
%1201 = load [3 x double]*, [3 x double]** %12
%1202 = getelementptr inbounds [3 x double], [3 x double]* %1201, i64 1
%1203 = getelementptr inbounds [3 x double], [3 x double]* %1202, i64 0, i64 2
%1204 = load double, double* %1203
%1205 = load [3 x double]*, [3 x double]** %12
%1206 = getelementptr inbounds [3 x double], [3 x double]* %1205, i64 0
%1207 = getelementptr inbounds [3 x double], [3 x double]* %1206, i64 0, i64 2
%1208 = load double, double* %1207
%1209 = fsub double %1204, %1208
%1210 = load [3 x double]*, [3 x double]** %12
%1211 = getelementptr inbounds [3 x double], [3 x double]* %1210, i64 1
%1212 = getelementptr inbounds [3 x double], [3 x double]* %1211, i64 0, i64 2
%1213 = load double, double* %1212
%1214 = load [3 x double]*, [3 x double]** %12
%1215 = getelementptr inbounds [3 x double], [3 x double]* %1214, i64 0
%1216 = getelementptr inbounds [3 x double], [3 x double]* %1215, i64 0, i64 2
%1217 = load double, double* %1216
%1218 = fsub double %1213, %1217
%1219 = call double @llvm.fmuladd.f64(double %1209, double %1218, double %1200)
%1220 = call double @sqrt(double %1219)
%1221 = load [3 x double]*, [3 x double]** %12
%1222 = getelementptr inbounds [3 x double], [3 x double]* %1221, i64 2
%1223 = getelementptr inbounds [3 x double], [3 x double]* %1222, i64 0, i64 0
%1224 = load double, double* %1223
%1225 = load [3 x double]*, [3 x double]** %12
%1226 = getelementptr inbounds [3 x double], [3 x double]* %1225, i64 0
%1227 = getelementptr inbounds [3 x double], [3 x double]* %1226, i64 0, i64 0
%1228 = load double, double* %1227
%1229 = fsub double %1224, %1228
%1230 = load [3 x double]*, [3 x double]** %12
%1231 = getelementptr inbounds [3 x double], [3 x double]* %1230, i64 2
%1232 = getelementptr inbounds [3 x double], [3 x double]* %1231, i64 0, i64 0
%1233 = load double, double* %1232
%1234 = load [3 x double]*, [3 x double]** %12
%1235 = getelementptr inbounds [3 x double], [3 x double]* %1234, i64 0
%1236 = getelementptr inbounds [3 x double], [3 x double]* %1235, i64 0, i64 0
%1237 = load double, double* %1236
%1238 = fsub double %1233, %1237
%1239 = load [3 x double]*, [3 x double]** %12
%1240 = getelementptr inbounds [3 x double], [3 x double]* %1239, i64 2
%1241 = getelementptr inbounds [3 x double], [3 x double]* %1240, i64 0, i64 1
%1242 = load double, double* %1241
%1243 = load [3 x double]*, [3 x double]** %12
%1244 = getelementptr inbounds [3 x double], [3 x double]* %1243, i64 0
%1245 = getelementptr inbounds [3 x double], [3 x double]* %1244, i64 0, i64 1
%1246 = load double, double* %1245
%1247 = fsub double %1242, %1246
%1248 = load [3 x double]*, [3 x double]** %12
%1249 = getelementptr inbounds [3 x double], [3 x double]* %1248, i64 2
%1250 = getelementptr inbounds [3 x double], [3 x double]* %1249, i64 0, i64 1
%1251 = load double, double* %1250
%1252 = load [3 x double]*, [3 x double]** %12
%1253 = getelementptr inbounds [3 x double], [3 x double]* %1252, i64 0
%1254 = getelementptr inbounds [3 x double], [3 x double]* %1253, i64 0, i64 1
%1255 = load double, double* %1254
%1256 = fsub double %1251, %1255
%1257 = fmul double %1247, %1256
%1258 = call double @llvm.fmuladd.f64(double %1229, double %1238, double %1257)
%1259 = load [3 x double]*, [3 x double]** %12
%1260 = getelementptr inbounds [3 x double], [3 x double]* %1259, i64 2
%1261 = getelementptr inbounds [3 x double], [3 x double]* %1260, i64 0, i64 2
%1262 = load double, double* %1261
%1263 = load [3 x double]*, [3 x double]** %12
%1264 = getelementptr inbounds [3 x double], [3 x double]* %1263, i64 0
%1265 = getelementptr inbounds [3 x double], [3 x double]* %1264, i64 0, i64 2
%1266 = load double, double* %1265
%1267 = fsub double %1262, %1266
%1268 = load [3 x double]*, [3 x double]** %12
%1269 = getelementptr inbounds [3 x double], [3 x double]* %1268, i64 2
%1270 = getelementptr inbounds [3 x double], [3 x double]* %1269, i64 0, i64 2
%1271 = load double, double* %1270
%1272 = load [3 x double]*, [3 x double]** %12
%1273 = getelementptr inbounds [3 x double], [3 x double]* %1272, i64 0
%1274 = getelementptr inbounds [3 x double], [3 x double]* %1273, i64 0, i64 2
%1275 = load double, double* %1274
%1276 = fsub double %1271, %1275
%1277 = call double @llvm.fmuladd.f64(double %1267, double %1276, double %1258)
%1278 = call double @sqrt(double %1277)
%1279 = fmul double %1220, %1278
%1280 = load double, double* %29
%1281 = fmul double %1279, %1280
%1282 = fdiv double %1281, 2.000000e+00
store double %1282, double* %31
%1283 = load double, double* %31
%1284 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 0
%1285 = load double, double* %1284
%1286 = fsub double %1283, %1285
%1287 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 1
%1288 = load double, double* %1287
%1289 = fsub double %1286, %1288
%1290 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 2
%1291 = load double, double* %1290
%1292 = fsub double %1289, %1291
%1293 = call double @llvm.fabs.f64(double %1292)
%1294 = fcmp olt double %1293, 1.000000e-08
br i1 %1294, label %1295, label %1475
1295: ; preds = %982
store i32 1, i32* %27
store i32 0, i32* %24
br label %1296
1296: ; preds = %1367, %1295
%1297 = load i32, i32* %24
%1298 = icmp slt i32 %1297, 3
br i1 %1298, label %1299, label %1370
1299: ; preds = %1296
%1300 = load double*, double** %15
%1301 = getelementptr inbounds double, double* %1300, i64 0
%1302 = load double, double* %1301
%1303 = load [3 x double]*, [3 x double]** %12
%1304 = load i32, i32* %24
%1305 = sext i32 %1304 to i64
%1306 = getelementptr inbounds [3 x double], [3 x double]* %1303, i64 %1305
%1307 = getelementptr inbounds [3 x double], [3 x double]* %1306, i64 0, i64 0
%1308 = load double, double* %1307
%1309 = fsub double %1302, %1308
%1310 = load double*, double** %15
%1311 = getelementptr inbounds double, double* %1310, i64 0
%1312 = load double, double* %1311
%1313 = load [3 x double]*, [3 x double]** %12
%1314 = load i32, i32* %24
%1315 = sext i32 %1314 to i64
%1316 = getelementptr inbounds [3 x double], [3 x double]* %1313, i64 %1315
%1317 = getelementptr inbounds [3 x double], [3 x double]* %1316, i64 0, i64 0
%1318 = load double, double* %1317
%1319 = fsub double %1312, %1318
%1320 = load double*, double** %15
%1321 = getelementptr inbounds double, double* %1320, i64 1
%1322 = load double, double* %1321
%1323 = load [3 x double]*, [3 x double]** %12
%1324 = load i32, i32* %24
%1325 = sext i32 %1324 to i64
%1326 = getelementptr inbounds [3 x double], [3 x double]* %1323, i64 %1325
%1327 = getelementptr inbounds [3 x double], [3 x double]* %1326, i64 0, i64 1
%1328 = load double, double* %1327
%1329 = fsub double %1322, %1328
%1330 = load double*, double** %15
%1331 = getelementptr inbounds double, double* %1330, i64 1
%1332 = load double, double* %1331
%1333 = load [3 x double]*, [3 x double]** %12
%1334 = load i32, i32* %24
%1335 = sext i32 %1334 to i64
%1336 = getelementptr inbounds [3 x double], [3 x double]* %1333, i64 %1335
%1337 = getelementptr inbounds [3 x double], [3 x double]* %1336, i64 0, i64 1
%1338 = load double, double* %1337
%1339 = fsub double %1332, %1338
%1340 = fmul double %1329, %1339
%1341 = call double @llvm.fmuladd.f64(double %1309, double %1319, double %1340)
%1342 = load double*, double** %15
%1343 = getelementptr inbounds double, double* %1342, i64 2
%1344 = load double, double* %1343
%1345 = load [3 x double]*, [3 x double]** %12
%1346 = load i32, i32* %24
%1347 = sext i32 %1346 to i64
%1348 = getelementptr inbounds [3 x double], [3 x double]* %1345, i64 %1347
%1349 = getelementptr inbounds [3 x double], [3 x double]* %1348, i64 0, i64 2
%1350 = load double, double* %1349
%1351 = fsub double %1344, %1350
%1352 = load double*, double** %15
%1353 = getelementptr inbounds double, double* %1352, i64 2
%1354 = load double, double* %1353
%1355 = load [3 x double]*, [3 x double]** %12
%1356 = load i32, i32* %24
%1357 = sext i32 %1356 to i64
%1358 = getelementptr inbounds [3 x double], [3 x double]* %1355, i64 %1357
%1359 = getelementptr inbounds [3 x double], [3 x double]* %1358, i64 0, i64 2
%1360 = load double, double* %1359
%1361 = fsub double %1354, %1360
%1362 = call double @llvm.fmuladd.f64(double %1351, double %1361, double %1341)
%1363 = call double @sqrt(double %1362)
%1364 = load i32, i32* %24
%1365 = sext i32 %1364 to i64
%1366 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 %1365
store double %1363, double* %1366
br label %1367
1367: ; preds = %1299
%1368 = load i32, i32* %24
%1369 = add nsw i32 %1368, 1
store i32 %1369, i32* %24
br label %1296
1370: ; preds = %1296
%1371 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 0
%1372 = load double, double* %1371
%1373 = fdiv double 1.000000e+00, %1372
%1374 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 1
%1375 = load double, double* %1374
%1376 = fdiv double 1.000000e+00, %1375
%1377 = fadd double %1373, %1376
%1378 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 2
%1379 = load double, double* %1378
%1380 = fdiv double 1.000000e+00, %1379
%1381 = fadd double %1377, %1380
store double %1381, double* %34
%1382 = load double*, double** %18
%1383 = getelementptr inbounds double, double* %1382, i64 0
%1384 = load double, double* %1383
%1385 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 0
%1386 = load double, double* %1385
%1387 = load double, double* %34
%1388 = fmul double %1386, %1387
%1389 = fdiv double %1384, %1388
%1390 = load double*, double** %18
%1391 = getelementptr inbounds double, double* %1390, i64 1
%1392 = load double, double* %1391
%1393 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 1
%1394 = load double, double* %1393
%1395 = load double, double* %34
%1396 = fmul double %1394, %1395
%1397 = fdiv double %1392, %1396
%1398 = fadd double %1389, %1397
%1399 = load double*, double** %18
%1400 = getelementptr inbounds double, double* %1399, i64 2
%1401 = load double, double* %1400
%1402 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 2
%1403 = load double, double* %1402
%1404 = load double, double* %34
%1405 = fmul double %1403, %1404
%1406 = fdiv double %1401, %1405
%1407 = fadd double %1398, %1406
%1408 = load double*, double** %19
store double %1407, double* %1408
%1409 = load i32, i32* %22
%1410 = icmp eq i32 %1409, 1
br i1 %1410, label %1411, label %1474
1411: ; preds = %1370
store i32 0, i32* %24
br label %1412
1412: ; preds = %1454, %1411
%1413 = load i32, i32* %24
%1414 = icmp slt i32 %1413, 3
br i1 %1414, label %1415, label %1457
1415: ; preds = %1412
%1416 = load double*, double** %20
%1417 = load i32, i32* %24
%1418 = add nsw i32 0, %1417
%1419 = sext i32 %1418 to i64
%1420 = getelementptr inbounds double, double* %1416, i64 %1419
%1421 = load double, double* %1420
%1422 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 0
%1423 = load double, double* %1422
%1424 = load double, double* %34
%1425 = fmul double %1423, %1424
%1426 = fdiv double %1421, %1425
%1427 = load double*, double** %20
%1428 = load i32, i32* %24
%1429 = add nsw i32 3, %1428
%1430 = sext i32 %1429 to i64
%1431 = getelementptr inbounds double, double* %1427, i64 %1430
%1432 = load double, double* %1431
%1433 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 1
%1434 = load double, double* %1433
%1435 = load double, double* %34
%1436 = fmul double %1434, %1435
%1437 = fdiv double %1432, %1436
%1438 = fadd double %1426, %1437
%1439 = load double*, double** %20
%1440 = load i32, i32* %24
%1441 = add nsw i32 6, %1440
%1442 = sext i32 %1441 to i64
%1443 = getelementptr inbounds double, double* %1439, i64 %1442
%1444 = load double, double* %1443
%1445 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 2
%1446 = load double, double* %1445
%1447 = load double, double* %34
%1448 = fmul double %1446, %1447
%1449 = fdiv double %1444, %1448
%1450 = fadd double %1438, %1449
%1451 = load i32, i32* %24
%1452 = sext i32 %1451 to i64
%1453 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 %1452
store double %1450, double* %1453
br label %1454
1454: ; preds = %1415
%1455 = load i32, i32* %24
%1456 = add nsw i32 %1455, 1
store i32 %1456, i32* %24
br label %1412
1457: ; preds = %1412
store i32 0, i32* %24
br label %1458
1458: ; preds = %1470, %1457
%1459 = load i32, i32* %24
%1460 = icmp slt i32 %1459, 3
br i1 %1460, label %1461, label %1473
1461: ; preds = %1458
%1462 = load i32, i32* %24
%1463 = sext i32 %1462 to i64
%1464 = getelementptr inbounds [7 x double], [7 x double]* %38, i64 0, i64 %1463
%1465 = load double, double* %1464
%1466 = load double*, double** %20
%1467 = load i32, i32* %24
%1468 = sext i32 %1467 to i64
%1469 = getelementptr inbounds double, double* %1466, i64 %1468
store double %1465, double* %1469
br label %1470
1470: ; preds = %1461
%1471 = load i32, i32* %24
%1472 = add nsw i32 %1471, 1
store i32 %1472, i32* %24
br label %1458
1473: ; preds = %1458
br label %1474
1474: ; preds = %1473, %1370
br label %1475
1475: ; preds = %1474, %982
br label %1476
1476: ; preds = %1475, %979
br label %1477
1477: ; preds = %1476, %405
br label %1478
1478: ; preds = %1477, %369
%1479 = load i32, i32* %27
ret i32 %1479
}

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