#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 test_chunk_creation();
int test_complete_compression_and_decompression();
int test_no_chebyshev();
int test_no_compression();
int main(void) {
  int result;
  result = test_chunk_creation();
  if (result != 0)
    return result;
  result = test_no_compression();
  if (result != 0)
    return result;
  result = test_no_chebyshev();
  if (result != 0)
    return result;
  result = test_complete_compression_and_decompression();
  if (result != 0)
    return result;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_chunk_creation@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116e <main+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d2 <main+0x92>
mov    $0x0,%al
call   1030 <test_no_compression@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     118d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d2 <main+0x92>
mov    $0x0,%al
call   1050 <test_no_chebyshev@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11ac <main+0x6c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d2 <main+0x92>
mov    $0x0,%al
call   1060 <test_complete_compression_and_decompression@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11cb <main+0x8b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d2 <main+0x92>
movl   $0x0,-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_chunk_creation@plt>
test   %eax,%eax
jne    1162 <main+0x22>
xor    %eax,%eax
call   1030 <test_no_compression@plt>
test   %eax,%eax
jne    1162 <main+0x22>
xor    %eax,%eax
call   1050 <test_no_chebyshev@plt>
test   %eax,%eax
je     1164 <main+0x24>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1060 <test_complete_compression_and_decompression@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @test_chunk_creation()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %27
8: ; preds = %0
%9 = call i32 (...) @test_no_compression()
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i32, i32* %2
store i32 %13, i32* %1
br label %27
14: ; preds = %8
%15 = call i32 (...) @test_no_chebyshev()
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i32, i32* %2
store i32 %19, i32* %1
br label %27
20: ; preds = %14
%21 = call i32 (...) @test_complete_compression_and_decompression()
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* %2
store i32 %25, i32* %1
br label %27
26: ; preds = %20
store i32 0, i32* %1
br label %27
27: ; preds = %26, %24, %18, %12, %6
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_chunk_creation()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %11
3: ; preds = %0
%4 = tail call i32 (...) @test_no_compression()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i32 (...) @test_no_chebyshev()
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @test_complete_compression_and_decompression()
br label %11
11: ; preds = %9, %6, %3, %0
%12 = phi i32 [ %1, %0 ], [ %4, %3 ], [ %7, %6 ], [ %10, %9 ]
ret i32 %12
}