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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ freeMat(long, double ***);
int /*<<< orphan*/ initMat(long, int, double ***);
int /*<<< orphan*/ invert(long, long, double **);
int /*<<< orphan*/ matrixMultiply(long, long, int, double **, double **,
                                  double **);
double pow(double, int);
void vanderInterpolate(long int n, double *x, double *y, double *c) {
  int i = 0;
  int j = 0;
  double **xMat;
  initMat(n, n, &xMat);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      xMat[i][j] = pow(x[i], j);
    }
  }
  double **yMat;
  initMat(n, 1, &yMat);
  for (i = 0; i < n; i++) {
    yMat[i][0] = y[i];
  }
  double **pMat;
  initMat(n, 1, &pMat);
  for (i = 0; i < n; i++) {
    pMat[i][0] = 0;
  }
  invert(n, n, xMat);
  matrixMultiply(n, n, 1, xMat, yMat, pMat);
  for (i = 0; i < n; i++) {
    c[i] = pMat[i][0];
  }
  freeMat(n, &xMat);
  freeMat(n, &yMat);
  freeMat(n, &pMat);
  return;
}


x86 assembly (clang, -O0):
<vanderInterpolate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    %eax,%esi
lea    -0x30(%rbp),%rdx
call   1040 <initMat@plt>
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    11fe <vanderInterpolate+0xae>
movl   $0x0,-0x28(%rbp)
movslq -0x28(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    11eb <vanderInterpolate+0x9b>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%edi
call   1060 <pow@plt>
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    11a5 <vanderInterpolate+0x55>
jmp    11f0 <vanderInterpolate+0xa0>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1190 <vanderInterpolate+0x40>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    -0x38(%rbp),%rdx
call   1040 <initMat@plt>
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1250 <vanderInterpolate+0x100>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1217 <vanderInterpolate+0xc7>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    -0x40(%rbp),%rdx
call   1040 <initMat@plt>
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1298 <vanderInterpolate+0x148>
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1269 <vanderInterpolate+0x119>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <invert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    $0x1,%edx
call   1070 <matrixMultiply@plt>
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1307 <vanderInterpolate+0x1b7>
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%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    12ce <vanderInterpolate+0x17e>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <freeMat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1050 <freeMat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <freeMat@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vanderInterpolate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,%rbx
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r14
mov    %rsp,%rdx
mov    %r14d,%esi
call   1040 <initMat@plt>
test   %r14,%r14
jle    126b <vanderInterpolate+0x11b>
mov    %rbx,0x20(%rsp)
lea    -0x1(%r14),%rax
mov    %rax,0x18(%rsp)
mov    %r14,%r15
and    $0xfffffffffffffffe,%r15
xor    %ebp,%ebp
jmp    11ad <vanderInterpolate+0x5d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %r14,%rbp
je     1238 <vanderInterpolate+0xe8>
cmpq   $0x0,0x18(%rsp)
je     1210 <vanderInterpolate+0xc0>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,8),%xmm0
mov    %ebx,%edi
call   1060 <pow@plt>
mov    (%rsp),%rax
mov    (%rax,%rbp,8),%rax
movsd  %xmm0,(%rax,%rbx,8)
movsd  0x0(%r13,%rbp,8),%xmm0
lea    0x1(%rbx),%edi
call   1060 <pow@plt>
mov    (%rsp),%rax
mov    (%rax,%rbp,8),%rax
movsd  %xmm0,0x8(%rax,%rbx,8)
add    $0x2,%rbx
cmp    %r15,%rbx
jne    11c0 <vanderInterpolate+0x70>
test   $0x1,%r14b
je     11a0 <vanderInterpolate+0x50>
jmp    1218 <vanderInterpolate+0xc8>
nopl   0x0(%rax)
xor    %ebx,%ebx
test   $0x1,%r14b
je     11a0 <vanderInterpolate+0x50>
movsd  0x0(%r13,%rbp,8),%xmm0
mov    %ebx,%edi
call   1060 <pow@plt>
mov    (%rsp),%rax
mov    (%rax,%rbp,8),%rax
movsd  %xmm0,(%rax,%rbx,8)
jmp    11a0 <vanderInterpolate+0x50>
lea    0x10(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <initMat@plt>
test   %r14,%r14
mov    0x20(%rsp),%rbx
jle    127d <vanderInterpolate+0x12d>
mov    0x10(%rsp),%rcx
mov    %r14d,%eax
and    $0x3,%eax
cmpq   $0x3,0x18(%rsp)
jae    1294 <vanderInterpolate+0x144>
xor    %edx,%edx
jmp    12e7 <vanderInterpolate+0x197>
lea    0x10(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <initMat@plt>
lea    0x8(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <initMat@plt>
jmp    1424 <vanderInterpolate+0x2d4>
mov    %r14,%rsi
and    $0xfffffffffffffffc,%rsi
xor    %edx,%edx
nopl   (%rax)
movsd  (%r12,%rdx,8),%xmm0
mov    (%rcx,%rdx,8),%rdi
movsd  %xmm0,(%rdi)
movsd  0x8(%r12,%rdx,8),%xmm0
mov    0x8(%rcx,%rdx,8),%rdi
movsd  %xmm0,(%rdi)
movsd  0x10(%r12,%rdx,8),%xmm0
mov    0x10(%rcx,%rdx,8),%rdi
movsd  %xmm0,(%rdi)
movsd  0x18(%r12,%rdx,8),%xmm0
mov    0x18(%rcx,%rdx,8),%rdi
movsd  %xmm0,(%rdi)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    12a0 <vanderInterpolate+0x150>
test   %rax,%rax
je     1316 <vanderInterpolate+0x1c6>
lea    (%rcx,%rdx,8),%rcx
lea    (%r12,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,8),%xmm0
mov    (%rcx,%rsi,8),%rdi
movsd  %xmm0,(%rdi)
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1300 <vanderInterpolate+0x1b0>
lea    0x8(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <initMat@plt>
test   %r14,%r14
jle    1347 <vanderInterpolate+0x1f7>
mov    0x8(%rsp),%rcx
mov    %r14d,%eax
and    $0x7,%eax
cmpq   $0x7,0x18(%rsp)
jae    1379 <vanderInterpolate+0x229>
xor    %edx,%edx
jmp    13f8 <vanderInterpolate+0x2a8>
mov    (%rsp),%rdx
mov    %r14,%rdi
mov    %r14,%rsi
call   1030 <invert@plt>
mov    (%rsp),%rcx
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%r9
mov    %r14,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1070 <matrixMultiply@plt>
jmp    14f6 <vanderInterpolate+0x3a6>
mov    %r14,%rsi
and    $0xfffffffffffffff8,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x8(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x10(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x18(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x20(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x28(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x30(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
mov    0x38(%rcx,%rdx,8),%rdi
movq   $0x0,(%rdi)
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    1390 <vanderInterpolate+0x240>
test   %rax,%rax
je     1424 <vanderInterpolate+0x2d4>
lea    (%rcx,%rdx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rcx,%rdx,8),%rsi
movq   $0x0,(%rsi)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1410 <vanderInterpolate+0x2c0>
mov    (%rsp),%rdx
mov    %r14,%rdi
mov    %r14,%rsi
call   1030 <invert@plt>
mov    (%rsp),%rcx
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%r9
mov    %r14,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1070 <matrixMultiply@plt>
test   %r14,%r14
jle    14f6 <vanderInterpolate+0x3a6>
mov    0x8(%rsp),%rcx
lea    -0x1(%r14),%rdx
mov    %r14d,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    1473 <vanderInterpolate+0x323>
xor    %edx,%edx
jmp    14c3 <vanderInterpolate+0x373>
mov    %r14,%rsi
and    $0xfffffffffffffffc,%rsi
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rcx,%rdx,8),%rdi
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
mov    0x8(%rcx,%rdx,8),%rdi
movsd  (%rdi),%xmm0
movsd  %xmm0,0x8(%rbx,%rdx,8)
mov    0x10(%rcx,%rdx,8),%rdi
movsd  (%rdi),%xmm0
movsd  %xmm0,0x10(%rbx,%rdx,8)
mov    0x18(%rcx,%rdx,8),%rdi
movsd  (%rdi),%xmm0
movsd  %xmm0,0x18(%rbx,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1480 <vanderInterpolate+0x330>
test   %rax,%rax
je     14f6 <vanderInterpolate+0x3a6>
lea    (%rbx,%rdx,8),%rsi
lea    (%rcx,%rdx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rcx,%rdx,8),%rdi
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    14e0 <vanderInterpolate+0x390>
mov    %rsp,%rsi
mov    %r14,%rdi
call   1050 <freeMat@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1050 <freeMat@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1050 <freeMat@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @vanderInterpolate(i64 %0, double* %1, double* %2, double* %3) {
%5 = alloca i64
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double**
%12 = alloca double**
%13 = alloca double**
store i64 %0, i64* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
store i32 0, i32* %10
%14 = load i64, i64* %5
%15 = load i64, i64* %5
%16 = trunc i64 %15 to i32
%17 = call i32 @initMat(i64 %14, i32 %16, double*** %11)
store i32 0, i32* %9
br label %18
18: ; preds = %49, %4
%19 = load i32, i32* %9
%20 = sext i32 %19 to i64
%21 = load i64, i64* %5
%22 = icmp slt i64 %20, %21
br i1 %22, label %23, label %52
23: ; preds = %18
store i32 0, i32* %10
br label %24
24: ; preds = %45, %23
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = load i64, i64* %5
%28 = icmp slt i64 %26, %27
br i1 %28, label %29, label %48
29: ; preds = %24
%30 = load double*, double** %6
%31 = load i32, i32* %9
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %30, i64 %32
%34 = load double, double* %33
%35 = load i32, i32* %10
%36 = call double @pow(double %34, i32 %35)
%37 = load double**, double*** %11
%38 = load i32, i32* %9
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double*, double** %37, i64 %39
%41 = load double*, double** %40
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
store double %36, double* %44
br label %45
45: ; preds = %29
%46 = load i32, i32* %10
%47 = add nsw i32 %46, 1
store i32 %47, i32* %10
br label %24
48: ; preds = %24
br label %49
49: ; preds = %48
%50 = load i32, i32* %9
%51 = add nsw i32 %50, 1
store i32 %51, i32* %9
br label %18
52: ; preds = %18
%53 = load i64, i64* %5
%54 = call i32 @initMat(i64 %53, i32 1, double*** %12)
store i32 0, i32* %9
br label %55
55: ; preds = %72, %52
%56 = load i32, i32* %9
%57 = sext i32 %56 to i64
%58 = load i64, i64* %5
%59 = icmp slt i64 %57, %58
br i1 %59, label %60, label %75
60: ; preds = %55
%61 = load double*, double** %7
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %64
%66 = load double**, double*** %12
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double*, double** %66, i64 %68
%70 = load double*, double** %69
%71 = getelementptr inbounds double, double* %70, i64 0
store double %65, double* %71
br label %72
72: ; preds = %60
%73 = load i32, i32* %9
%74 = add nsw i32 %73, 1
store i32 %74, i32* %9
br label %55
75: ; preds = %55
%76 = load i64, i64* %5
%77 = call i32 @initMat(i64 %76, i32 1, double*** %13)
store i32 0, i32* %9
br label %78
78: ; preds = %90, %75
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = load i64, i64* %5
%82 = icmp slt i64 %80, %81
br i1 %82, label %83, label %93
83: ; preds = %78
%84 = load double**, double*** %13
%85 = load i32, i32* %9
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double*, double** %84, i64 %86
%88 = load double*, double** %87
%89 = getelementptr inbounds double, double* %88, i64 0
store double 0.000000e+00, double* %89
br label %90
90: ; preds = %83
%91 = load i32, i32* %9
%92 = add nsw i32 %91, 1
store i32 %92, i32* %9
br label %78
93: ; preds = %78
%94 = load i64, i64* %5
%95 = load i64, i64* %5
%96 = load double**, double*** %11
%97 = call i32 @invert(i64 %94, i64 %95, double** %96)
%98 = load i64, i64* %5
%99 = load i64, i64* %5
%100 = load double**, double*** %11
%101 = load double**, double*** %12
%102 = load double**, double*** %13
%103 = call i32 @matrixMultiply(i64 %98, i64 %99, i32 1, double** %100, double** %101, double** %102)
store i32 0, i32* %9
br label %104
104: ; preds = %121, %93
%105 = load i32, i32* %9
%106 = sext i32 %105 to i64
%107 = load i64, i64* %5
%108 = icmp slt i64 %106, %107
br i1 %108, label %109, label %124
109: ; preds = %104
%110 = load double**, double*** %13
%111 = load i32, i32* %9
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double*, double** %110, i64 %112
%114 = load double*, double** %113
%115 = getelementptr inbounds double, double* %114, i64 0
%116 = load double, double* %115
%117 = load double*, double** %8
%118 = load i32, i32* %9
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
store double %116, double* %120
br label %121
121: ; preds = %109
%122 = load i32, i32* %9
%123 = add nsw i32 %122, 1
store i32 %123, i32* %9
br label %104
124: ; preds = %104
%125 = load i64, i64* %5
%126 = call i32 @freeMat(i64 %125, double*** %11)
%127 = load i64, i64* %5
%128 = call i32 @freeMat(i64 %127, double*** %12)
%129 = load i64, i64* %5
%130 = call i32 @freeMat(i64 %129, double*** %13)
ret void
}

LLVM IR (-O2):
define void @vanderInterpolate(i64 %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = alloca double**
%6 = alloca double**
%7 = alloca double**
%8 = bitcast double*** %5 to i8*
%9 = trunc i64 %0 to i32
%10 = call i32 @initMat(i64 %0, i32 %9, double*** %5)
%11 = icmp sgt i64 %0, 0
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = add i64 %0, -1
%14 = and i64 %0, 1
%15 = icmp eq i64 %13, 0
%16 = and i64 %0, -2
%17 = icmp eq i64 %14, 0
br label %21
18: ; preds = %4
%19 = bitcast double*** %6 to i8*
%20 = call i32 @initMat(i64 %0, i32 1, double*** %6)
br label %92
21: ; preds = %12, %55
%22 = phi i64 [ %56, %55 ], [ 0, %12 ]
%23 = getelementptr inbounds double, double* %1, i64 %22
br i1 %15, label %45, label %24
24: ; preds = %21, %24
%25 = phi i64 [ %42, %24 ], [ 0, %21 ]
%26 = phi i64 [ %43, %24 ], [ 0, %21 ]
%27 = load double, double* %23
%28 = trunc i64 %25 to i32
%29 = call double @pow(double %27, i32 %28)
%30 = load double**, double*** %5
%31 = getelementptr inbounds double*, double** %30, i64 %22
%32 = load double*, double** %31
%33 = getelementptr inbounds double, double* %32, i64 %25
store double %29, double* %33
%34 = or i64 %25, 1
%35 = load double, double* %23
%36 = trunc i64 %34 to i32
%37 = call double @pow(double %35, i32 %36)
%38 = load double**, double*** %5
%39 = getelementptr inbounds double*, double** %38, i64 %22
%40 = load double*, double** %39
%41 = getelementptr inbounds double, double* %40, i64 %34
store double %37, double* %41
%42 = add nuw nsw i64 %25, 2
%43 = add i64 %26, 2
%44 = icmp eq i64 %43, %16
br i1 %44, label %45, label %24
45: ; preds = %24, %21
%46 = phi i64 [ 0, %21 ], [ %42, %24 ]
br i1 %17, label %55, label %47
47: ; preds = %45
%48 = load double, double* %23
%49 = trunc i64 %46 to i32
%50 = call double @pow(double %48, i32 %49)
%51 = load double**, double*** %5
%52 = getelementptr inbounds double*, double** %51, i64 %22
%53 = load double*, double** %52
%54 = getelementptr inbounds double, double* %53, i64 %46
store double %50, double* %54
br label %55
55: ; preds = %45, %47
%56 = add nuw nsw i64 %22, 1
%57 = icmp eq i64 %56, %0
br i1 %57, label %58, label %21
58: ; preds = %55
%59 = bitcast double*** %6 to i8*
%60 = call i32 @initMat(i64 %0, i32 1, double*** %6)
br i1 %11, label %61, label %92
61: ; preds = %58
%62 = load double**, double*** %6
%63 = and i64 %0, 3
%64 = icmp ult i64 %13, 3
br i1 %64, label %95, label %65
65: ; preds = %61
%66 = and i64 %0, -4
br label %67
67: ; preds = %67, %65
%68 = phi i64 [ 0, %65 ], [ %89, %67 ]
%69 = phi i64 [ 0, %65 ], [ %90, %67 ]
%70 = getelementptr inbounds double, double* %2, i64 %68
%71 = load double, double* %70
%72 = getelementptr inbounds double*, double** %62, i64 %68
%73 = load double*, double** %72
store double %71, double* %73
%74 = or i64 %68, 1
%75 = getelementptr inbounds double, double* %2, i64 %74
%76 = load double, double* %75
%77 = getelementptr inbounds double*, double** %62, i64 %74
%78 = load double*, double** %77
store double %76, double* %78
%79 = or i64 %68, 2
%80 = getelementptr inbounds double, double* %2, i64 %79
%81 = load double, double* %80
%82 = getelementptr inbounds double*, double** %62, i64 %79
%83 = load double*, double** %82
store double %81, double* %83
%84 = or i64 %68, 3
%85 = getelementptr inbounds double, double* %2, i64 %84
%86 = load double, double* %85
%87 = getelementptr inbounds double*, double** %62, i64 %84
%88 = load double*, double** %87
store double %86, double* %88
%89 = add nuw nsw i64 %68, 4
%90 = add i64 %69, 4
%91 = icmp eq i64 %90, %66
br i1 %91, label %95, label %67
92: ; preds = %18, %58
%93 = bitcast double*** %7 to i8*
%94 = call i32 @initMat(i64 %0, i32 1, double*** %7)
br label %157
95: ; preds = %67, %61
%96 = phi i64 [ 0, %61 ], [ %89, %67 ]
%97 = icmp eq i64 %63, 0
br i1 %97, label %108, label %98
98: ; preds = %95, %98
%99 = phi i64 [ %105, %98 ], [ %96, %95 ]
%100 = phi i64 [ %106, %98 ], [ 0, %95 ]
%101 = getelementptr inbounds double, double* %2, i64 %99
%102 = load double, double* %101
%103 = getelementptr inbounds double*, double** %62, i64 %99
%104 = load double*, double** %103
store double %102, double* %104
%105 = add nuw nsw i64 %99, 1
%106 = add i64 %100, 1
%107 = icmp eq i64 %106, %63
br i1 %107, label %108, label %98
108: ; preds = %98, %95
%109 = bitcast double*** %7 to i8*
%110 = call i32 @initMat(i64 %0, i32 1, double*** %7)
br i1 %11, label %111, label %196
111: ; preds = %108
%112 = load double**, double*** %7
%113 = and i64 %0, 7
%114 = icmp ult i64 %13, 7
br i1 %114, label %146, label %115
115: ; preds = %111
%116 = and i64 %0, -8
br label %117
117: ; preds = %117, %115
%118 = phi i64 [ 0, %115 ], [ %143, %117 ]
%119 = phi i64 [ 0, %115 ], [ %144, %117 ]
%120 = getelementptr inbounds double*, double** %112, i64 %118
%121 = load double*, double** %120
store double 0.000000e+00, double* %121
%122 = or i64 %118, 1
%123 = getelementptr inbounds double*, double** %112, i64 %122
%124 = load double*, double** %123
store double 0.000000e+00, double* %124
%125 = or i64 %118, 2
%126 = getelementptr inbounds double*, double** %112, i64 %125
%127 = load double*, double** %126
store double 0.000000e+00, double* %127
%128 = or i64 %118, 3
%129 = getelementptr inbounds double*, double** %112, i64 %128
%130 = load double*, double** %129
store double 0.000000e+00, double* %130
%131 = or i64 %118, 4
%132 = getelementptr inbounds double*, double** %112, i64 %131
%133 = load double*, double** %132
store double 0.000000e+00, double* %133
%134 = or i64 %118, 5
%135 = getelementptr inbounds double*, double** %112, i64 %134
%136 = load double*, double** %135
store double 0.000000e+00, double* %136
%137 = or i64 %118, 6
%138 = getelementptr inbounds double*, double** %112, i64 %137
%139 = load double*, double** %138
store double 0.000000e+00, double* %139
%140 = or i64 %118, 7
%141 = getelementptr inbounds double*, double** %112, i64 %140
%142 = load double*, double** %141
store double 0.000000e+00, double* %142
%143 = add nuw nsw i64 %118, 8
%144 = add i64 %119, 8
%145 = icmp eq i64 %144, %116
br i1 %145, label %146, label %117
146: ; preds = %117, %111
%147 = phi i64 [ 0, %111 ], [ %143, %117 ]
%148 = icmp eq i64 %113, 0
br i1 %148, label %157, label %149
149: ; preds = %146, %149
%150 = phi i64 [ %154, %149 ], [ %147, %146 ]
%151 = phi i64 [ %155, %149 ], [ 0, %146 ]
%152 = getelementptr inbounds double*, double** %112, i64 %150
%153 = load double*, double** %152
store double 0.000000e+00, double* %153
%154 = add nuw nsw i64 %150, 1
%155 = add i64 %151, 1
%156 = icmp eq i64 %155, %113
br i1 %156, label %157, label %149
157: ; preds = %146, %149, %92
%158 = load double**, double*** %5
%159 = call i32 @invert(i64 %0, i64 %0, double** %158)
%160 = load double**, double*** %5
%161 = load double**, double*** %6
%162 = load double**, double*** %7
%163 = call i32 @matrixMultiply(i64 %0, i64 %0, i32 1, double** %160, double** %161, double** %162)
br i1 %11, label %164, label %216
164: ; preds = %157
%165 = load double**, double*** %7
%166 = add i64 %0, -1
%167 = and i64 %0, 3
%168 = icmp ult i64 %166, 3
br i1 %168, label %203, label %169
169: ; preds = %164
%170 = and i64 %0, -4
br label %171
171: ; preds = %171, %169
%172 = phi i64 [ 0, %169 ], [ %193, %171 ]
%173 = phi i64 [ 0, %169 ], [ %194, %171 ]
%174 = getelementptr inbounds double*, double** %165, i64 %172
%175 = load double*, double** %174
%176 = load double, double* %175
%177 = getelementptr inbounds double, double* %3, i64 %172
store double %176, double* %177
%178 = or i64 %172, 1
%179 = getelementptr inbounds double*, double** %165, i64 %178
%180 = load double*, double** %179
%181 = load double, double* %180
%182 = getelementptr inbounds double, double* %3, i64 %178
store double %181, double* %182
%183 = or i64 %172, 2
%184 = getelementptr inbounds double*, double** %165, i64 %183
%185 = load double*, double** %184
%186 = load double, double* %185
%187 = getelementptr inbounds double, double* %3, i64 %183
store double %186, double* %187
%188 = or i64 %172, 3
%189 = getelementptr inbounds double*, double** %165, i64 %188
%190 = load double*, double** %189
%191 = load double, double* %190
%192 = getelementptr inbounds double, double* %3, i64 %188
store double %191, double* %192
%193 = add nuw nsw i64 %172, 4
%194 = add i64 %173, 4
%195 = icmp eq i64 %194, %170
br i1 %195, label %203, label %171
196: ; preds = %108
%197 = load double**, double*** %5
%198 = call i32 @invert(i64 %0, i64 %0, double** %197)
%199 = load double**, double*** %5
%200 = load double**, double*** %6
%201 = load double**, double*** %7
%202 = call i32 @matrixMultiply(i64 %0, i64 %0, i32 1, double** %199, double** %200, double** %201)
br label %216
203: ; preds = %171, %164
%204 = phi i64 [ 0, %164 ], [ %193, %171 ]
%205 = icmp eq i64 %167, 0
br i1 %205, label %216, label %206
206: ; preds = %203, %206
%207 = phi i64 [ %213, %206 ], [ %204, %203 ]
%208 = phi i64 [ %214, %206 ], [ 0, %203 ]
%209 = getelementptr inbounds double*, double** %165, i64 %207
%210 = load double*, double** %209
%211 = load double, double* %210
%212 = getelementptr inbounds double, double* %3, i64 %207
store double %211, double* %212
%213 = add nuw nsw i64 %207, 1
%214 = add i64 %208, 1
%215 = icmp eq i64 %214, %167
br i1 %215, label %216, label %206
216: ; preds = %203, %206, %196, %157
%217 = bitcast double*** %6 to i8*
%218 = bitcast double*** %7 to i8*
%219 = call i32 @freeMat(i64 %0, double*** %5)
%220 = call i32 @freeMat(i64 %0, double*** %6)
%221 = call i32 @freeMat(i64 %0, double*** %7)
ret void
}