void choleskySolve(double **A, int n, double *b, double *x) {
  int i, j;
  double **U;
  U = (double **)malloc(n * sizeof(double *));
  for (i = 0; i < n; i++) {
    U[i] = (double *)malloc(n * sizeof(double));
    for (j = i; j < n; j++) {
      U[i][j] = A[j][i];
    }
  }
  for (i = 0; i < n; i++) {
    x[i] = b[i];
  }
  lowerTriSolve(A, n, b, x);
  upperTriSolve(U, n, x, x);
  for (i = 0; i < n; i++) {
    free(U[i]);
  }
  free(U);
}


x86 assembly (clang, -O0):
<choleskySolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movslq -0xc(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f4 <choleskySolve+0xb4>
movslq -0xc(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11e1 <choleskySolve+0xa1>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    119d <choleskySolve+0x5d>
jmp    11e6 <choleskySolve+0xa6>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    116f <choleskySolve+0x2f>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    122f <choleskySolve+0xef>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11fb <choleskySolve+0xbb>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1050 <lowerTriSolve@plt>
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <upperTriSolve@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    128d <choleskySolve+0x14d>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1262 <choleskySolve+0x122>
mov    -0x30(%rbp),%rdi
call   1040 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choleskySolve>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x8(%rsp)
mov    %rdx,%r13
mov    %esi,%r12d
mov    %rdi,%rbp
movslq %esi,%r14
lea    0x0(,%r14,8),%rbx
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,%r15
test   %r14d,%r14d
jle    11e2 <choleskySolve+0xa2>
mov    %r12d,%eax
mov    %r15,%r12
mov    %eax,0x14(%rsp)
mov    %eax,%r14d
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,(%r12,%r15,8)
mov    %r15,%rcx
nop
mov    0x0(%rbp,%rcx,8),%rdx
movsd  (%rdx,%r15,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r14
jne    11a0 <choleskySolve+0x60>
add    $0x1,%r15
cmp    %r14,%r15
jne    1190 <choleskySolve+0x50>
mov    0x14(%rsp),%eax
test   %eax,%eax
mov    %r12,%r15
mov    %eax,%r12d
jle    11e2 <choleskySolve+0xa2>
cmp    $0x4,%r12d
jae    1212 <choleskySolve+0xd2>
xor    %eax,%eax
mov    0x8(%rsp),%rbx
jmp    1310 <choleskySolve+0x1d0>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r13,%rdx
mov    0x8(%rsp),%rbx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <lowerTriSolve@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <upperTriSolve@plt>
jmp    13d2 <choleskySolve+0x292>
lea    0x0(,%r14,8),%rax
add    %r13,%rax
mov    0x8(%rsp),%rbx
cmp    %rbx,%rax
jbe    1237 <choleskySolve+0xf7>
lea    (%rbx,%r14,8),%rax
cmp    %r13,%rax
jbe    1237 <choleskySolve+0xf7>
xor    %eax,%eax
jmp    1310 <choleskySolve+0x1d0>
mov    %r14d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    125b <choleskySolve+0x11b>
xor    %esi,%esi
jmp    12d1 <choleskySolve+0x191>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x0(%r13,%rsi,8),%xmm0
movups 0x10(%r13,%rsi,8),%xmm1
movups %xmm0,(%rbx,%rsi,8)
movups %xmm1,0x10(%rbx,%rsi,8)
movups 0x20(%r13,%rsi,8),%xmm0
movups 0x30(%r13,%rsi,8),%xmm1
movups %xmm0,0x20(%rbx,%rsi,8)
movups %xmm1,0x30(%rbx,%rsi,8)
movups 0x40(%r13,%rsi,8),%xmm0
movups 0x50(%r13,%rsi,8),%xmm1
movups %xmm0,0x40(%rbx,%rsi,8)
movups %xmm1,0x50(%rbx,%rsi,8)
movups 0x60(%r13,%rsi,8),%xmm0
movups 0x70(%r13,%rsi,8),%xmm1
movups %xmm0,0x60(%rbx,%rsi,8)
movups %xmm1,0x70(%rbx,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1270 <choleskySolve+0x130>
test   %rcx,%rcx
je     130b <choleskySolve+0x1cb>
lea    (%rbx,%rsi,8),%rdx
add    $0x10,%rdx
lea    0x10(,%rsi,8),%rsi
add    %r13,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nop
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    12f0 <choleskySolve+0x1b0>
cmp    %r14,%rax
je     138c <choleskySolve+0x24c>
mov    %rax,%rcx
not    %rcx
add    %r14,%rcx
mov    %r14,%rdx
and    $0x3,%rdx
je     1346 <choleskySolve+0x206>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1330 <choleskySolve+0x1f0>
cmp    $0x3,%rcx
jb     138c <choleskySolve+0x24c>
nopl   0x0(%rax)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r14
jne    1350 <choleskySolve+0x210>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r13,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <lowerTriSolve@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <upperTriSolve@plt>
test   %r12d,%r12d
jle    13d2 <choleskySolve+0x292>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
call   1040 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    13c0 <choleskySolve+0x280>
mov    %r15,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <free@plt>

LLVM IR (-O0):
define void @choleskySolve(double** %0, i32 %1, double* %2, double* %3) {
%5 = alloca double**
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double**
store double** %0, double*** %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 8
%15 = call i8* @malloc(i64 %14)
%16 = bitcast i8* %15 to double**
store double** %16, double*** %11
store i32 0, i32* %9
br label %17
17: ; preds = %58, %4
%18 = load i32, i32* %9
%19 = load i32, i32* %6
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %61
21: ; preds = %17
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 8
%25 = call i8* @malloc(i64 %24)
%26 = bitcast i8* %25 to double*
%27 = load double**, double*** %11
%28 = load i32, i32* %9
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double*, double** %27, i64 %29
store double* %26, double** %30
%31 = load i32, i32* %9
store i32 %31, i32* %10
br label %32
32: ; preds = %54, %21
%33 = load i32, i32* %10
%34 = load i32, i32* %6
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %57
36: ; preds = %32
%37 = load double**, double*** %5
%38 = load i32, i32* %10
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double*, double** %37, i64 %39
%41 = load double*, double** %40
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
%45 = load double, double* %44
%46 = load double**, double*** %11
%47 = load i32, i32* %9
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double*, double** %46, i64 %48
%50 = load double*, double** %49
%51 = load i32, i32* %10
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %45, double* %53
br label %54
54: ; preds = %36
%55 = load i32, i32* %10
%56 = add nsw i32 %55, 1
store i32 %56, i32* %10
br label %32
57: ; preds = %32
br label %58
58: ; preds = %57
%59 = load i32, i32* %9
%60 = add nsw i32 %59, 1
store i32 %60, i32* %9
br label %17
61: ; preds = %17
store i32 0, i32* %9
br label %62
62: ; preds = %76, %61
%63 = load i32, i32* %9
%64 = load i32, i32* %6
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %79
66: ; preds = %62
%67 = load double*, double** %7
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = load double*, double** %8
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double %71, double* %75
br label %76
76: ; preds = %66
%77 = load i32, i32* %9
%78 = add nsw i32 %77, 1
store i32 %78, i32* %9
br label %62
79: ; preds = %62
%80 = load double**, double*** %5
%81 = load i32, i32* %6
%82 = load double*, double** %7
%83 = load double*, double** %8
%84 = call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @lowerTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %80, i32 %81, double* %82, double* %83)
%85 = load double**, double*** %11
%86 = load i32, i32* %6
%87 = load double*, double** %8
%88 = load double*, double** %8
%89 = call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @upperTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %85, i32 %86, double* %87, double* %88)
store i32 0, i32* %9
br label %90
90: ; preds = %101, %79
%91 = load i32, i32* %9
%92 = load i32, i32* %6
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %104
94: ; preds = %90
%95 = load double**, double*** %11
%96 = load i32, i32* %9
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double*, double** %95, i64 %97
%99 = load double*, double** %98
%100 = bitcast double* %99 to i8*
br label %101
101: ; preds = %94
%102 = load i32, i32* %9
%103 = add nsw i32 %102, 1
store i32 %103, i32* %9
br label %90
104: ; preds = %90
%105 = load double**, double*** %11
%106 = bitcast double** %105 to i8*
ret void
}

LLVM IR (-O2):
define void @choleskySolve(double** %0, i32 %1, double* %2, double* %3) {
%5 = sext i32 %1 to i64
%6 = shl nsw i64 %5, 3
%7 = tail call i8* @malloc(i64 %6)
%8 = bitcast i8* %7 to double**
%9 = icmp sgt i32 %1, 0
br i1 %9, label %10, label %168
10: ; preds = %4
%11 = zext i32 %1 to i64
br label %119
12: ; preds = %134
br i1 %9, label %13, label %168
13: ; preds = %12
%14 = zext i32 %1 to i64
%15 = icmp ult i32 %1, 4
br i1 %15, label %101, label %16
16: ; preds = %13
%17 = getelementptr double, double* %3, i64 %11
%18 = getelementptr double, double* %2, i64 %11
%19 = icmp ugt double* %18, %3
%20 = icmp ugt double* %17, %2
%21 = and i1 %19, %20
br i1 %21, label %101, label %22
22: ; preds = %16
%23 = and i64 %11, 4294967292
%24 = add nsw i64 %23, -4
%25 = lshr exact i64 %24, 2
%26 = add nuw nsw i64 %25, 1
%27 = and i64 %26, 3
%28 = icmp ult i64 %24, 12
br i1 %28, label %80, label %29
29: ; preds = %22
%30 = and i64 %26, 9223372036854775804
br label %31
31: ; preds = %31, %29
%32 = phi i64 [ 0, %29 ], [ %77, %31 ]
%33 = phi i64 [ 0, %29 ], [ %78, %31 ]
%34 = getelementptr inbounds double, double* %2, i64 %32
%35 = bitcast double* %34 to <2 x double>*
%36 = load <2 x double>, <2 x double>* %35
%37 = getelementptr inbounds double, double* %34, i64 2
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr inbounds double, double* %3, i64 %32
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %36, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> %39, <2 x double>* %43
%44 = or i64 %32, 4
%45 = getelementptr inbounds double, double* %2, i64 %44
%46 = bitcast double* %45 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = getelementptr inbounds double, double* %45, i64 2
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = getelementptr inbounds double, double* %3, i64 %44
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %47, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %50, <2 x double>* %54
%55 = or i64 %32, 8
%56 = getelementptr inbounds double, double* %2, i64 %55
%57 = bitcast double* %56 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = getelementptr inbounds double, double* %56, i64 2
%60 = bitcast double* %59 to <2 x double>*
%61 = load <2 x double>, <2 x double>* %60
%62 = getelementptr inbounds double, double* %3, i64 %55
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %58, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %61, <2 x double>* %65
%66 = or i64 %32, 12
%67 = getelementptr inbounds double, double* %2, i64 %66
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds double, double* %67, i64 2
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = getelementptr inbounds double, double* %3, i64 %66
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %69, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %72, <2 x double>* %76
%77 = add nuw i64 %32, 16
%78 = add nuw i64 %33, 4
%79 = icmp eq i64 %78, %30
br i1 %79, label %80, label %31
80: ; preds = %31, %22
%81 = phi i64 [ 0, %22 ], [ %77, %31 ]
%82 = icmp eq i64 %27, 0
br i1 %82, label %99, label %83
83: ; preds = %80, %83
%84 = phi i64 [ %96, %83 ], [ %81, %80 ]
%85 = phi i64 [ %97, %83 ], [ 0, %80 ]
%86 = getelementptr inbounds double, double* %2, i64 %84
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %86, i64 2
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %3, i64 %84
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %88, <2 x double>* %93
%94 = getelementptr inbounds double, double* %92, i64 2
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> %91, <2 x double>* %95
%96 = add nuw i64 %84, 4
%97 = add i64 %85, 1
%98 = icmp eq i64 %97, %27
br i1 %98, label %99, label %83
99: ; preds = %83, %80
%100 = icmp eq i64 %23, %11
br i1 %100, label %156, label %101
101: ; preds = %16, %13, %99
%102 = phi i64 [ 0, %16 ], [ 0, %13 ], [ %23, %99 ]
%103 = xor i64 %102, -1
%104 = add nsw i64 %103, %11
%105 = and i64 %11, 3
%106 = icmp eq i64 %105, 0
br i1 %106, label %116, label %107
107: ; preds = %101, %107
%108 = phi i64 [ %113, %107 ], [ %102, %101 ]
%109 = phi i64 [ %114, %107 ], [ 0, %101 ]
%110 = getelementptr inbounds double, double* %2, i64 %108
%111 = load double, double* %110
%112 = getelementptr inbounds double, double* %3, i64 %108
store double %111, double* %112
%113 = add nuw nsw i64 %108, 1
%114 = add i64 %109, 1
%115 = icmp eq i64 %114, %105
br i1 %115, label %116, label %107
116: ; preds = %107, %101
%117 = phi i64 [ %102, %101 ], [ %113, %107 ]
%118 = icmp ult i64 %104, 3
br i1 %118, label %156, label %137
119: ; preds = %134, %10
%120 = phi i64 [ 0, %10 ], [ %135, %134 ]
%121 = tail call i8* @malloc(i64 %6)
%122 = getelementptr inbounds double*, double** %8, i64 %120
%123 = bitcast double** %122 to i8**
store i8* %121, i8** %123
%124 = bitcast i8* %121 to double*
br label %125
125: ; preds = %119, %125
%126 = phi i64 [ %120, %119 ], [ %132, %125 ]
%127 = getelementptr inbounds double*, double** %0, i64 %126
%128 = load double*, double** %127
%129 = getelementptr inbounds double, double* %128, i64 %120
%130 = load double, double* %129
%131 = getelementptr inbounds double, double* %124, i64 %126
store double %130, double* %131
%132 = add nuw nsw i64 %126, 1
%133 = icmp eq i64 %132, %11
br i1 %133, label %134, label %125
134: ; preds = %125
%135 = add nuw nsw i64 %120, 1
%136 = icmp eq i64 %135, %11
br i1 %136, label %12, label %119
137: ; preds = %116, %137
%138 = phi i64 [ %154, %137 ], [ %117, %116 ]
%139 = getelementptr inbounds double, double* %2, i64 %138
%140 = load double, double* %139
%141 = getelementptr inbounds double, double* %3, i64 %138
store double %140, double* %141
%142 = add nuw nsw i64 %138, 1
%143 = getelementptr inbounds double, double* %2, i64 %142
%144 = load double, double* %143
%145 = getelementptr inbounds double, double* %3, i64 %142
store double %144, double* %145
%146 = add nuw nsw i64 %138, 2
%147 = getelementptr inbounds double, double* %2, i64 %146
%148 = load double, double* %147
%149 = getelementptr inbounds double, double* %3, i64 %146
store double %148, double* %149
%150 = add nuw nsw i64 %138, 3
%151 = getelementptr inbounds double, double* %2, i64 %150
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %3, i64 %150
store double %152, double* %153
%154 = add nuw nsw i64 %138, 4
%155 = icmp eq i64 %154, %14
br i1 %155, label %156, label %137
156: ; preds = %116, %137, %99
%157 = tail call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @lowerTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %0, i32 %1, double* %2, double* %3)
%158 = tail call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @upperTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %8, i32 %1, double* %3, double* %3)
br i1 %9, label %159, label %171
159: ; preds = %156
%160 = zext i32 %1 to i64
br label %161
161: ; preds = %159, %161
%162 = phi i64 [ 0, %159 ], [ %166, %161 ]
%163 = getelementptr inbounds double*, double** %8, i64 %162
%164 = bitcast double** %163 to i8**
%165 = load i8*, i8** %164
tail call void @free(i8* %165)
%166 = add nuw nsw i64 %162, 1
%167 = icmp eq i64 %166, %160
br i1 %167, label %171, label %161
168: ; preds = %12, %4
%169 = tail call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @lowerTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %0, i32 %1, double* %2, double* %3)
%170 = tail call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @upperTriSolve to i32 (double**, i32, double*, double*, ...)*)(double** %8, i32 %1, double* %3, double* %3)
br label %171
171: ; preds = %161, %168, %156
tail call void @free(i8* %7)
ret void
}