#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_compress_binary();
int /*<<< orphan*/ test_compress_text();
int /*<<< orphan*/ test_decompress_binary();
int /*<<< orphan*/ test_decompress_text();
int /*<<< orphan*/ test_reversibility_binary();
int /*<<< orphan*/ test_reversibility_text();
int main(void) {
  printf("\n\n--- %s ---\n", "text compression");
  test_compress_text();
  printf("\n\n--- %s ---\n", "text decompression");
  test_decompress_text();
  printf("\n\n--- %s ---\n", "text reversibility");
  test_reversibility_text();
  printf("\n\n--- %s ---\n", "binary compression");
  test_compress_binary();
  printf("\n\n--- %s ---\n", "binary decompression");
  test_decompress_binary();
  printf("\n\n--- %s ---\n", "binary reversibility");
  test_reversibility_binary();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <test_compress_text@plt>
lea    0xe60(%rip),%rdi
lea    0xe78(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_decompress_text@plt>
lea    0xe46(%rip),%rdi
lea    0xe71(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <test_reversibility_text@plt>
lea    0xe2c(%rip),%rdi
lea    0xe6a(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <test_compress_binary@plt>
lea    0xe12(%rip),%rdi
lea    0xe63(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <test_decompress_binary@plt>
lea    0xdf8(%rip),%rdi
lea    0xe5e(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_reversibility_binary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe88(%rip),%rbx
lea    0xe8f(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <test_compress_text@plt>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <test_decompress_text@plt>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <test_reversibility_text@plt>
lea    0xe84(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <test_compress_binary@plt>
lea    0xe81(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <test_decompress_binary@plt>
lea    0xe80(%rip),%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <test_reversibility_binary@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\0A\0A--- %s ---\0A\00"
@.str.1 = [17 x i8] c"text compression\00"
@.str.2 = [19 x i8] c"text decompression\00"
@.str.3 = [19 x i8] c"text reversibility\00"
@.str.4 = [19 x i8] c"binary compression\00"
@.str.5 = [21 x i8] c"binary decompression\00"
@.str.6 = [21 x i8] c"binary reversibility\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @test_compress_text()
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @test_decompress_text()
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (...) @test_reversibility_text()
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (...) @test_compress_binary()
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (...) @test_decompress_binary()
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (...) @test_reversibility_binary()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0A\0A--- %s ---\0A\00"
@.str.1 = [17 x i8] c"text compression\00"
@.str.2 = [19 x i8] c"text decompression\00"
@.str.3 = [19 x i8] c"text reversibility\00"
@.str.4 = [19 x i8] c"binary compression\00"
@.str.5 = [21 x i8] c"binary decompression\00"
@.str.6 = [21 x i8] c"binary reversibility\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_compress_text()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @test_decompress_text()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (...) @test_reversibility_text()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (...) @test_compress_binary()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i32 (...) @test_decompress_binary()
%11 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 (...) @test_reversibility_binary()
ret i32 0
}