#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ display_result(int, double **);
int /*<<< orphan*/ eval_args(int, char **);
int /*<<< orphan*/ fill_matrix(int, double **);
int get_nou();
int /*<<< orphan*/ solve_matrix(int, double **);
int main(int argc, char *argv[]) {
  if (argc > 0) {
    eval_args(argc, argv);
  }
  int nou = get_nou();
  double mat[nou][nou + 1];
  fill_matrix(nou, mat);
  solve_matrix(nou, mat);
  display_result(nou, mat);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    117c <main+0x2c>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <eval_args@plt>
xor    %eax,%eax
call   1070 <get_nou@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %rsp,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rsi
sub    %rdx,%rsi
mov    %rsi,-0x38(%rbp)
mov    %rsi,%rsp
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <fill_matrix@plt>
mov    -0x38(%rbp),%rsi
mov    -0x14(%rbp),%edi
call   1050 <solve_matrix@plt>
mov    -0x38(%rbp),%rsi
mov    -0x14(%rbp),%edi
call   1060 <display_result@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1160 <main+0x10>
call   1040 <eval_args@plt>
xor    %eax,%eax
call   1070 <get_nou@plt>
mov    %eax,%r14d
mov    %eax,%eax
lea    0x1(%r14),%ecx
imul   %rax,%rcx
lea    0xf(,%rcx,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r14d,%edi
mov    %rbx,%rsi
call   1030 <fill_matrix@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
call   1050 <solve_matrix@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
call   1060 <display_result@plt>
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @eval_args(i32 %13, i8** %14)
br label %16
16: ; preds = %12, %2
%17 = call i32 (...) @get_nou()
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = zext i32 %18 to i64
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
%22 = zext i32 %21 to i64
%23 = call i8* @llvm.stacksave()
store i8* %23, i8** %7
%24 = mul nuw i64 %19, %22
%25 = alloca double, i64 %24
store i64 %19, i64* %8
store i64 %22, i64* %9
%26 = load i32, i32* %6
%27 = bitcast double* %25 to double**
%28 = call i32 @fill_matrix(i32 %26, double** %27)
%29 = load i32, i32* %6
%30 = bitcast double* %25 to double**
%31 = call i32 @solve_matrix(i32 %29, double** %30)
%32 = load i32, i32* %6
%33 = bitcast double* %25 to double**
%34 = call i32 @display_result(i32 %32, double** %33)
store i32 0, i32* %3
%35 = load i8*, i8** %7
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @eval_args(i32 %0, i8** %1)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 (...) @get_nou()
%8 = zext i32 %7 to i64
%9 = add nsw i32 %7, 1
%10 = zext i32 %9 to i64
%11 = mul nuw i64 %10, %8
%12 = alloca double*, i64 %11
%13 = call i32 @fill_matrix(i32 %7, double** %12)
%14 = call i32 @solve_matrix(i32 %7, double** %12)
%15 = call i32 @display_result(i32 %7, double** %12)
ret i32 0
}