#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_allocate_from_free_chunk();
int /*<<< orphan*/ test_empty();
int /*<<< orphan*/ test_mark_then_allocate();
int main(int argc, char *argv[]) {
  printf("TESTING %s\n", "test_empty");
  test_empty();
  ;
  printf("TESTING %s\n", "test_mark_then_allocate");
  test_mark_then_allocate();
  ;
  printf("TESTING %s\n", "test_allocate_from_free_chunk");
  test_allocate_from_free_chunk();
  ;
  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    0xea3(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_empty@plt>
lea    0xe89(%rip),%rdi
lea    0xe99(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_mark_then_allocate@plt>
lea    0xe6f(%rip),%rdi
lea    0xe97(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <test_allocate_from_free_chunk@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <test_empty@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <test_mark_then_allocate@plt>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <test_allocate_from_free_chunk@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"TESTING %s\0A\00"
@.str.1 = [11 x i8] c"test_empty\00"
@.str.2 = [24 x i8] c"test_mark_then_allocate\00"
@.str.3 = [30 x i8] c"test_allocate_from_free_chunk\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
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (...) @test_empty()
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (...) @test_mark_then_allocate()
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (...) @test_allocate_from_free_chunk()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"TESTING %s\0A\00"
@.str.1 = [11 x i8] c"test_empty\00"
@.str.2 = [24 x i8] c"test_mark_then_allocate\00"
@.str.3 = [30 x i8] c"test_allocate_from_free_chunk\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 ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @test_empty()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @test_mark_then_allocate()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (...) @test_allocate_from_free_chunk()
ret i32 0
}