#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);
void ch_eigenvec3(double A[3][3], double eval, double evec[3], double *res) {
  double mat[3][3];
  int ind[3];
  double ex, ey, ez;
  double xmax;
  double tmp;
  double norm;
  double res1, res2, res3;
  double tol = 1.0e-6;
  int imax = -1, jmax = -1;
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      mat[i][j] = A[i][j];
    }
  }
  for (i = 0; i < 3; i++) {
    mat[i][i] -= eval;
  }
  ind[0] = 0;
  ind[1] = 1;
  ind[2] = 2;
  xmax = 0.0;
  for (i = 0; i < 3; i++) {
    for (j = i; j < 3; j++) {
      if (fabs(mat[i][j]) > xmax) {
        imax = i;
        jmax = j;
        xmax = fabs(mat[i][j]);
      }
    }
  }
  if (xmax == 0.0) {
    evec[0] = 1.0;
    evec[1] = evec[2] = 0.0;
  } else {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        mat[i][j] /= xmax;
      }
    }
    if (imax != 0) {
      for (j = 0; j < 3; j++) {
        tmp = mat[0][j];
        mat[0][j] = mat[imax][j];
        mat[imax][j] = tmp;
      }
    }
    if (jmax != 0) {
      for (i = 0; i < 3; i++) {
        tmp = mat[i][0];
        mat[i][0] = mat[i][jmax];
        mat[i][jmax] = tmp;
      }
      ind[0] = jmax;
      ind[jmax] = 0;
    }
    for (i = 1; i < 3; i++) {
      for (j = 1; j < 3; j++) {
        mat[i][j] = mat[0][0] * mat[i][j] - mat[i][0] * mat[0][j];
      }
    }
    xmax = 0.0;
    for (i = 1; i < 3; i++) {
      for (j = i; j < 3; j++) {
        if (fabs(mat[i][j]) > xmax) {
          imax = i;
          jmax = j;
          xmax = fabs(mat[i][j]);
        }
      }
    }
    if (xmax < tol) {
      ey = 1.0;
      ex = ez = 0;
    } else {
      if (imax != 1) {
        for (j = 0; j < 3; j++) {
          tmp = mat[1][j];
          mat[1][j] = mat[imax][j];
          mat[imax][j] = tmp;
        }
      }
      if (jmax != 1) {
        for (i = 0; i < 3; i++) {
          tmp = mat[i][1];
          mat[i][1] = mat[i][2];
          mat[i][2] = tmp;
        }
        i = ind[1];
        ind[1] = ind[2];
        ind[2] = i;
      }
      ez = mat[0][0] * mat[1][1];
      ey = -mat[1][2] * mat[0][0];
      ex = mat[0][1] * mat[1][2] - mat[0][2] * mat[1][1];
    }
    evec[ind[0]] = ex;
    evec[ind[1]] = ey;
    evec[ind[2]] = ez;
  }
  norm = sqrt(evec[0] * evec[0] + evec[1] * evec[1] + evec[2] * evec[2]);
  for (i = 0; i < 3; i++) {
    evec[i] /= norm;
  }
  res1 = (A[0][0] - eval) * evec[0] + A[0][1] * evec[1] + A[0][2] * evec[2];
  res2 = A[1][0] * evec[0] + (A[1][1] - eval) * evec[1] + A[1][2] * evec[2];
  res3 = A[2][0] * evec[0] + A[2][1] * evec[1] + (A[2][2] - eval) * evec[2];
  *res = sqrt(res1 * res1 + res2 * res2 + res3 * res3);
  res1 = fabs(A[0][0]) + fabs(A[0][1]) + fabs(A[0][2]);
  res2 = fabs(A[1][0]) + fabs(A[1][1]) + fabs(A[1][2]);
  res3 = fabs(A[2][0]) + fabs(A[2][1]) + fabs(A[2][2]);
  res2 = ((res2) > (res3) ? (res2) : (res3));
  *res /= ((res1) > (res2) ? (res1) : (res2));
}


x86 assembly (clang, -O0):
<ch_eigenvec3>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movl   $0xffffffff,-0xd4(%rbp)
ff ff ff
movl   $0xffffffff,-0xd8(%rbp)
ff ff ff
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    11e7 <ch_eigenvec3+0xd7>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    11ce <ch_eigenvec3+0xbe>
mov    -0x8(%rbp),%rax
movslq -0xdc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1171 <ch_eigenvec3+0x61>
jmp    11d3 <ch_eigenvec3+0xc3>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    115a <ch_eigenvec3+0x4a>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    123e <ch_eigenvec3+0x12e>
movsd  -0x10(%rbp),%xmm1
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xdc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    11f1 <ch_eigenvec3+0xe1>
movl   $0x0,-0x7c(%rbp)
movl   $0x1,-0x78(%rbp)
movl   $0x2,-0x74(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    1340 <ch_eigenvec3+0x230>
mov    -0xdc(%rbp),%eax
mov    %eax,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    1327 <ch_eigenvec3+0x217>
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd5d(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    130e <ch_eigenvec3+0x1fe>
mov    -0xdc(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xe0(%rbp),%eax
mov    %eax,-0xd8(%rbp)
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd0e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1313 <ch_eigenvec3+0x203>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1281 <ch_eigenvec3+0x171>
jmp    132c <ch_eigenvec3+0x21c>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1268 <ch_eigenvec3+0x158>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1388 <ch_eigenvec3+0x278>
jp     1388 <ch_eigenvec3+0x278>
mov    -0x18(%rbp),%rax
movsd  0xca1(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
jmp    19a1 <ch_eigenvec3+0x891>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    1412 <ch_eigenvec3+0x302>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    13f9 <ch_eigenvec3+0x2e9>
movsd  -0xa0(%rbp),%xmm1
ff
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    13a9 <ch_eigenvec3+0x299>
jmp    13fe <ch_eigenvec3+0x2ee>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1392 <ch_eigenvec3+0x282>
cmpl   $0x0,-0xd4(%rbp)
je     14b5 <ch_eigenvec3+0x3a5>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    14b0 <ch_eigenvec3+0x3a0>
movslq -0xe0(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movslq -0xd4(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xe0(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
movsd  -0xa8(%rbp),%xmm0
ff
movslq -0xd4(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1429 <ch_eigenvec3+0x319>
jmp    14b5 <ch_eigenvec3+0x3a5>
cmpl   $0x0,-0xd8(%rbp)
je     157d <ch_eigenvec3+0x46d>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    1565 <ch_eigenvec3+0x455>
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    14cc <ch_eigenvec3+0x3bc>
mov    -0xd8(%rbp),%eax
mov    %eax,-0x7c(%rbp)
movslq -0xd8(%rbp),%rax
movl   $0x0,-0x7c(%rbp,%rax,4)
movl   $0x1,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    165b <ch_eigenvec3+0x54b>
movl   $0x1,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    1642 <ch_eigenvec3+0x532>
movsd  -0x70(%rbp),%xmm0
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm1
movslq -0xe0(%rbp),%rax
mulsd  -0x70(%rbp,%rax,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    159e <ch_eigenvec3+0x48e>
jmp    1647 <ch_eigenvec3+0x537>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1587 <ch_eigenvec3+0x477>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x1,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    1748 <ch_eigenvec3+0x638>
mov    -0xdc(%rbp),%eax
mov    %eax,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    172f <ch_eigenvec3+0x61f>
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0x955(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    1716 <ch_eigenvec3+0x606>
mov    -0xdc(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xe0(%rbp),%eax
mov    %eax,-0xd8(%rbp)
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0x906(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    171b <ch_eigenvec3+0x60b>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1689 <ch_eigenvec3+0x579>
jmp    1734 <ch_eigenvec3+0x624>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1670 <ch_eigenvec3+0x560>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    178d <ch_eigenvec3+0x67d>
movsd  0x89e(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1962 <ch_eigenvec3+0x852>
cmpl   $0x1,-0xd4(%rbp)
je     1830 <ch_eigenvec3+0x720>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x3,-0xe0(%rbp)
jge    182b <ch_eigenvec3+0x71b>
movslq -0xe0(%rbp),%rax
movsd  -0x58(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movslq -0xd4(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xe0(%rbp),%rax
movsd  %xmm0,-0x58(%rbp,%rax,8)
movsd  -0xa8(%rbp),%xmm0
ff
movslq -0xd4(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xe0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    17a4 <ch_eigenvec3+0x694>
jmp    1830 <ch_eigenvec3+0x720>
cmpl   $0x1,-0xd8(%rbp)
je     18ec <ch_eigenvec3+0x7dc>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    18d4 <ch_eigenvec3+0x7c4>
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
movslq -0xdc(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1847 <ch_eigenvec3+0x737>
mov    -0x78(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0xdc(%rbp),%eax
mov    %eax,-0x74(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0xdc(%rbp)
cmpl   $0x3,-0xdc(%rbp)
jge    1a3e <ch_eigenvec3+0x92e>
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x18(%rbp),%rax
movslq -0xdc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    19fc <ch_eigenvec3+0x8ec>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
subsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
subsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
subsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0x481(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movaps 0x46d(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movaps 0x455(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movaps 0x435(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movaps 0x421(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
movaps 0x409(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movaps 0x3e9(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
movaps 0x3d5(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm1
movaps 0x3bd(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd -0xc8(%rbp),%xmm0
ff
jbe    1c8e <ch_eigenvec3+0xb7e>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1c9e <ch_eigenvec3+0xb8e>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    1cd9 <ch_eigenvec3+0xbc9>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
jmp    1ce9 <ch_eigenvec3+0xbd9>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm1
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_eigenvec3>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
movapd %xmm0,%xmm9
mov    %rdi,%rbx
movupd (%rdi),%xmm0
movups 0x10(%rdi),%xmm1
movups 0x20(%rdi),%xmm2
movups 0x30(%rdi),%xmm3
movapd %xmm0,(%rsp)
movaps %xmm2,0x20(%rsp)
mov    0x40(%rdi),%rax
mov    %rax,0x40(%rsp)
movaps %xmm1,0x10(%rsp)
movaps %xmm3,0x30(%rsp)
movsd  (%rsp),%xmm1
subsd  %xmm9,%xmm1
movsd  0x20(%rsp),%xmm3
subsd  %xmm9,%xmm3
movsd  0x40(%rsp),%xmm2
subsd  %xmm9,%xmm2
movabs $0x200000001,%rax
mov    %rax,0x50(%rsp)
movapd 0xe74(%rip),%xmm8
xorpd  %xmm4,%xmm4
xor    %eax,%eax
ucomisd %xmm4,%xmm1
sete   %cl
jne    11a1 <ch_eigenvec3+0x91>
xorpd  %xmm5,%xmm5
jmp    11aa <ch_eigenvec3+0x9a>
movapd %xmm1,%xmm5
andpd  %xmm8,%xmm5
mov    %cl,%al
neg    %eax
movsd  0x8(%rsp),%xmm6
andpd  %xmm8,%xmm6
xor    %esi,%esi
ucomisd %xmm5,%xmm6
mov    $0x1,%edx
mov    %eax,%ecx
cmova  %edx,%ecx
maxsd  %xmm5,%xmm6
cmova  %esi,%eax
movsd  0x10(%rsp),%xmm5
andpd  %xmm8,%xmm5
ucomisd %xmm6,%xmm5
cmova  %esi,%eax
mov    $0x2,%esi
cmova  %esi,%ecx
maxsd  %xmm6,%xmm5
movapd %xmm3,%xmm6
andpd  %xmm8,%xmm6
ucomisd %xmm5,%xmm6
cmova  %edx,%ecx
maxsd  %xmm5,%xmm6
cmova  %edx,%eax
movsd  0x28(%rsp),%xmm7
andpd  %xmm8,%xmm7
ucomisd %xmm6,%xmm7
cmova  %edx,%eax
cmova  %esi,%ecx
maxsd  %xmm6,%xmm7
movapd %xmm2,%xmm5
andpd  %xmm8,%xmm5
ucomisd %xmm7,%xmm5
cmova  %esi,%eax
cmova  %esi,%ecx
maxsd  %xmm7,%xmm5
ucomisd %xmm4,%xmm5
jne    1269 <ch_eigenvec3+0x159>
jp     1269 <ch_eigenvec3+0x159>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r15)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x8(%r15)
movsd  0xdc4(%rip),%xmm1
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
jmp    1515 <ch_eigenvec3+0x405>
divsd  %xmm5,%xmm1
movsd  %xmm1,(%rsp)
unpcklpd %xmm5,%xmm5
movupd 0x8(%rsp),%xmm4
movupd 0x18(%rsp),%xmm6
movupd 0x28(%rsp),%xmm7
movupd 0x38(%rsp),%xmm0
divpd  %xmm5,%xmm4
movupd %xmm4,0x8(%rsp)
unpcklpd %xmm3,%xmm6
divpd  %xmm5,%xmm6
movupd %xmm6,0x18(%rsp)
divpd  %xmm5,%xmm7
movupd %xmm7,0x28(%rsp)
unpcklpd %xmm2,%xmm0
divpd  %xmm5,%xmm0
movupd %xmm0,0x38(%rsp)
test   %eax,%eax
je     12f2 <ch_eigenvec3+0x1e2>
movslq %eax,%rdx
lea    (%rdx,%rdx,2),%rdx
movsd  (%rsp,%rdx,8),%xmm0
movsd  %xmm0,(%rsp)
movsd  %xmm1,(%rsp,%rdx,8)
movupd 0x8(%rsp,%rdx,8),%xmm2
movupd %xmm2,0x8(%rsp)
movupd %xmm4,0x8(%rsp,%rdx,8)
movapd %xmm0,%xmm1
movapd %xmm2,%xmm4
movslq %ecx,%rsi
test   %ecx,%ecx
je     1351 <ch_eigenvec3+0x241>
movsd  (%rsp,%rsi,8),%xmm0
movsd  %xmm0,(%rsp)
movsd  %xmm1,(%rsp,%rsi,8)
movsd  0x18(%rsp),%xmm0
movsd  0x18(%rsp,%rsi,8),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x18(%rsp,%rsi,8)
movsd  0x30(%rsp),%xmm0
movsd  0x30(%rsp,%rsi,8),%xmm6
movsd  %xmm6,0x30(%rsp)
movsd  %xmm0,0x30(%rsp,%rsi,8)
mov    %esi,0x4c(%rsp)
movl   $0x0,0x4c(%rsp,%rsi,4)
movsd  (%rsp),%xmm1
movupd 0x8(%rsp),%xmm4
jmp    1357 <ch_eigenvec3+0x247>
movsd  0x30(%rsp),%xmm6
movsd  0x18(%rsp),%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
mulpd  %xmm4,%xmm0
unpcklpd %xmm1,%xmm1
movapd 0x20(%rsp),%xmm3
mulpd  %xmm1,%xmm3
subpd  %xmm0,%xmm3
movapd %xmm3,0x20(%rsp)
movupd 0x38(%rsp),%xmm5
unpcklpd %xmm6,%xmm6
mulpd  %xmm4,%xmm6
mulpd  %xmm1,%xmm5
subpd  %xmm6,%xmm5
movupd %xmm5,0x38(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm3
jne    13ad <ch_eigenvec3+0x29d>
xorpd  %xmm4,%xmm4
jmp    13b6 <ch_eigenvec3+0x2a6>
movapd %xmm3,%xmm4
andpd  %xmm8,%xmm4
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
andpd  %xmm8,%xmm0
mov    $0x1,%edx
cmovne %edx,%eax
ucomisd %xmm4,%xmm0
seta   %r8b
cmova  %edx,%eax
maxsd  %xmm4,%xmm0
unpckhpd %xmm5,%xmm5
andpd  %xmm8,%xmm5
ucomisd %xmm0,%xmm5
seta   %dl
mov    $0x2,%edi
cmovbe %eax,%edi
maxsd  %xmm0,%xmm5
movsd  0xc2a(%rip),%xmm0
ucomisd %xmm5,%xmm0
jbe    1415 <ch_eigenvec3+0x305>
movsd  0xc14(%rip),%xmm3
xorpd  %xmm0,%xmm0
jmp    14e8 <ch_eigenvec3+0x3d8>
or     %r8b,%dl
cmp    $0x1,%edi
je     1444 <ch_eigenvec3+0x334>
movslq %edi,%rax
lea    (%rax,%rax,2),%rax
movups (%rsp,%rax,8),%xmm0
movups %xmm0,0x18(%rsp)
movsd  %xmm2,(%rsp,%rax,8)
movsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x28(%rsp)
movupd %xmm3,0x8(%rsp,%rax,8)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
setne  %al
cmp    $0x1,%ecx
sete   %cl
test   %dl,%dl
jne    1476 <ch_eigenvec3+0x366>
or     %cl,%al
je     1476 <ch_eigenvec3+0x366>
movupd 0x8(%rsp),%xmm0
shufpd $0x1,%xmm0,%xmm0
movsd  0x28(%rsp),%xmm2
movhpd 0x20(%rsp),%xmm2
jmp    14b7 <ch_eigenvec3+0x3a7>
movupd 0x8(%rsp),%xmm0
movapd %xmm0,%xmm1
shufpd $0x1,%xmm0,%xmm1
movupd %xmm1,0x8(%rsp)
movapd 0x20(%rsp),%xmm2
movapd %xmm2,%xmm1
shufpd $0x1,%xmm2,%xmm1
movapd %xmm1,0x20(%rsp)
movupd 0x38(%rsp),%xmm1
shufpd $0x1,%xmm1,%xmm1
movupd %xmm1,0x38(%rsp)
rolq   $0x20,0x50(%rsp)
movsd  (%rsp),%xmm1
movapd %xmm2,%xmm4
unpckhpd %xmm2,%xmm4
movapd 0xb44(%rip),%xmm3
xorpd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm4
unpckhpd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,(%r15,%rsi,8)
movslq 0x50(%rsp),%rax
movsd  %xmm3,(%r15,%rax,8)
movslq 0x54(%rsp),%rax
movsd  %xmm1,(%r15,%rax,8)
movsd  (%r15),%xmm1
movsd  0x8(%r15),%xmm2
movsd  0x10(%r15),%xmm0
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm7,%xmm7
ucomisd %xmm7,%xmm0
jb     1539 <ch_eigenvec3+0x429>
sqrtsd %xmm0,%xmm0
jmp    1550 <ch_eigenvec3+0x440>
movsd  %xmm9,0x58(%rsp)
call   1030 <sqrt@plt>
xorpd  %xmm7,%xmm7
movsd  0x58(%rsp),%xmm9
movupd (%r15),%xmm2
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm2
movupd %xmm2,(%r15)
movsd  0x10(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%r15)
movsd  (%rbx),%xmm0
subsd  %xmm9,%xmm0
mulsd  %xmm2,%xmm0
movsd  0x18(%rbx),%xmm3
mulsd  %xmm2,%xmm3
movsd  0x30(%rbx),%xmm4
mulsd  %xmm2,%xmm4
unpckhpd %xmm2,%xmm2
movsd  0x8(%rbx),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm5,%xmm0
movsd  0x10(%rbx),%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm0,%xmm5
movsd  0x20(%rbx),%xmm0
subsd  %xmm9,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm0,%xmm3
movsd  0x28(%rbx),%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm3,%xmm6
movsd  0x38(%rbx),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm0,%xmm4
movsd  0x40(%rbx),%xmm0
subsd  %xmm9,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm6,%xmm6
mulsd  %xmm5,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm0,%xmm0
addsd  %xmm5,%xmm0
ucomisd %xmm7,%xmm0
jb     1611 <ch_eigenvec3+0x501>
sqrtsd %xmm0,%xmm0
jmp    1616 <ch_eigenvec3+0x506>
call   1030 <sqrt@plt>
movsd  %xmm0,(%r14)
movdqu (%rbx),%xmm1
movdqa 0x9d9(%rip),%xmm2
pand   %xmm2,%xmm1
pshufd $0xee,%xmm1,%xmm3
addsd  %xmm1,%xmm3
movq   0x10(%rbx),%xmm1
pand   %xmm2,%xmm1
addsd  %xmm3,%xmm1
movdqu 0x18(%rbx),%xmm3
pand   %xmm2,%xmm3
movdqu 0x30(%rbx),%xmm4
pand   %xmm2,%xmm4
movdqa %xmm3,%xmm5
punpcklqdq %xmm4,%xmm5
movhlps %xmm3,%xmm4
movsd  0x28(%rbx),%xmm3
movhps 0x40(%rbx),%xmm3
addpd  %xmm5,%xmm4
pand   %xmm2,%xmm3
addpd  %xmm4,%xmm3
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
maxsd  %xmm2,%xmm3
maxsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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