#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 */
scalar_t__ printf(char *);
scalar_t__ test_check_buffer_size();
scalar_t__ test_sms_decode();
scalar_t__ test_sms_encode();
int main() {
  return test_check_buffer_size() || test_sms_encode() || test_sms_decode() ||
         printf("ALL TESTS PASSED.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_check_buffer_size@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    11b0 <main+0x70>
mov    $0x0,%al
call   1050 <test_sms_encode@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    11b0 <main+0x70>
mov    $0x0,%al
call   1060 <test_sms_decode@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    11b0 <main+0x70>
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <test_check_buffer_size@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    117e <main+0x3e>
xor    %eax,%eax
call   1050 <test_sms_encode@plt>
test   %rax,%rax
jne    117e <main+0x3e>
xor    %eax,%eax
call   1060 <test_sms_decode@plt>
test   %rax,%rax
jne    117e <main+0x3e>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"ALL TESTS PASSED.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_check_buffer_size()
%3 = icmp ne i64 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %0
%5 = call i64 (...) @test_sms_encode()
%6 = icmp ne i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = call i64 (...) @test_sms_decode()
%9 = icmp ne i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = call i64 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %10, %7, %4, %0
%14 = phi i1 [ true, %7 ], [ true, %4 ], [ true, %0 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [19 x i8] c"ALL TESTS PASSED.\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @test_check_buffer_size()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0
%4 = tail call i64 (...) @test_sms_encode()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = tail call i64 (...) @test_sms_decode()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %9, %6, %3, %0
%14 = phi i32 [ 1, %6 ], [ 1, %3 ], [ 1, %0 ], [ %12, %9 ]
ret i32 %14
}