#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*/ printf(char *, int);
int test_binary_tree();
int test_graph();
int test_hashtable();
int test_linkedlist();
int test_queue();
int test_stack();
int main() {
  int error = test_binary_tree();
  if (error)
    printf("Test %d failed for Binary Tree!", error);
  error = test_graph();
  if (error)
    printf("Test %d failed for Graph", error);
  error = test_hashtable();
  if (error)
    printf("Test %d failed for Hash Table", error);
  error = test_linkedlist();
  if (error)
    printf("Test %d failed for Linked List", error);
  error = test_queue();
  if (error)
    printf("Test %d failed for Queue", error);
  error = test_stack();
  if (error)
    printf("Test %d failed for Stack", error);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_binary_tree@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a2 <main+0x32>
mov    -0x8(%rbp),%esi
lea    0xe63(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_graph@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11c5 <main+0x55>
mov    -0x8(%rbp),%esi
lea    0xe60(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <test_hashtable@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11e8 <main+0x78>
mov    -0x8(%rbp),%esi
lea    0xe56(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <test_linkedlist@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     120b <main+0x9b>
mov    -0x8(%rbp),%esi
lea    0xe51(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_queue@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     122e <main+0xbe>
mov    -0x8(%rbp),%esi
lea    0xe4d(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <test_stack@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1251 <main+0xe1>
mov    -0x8(%rbp),%esi
lea    0xe43(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_binary_tree@plt>
test   %eax,%eax
je     118a <main+0x1a>
lea    0xe7d(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <test_graph@plt>
test   %eax,%eax
je     11a3 <main+0x33>
lea    0xe84(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <test_hashtable@plt>
test   %eax,%eax
je     11bc <main+0x4c>
lea    0xe84(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <test_linkedlist@plt>
test   %eax,%eax
je     11d5 <main+0x65>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <test_queue@plt>
test   %eax,%eax
je     11ee <main+0x7e>
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <test_stack@plt>
test   %eax,%eax
je     1207 <main+0x97>
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Test %d failed for Binary Tree!\00"
@.str.1 = [25 x i8] c"Test %d failed for Graph\00"
@.str.2 = [30 x i8] c"Test %d failed for Hash Table\00"
@.str.3 = [31 x i8] c"Test %d failed for Linked List\00"
@.str.4 = [25 x i8] c"Test %d failed for Queue\00"
@.str.5 = [25 x i8] c"Test %d failed for Stack\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @test_binary_tree()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %0
%10 = call i32 (...) @test_graph()
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %9
%17 = call i32 (...) @test_hashtable()
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %16
%24 = call i32 (...) @test_linkedlist()
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* %2
%29 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %27, %23
%31 = call i32 (...) @test_queue()
store i32 %31, i32* %2
%32 = load i32, i32* %2
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = load i32, i32* %2
%36 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %34, %30
%38 = call i32 (...) @test_stack()
store i32 %38, i32* %2
%39 = load i32, i32* %2
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = load i32, i32* %2
%43 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %41, %37
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Test %d failed for Binary Tree!\00"
@.str.1 = [25 x i8] c"Test %d failed for Graph\00"
@.str.2 = [30 x i8] c"Test %d failed for Hash Table\00"
@.str.3 = [31 x i8] c"Test %d failed for Linked List\00"
@.str.4 = [25 x i8] c"Test %d failed for Queue\00"
@.str.5 = [25 x i8] c"Test %d failed for Stack\00"
define i32 @main() {
%1 = tail call i32 (...) @test_binary_tree()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 (...) @test_graph()
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %10
10: ; preds = %8, %5
%11 = tail call i32 (...) @test_hashtable()
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %15
15: ; preds = %13, %10
%16 = tail call i32 (...) @test_linkedlist()
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %20
20: ; preds = %18, %15
%21 = tail call i32 (...) @test_queue()
%22 = icmp eq i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %21)
br label %25
25: ; preds = %23, %20
%26 = tail call i32 (...) @test_stack()
%27 = icmp eq i32 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %26)
br label %30
30: ; preds = %28, %25
ret i32 0
}