#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*/ Init();
int /*<<< orphan*/ printf(char *);
int testcase1();
int testcase2();
int testcase3();
int testcase4();
int main() {
  Init();
  if (testcase1() == 1)
    printf("\n testcase 1 complete. \n\n");
  else
    return -1;
  if (testcase2() == 1)
    printf("\n testcase 2 complete. \n\n");
  else
    return -1;
  if (testcase3() == 1)
    printf("\n testcase 3 complete. \n\n");
  else
    return -1;
  if (testcase4() == 1)
    printf("\n testcase 4 complete. \n\n");
  else
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <Init@plt>
mov    $0x0,%al
call   1060 <testcase1@plt>
cmp    $0x1,%eax
jne    1197 <main+0x37>
lea    0xe73(%rip),%rdi
call   1050 <printf@plt>
jmp    11a3 <main+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    1231 <main+0xd1>
mov    $0x0,%al
call   1030 <testcase2@plt>
cmp    $0x1,%eax
jne    11c4 <main+0x64>
lea    0xe60(%rip),%rdi
call   1050 <printf@plt>
jmp    11d0 <main+0x70>
movl   $0xffffffff,-0x4(%rbp)
jmp    1231 <main+0xd1>
mov    $0x0,%al
call   1070 <testcase3@plt>
cmp    $0x1,%eax
jne    11f1 <main+0x91>
lea    0xe4d(%rip),%rdi
call   1050 <printf@plt>
jmp    11fd <main+0x9d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1231 <main+0xd1>
mov    $0x0,%al
call   1040 <testcase4@plt>
cmp    $0x1,%eax
jne    121e <main+0xbe>
lea    0xe3a(%rip),%rdi
call   1050 <printf@plt>
jmp    122a <main+0xca>
movl   $0xffffffff,-0x4(%rbp)
jmp    1231 <main+0xd1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1080 <Init@plt>
xor    %eax,%eax
call   1060 <testcase1@plt>
mov    $0xffffffff,%ebx
cmp    $0x1,%eax
jne    11cf <main+0x6f>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <testcase2@plt>
cmp    $0x1,%eax
jne    11cf <main+0x6f>
lea    0xe81(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <testcase3@plt>
cmp    $0x1,%eax
jne    11cf <main+0x6f>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <testcase4@plt>
cmp    $0x1,%eax
jne    11cf <main+0x6f>
lea    0xe83(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0A testcase 1 complete. \0A\0A\00"
@.str.1 = [26 x i8] c"\0A testcase 2 complete. \0A\0A\00"
@.str.2 = [26 x i8] c"\0A testcase 3 complete. \0A\0A\00"
@.str.3 = [26 x i8] c"\0A testcase 4 complete. \0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Init()
%3 = call i32 (...) @testcase1()
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
7: ; preds = %0
store i32 -1, i32* %1
br label %27
8: ; preds = %5
%9 = call i32 (...) @testcase2()
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %14
13: ; preds = %8
store i32 -1, i32* %1
br label %27
14: ; preds = %11
%15 = call i32 (...) @testcase3()
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %20
19: ; preds = %14
store i32 -1, i32* %1
br label %27
20: ; preds = %17
%21 = call i32 (...) @testcase4()
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %26
25: ; preds = %20
store i32 -1, i32* %1
br label %27
26: ; preds = %23
store i32 0, i32* %1
br label %27
27: ; preds = %26, %25, %19, %13, %7
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@str = [25 x i8] c"\0A testcase 1 complete. \0A\00"
@str.4 = [25 x i8] c"\0A testcase 2 complete. \0A\00"
@str.5 = [25 x i8] c"\0A testcase 3 complete. \0A\00"
@str.6 = [25 x i8] c"\0A testcase 4 complete. \0A\00"
define i32 @main() {
%1 = tail call i32 (...) @Init()
%2 = tail call i32 (...) @testcase1()
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %18
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @testcase2()
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%10 = tail call i32 (...) @testcase3()
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0))
%14 = tail call i32 (...) @testcase4()
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0))
br label %18
18: ; preds = %12, %8, %4, %0, %16
%19 = phi i32 [ 0, %16 ], [ -1, %0 ], [ -1, %4 ], [ -1, %8 ], [ -1, %12 ]
ret i32 %19
}