#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*/ le_entrada(int *, double **, double *);
int /*<<< orphan*/ printf(char *);
int testa_cholesky(int, double **, double *, int /*<<< orphan*/,
                   int /*<<< orphan*/, int);
int main() {
  int n;
  double A[800][800];
  double b[800];
  int p[800];
  int ret;
  le_entrada(&n, A, b);
  printf("CHOL row:\n");
  ret = testa_cholesky(n, A, b, 0, 0, 1);
  if (ret == -1) {
    printf("A equacao nao pode ser resolvida.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e45a0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4e2010(%rbp),%rsi
lea    -0x4e3910(%rbp),%rdx
lea    -0x8(%rbp),%rdi
call   1030 <le_entrada@plt>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x4e2010(%rbp),%rsi
lea    -0x4e3910(%rbp),%rdx
xor    %r8d,%r8d
mov    $0x1,%r9d
mov    %r8d,%ecx
call   1050 <testa_cholesky@plt>
mov    %eax,-0x4e4594(%rbp)
cmpl   $0xffffffff,-0x4e4594(%rbp)
jne    11a6 <main+0x76>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x4e45a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x4e3918,%rsp
lea    0xc(%rsp),%rdi
lea    0x1910(%rsp),%rbx
lea    0x10(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <le_entrada@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%edi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1050 <testa_cholesky@plt>
cmp    $0xffffffff,%eax
jne    118e <main+0x5e>
lea    0xe81(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x4e3918,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"CHOL row:\0A\00"
@.str.1 = [35 x i8] c"A equacao nao pode ser resolvida.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [800 x [800 x double]]
%4 = alloca [800 x double]
%5 = alloca [800 x i32]
%6 = alloca i32
store i32 0, i32* %1
%7 = getelementptr inbounds [800 x [800 x double]], [800 x [800 x double]]* %3, i64 0, i64 0
%8 = bitcast [800 x double]* %7 to double**
%9 = getelementptr inbounds [800 x double], [800 x double]* %4, i64 0, i64 0
%10 = call i32 @le_entrada(i32* %2, double** %8, double* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = getelementptr inbounds [800 x [800 x double]], [800 x [800 x double]]* %3, i64 0, i64 0
%14 = bitcast [800 x double]* %13 to double**
%15 = getelementptr inbounds [800 x double], [800 x double]* %4, i64 0, i64 0
%16 = call i32 @testa_cholesky(i32 %12, double** %14, double* %15, i32 0, i32 0, i32 1)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %0
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"CHOL row:\00"
@str.2 = [34 x i8] c"A equacao nao pode ser resolvida.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [800 x [800 x double]]
%3 = alloca [800 x double]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [800 x [800 x double]]* %2 to i8*
%6 = bitcast [800 x double]* %3 to i8*
%7 = bitcast [800 x [800 x double]]* %2 to double**
%8 = getelementptr inbounds [800 x double], [800 x double]* %3, i64 0, i64 0
%9 = call i32 @le_entrada(i32* %1, double** %7, double* %8)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = call i32 @testa_cholesky(i32 %11, double** %7, double* %8, i32 0, i32 0, i32 1)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %0
ret i32 0
}