#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*/ alarm_test();
int /*<<< orphan*/ bufferpool_test();
int /*<<< orphan*/ dict_test();
int /*<<< orphan*/ log_close();
int /*<<< orphan*/ log_init(char *, int);
int /*<<< orphan*/ log_set_level(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ rbtree_random_test(int, int, int, int, int);
int /*<<< orphan*/ rbtree_stress_test(int);
int main() {
  log_init("test.log", 1);
  log_set_level(0);
  puts("rbtree_random_test");
  rbtree_random_test(10, 1000, 500, 500, 300);
  puts("rbtree_stress_test");
  rbtree_stress_test(100000);
  puts("dictionary_test");
  dict_test();
  puts("bufferpool_test");
  bufferpool_test();
  puts("alarm_test");
  alarm_test();
  log_close();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe5a(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
xor    %edi,%edi
call   1050 <log_set_level@plt>
lea    0xe4b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
mov    $0x3e8,%esi
mov    $0x1f4,%ecx
mov    $0x12c,%r8d
mov    %ecx,%edx
call   1090 <rbtree_random_test@plt>
lea    0xe36(%rip),%rdi
call   1040 <puts@plt>
mov    $0x186a0,%edi
call   1060 <rbtree_stress_test@plt>
lea    0xe33(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1070 <dict_test@plt>
lea    0xe30(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   10b0 <bufferpool_test@plt>
lea    0xe2d(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   10a0 <alarm_test@plt>
mov    $0x0,%al
call   1080 <log_close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe68(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
xor    %edi,%edi
call   1050 <log_set_level@plt>
lea    0xe59(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
mov    $0x3e8,%esi
mov    $0x1f4,%edx
mov    $0x1f4,%ecx
mov    $0x12c,%r8d
call   1090 <rbtree_random_test@plt>
lea    0xe41(%rip),%rdi
call   1040 <puts@plt>
mov    $0x186a0,%edi
call   1060 <rbtree_stress_test@plt>
lea    0xe3e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1070 <dict_test@plt>
lea    0xe3b(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10b0 <bufferpool_test@plt>
lea    0xe38(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10a0 <alarm_test@plt>
xor    %eax,%eax
call   1080 <log_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [19 x i8] c"rbtree_random_test\00"
@.str.2 = [19 x i8] c"rbtree_stress_test\00"
@.str.3 = [16 x i8] c"dictionary_test\00"
@.str.4 = [16 x i8] c"bufferpool_test\00"
@.str.5 = [11 x i8] c"alarm_test\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @log_init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @log_set_level(i32 0)
%4 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @rbtree_random_test(i32 10, i32 1000, i32 500, i32 500, i32 300)
%6 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @rbtree_stress_test(i32 100000)
%8 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (...) @dict_test()
%10 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (...) @bufferpool_test()
%12 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (...) @alarm_test()
%14 = call i32 (...) @log_close()
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [19 x i8] c"rbtree_random_test\00"
@.str.2 = [19 x i8] c"rbtree_stress_test\00"
@.str.3 = [16 x i8] c"dictionary_test\00"
@.str.4 = [16 x i8] c"bufferpool_test\00"
@.str.5 = [11 x i8] c"alarm_test\00"
define i32 @main() {
%1 = tail call i32 @log_init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @log_set_level(i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @rbtree_random_test(i32 10, i32 1000, i32 500, i32 500, i32 300)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @rbtree_stress_test(i32 100000)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (...) @dict_test()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (...) @bufferpool_test()
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 (...) @alarm_test()
%13 = tail call i32 (...) @log_close()
ret i32 0
}