int solution_of_linear_equation(double **a, double *b, int n) {
  int *index;
  int sign;
  int not_singular;
  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",
      338, (n * sizeof(int)));
  not_singular = lu_decomposition(a, n, index, &sign);
  if (not_singular)
    lu_backsubstitution(a, n, index, b);
  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",
       345, (index));
  return not_singular;
}


x86 assembly (clang, -O0):
<solution_of_linear_equation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
lea    0xe9e(%rip),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x152,%edx
mov    $0x0,%al
call   1040 <Malloc@plt>
cltq
mov    %rax,-0x20(%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,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     11b4 <solution_of_linear_equation+0x74>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1030 <lu_backsubstitution@plt>
mov    -0x20(%rbp),%rcx
lea    0xe41(%rip),%rdi
lea    0xe56(%rip),%rsi
mov    $0x159,%edx
mov    $0x0,%al
call   1060 <Free@plt>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solution_of_linear_equation>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%r12
movslq %edx,%rbp
lea    0x0(,%rbp,4),%rcx
lea    0xe99(%rip),%rdi
lea    0xeae(%rip),%rsi
mov    $0x152,%edx
xor    %eax,%eax
call   1040 <Malloc@plt>
movslq %eax,%rbx
lea    0xc(%rsp),%rcx
mov    %r12,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <lu_decomposition@plt>
mov    %eax,%ebp
test   %eax,%eax
je     11aa <solution_of_linear_equation+0x6a>
mov    %r12,%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <lu_backsubstitution@plt>
lea    0xe4f(%rip),%rdi
lea    0xe64(%rip),%rsi
mov    $0x159,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1060 <Free@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__func__.solution_of_linear_equation = [28 x i8] c"solution_of_linear_equation\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 @solution_of_linear_equation(double** %0, double* %1, i32 %2) {
%4 = alloca double**
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store double** %0, double*** %4
store double* %1, double** %5
store i32 %2, i32* %6
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 4
%13 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.solution_of_linear_equation, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 338, i64 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store i32* %15, i32** %7
%16 = load double**, double*** %4
%17 = load i32, i32* %6
%18 = load i32*, i32** %7
%19 = call i32 (double**, i32, i32*, i32*, ...) bitcast (i32 (...)* @lu_decomposition to i32 (double**, i32, i32*, i32*, ...)*)(double** %16, i32 %17, i32* %18, i32* %8)
store i32 %19, i32* %9
%20 = load i32, i32* %9
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %3
%23 = load double**, double*** %4
%24 = load i32, i32* %6
%25 = load i32*, i32** %7
%26 = load double*, double** %5
%27 = call i32 (double**, i32, i32*, double*, ...) bitcast (i32 (...)* @lu_backsubstitution to i32 (double**, i32, i32*, double*, ...)*)(double** %23, i32 %24, i32* %25, double* %26)
br label %28
28: ; preds = %22, %3
%29 = load i32*, i32** %7
%30 = call i32 (i8*, i8*, i32, i32*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i32*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.solution_of_linear_equation, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 345, i32* %29)
%31 = load i32, i32* %9
ret i32 %31
}

LLVM IR (-O2):
@__func__.solution_of_linear_equation = [28 x i8] c"solution_of_linear_equation\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 @solution_of_linear_equation(double** %0, double* %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 ([28 x i8], [28 x i8]* @__func__.solution_of_linear_equation, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 338, i64 %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = call i32 (double**, i32, i32*, i32*, ...) bitcast (i32 (...)* @lu_decomposition to i32 (double**, i32, i32*, i32*, ...)*)(double** %0, i32 %2, i32* %10, i32* %4)
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %3
%14 = call i32 (double**, i32, i32*, double*, ...) bitcast (i32 (...)* @lu_backsubstitution to i32 (double**, i32, i32*, double*, ...)*)(double** %0, i32 %2, i32* %10, double* %1)
br label %15
15: ; preds = %13, %3
%16 = call i32 (i8*, i8*, i32, i32*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, i32*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.solution_of_linear_equation, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 345, i32* %10)
ret i32 %11
}