#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;
int /*<<< orphan*/ mmp_trace_print(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
scalar_t__ test_create_destroy();
scalar_t__ test_insert_delete();
scalar_t__ test_insert_delete_2();
int main(void) {
  if (test_create_destroy() != 0 || test_insert_delete() != 0 ||
      test_insert_delete_2() != 0) {
    mmp_trace_print(stdout);
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_create_destroy@plt>
cmp    $0x0,%rax
jne    1182 <main+0x42>
mov    $0x0,%al
call   1050 <test_insert_delete@plt>
cmp    $0x0,%rax
jne    1182 <main+0x42>
mov    $0x0,%al
call   1060 <test_insert_delete_2@plt>
cmp    $0x0,%rax
je     11a1 <main+0x61>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1030 <mmp_trace_print@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11ad <main+0x6d>
mov    0x2e28(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_create_destroy@plt>
test   %rax,%rax
jne    1165 <main+0x25>
xor    %eax,%eax
call   1050 <test_insert_delete@plt>
test   %rax,%rax
jne    1165 <main+0x25>
xor    %eax,%eax
call   1060 <test_insert_delete_2@plt>
test   %rax,%rax
je     117e <main+0x3e>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1030 <mmp_trace_print@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
mov    0x2e4b(%rip),%rax
jmp    117a <main+0x3a>

LLVM IR (-O0):
@stdout = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_create_destroy()
%3 = icmp ne i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = call i64 (...) @test_insert_delete()
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i64 (...) @test_insert_delete_2()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7, %4, %0
%11 = load i32, i32* @stdout
%12 = call i32 @mmp_trace_print(i32 %11)
%13 = load i32, i32* @EXIT_FAILURE
store i32 %13, i32* %1
br label %16
14: ; preds = %7
%15 = load i32, i32* @EXIT_SUCCESS
store i32 %15, i32* %1
br label %16
16: ; preds = %14, %10
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@stdout = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @test_create_destroy()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i64 (...) @test_insert_delete()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i64 (...) @test_insert_delete_2()
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6, %3, %0
%10 = load i32, i32* @stdout
%11 = tail call i32 @mmp_trace_print(i32 %10)
br label %12
12: ; preds = %6, %9
%13 = phi i32* [ @EXIT_FAILURE, %9 ], [ @EXIT_SUCCESS, %6 ]
%14 = load i32, i32* %13
ret i32 %14
}