#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 EXIT_SUCCESS;
int /*<<< orphan*/ backtracking(int /*<<< orphan*/);
scalar_t__ carrega_grafo(char *);
int erro(char *);
int /*<<< orphan*/ imprime_tudo();
main(int argc, char **argv) {
  if (argc != 2)
    return erro("Especifique o nome do arquivo");
  if (carrega_grafo(argv[1]) != 0)
    return erro("Erro ao construir o grafo");
  if (!backtracking(0))
    return erro("Não consegui fazer backtracking");
  imprime_tudo();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1174 <main+0x34>
lea    0xe99(%rip),%rdi
call   1040 <erro@plt>
mov    %eax,-0x4(%rbp)
jmp    11d6 <main+0x96>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <carrega_grafo@plt>
cmp    $0x0,%rax
je     119f <main+0x5f>
lea    0xe8c(%rip),%rdi
call   1040 <erro@plt>
mov    %eax,-0x4(%rbp)
jmp    11d6 <main+0x96>
xor    %edi,%edi
call   1050 <backtracking@plt>
cmp    $0x0,%eax
jne    11c3 <main+0x83>
lea    0xe82(%rip),%rdi
call   1040 <erro@plt>
mov    %eax,-0x4(%rbp)
jmp    11d6 <main+0x96>
mov    $0x0,%al
call   1060 <imprime_tudo@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1161 <main+0x21>
mov    0x8(%rsi),%rdi
call   1030 <carrega_grafo@plt>
test   %rax,%rax
je     116e <main+0x2e>
lea    0xec3(%rip),%rdi
pop    %rax
jmp    1040 <erro@plt>
lea    0xe98(%rip),%rdi
pop    %rax
jmp    1040 <erro@plt>
xor    %edi,%edi
call   1050 <backtracking@plt>
test   %eax,%eax
je     118b <main+0x4b>
xor    %eax,%eax
call   1060 <imprime_tudo@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xea6(%rip),%rdi
pop    %rax
jmp    1040 <erro@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Especifique o nome do arquivo\00"
@.str.1 = [26 x i8] c"Erro ao construir o grafo\00"
@.str.2 = [33 x i8] c"N\C3\A3o consegui fazer backtracking\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @erro(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i32 %9, i32* %3
br label %26
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @carrega_grafo(i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 @erro(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i32 %17, i32* %3
br label %26
18: ; preds = %10
%19 = call i32 @backtracking(i32 0)
%20 = icmp ne i32 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = call i32 @erro(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store i32 %22, i32* %3
br label %26
23: ; preds = %18
%24 = call i32 (...) @imprime_tudo()
%25 = load i32, i32* @EXIT_SUCCESS
store i32 %25, i32* %3
br label %26
26: ; preds = %23, %21, %16, %8
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@.str = [30 x i8] c"Especifique o nome do arquivo\00"
@.str.1 = [26 x i8] c"Erro ao construir o grafo\00"
@.str.2 = [33 x i8] c"N\C3\A3o consegui fazer backtracking\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @erro(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %21
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @carrega_grafo(i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %6
%12 = tail call i32 @erro(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %21
13: ; preds = %6
%14 = tail call i32 @backtracking(i32 0)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @erro(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %21
18: ; preds = %13
%19 = tail call i32 (...) @imprime_tudo()
%20 = load i32, i32* @EXIT_SUCCESS
br label %21
21: ; preds = %18, %16, %11, %4
%22 = phi i32 [ %5, %4 ], [ %12, %11 ], [ %20, %18 ], [ %17, %16 ]
ret i32 %22
}