void pca_project(double **data, int n, int m, int ncomponents) {
  int i, j, k, k2;
  double **symmat, *evals, *interm;
  symmat = (double **)malloc(m * sizeof(double *));
  for (i = 0; i < m; i++)
    symmat[i] = (double *)malloc(m * sizeof(double));
  covcol(data, n, m, symmat);
  evals = (double *)malloc(m * sizeof(double));
  interm = (double *)malloc(m * sizeof(double));
  tred2(symmat, m, evals, interm);
  tqli(evals, interm, m, symmat);
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      interm[j] = data[i][j];
    }
    for (k = 0; k < ncomponents; k++) {
      data[i][k] = 0.0;
      for (k2 = 0; k2 < m; k2++) {
        data[i][k] += interm[k2] * symmat[k2][m - k - 1];
      }
    }
  }
  for (i = 0; i < m; i++)
    free(symmat[i]);
  free(symmat);
  free(evals);
  free(interm);
}


x86 assembly (clang, -O0):
<pca_project>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11b3 <pca_project+0x63>
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117d <pca_project+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1040 <covcol@plt>
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x0,%al
call   1070 <tred2@plt>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1050 <tqli@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    132a <pca_project+0x1da>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    126c <pca_project+0x11c>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1230 <pca_project+0xe0>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1317 <pca_project+0x1c7>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1304 <pca_project+0x1b4>
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%ecx
sub    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    129e <pca_project+0x14e>
jmp    1309 <pca_project+0x1b9>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1273 <pca_project+0x123>
jmp    131c <pca_project+0x1cc>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    121d <pca_project+0xcd>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    135c <pca_project+0x20c>
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1331 <pca_project+0x1e1>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pca_project>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,0xc(%rsp)
mov    %edx,%r13d
mov    %esi,%r15d
mov    %rdi,0x18(%rsp)
movslq %edx,%rbp
lea    0x0(,%rbp,8),%r12
mov    %r12,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %r13d,%r14d
test   %ebp,%ebp
jle    11a5 <pca_project+0x55>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r12,%rdi
call   1060 <malloc@plt>
mov    %rax,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1190 <pca_project+0x40>
mov    0x18(%rsp),%rdi
mov    %r15d,%esi
mov    %r13d,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <covcol@plt>
mov    %r12,%rdi
call   1060 <malloc@plt>
mov    %r15d,0x10(%rsp)
mov    %rax,%r15
mov    %r12,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <tred2@plt>
mov    %r15,0x20(%rsp)
mov    %r15,%rdi
mov    0x10(%rsp),%r15d
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <tqli@plt>
test   %r15d,%r15d
jle    14ad <pca_project+0x35d>
mov    %r15d,%eax
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%r15d
lea    0x0(,%r14,8),%rax
add    %rbp,%rax
mov    %rax,0x50(%rsp)
mov    %r14d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x48(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x40(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
lea    -0x1(%r14),%r11
mov    %eax,%r10d
and    $0x3,%r10d
and    $0xfffffffffffffffc,%rax
mov    %rax,0x28(%rsp)
mov    %r14d,%edi
and    $0x3,%edi
mov    %r14d,%r12d
and    $0xfffffffe,%r12d
lea    0x10(%rbp),%rax
mov    %rax,0x30(%rsp)
mov    %r10,0x38(%rsp)
shl    $0x5,%r10
xor    %r9d,%r9d
jmp    1292 <pca_project+0x142>
nop
add    $0x1,%r9
cmp    0x10(%rsp),%r9
mov    %r8,%rdi
je     14ad <pca_project+0x35d>
test   %r13d,%r13d
jle    1400 <pca_project+0x2b0>
mov    0x18(%rsp),%rax
mov    (%rax,%r9,8),%r8
cmp    $0x4,%r13d
jb     12be <pca_project+0x16e>
lea    (%r8,%r14,8),%rax
cmp    %rax,%rbp
jae    1331 <pca_project+0x1e1>
cmp    %r8,0x50(%rsp)
jbe    1331 <pca_project+0x1e1>
xor    %eax,%eax
mov    %r11,%rdx
sub    %rax,%rdx
test   %rdi,%rdi
je     12e6 <pca_project+0x196>
mov    %rdi,%rsi
xchg   %ax,%ax
movsd  (%r8,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    12d0 <pca_project+0x180>
cmp    $0x3,%rdx
jb     1400 <pca_project+0x2b0>
movsd  (%r8,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movsd  0x8(%r8,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rax,8)
movsd  0x10(%r8,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbp,%rax,8)
movsd  0x18(%r8,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbp,%rax,8)
add    $0x4,%rax
cmp    %rax,%r14
jne    12f0 <pca_project+0x1a0>
jmp    1400 <pca_project+0x2b0>
cmpq   $0xc,0x40(%rsp)
jae    133d <pca_project+0x1ed>
xor    %eax,%eax
jmp    13b5 <pca_project+0x265>
mov    0x28(%rsp),%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups (%r8,%rax,8),%xmm0
movups 0x10(%r8,%rax,8),%xmm1
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
movups 0x20(%r8,%rax,8),%xmm0
movups 0x30(%r8,%rax,8),%xmm1
movups %xmm0,0x20(%rbp,%rax,8)
movups %xmm1,0x30(%rbp,%rax,8)
movups 0x40(%r8,%rax,8),%xmm0
movups 0x50(%r8,%rax,8),%xmm1
movups %xmm0,0x40(%rbp,%rax,8)
movups %xmm1,0x50(%rbp,%rax,8)
movupd 0x60(%r8,%rax,8),%xmm0
movupd 0x70(%r8,%rax,8),%xmm1
movupd %xmm0,0x60(%rbp,%rax,8)
movupd %xmm1,0x70(%rbp,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rdx
jne    1350 <pca_project+0x200>
cmpq   $0x0,0x38(%rsp)
je     13ef <pca_project+0x29f>
mov    0x30(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
lea    (%r8,%rax,8),%rax
add    $0x10,%rax
xor    %esi,%esi
movupd -0x10(%rax,%rsi,1),%xmm0
movupd (%rax,%rsi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r10
jne    13d0 <pca_project+0x280>
mov    0x48(%rsp),%rcx
mov    %rcx,%rax
cmp    %r14,%rcx
jne    12c0 <pca_project+0x170>
mov    %rdi,%r8
cmpl   $0x0,0xc(%rsp)
jle    1280 <pca_project+0x130>
mov    0x18(%rsp),%rax
mov    (%rax,%r9,8),%rsi
xor    %eax,%eax
jmp    142d <pca_project+0x2dd>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    %r15,%rax
je     1280 <pca_project+0x130>
movq   $0x0,(%rsi,%rax,8)
test   %r13d,%r13d
jle    1420 <pca_project+0x2d0>
mov    %eax,%edx
not    %edx
add    %r13d,%edx
movslq %edx,%rdi
xorpd  %xmm0,%xmm0
xor    %edx,%edx
test   %r11,%r11
je     148a <pca_project+0x33a>
nop
movsd  0x0(%rbp,%rdx,8),%xmm1
mov    (%rbx,%rdx,8),%rcx
mulsd  (%rcx,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rax,8)
movsd  0x8(%rbp,%rdx,8),%xmm0
mov    0x8(%rbx,%rdx,8),%rcx
mulsd  (%rcx,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi,%rax,8)
add    $0x2,%rdx
cmp    %rdx,%r12
jne    1450 <pca_project+0x300>
test   $0x1,%r14b
je     1420 <pca_project+0x2d0>
movsd  0x0(%rbp,%rdx,8),%xmm1
mov    (%rbx,%rdx,8),%rcx
mulsd  (%rcx,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rax,8)
jmp    1420 <pca_project+0x2d0>
test   %r13d,%r13d
jle    14d2 <pca_project+0x382>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx,%r15,8),%rdi
call   1030 <free@plt>
add    $0x1,%r15
cmp    %r15,%r14
jne    14c0 <pca_project+0x370>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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