#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 */
scalar_t__ matrizes_iguais(double **, double **, int, int);
bool confere_fatoracao_lu(double **L, double **U, double **P, double **L_ok,
                          double **U_ok, double **P_ok, int dim) {
  return (matrizes_iguais(L, L_ok, dim, dim) &&
          matrizes_iguais(U, U_ok, dim, dim) &&
          matrizes_iguais(P, P_ok, dim, dim));
}


x86 assembly (clang, -O0):
<confere_fatoracao_lu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    0x10(%rbp),%ecx
call   1030 <matrizes_iguais@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x31(%rbp)
je     119a <confere_fatoracao_lu+0x8a>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    0x10(%rbp),%ecx
call   1030 <matrizes_iguais@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x31(%rbp)
je     119a <confere_fatoracao_lu+0x8a>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    0x10(%rbp),%ecx
call   1030 <matrizes_iguais@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confere_fatoracao_lu>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r12
mov    %rdx,%r15
mov    %rsi,%r13
mov    0x40(%rsp),%ebp
mov    %rcx,%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
call   1030 <matrizes_iguais@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1169 <confere_fatoracao_lu+0x59>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
call   1030 <matrizes_iguais@plt>
test   %rax,%rax
je     1169 <confere_fatoracao_lu+0x59>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
call   1030 <matrizes_iguais@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @confere_fatoracao_lu(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i32 %6) {
%8 = alloca double**
%9 = alloca double**
%10 = alloca double**
%11 = alloca double**
%12 = alloca double**
%13 = alloca double**
%14 = alloca i32
store double** %0, double*** %8
store double** %1, double*** %9
store double** %2, double*** %10
store double** %3, double*** %11
store double** %4, double*** %12
store double** %5, double*** %13
store i32 %6, i32* %14
%15 = load double**, double*** %8
%16 = load double**, double*** %11
%17 = load i32, i32* %14
%18 = load i32, i32* %14
%19 = call i64 @matrizes_iguais(double** %15, double** %16, i32 %17, i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %35
21: ; preds = %7
%22 = load double**, double*** %9
%23 = load double**, double*** %12
%24 = load i32, i32* %14
%25 = load i32, i32* %14
%26 = call i64 @matrizes_iguais(double** %22, double** %23, i32 %24, i32 %25)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %21
%29 = load double**, double*** %10
%30 = load double**, double*** %13
%31 = load i32, i32* %14
%32 = load i32, i32* %14
%33 = call i64 @matrizes_iguais(double** %29, double** %30, i32 %31, i32 %32)
%34 = icmp ne i64 %33, 0
br label %35
35: ; preds = %28, %21, %7
%36 = phi i1 [ false, %21 ], [ false, %7 ], [ %34, %28 ]
%37 = zext i1 %36 to i32
ret i32 %37
}

LLVM IR (-O2):
define i32 @confere_fatoracao_lu(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i32 %6) {
%8 = tail call i64 @matrizes_iguais(double** %0, double** %3, i32 %6, i32 %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %7
%11 = tail call i64 @matrizes_iguais(double** %1, double** %4, i32 %6, i32 %6)
%12 = icmp eq i64 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %10
%14 = tail call i64 @matrizes_iguais(double** %2, double** %5, i32 %6, i32 %6)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %13, %10, %7
%18 = phi i32 [ 0, %10 ], [ 0, %7 ], [ %16, %13 ]
ret i32 %18
}