#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_FAILURE;
int EXIT_SUCCESS;
scalar_t__ initredo();
scalar_t__ initui();
scalar_t__ loadsession();
scalar_t__ runui();
scalar_t__ savesession();
scalar_t__ setupgame();
int main(void) {
  return setupgame() && initredo() && loadsession() && initui() && runui() &&
                 savesession()
             ? EXIT_SUCCESS
             : EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <setupgame@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    $0x0,%al
call   1060 <initredo@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    $0x0,%al
call   1080 <loadsession@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    $0x0,%al
call   1040 <initui@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    $0x0,%al
call   1050 <runui@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    $0x0,%al
call   1030 <savesession@plt>
cmp    $0x0,%rax
je     11e6 <main+0x86>
mov    0x2dfc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    11f2 <main+0x92>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <setupgame@plt>
test   %rax,%rax
je     11b2 <main+0x52>
xor    %eax,%eax
call   1060 <initredo@plt>
test   %rax,%rax
je     11b2 <main+0x52>
xor    %eax,%eax
call   1080 <loadsession@plt>
test   %rax,%rax
je     11b2 <main+0x52>
xor    %eax,%eax
call   1040 <initui@plt>
test   %rax,%rax
je     11b2 <main+0x52>
xor    %eax,%eax
call   1050 <runui@plt>
test   %rax,%rax
je     11b2 <main+0x52>
xor    %eax,%eax
call   1030 <savesession@plt>
test   %rax,%rax
je     11b2 <main+0x52>
mov    0x2e28(%rip),%rax
jmp    11b9 <main+0x59>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @setupgame()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %21
4: ; preds = %0
%5 = call i64 (...) @initredo()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = call i64 (...) @loadsession()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = call i64 (...) @initui()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = call i64 (...) @runui()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = call i64 (...) @savesession()
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* @EXIT_SUCCESS
br label %23
21: ; preds = %16, %13, %10, %7, %4, %0
%22 = load i32, i32* @EXIT_FAILURE
br label %23
23: ; preds = %21, %19
%24 = phi i32 [ %20, %19 ], [ %22, %21 ]
ret i32 %24
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @setupgame()
%2 = icmp eq i64 %1, 0
br i1 %2, label %18, label %3
3: ; preds = %0
%4 = tail call i64 (...) @initredo()
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3
%7 = tail call i64 (...) @loadsession()
%8 = icmp eq i64 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = tail call i64 (...) @initui()
%11 = icmp eq i64 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = tail call i64 (...) @runui()
%14 = icmp eq i64 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = tail call i64 (...) @savesession()
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15, %12, %9, %6, %3, %0
br label %19
19: ; preds = %15, %18
%20 = phi i32* [ @EXIT_FAILURE, %18 ], [ @EXIT_SUCCESS, %15 ]
%21 = load i32, i32* %20
ret i32 %21
}