#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 *, char *);
int /*<<< orphan*/ test_empty_tree();
int /*<<< orphan*/ test_insert_duplicate();
int /*<<< orphan*/ test_insert_null();
int /*<<< orphan*/ test_invalid();
int /*<<< orphan*/ test_lookup();
int main(int argc, char *argv[]) {
  do {
    printf("RUNNING %s\n", "test_insert_null");
    test_insert_null();
  } while (0);
  do {
    printf("RUNNING %s\n", "test_empty_tree");
    test_empty_tree();
  } while (0);
  do {
    printf("RUNNING %s\n", "test_insert_duplicate");
    test_insert_duplicate();
  } while (0);
  do {
    printf("RUNNING %s\n", "test_lookup");
    test_lookup();
  } while (0);
  do {
    printf("RUNNING %s\n", "test_invalid");
    test_invalid();
  } while (0);
  return 0;
}


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)
lea    0xe83(%rip),%rdi
lea    0xe88(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <test_insert_null@plt>
jmp    1195 <main+0x35>
lea    0xe64(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <test_empty_tree@plt>
jmp    11b4 <main+0x54>
lea    0xe45(%rip),%rdi
lea    0xe6b(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_insert_duplicate@plt>
jmp    11d3 <main+0x73>
lea    0xe26(%rip),%rdi
lea    0xe62(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <test_lookup@plt>
jmp    11f2 <main+0x92>
lea    0xe07(%rip),%rdi
lea    0xe4f(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_invalid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe98(%rip),%rbx
lea    0xe9d(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <test_insert_null@plt>
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <test_empty_tree@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <test_insert_duplicate@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <test_lookup@plt>
lea    0xe88(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <test_invalid@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"RUNNING %s\0A\00"
@.str.1 = [17 x i8] c"test_insert_null\00"
@.str.2 = [16 x i8] c"test_empty_tree\00"
@.str.3 = [22 x i8] c"test_insert_duplicate\00"
@.str.4 = [12 x i8] c"test_lookup\00"
@.str.5 = [13 x i8] c"test_invalid\00"
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
br label %6
6: ; preds = %2
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @test_insert_null()
br label %9
9: ; preds = %6
br label %10
10: ; preds = %9
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (...) @test_empty_tree()
br label %13
13: ; preds = %10
br label %14
14: ; preds = %13
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (...) @test_insert_duplicate()
br label %17
17: ; preds = %14
br label %18
18: ; preds = %17
%19 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 (...) @test_lookup()
br label %21
21: ; preds = %18
br label %22
22: ; preds = %21
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%24 = call i32 (...) @test_invalid()
br label %25
25: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"RUNNING %s\0A\00"
@.str.1 = [17 x i8] c"test_insert_null\00"
@.str.2 = [16 x i8] c"test_empty_tree\00"
@.str.3 = [22 x i8] c"test_insert_duplicate\00"
@.str.4 = [12 x i8] c"test_lookup\00"
@.str.5 = [13 x i8] c"test_invalid\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @test_insert_null()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @test_empty_tree()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (...) @test_insert_duplicate()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (...) @test_lookup()
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 (...) @test_invalid()
ret i32 0
}