void eigen_solution_of_symmetric_matrix(double **a, double *eig_val, int n,
                                        const char *prompt) {
  double *e;
  int i, j;
  double temp;
  e = (double *)Malloc(
      __func__,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c",
      71, (n * sizeof(double)));
  make_symmetric_matrix_triangular(a, n, eig_val, e);
  eigen_solution_of_triangular_matrix(eig_val, e, n, a, prompt);
  Free(__func__,
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c",
       77, (e));
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) {
      temp = a[i][j];
      a[i][j] = a[j][i];
      a[j][i] = temp;
    }
  heap_sort(eig_val, a, n);
}


x86 assembly (clang, -O0):
<eigen_solution_of_symmetric_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
lea    0xe8a(%rip),%rdi
lea    0xea6(%rip),%rsi
mov    $0x47,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x0,%al
call   1070 <make_symmetric_matrix_triangular@plt>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x0,%al
call   1050 <eigen_solution_of_triangular_matrix@plt>
mov    -0x28(%rbp),%rcx
lea    0xe36(%rip),%rdi
lea    0xe52(%rip),%rsi
mov    $0x4d,%edx
mov    $0x0,%al
call   1060 <Free@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1284 <eigen_solution_of_symmetric_matrix+0x134>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1271 <eigen_solution_of_symmetric_matrix+0x121>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11f9 <eigen_solution_of_symmetric_matrix+0xa9>
jmp    1276 <eigen_solution_of_symmetric_matrix+0x126>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11e4 <eigen_solution_of_symmetric_matrix+0x94>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <heap_sort@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigen_solution_of_symmetric_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r12
mov    %edx,%ebx
mov    %rsi,%rbp
mov    %rdi,%r14
movslq %edx,%r15
lea    0x0(,%r15,8),%rcx
lea    0xe88(%rip),%rdi
lea    0xea4(%rip),%rsi
mov    $0x47,%edx
xor    %eax,%eax
call   1030 <Malloc@plt>
movslq %eax,%r13
mov    %r14,%rdi
mov    %r15d,%esi
mov    %rbp,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1070 <make_symmetric_matrix_triangular@plt>
mov    %rbp,(%rsp)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1050 <eigen_solution_of_triangular_matrix@plt>
lea    0xe3e(%rip),%rdi
lea    0xe5a(%rip),%rsi
mov    $0x4d,%edx
mov    %r13,%rcx
xor    %eax,%eax
call   1060 <Free@plt>
mov    %ebx,%edx
test   %r15d,%r15d
jle    1243 <eigen_solution_of_symmetric_matrix+0xf3>
mov    %edx,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
mov    %r14,%rsi
jmp    11fd <eigen_solution_of_symmetric_matrix+0xad>
nopl   (%rax)
add    $0x8,%rsi
add    $0xffffffffffffffff,%rcx
cmp    %r8,%r9
je     1243 <eigen_solution_of_symmetric_matrix+0xf3>
mov    %r9,%rdi
add    $0x1,%r9
cmp    %r15,%r9
jge    11f0 <eigen_solution_of_symmetric_matrix+0xa0>
lea    0x0(,%rdi,8),%rbx
add    (%r14,%rdi,8),%rbx
mov    $0x1,%ebp
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm0
mov    (%rsi,%rbp,8),%rax
movsd  (%rax,%rdi,8),%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  %xmm0,(%rax,%rdi,8)
add    $0x1,%rbp
cmp    %rbp,%rcx
jne    1220 <eigen_solution_of_symmetric_matrix+0xd0>
jmp    11f0 <eigen_solution_of_symmetric_matrix+0xa0>
mov    (%rsp),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <heap_sort@plt>

LLVM IR (-O0):
@__func__.eigen_solution_of_symmetric_matrix = [35 x i8] c"eigen_solution_of_symmetric_matrix\00"
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c\00"
define void @eigen_solution_of_symmetric_matrix(double** %0, double* %1, i32 %2, i8* %3) {
%5 = alloca double**
%6 = alloca double*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
store double** %0, double*** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 8
%16 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.eigen_solution_of_symmetric_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 71, i64 %15)
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to double*
store double* %18, double** %9
%19 = load double**, double*** %5
%20 = load i32, i32* %7
%21 = load double*, double** %6
%22 = load double*, double** %9
%23 = call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @make_symmetric_matrix_triangular to i32 (double**, i32, double*, double*, ...)*)(double** %19, i32 %20, double* %21, double* %22)
%24 = load double*, double** %6
%25 = load double*, double** %9
%26 = load i32, i32* %7
%27 = load double**, double*** %5
%28 = load i8*, i8** %8
%29 = call i32 (double*, double*, i32, double**, i8*, ...) bitcast (i32 (...)* @eigen_solution_of_triangular_matrix to i32 (double*, double*, i32, double**, i8*, ...)*)(double* %24, double* %25, i32 %26, double** %27, i8* %28)
%30 = load double*, double** %9
%31 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.eigen_solution_of_symmetric_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 77, double* %30)
store i32 0, i32* %10
br label %32
32: ; preds = %83, %4
%33 = load i32, i32* %10
%34 = load i32, i32* %7
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %86
36: ; preds = %32
%37 = load i32, i32* %10
%38 = add nsw i32 %37, 1
store i32 %38, i32* %11
br label %39
39: ; preds = %79, %36
%40 = load i32, i32* %11
%41 = load i32, i32* %7
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %82
43: ; preds = %39
%44 = load double**, double*** %5
%45 = load i32, i32* %10
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double*, double** %44, i64 %46
%48 = load double*, double** %47
%49 = load i32, i32* %11
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
%52 = load double, double* %51
store double %52, double* %12
%53 = load double**, double*** %5
%54 = load i32, i32* %11
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double*, double** %53, i64 %55
%57 = load double*, double** %56
%58 = load i32, i32* %10
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
%61 = load double, double* %60
%62 = load double**, double*** %5
%63 = load i32, i32* %10
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double*, double** %62, i64 %64
%66 = load double*, double** %65
%67 = load i32, i32* %11
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double %61, double* %69
%70 = load double, double* %12
%71 = load double**, double*** %5
%72 = load i32, i32* %11
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double*, double** %71, i64 %73
%75 = load double*, double** %74
%76 = load i32, i32* %10
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
store double %70, double* %78
br label %79
79: ; preds = %43
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %39
82: ; preds = %39
br label %83
83: ; preds = %82
%84 = load i32, i32* %10
%85 = add nsw i32 %84, 1
store i32 %85, i32* %10
br label %32
86: ; preds = %32
%87 = load double*, double** %6
%88 = load double**, double*** %5
%89 = load i32, i32* %7
%90 = call i32 (double*, double**, i32, ...) bitcast (i32 (...)* @heap_sort to i32 (double*, double**, i32, ...)*)(double* %87, double** %88, i32 %89)
ret void
}

LLVM IR (-O2):
@__func__.eigen_solution_of_symmetric_matrix = [35 x i8] c"eigen_solution_of_symmetric_matrix\00"
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c\00"
define void @eigen_solution_of_symmetric_matrix(double** %0, double* %1, i32 %2, i8* %3) {
%5 = sext i32 %2 to i64
%6 = shl nsw i64 %5, 3
%7 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.eigen_solution_of_symmetric_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 71, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to double*
%10 = tail call i32 (double**, i32, double*, double*, ...) bitcast (i32 (...)* @make_symmetric_matrix_triangular to i32 (double**, i32, double*, double*, ...)*)(double** %0, i32 %2, double* %1, double* %9)
%11 = tail call i32 (double*, double*, i32, double**, i8*, ...) bitcast (i32 (...)* @eigen_solution_of_triangular_matrix to i32 (double*, double*, i32, double**, i8*, ...)*)(double* %1, double* %9, i32 %2, double** %0, i8* %3)
%12 = tail call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.eigen_solution_of_symmetric_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 77, double* %9)
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %37
14: ; preds = %4
%15 = zext i32 %2 to i64
br label %19
16: ; preds = %27, %19
%17 = add nuw nsw i64 %21, 1
%18 = icmp eq i64 %22, %15
br i1 %18, label %37, label %19
19: ; preds = %14, %16
%20 = phi i64 [ 0, %14 ], [ %22, %16 ]
%21 = phi i64 [ 1, %14 ], [ %17, %16 ]
%22 = add nuw nsw i64 %20, 1
%23 = icmp slt i64 %22, %5
br i1 %23, label %24, label %16
24: ; preds = %19
%25 = getelementptr inbounds double*, double** %0, i64 %20
%26 = load double*, double** %25
br label %27
27: ; preds = %24, %27
%28 = phi i64 [ %21, %24 ], [ %35, %27 ]
%29 = getelementptr inbounds double, double* %26, i64 %28
%30 = load double, double* %29
%31 = getelementptr inbounds double*, double** %0, i64 %28
%32 = load double*, double** %31
%33 = getelementptr inbounds double, double* %32, i64 %20
%34 = load double, double* %33
store double %34, double* %29
store double %30, double* %33
%35 = add nuw nsw i64 %28, 1
%36 = icmp eq i64 %35, %15
br i1 %36, label %16, label %27
37: ; preds = %16, %4
%38 = tail call i32 (double*, double**, i32, ...) bitcast (i32 (...)* @heap_sort to i32 (double*, double**, i32, ...)*)(double* %1, double** %0, i32 %2)
ret void
}