int inverse_of_matrix(double **a, double **b, int n) {
  int *index;
  int sign;
  int i, j;
  int not_singular;
  double *col;
  index = (int *)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",
      359, (n * sizeof(int)));
  col = (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",
      360, (n * sizeof(double)));
  not_singular = lu_decomposition(a, n, index, &sign);
  if (not_singular) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        col[j] = 0;
      col[i] = 1;
      lu_backsubstitution(a, n, index, col);
      for (j = 0; j < n; j++)
        b[j][i] = col[j];
    }
  }
  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",
       377, (index));
  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",
       378, (col));
  return not_singular;
}


x86 assembly (clang, -O0):
<inverse_of_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
lea    0xea6(%rip),%rdi
lea    0xeb1(%rip),%rsi
mov    $0x167,%edx
mov    $0x0,%al
call   1040 <Malloc@plt>
cltq
mov    %rax,-0x20(%rbp)
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
lea    0xe7e(%rip),%rdi
lea    0xe89(%rip),%rsi
mov    $0x168,%edx
mov    $0x0,%al
call   1040 <Malloc@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x0,%al
call   1050 <lu_decomposition@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     1290 <inverse_of_matrix+0x150>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    128b <inverse_of_matrix+0x14b>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    120a <inverse_of_matrix+0xca>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11e0 <inverse_of_matrix+0xa0>
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  0xde6(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    $0x0,%al
call   1030 <lu_backsubstitution@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1278 <inverse_of_matrix+0x138>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    123c <inverse_of_matrix+0xfc>
jmp    127d <inverse_of_matrix+0x13d>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11cd <inverse_of_matrix+0x8d>
jmp    1290 <inverse_of_matrix+0x150>
mov    -0x20(%rbp),%rcx
lea    0xd6d(%rip),%rdi
lea    0xd78(%rip),%rsi
mov    $0x179,%edx
mov    $0x0,%al
call   1060 <Free@plt>
mov    -0x38(%rbp),%rcx
lea    0xd4f(%rip),%rdi
lea    0xd5a(%rip),%rsi
mov    $0x17a,%edx
mov    $0x0,%al
call   1060 <Free@plt>
mov    -0x30(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse_of_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %edx,0x8(%rsp)
movslq %edx,%r13
lea    0x0(,%r13,4),%rcx
lea    0xe86(%rip),%rbp
lea    0xe91(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x167,%edx
xor    %eax,%eax
call   1040 <Malloc@plt>
movslq %eax,%r15
lea    0x0(,%r13,8),%rcx
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x168,%edx
xor    %eax,%eax
call   1040 <Malloc@plt>
movslq %eax,%rbp
lea    0x34(%rsp),%rcx
mov    %r14,0x28(%rsp)
mov    %r14,%rdi
mov    %r13d,%esi
mov    %r15,0x10(%rsp)
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <lu_decomposition@plt>
mov    %eax,0xc(%rsp)
test   %eax,%eax
je     130d <inverse_of_matrix+0x1bd>
cmpl   $0x0,0x8(%rsp)
jle    130d <inverse_of_matrix+0x1bd>
mov    0x8(%rsp),%r15d
lea    0x0(,%r15,8),%rax
mov    %rax,0x20(%rsp)
lea    -0x1(%r15),%rax
mov    %rax,0x18(%rsp)
mov    %r15d,%r14d
and    $0x3,%r14d
mov    %r15d,%r12d
and    $0xfffffffc,%r12d
xor    %r13d,%r13d
jmp    122d <inverse_of_matrix+0xdd>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13
cmp    %r15,%r13
je     130d <inverse_of_matrix+0x1bd>
mov    %rbp,%rdi
xor    %esi,%esi
mov    0x20(%rsp),%rdx
call   1060 <memset@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,0x0(%rbp,%r13,8)
mov    0x28(%rsp),%rdi
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1030 <lu_backsubstitution@plt>
cmpq   $0x3,0x18(%rsp)
jae    1270 <inverse_of_matrix+0x120>
xor    %eax,%eax
jmp    12cc <inverse_of_matrix+0x17c>
nop
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rax,8),%xmm0
mov    (%rbx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x8(%rbp,%rax,8),%xmm0
mov    0x8(%rbx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x10(%rbp,%rax,8),%xmm0
mov    0x10(%rbx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x18(%rbp,%rax,8),%xmm0
mov    0x18(%rbx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
add    $0x4,%rax
cmp    %rax,%r12
jne    1280 <inverse_of_matrix+0x130>
test   %r14,%r14
je     1220 <inverse_of_matrix+0xd0>
lea    (%rbx,%rax,8),%rcx
lea    0x0(,%rax,8),%rax
add    %rbp,%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rax,%rdx,8),%xmm0
mov    (%rcx,%rdx,8),%rsi
movsd  %xmm0,(%rsi,%r13,8)
add    $0x1,%rdx
cmp    %rdx,%r14
jne    12f0 <inverse_of_matrix+0x1a0>
jmp    1220 <inverse_of_matrix+0xd0>
lea    0xcec(%rip),%rbx
lea    0xcf7(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x179,%edx
mov    0x10(%rsp),%rcx
xor    %eax,%eax
call   1070 <Free@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x17a,%edx
mov    %rbp,%rcx
xor    %eax,%eax
call   1070 <Free@plt>
mov    0xc(%rsp),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__func__.inverse_of_matrix = [18 x i8] c"inverse_of_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 i32 @inverse_of_matrix(double** %0, double** %1, i32 %2) {
%4 = alloca double**
%5 = alloca double**
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
store double** %0, double*** %4
store double** %1, double*** %5
store i32 %2, i32* %6
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 359, i64 %15)
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store i32* %18, i32** %7
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = mul i64 %20, 8
%22 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 360, i64 %21)
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to double*
store double* %24, double** %12
%25 = load double**, double*** %4
%26 = load i32, i32* %6
%27 = load i32*, i32** %7
%28 = call i32 (double**, i32, i32*, i32*, ...) bitcast (i32 (...)* @lu_decomposition to i32 (double**, i32, i32*, i32*, ...)*)(double** %25, i32 %26, i32* %27, i32* %8)
store i32 %28, i32* %11
%29 = load i32, i32* %11
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %85
31: ; preds = %3
store i32 0, i32* %9
br label %32
32: ; preds = %81, %31
%33 = load i32, i32* %9
%34 = load i32, i32* %6
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %84
36: ; preds = %32
store i32 0, i32* %10
br label %37
37: ; preds = %46, %36
%38 = load i32, i32* %10
%39 = load i32, i32* %6
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %49
41: ; preds = %37
%42 = load double*, double** %12
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
store double 0.000000e+00, double* %45
br label %46
46: ; preds = %41
%47 = load i32, i32* %10
%48 = add nsw i32 %47, 1
store i32 %48, i32* %10
br label %37
49: ; preds = %37
%50 = load double*, double** %12
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double 1.000000e+00, double* %53
%54 = load double**, double*** %4
%55 = load i32, i32* %6
%56 = load i32*, i32** %7
%57 = load double*, double** %12
%58 = call i32 (double**, i32, i32*, double*, ...) bitcast (i32 (...)* @lu_backsubstitution to i32 (double**, i32, i32*, double*, ...)*)(double** %54, i32 %55, i32* %56, double* %57)
store i32 0, i32* %10
br label %59
59: ; preds = %77, %49
%60 = load i32, i32* %10
%61 = load i32, i32* %6
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %80
63: ; preds = %59
%64 = load double*, double** %12
%65 = load i32, i32* %10
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = load double**, double*** %5
%70 = load i32, i32* %10
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double*, double** %69, i64 %71
%73 = load double*, double** %72
%74 = load i32, i32* %9
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
store double %68, double* %76
br label %77
77: ; preds = %63
%78 = load i32, i32* %10
%79 = add nsw i32 %78, 1
store i32 %79, i32* %10
br label %59
80: ; preds = %59
br label %81
81: ; preds = %80
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 1
store i32 %83, i32* %9
br label %32
84: ; preds = %32
br label %85
85: ; preds = %84, %3
%86 = load i32*, i32** %7
%87 = call i32 (i8*, i8*, i32, i32*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i32*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 377, i32* %86)
%88 = load double*, double** %12
%89 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 378, double* %88)
%90 = load i32, i32* %11
ret i32 %90
}

LLVM IR (-O2):
@__func__.inverse_of_matrix = [18 x i8] c"inverse_of_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 i32 @inverse_of_matrix(double** %0, double** nocapture %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = sext i32 %2 to i64
%7 = shl nsw i64 %6, 2
%8 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 359, i64 %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = shl nsw i64 %6, 3
%12 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 360, i64 %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to double*
%15 = inttoptr i64 %13 to i8*
%16 = call i32 (double**, i32, i32*, i32*, ...) bitcast (i32 (...)* @lu_decomposition to i32 (double**, i32, i32*, i32*, ...)*)(double** %0, i32 %2, i32* %10, i32* %4)
%17 = icmp ne i32 %16, 0
%18 = icmp sgt i32 %2, 0
%19 = and i1 %17, %18
br i1 %19, label %20, label %77
20: ; preds = %3
%21 = zext i32 %2 to i64
%22 = shl nuw nsw i64 %21, 3
%23 = add nsw i64 %21, -1
%24 = and i64 %21, 3
%25 = icmp ult i64 %23, 3
%26 = and i64 %21, 4294967292
%27 = icmp eq i64 %24, 0
br label %28
28: ; preds = %74, %20
%29 = phi i64 [ 0, %20 ], [ %75, %74 ]
%30 = getelementptr inbounds double, double* %14, i64 %29
store double 1.000000e+00, double* %30
%31 = call i32 (double**, i32, i32*, double*, ...) bitcast (i32 (...)* @lu_backsubstitution to i32 (double**, i32, i32*, double*, ...)*)(double** %0, i32 %2, i32* %10, double* %14)
br i1 %25, label %61, label %32
32: ; preds = %28, %32
%33 = phi i64 [ %58, %32 ], [ 0, %28 ]
%34 = phi i64 [ %59, %32 ], [ 0, %28 ]
%35 = getelementptr inbounds double, double* %14, i64 %33
%36 = load double, double* %35
%37 = getelementptr inbounds double*, double** %1, i64 %33
%38 = load double*, double** %37
%39 = getelementptr inbounds double, double* %38, i64 %29
store double %36, double* %39
%40 = or i64 %33, 1
%41 = getelementptr inbounds double, double* %14, i64 %40
%42 = load double, double* %41
%43 = getelementptr inbounds double*, double** %1, i64 %40
%44 = load double*, double** %43
%45 = getelementptr inbounds double, double* %44, i64 %29
store double %42, double* %45
%46 = or i64 %33, 2
%47 = getelementptr inbounds double, double* %14, i64 %46
%48 = load double, double* %47
%49 = getelementptr inbounds double*, double** %1, i64 %46
%50 = load double*, double** %49
%51 = getelementptr inbounds double, double* %50, i64 %29
store double %48, double* %51
%52 = or i64 %33, 3
%53 = getelementptr inbounds double, double* %14, i64 %52
%54 = load double, double* %53
%55 = getelementptr inbounds double*, double** %1, i64 %52
%56 = load double*, double** %55
%57 = getelementptr inbounds double, double* %56, i64 %29
store double %54, double* %57
%58 = add nuw nsw i64 %33, 4
%59 = add i64 %34, 4
%60 = icmp eq i64 %59, %26
br i1 %60, label %61, label %32
61: ; preds = %32, %28
%62 = phi i64 [ 0, %28 ], [ %58, %32 ]
br i1 %27, label %74, label %63
63: ; preds = %61, %63
%64 = phi i64 [ %71, %63 ], [ %62, %61 ]
%65 = phi i64 [ %72, %63 ], [ 0, %61 ]
%66 = getelementptr inbounds double, double* %14, i64 %64
%67 = load double, double* %66
%68 = getelementptr inbounds double*, double** %1, i64 %64
%69 = load double*, double** %68
%70 = getelementptr inbounds double, double* %69, i64 %29
store double %67, double* %70
%71 = add nuw nsw i64 %64, 1
%72 = add i64 %65, 1
%73 = icmp eq i64 %72, %24
br i1 %73, label %74, label %63
74: ; preds = %63, %61
%75 = add nuw nsw i64 %29, 1
%76 = icmp eq i64 %75, %21
br i1 %76, label %77, label %28
77: ; preds = %74, %3
%78 = call i32 (i8*, i8*, i32, i32*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i32*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 377, i32* %10)
%79 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.inverse_of_matrix, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 378, double* %14)
ret i32 %16
}