int eigen_sym_core(double *mat, int n, double *eval) {
  double **a;
  int i, j;
  double *off_diag;
  a = (double **)malloc(n * sizeof(double *));
  for (i = 0; i < n; i++)
    a[i] = (double *)calloc(n, sizeof(double));
  off_diag = (double *)malloc(n * sizeof(double *));
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++)
      a[i][j] = mat[i * n + j];
  tred2(a, n, eval, off_diag);
  tqli(eval, off_diag, n, a);
  free(off_diag);
  for (i = n - 1; i >= 0; i--)
    free(a[i]);
  free(a);
  return 0;
}


x86 assembly (clang, -O0):
<eigen_sym_core>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movslq -0xc(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b2 <eigen_sym_core+0x62>
movslq -0xc(%rbp),%rdi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    117b <eigen_sym_core+0x2b>
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    1235 <eigen_sym_core+0xe5>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1222 <eigen_sym_core+0xd2>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%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    11dd <eigen_sym_core+0x8d>
jmp    1227 <eigen_sym_core+0xd7>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ca <eigen_sym_core+0x7a>
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1070 <tred2@plt>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <tqli@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     129c <eigen_sym_core+0x14c>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1273 <eigen_sym_core+0x123>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigen_sym_core>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,0x8(%rsp)
mov    %esi,%ebp
mov    %rdi,0x10(%rsp)
movslq %esi,%r13
lea    0x0(,%r13,8),%r14
mov    %r14,%rdi
call   1060 <malloc@plt>
mov    %rax,%r12
mov    %ebp,%r15d
test   %r13d,%r13d
jle    1400 <eigen_sym_core+0x2b0>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    $0x8,%esi
mov    %r13,%rdi
call   1050 <calloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1190 <eigen_sym_core+0x40>
mov    %r13,0x40(%rsp)
mov    %r14,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1469 <eigen_sym_core+0x319>
mov    %rbx,0x18(%rsp)
mov    %r15d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x38(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x30(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %eax,%esi
and    $0x3,%esi
and    $0xfffffffffffffffc,%rax
mov    %rax,0x20(%rsp)
mov    %r15d,%r10d
and    $0x3,%r10d
mov    0x10(%rsp),%rbx
lea    0x70(%rbx),%rcx
lea    0x10(%rbx),%rdx
mov    %rsi,0x28(%rsp)
shl    $0x5,%rsi
xor    %eax,%eax
mov    %rbx,%r13
jmp    123b <eigen_sym_core+0xeb>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
add    %r14,%rcx
add    %r14,%rdx
add    %r14,%r13
cmp    %r15,%rax
mov    0x10(%rsp),%rbx
je     13f4 <eigen_sym_core+0x2a4>
mov    (%r12,%rax,8),%r8
cmp    $0x4,%ebp
jae    1250 <eigen_sym_core+0x100>
xor    %r11d,%r11d
jmp    1360 <eigen_sym_core+0x210>
nopl   0x0(%rax)
mov    %ebp,%r9d
mov    %rax,%rdi
imul   0x40(%rsp),%rdi
lea    (%rdi,%r15,1),%rbp
lea    (%rbx,%rbp,8),%rbp
cmp    %rbp,%r8
jae    1290 <eigen_sym_core+0x140>
lea    (%rbx,%rdi,8),%rdi
lea    (%r8,%r15,8),%rbp
cmp    %rbp,%rdi
jae    1290 <eigen_sym_core+0x140>
xor    %r11d,%r11d
mov    %r9d,%ebp
jmp    1360 <eigen_sym_core+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpq   $0xc,0x30(%rsp)
jae    129c <eigen_sym_core+0x14c>
xor    %edi,%edi
jmp    1310 <eigen_sym_core+0x1c0>
mov    0x20(%rsp),%rbx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x70(%rcx,%rdi,8),%xmm0
movups -0x60(%rcx,%rdi,8),%xmm1
movups %xmm0,(%r8,%rdi,8)
movups %xmm1,0x10(%r8,%rdi,8)
movups -0x50(%rcx,%rdi,8),%xmm0
movups -0x40(%rcx,%rdi,8),%xmm1
movups %xmm0,0x20(%r8,%rdi,8)
movups %xmm1,0x30(%r8,%rdi,8)
movups -0x30(%rcx,%rdi,8),%xmm0
movups -0x20(%rcx,%rdi,8),%xmm1
movups %xmm0,0x40(%r8,%rdi,8)
movups %xmm1,0x50(%r8,%rdi,8)
movups -0x10(%rcx,%rdi,8),%xmm0
movups (%rcx,%rdi,8),%xmm1
movups %xmm0,0x60(%r8,%rdi,8)
movups %xmm1,0x70(%r8,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rbx
jne    12b0 <eigen_sym_core+0x160>
cmpq   $0x0,0x28(%rsp)
je     134b <eigen_sym_core+0x1fb>
lea    (%r8,%rdi,8),%rbx
add    $0x10,%rbx
lea    (%rdx,%rdi,8),%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movups -0x10(%rdi,%rbp,1),%xmm0
movups (%rdi,%rbp,1),%xmm1
movups %xmm0,-0x10(%rbx,%rbp,1)
movups %xmm1,(%rbx,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rsi
jne    1330 <eigen_sym_core+0x1e0>
mov    0x38(%rsp),%rdi
mov    %rdi,%r11
cmp    %r15,%rdi
mov    %r9d,%ebp
je     1220 <eigen_sym_core+0xd0>
nop
mov    %r11,%rdi
not    %rdi
add    %r15,%rdi
test   %r10,%r10
je     1397 <eigen_sym_core+0x247>
mov    %r10,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%r11,8),%xmm0
movsd  %xmm0,(%r8,%r11,8)
add    $0x1,%r11
add    $0xffffffffffffffff,%rbx
jne    1380 <eigen_sym_core+0x230>
cmp    $0x3,%rdi
jb     1220 <eigen_sym_core+0xd0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  -0x10(%rdx,%r11,8),%xmm0
movsd  %xmm0,(%r8,%r11,8)
movsd  -0x8(%rdx,%r11,8),%xmm0
movsd  %xmm0,0x8(%r8,%r11,8)
movsd  (%rdx,%r11,8),%xmm0
movsd  %xmm0,0x10(%r8,%r11,8)
movsd  0x8(%rdx,%r11,8),%xmm0
movsd  %xmm0,0x18(%r8,%r11,8)
add    $0x4,%r11
cmp    %r11,%r15
jne    13b0 <eigen_sym_core+0x260>
jmp    1220 <eigen_sym_core+0xd0>
mov    0x8(%rsp),%r14
mov    0x18(%rsp),%rbx
jmp    1410 <eigen_sym_core+0x2c0>
mov    %r14,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%r14
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1070 <tred2@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <tqli@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
test   %ebp,%ebp
jle    149a <eigen_sym_core+0x34a>
add    $0x1,%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x2(%r15),%eax
mov    (%r12,%rax,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%r15
cmp    $0x1,%r15
ja     1450 <eigen_sym_core+0x300>
jmp    149a <eigen_sym_core+0x34a>
mov    %r12,%rdi
mov    %ebp,%esi
mov    0x8(%rsp),%r14
mov    %r14,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1070 <tred2@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <tqli@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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