int getSearchDir(double *p, double *Grad, double **Hes, double delta,
                 int numSS) {
  int i, j;
  double a, b, c, sgnb;
  double q, x1, x2;
  double tau;
  double *pB;
  double *pU;
  double pB2;
  double pU2;
  double pBpU;
  double *CholDiag;
  double **HesCopy;
  int CholSuccess;
  double *HGrad;
  double pUcoeff;
  double delta2;
  double mag1;
  double mag2;
  pB2 = 0.0;
  delta2 = pow(delta, 2);
  pB = (double *)malloc(numSS * sizeof(double));
  CholDiag = (double *)malloc(numSS * sizeof(double));
  HesCopy = (double **)malloc(numSS * sizeof(double *));
  for (j = 0; j < numSS; j++) {
    HesCopy[j] = (double *)malloc(numSS * sizeof(double));
  }
  for (j = 0; j < numSS; j++) {
    for (i = j; i < numSS; i++) {
      HesCopy[i][j] = Hes[i][j];
    }
  }
  CholSuccess = choleskyDecomposition(HesCopy, numSS);
  if (CholSuccess == 1) {
    choleskySolve(HesCopy, numSS, Grad, pB);
    free(CholDiag);
    for (i = 0; i < numSS; i++) {
      free(HesCopy[i]);
    }
    free(HesCopy);
    for (i = 0; i < numSS; i++) {
      pB[i] *= -1.0;
    }
    pB2 = dot(pB, pB, numSS);
    if (pB2 <= delta2) {
      for (i = 0; i < numSS; i++) {
        p[i] = pB[i];
      }
      free(pB);
      return 1;
    }
  } else {
    free(CholDiag);
    for (i = 0; i < numSS; i++) {
      free(HesCopy[i]);
    }
    free(HesCopy);
  }
  HGrad = (double *)malloc(numSS * sizeof(double));
  pU = (double *)malloc(numSS * sizeof(double));
  for (i = 0; i < numSS; i++) {
    pU[i] = -Grad[i];
  }
  MatrixVectorMult(HGrad, Hes, Grad, numSS);
  mag1 = dot(Grad, Grad, numSS);
  mag2 = dot(Grad, HGrad, numSS);
  pUcoeff = mag1 / mag2;
  for (i = 0; i < numSS; i++) {
    pU[i] = pUcoeff * pU[i];
  }
  free(HGrad);
  pU2 = dot(pU, pU, numSS);
  if (pU2 >= delta2) {
    tau = sqrt(delta2 / pU2);
    for (i = 0; i < numSS; i++) {
      p[i] = tau * pU[i];
    }
    free(pU);
    free(pB);
    if (CholSuccess != 1) {
      return 5;
    } else {
      return 2;
    }
  }
  if (CholSuccess != 1) {
    for (i = 0; i < numSS; i++) {
      p[i] = pU[i];
    }
    free(pU);
    free(pB);
    return 4;
  }
  pBpU = dot(pB, pU, numSS);
  a = pB2 + pU2 - 2.0 * pBpU;
  b = 2 * (pBpU - pU2);
  c = pU2 - delta2;
  sgnb = 1;
  if (b < 0) {
    sgnb = -1;
  }
  q = -0.5 * (b + sgnb * sqrt(b * b - 4 * a * c));
  x1 = q / a;
  x2 = c / q;
  if (x2 >= 0 && x2 <= 1.0) {
    for (i = 0; i < numSS; i++) {
      p[i] = pU[i] + x2 * (pB[i] - pU[i]);
    }
    free(pU);
    free(pB);
    return 3;
  } else if (x1 >= 0 && x1 <= 1.0) {
    for (i = 0; i < numSS; i++) {
      p[i] = pU[i] + x1 * (pB[i] - pU[i]);
    }
    free(pU);
    free(pB);
    return 3;
  } else {
    for (i = 0; i < numSS; i++) {
      p[i] = pU[i];
    }
    free(pU);
    free(pB);
    return 6;
  }
}


x86 assembly (clang, -O0):
<getSearchDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xe49(%rip),%xmm1
call   1090 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    123d <getSearchDir+0xbd>
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xb0(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1204 <getSearchDir+0x84>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12b0 <getSearchDir+0x130>
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    129d <getSearchDir+0x11d>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xb0(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1256 <getSearchDir+0xd6>
jmp    12a2 <getSearchDir+0x122>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1244 <getSearchDir+0xc4>
mov    -0xb0(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    $0x0,%al
call   1060 <choleskyDecomposition@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x1,-0xb4(%rbp)
jne    1402 <getSearchDir+0x282>
mov    -0xb0(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    $0x0,%al
call   1050 <choleskySolve@plt>
mov    -0xa8(%rbp),%rdi
call   1040 <free@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    132e <getSearchDir+0x1ae>
mov    -0xb0(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1300 <getSearchDir+0x180>
mov    -0xb0(%rbp),%rdi
call   1040 <free@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1375 <getSearchDir+0x1f5>
mov    -0x80(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  0xcb3(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1341 <getSearchDir+0x1c1>
mov    -0x80(%rbp),%rdi
mov    -0x80(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    $0x0,%al
call   1030 <dot@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     13fd <getSearchDir+0x27d>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13e8 <getSearchDir+0x268>
mov    -0x80(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13b4 <getSearchDir+0x234>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
jmp    144f <getSearchDir+0x2cf>
mov    -0xa8(%rbp),%rdi
call   1040 <free@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1443 <getSearchDir+0x2c3>
mov    -0xb0(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1415 <getSearchDir+0x295>
mov    -0xb0(%rbp),%rdi
call   1040 <free@plt>
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x88(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    14cc <getSearchDir+0x34c>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    147e <getSearchDir+0x2fe>
mov    -0xc0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    $0x0,%al
call   1080 <MatrixVectorMult@plt>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    $0x0,%al
call   1030 <dot@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x18(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    $0x0,%al
call   1030 <dot@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
divsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1585 <getSearchDir+0x405>
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1543 <getSearchDir+0x3c3>
mov    -0xc0(%rbp),%rdi
call   1040 <free@plt>
mov    -0x88(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    $0x0,%al
call   1030 <dot@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd -0xd0(%rbp),%xmm0
ff
jb     1662 <getSearchDir+0x4e2>
movsd  -0xd0(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1628 <getSearchDir+0x4a8>
movsd  -0x78(%rbp),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15ec <getSearchDir+0x46c>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
cmpl   $0x1,-0xb4(%rbp)
je     1656 <getSearchDir+0x4d6>
movl   $0x5,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
movl   $0x2,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
cmpl   $0x1,-0xb4(%rbp)
je     16ce <getSearchDir+0x54e>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    16ad <getSearchDir+0x52d>
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1676 <getSearchDir+0x4f6>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
movl   $0x4,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
mov    -0x80(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    $0x0,%al
call   1030 <dot@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x98(%rbp),%xmm1
ff
movsd  0x8d4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  0x8b6(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    1772 <getSearchDir+0x5f2>
movsd  0x8a3(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x882(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   10a0 <sqrt@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x829(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     18c4 <getSearchDir+0x744>
movsd  0x7d8(%rip),%xmm0
ucomisd -0x70(%rbp),%xmm0
jb     18c4 <getSearchDir+0x744>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    18a3 <getSearchDir+0x723>
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1842 <getSearchDir+0x6c2>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
movl   $0x3,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1972 <getSearchDir+0x7f2>
movsd  0x72a(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
jb     1972 <getSearchDir+0x7f2>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1951 <getSearchDir+0x7d1>
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    18f0 <getSearchDir+0x770>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
movl   $0x3,-0x4(%rbp)
jmp    19cc <getSearchDir+0x84c>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    19b0 <getSearchDir+0x830>
mov    -0x88(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1979 <getSearchDir+0x7f9>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSearchDir>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm0,0x30(%rsp)
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %rdi,0x8(%rsp)
mov    %ecx,(%rsp)
movslq %ecx,%rbx
lea    0x0(,%rbx,8),%r13
mov    %r13,%rdi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r13,%rdi
call   1080 <malloc@plt>
mov    %rax,%r12
test   %ebx,%ebx
mov    %rbp,0x18(%rsp)
jle    12bb <getSearchDir+0x13b>
mov    %rbp,%rbx
mov    (%rsp),%r14d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1080 <malloc@plt>
mov    %rax,(%r12,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11e0 <getSearchDir+0x60>
cmpl   $0x0,(%rsp)
jle    12bb <getSearchDir+0x13b>
cmpl   $0x1,(%rsp)
jne    120c <getSearchDir+0x8c>
xor    %ebp,%ebp
jmp    1290 <getSearchDir+0x110>
mov    %r14d,%r8d
and    $0xfffffffe,%r8d
xor    %ebp,%ebp
mov    %r14,%rdx
mov    %rbx,%rsi
mov    %r12,%rdi
xchg   %ax,%ax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rsi,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
mov    (%rdi,%rax,8),%rcx
movsd  %xmm0,(%rcx,%rbp,8)
add    $0x1,%rax
cmp    %rax,%rdx
jne    1230 <getSearchDir+0xb0>
mov    %rbp,%rax
or     $0x1,%rax
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
mov    (%rsi,%rcx,8),%rbx
movsd  (%rbx,%rax,8),%xmm0
mov    (%rdi,%rcx,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1260 <getSearchDir+0xe0>
add    $0x2,%rbp
add    $0x10,%rdi
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdx
cmp    %r8,%rbp
jne    1220 <getSearchDir+0xa0>
test   $0x1,%r14b
mov    0x18(%rsp),%rdx
je     12bb <getSearchDir+0x13b>
mov    %rbp,%rax
xchg   %ax,%ax
mov    (%rdx,%rax,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
mov    (%r12,%rax,8),%rcx
movsd  %xmm0,(%rcx,%rbp,8)
add    $0x1,%rax
cmp    %rax,%r14
jne    12a0 <getSearchDir+0x120>
movsd  0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x30(%rsp)
mov    %r12,%rdi
mov    (%rsp),%r14d
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <choleskyDecomposition@plt>
mov    %eax,0x14(%rsp)
cmp    $0x1,%eax
jne    1341 <getSearchDir+0x1c1>
mov    %r12,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
mov    0x20(%rsp),%rbp
mov    %rbp,%rcx
xor    %eax,%eax
call   1050 <choleskySolve@plt>
test   %r14d,%r14d
jle    1378 <getSearchDir+0x1f8>
mov    %r14d,%r14d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
call   1040 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1310 <getSearchDir+0x190>
mov    %r12,%rdi
call   1040 <free@plt>
cmpl   $0x0,(%rsp)
jle    1469 <getSearchDir+0x2e9>
cmpl   $0x4,(%rsp)
jae    1385 <getSearchDir+0x205>
xor    %eax,%eax
jmp    143c <getSearchDir+0x2bc>
test   %r14d,%r14d
jle    1362 <getSearchDir+0x1e2>
mov    %r14d,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbp,8),%rdi
call   1040 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1350 <getSearchDir+0x1d0>
mov    %r12,%rdi
call   1040 <free@plt>
xorpd  %xmm1,%xmm1
mov    0x20(%rsp),%rbp
jmp    1490 <getSearchDir+0x310>
mov    %r12,%rdi
call   1040 <free@plt>
jmp    1469 <getSearchDir+0x2e9>
mov    %r14d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1a39 <getSearchDir+0x8b9>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
movapd 0xc4c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd 0x0(%rbp,%rcx,8),%xmm1
movupd 0x10(%rbp,%rcx,8),%xmm2
movupd 0x20(%rbp,%rcx,8),%xmm3
movupd 0x30(%rbp,%rcx,8),%xmm4
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,0x0(%rbp,%rcx,8)
movupd %xmm2,0x10(%rbp,%rcx,8)
xorpd  %xmm0,%xmm3
xorpd  %xmm0,%xmm4
movupd %xmm3,0x20(%rbp,%rcx,8)
movupd %xmm4,0x30(%rbp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    13c0 <getSearchDir+0x240>
test   $0x1,%dl
je     1437 <getSearchDir+0x2b7>
movupd 0x0(%rbp,%rcx,8),%xmm0
movupd 0x10(%rbp,%rcx,8),%xmm1
movapd 0xbdd(%rip),%xmm2
xorpd  %xmm2,%xmm0
xorpd  %xmm2,%xmm1
movupd %xmm0,0x0(%rbp,%rcx,8)
movupd %xmm1,0x10(%rbp,%rcx,8)
cmp    %r14,%rax
je     1469 <getSearchDir+0x2e9>
movapd 0xbbc(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x0(%rbp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r14
jne    1450 <getSearchDir+0x2d0>
mov    %rbp,%rdi
mov    %rbp,%rsi
mov    (%rsp),%r14d
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <dot@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x30(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jae    14c4 <getSearchDir+0x344>
movsd  %xmm1,(%rsp)
mov    %r13,%rdi
call   1080 <malloc@plt>
mov    %rax,%r12
mov    %r13,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbx
test   %r14d,%r14d
jle    15c8 <getSearchDir+0x448>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    14ef <getSearchDir+0x36f>
xor    %ecx,%ecx
jmp    159f <getSearchDir+0x41f>
test   %r14d,%r14d
jle    14dd <getSearchDir+0x35d>
mov    %r14d,%edx
shl    $0x3,%rdx
mov    0x8(%rsp),%rdi
mov    %rbp,%rsi
call   1060 <memcpy@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    $0x1,%eax
jmp    1cba <getSearchDir+0xb3a>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     19d8 <getSearchDir+0x858>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movapd 0xae3(%rip),%xmm0
nopl   (%rax)
movupd (%r15,%rdx,8),%xmm1
movupd 0x10(%r15,%rdx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rdx,8)
movupd %xmm2,0x10(%rbx,%rdx,8)
movupd 0x20(%r15,%rdx,8),%xmm1
movupd 0x30(%r15,%rdx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rbx,%rdx,8)
movupd %xmm2,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1520 <getSearchDir+0x3a0>
test   $0x1,%sil
je     159a <getSearchDir+0x41a>
movupd (%r15,%rdx,8),%xmm0
movupd 0x10(%r15,%rdx,8),%xmm1
movapd 0xa79(%rip),%xmm2
xorpd  %xmm2,%xmm0
xorpd  %xmm2,%xmm1
movupd %xmm0,(%rbx,%rdx,8)
movupd %xmm1,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
je     15c8 <getSearchDir+0x448>
movapd 0xa59(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rcx,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    15b0 <getSearchDir+0x430>
mov    %r12,%r13
mov    %r12,%rdi
mov    0x18(%rsp),%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1090 <MatrixVectorMult@plt>
mov    %r15,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <dot@plt>
mov    %eax,%r12d
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <dot@plt>
test   %r14d,%r14d
jle    16f7 <getSearchDir+0x577>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    162f <getSearchDir+0x4af>
xor    %ecx,%ecx
jmp    16e0 <getSearchDir+0x560>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     19e9 <getSearchDir+0x869>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nopl   (%rax)
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
movupd 0x20(%rbx,%rdx,8),%xmm4
movupd 0x30(%rbx,%rdx,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbx,%rdx,8)
movupd %xmm5,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1660 <getSearchDir+0x4e0>
test   $0x1,%sil
je     16cc <getSearchDir+0x54c>
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
je     16f7 <getSearchDir+0x577>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    16e0 <getSearchDir+0x560>
mov    %r13,%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <dot@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x30(%rsp),%xmm0
ucomisd %xmm0,%xmm1
jae    17bf <getSearchDir+0x63f>
cmpl   $0x1,0x14(%rsp)
jne    17d3 <getSearchDir+0x653>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %eax,%eax
movapd %xmm1,0x20(%rsp)
call   1030 <dot@plt>
movapd 0x20(%rsp),%xmm5
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
movsd  (%rsp),%xmm2
addsd  %xmm5,%xmm2
movapd %xmm3,%xmm0
addsd  %xmm3,%xmm0
subsd  %xmm0,%xmm2
subsd  %xmm5,%xmm3
addsd  %xmm3,%xmm3
xorpd  %xmm4,%xmm4
xor    %eax,%eax
ucomisd %xmm3,%xmm4
seta   %al
subsd  0x30(%rsp),%xmm5
lea    0x885(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm6
movsd  0x888(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm4,%xmm0
jb     191e <getSearchDir+0x79e>
sqrtsd %xmm0,%xmm0
jmp    1955 <getSearchDir+0x7d5>
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1806 <getSearchDir+0x686>
sqrtsd %xmm0,%xmm0
jmp    180b <getSearchDir+0x68b>
test   %r14d,%r14d
mov    0x8(%rsp),%rdi
jle    17ec <getSearchDir+0x66c>
mov    %r14d,%edx
shl    $0x3,%rdx
mov    %rbx,%rsi
call   1060 <memcpy@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    $0x4,%eax
jmp    1cba <getSearchDir+0xb3a>
call   10a0 <sqrt@plt>
mov    0x8(%rsp),%rbp
test   %r14d,%r14d
jle    18f8 <getSearchDir+0x778>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    1829 <getSearchDir+0x6a9>
xor    %ecx,%ecx
jmp    18e0 <getSearchDir+0x760>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     1a28 <getSearchDir+0x8a8>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm2
movupd 0x30(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x20(%rbp,%rdx,8)
movupd %xmm3,0x30(%rbp,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1860 <getSearchDir+0x6e0>
test   $0x1,%sil
je     18ce <getSearchDir+0x74e>
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
cmp    %rax,%rcx
je     18f8 <getSearchDir+0x778>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    18e0 <getSearchDir+0x760>
xor    %ebp,%ebp
cmpl   $0x1,0x14(%rsp)
setne  %bpl
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x20(%rsp),%rdi
call   1040 <free@plt>
lea    0x2(%rbp,%rbp,2),%eax
jmp    1cba <getSearchDir+0xb3a>
movsd  %xmm2,(%rsp)
movapd %xmm5,0x20(%rsp)
movapd %xmm6,0x30(%rsp)
movsd  %xmm3,0x18(%rsp)
call   10a0 <sqrt@plt>
xorpd  %xmm4,%xmm4
movsd  0x18(%rsp),%xmm3
movapd 0x30(%rsp),%xmm6
movapd 0x20(%rsp),%xmm5
movsd  (%rsp),%xmm2
mov    0x8(%rsp),%rdi
mulsd  %xmm0,%xmm6
addsd  %xmm3,%xmm6
mulsd  0x6be(%rip),%xmm6
divsd  %xmm6,%xmm5
ucomisd %xmm4,%xmm5
jb     199f <getSearchDir+0x81f>
movsd  0x6b4(%rip),%xmm0
ucomisd %xmm5,%xmm0
jb     199f <getSearchDir+0x81f>
test   %r14d,%r14d
jle    1ca5 <getSearchDir+0xb25>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    1a49 <getSearchDir+0x8c9>
xor    %ecx,%ecx
jmp    1c10 <getSearchDir+0xa90>
divsd  %xmm2,%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
jb     19fa <getSearchDir+0x87a>
movsd  0x67b(%rip),%xmm0
ucomisd %xmm6,%xmm0
jb     19fa <getSearchDir+0x87a>
test   %r14d,%r14d
jle    1ca5 <getSearchDir+0xb25>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    1b05 <getSearchDir+0x985>
xor    %ecx,%ecx
jmp    1c80 <getSearchDir+0xb00>
xor    %edx,%edx
test   $0x1,%sil
jne    1572 <getSearchDir+0x3f2>
jmp    159a <getSearchDir+0x41a>
xor    %edx,%edx
test   $0x1,%sil
jne    16ae <getSearchDir+0x52e>
jmp    16cc <getSearchDir+0x54c>
test   %r14d,%r14d
jle    1a0e <getSearchDir+0x88e>
mov    %r14d,%edx
shl    $0x3,%rdx
mov    %rbx,%rsi
call   1060 <memcpy@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    $0x6,%eax
jmp    1cba <getSearchDir+0xb3a>
xor    %edx,%edx
test   $0x1,%sil
jne    18af <getSearchDir+0x72f>
jmp    18ce <getSearchDir+0x74e>
xor    %ecx,%ecx
test   $0x1,%dl
jne    140f <getSearchDir+0x28f>
jmp    1437 <getSearchDir+0x2b7>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
lea    -0x4(%rcx),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1bc2 <getSearchDir+0xa42>
mov    %r8,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
movupd 0x0(%rbp,%rdx,8),%xmm3
movupd 0x10(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,(%rdi,%rdx,8)
movupd %xmm4,0x10(%rdi,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm1
movupd 0x30(%rbx,%rdx,8),%xmm2
movupd 0x20(%rbp,%rdx,8),%xmm3
movupd 0x30(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,0x20(%rdi,%rdx,8)
movupd %xmm4,0x30(%rdi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1a80 <getSearchDir+0x900>
jmp    1bc4 <getSearchDir+0xa44>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
lea    -0x4(%rcx),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1c37 <getSearchDir+0xab7>
mov    %r8,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
movupd 0x0(%rbp,%rdx,8),%xmm3
movupd 0x10(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,(%rdi,%rdx,8)
movupd %xmm4,0x10(%rdi,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm1
movupd 0x30(%rbx,%rdx,8),%xmm2
movupd 0x20(%rbp,%rdx,8),%xmm3
movupd 0x30(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,0x20(%rdi,%rdx,8)
movupd %xmm4,0x30(%rdi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1b40 <getSearchDir+0x9c0>
jmp    1c39 <getSearchDir+0xab9>
xor    %edx,%edx
test   $0x1,%r8b
je     1c04 <getSearchDir+0xa84>
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
movupd 0x0(%rbp,%rdx,8),%xmm3
movupd 0x10(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,(%rdi,%rdx,8)
movupd %xmm4,0x10(%rdi,%rdx,8)
cmp    %rax,%rcx
je     1ca5 <getSearchDir+0xb25>
nopl   (%rax)
movsd  (%rbx,%rcx,8),%xmm0
movsd  0x0(%rbp,%rcx,8),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1c10 <getSearchDir+0xa90>
jmp    1ca5 <getSearchDir+0xb25>
xor    %edx,%edx
test   $0x1,%r8b
je     1c79 <getSearchDir+0xaf9>
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
movupd 0x0(%rbp,%rdx,8),%xmm3
movupd 0x10(%rbp,%rdx,8),%xmm4
subpd  %xmm1,%xmm3
subpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,(%rdi,%rdx,8)
movupd %xmm4,0x10(%rdi,%rdx,8)
cmp    %rax,%rcx
je     1ca5 <getSearchDir+0xb25>
xchg   %ax,%ax
movsd  (%rbx,%rcx,8),%xmm0
movsd  0x0(%rbp,%rcx,8),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm6,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1c80 <getSearchDir+0xb00>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    $0x3,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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