#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 okn_array_test();
int okn_carray_test();
int okn_list_test();
int okn_logger_test();
int okn_test();
int okn_thread_test();
int test(void) {
  int ret;
  ret = okn_list_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  ret = okn_array_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  ret = okn_carray_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  ret = okn_thread_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  ret = okn_logger_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  ret = okn_test();
  if (((ret) < 0)) {
    ;
    return ret;
  };
  return 1;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <okn_list_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1187 <test+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
mov    $0x0,%al
call   1050 <okn_array_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11a6 <test+0x46>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
mov    $0x0,%al
call   1070 <okn_carray_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11c5 <test+0x65>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
mov    $0x0,%al
call   1040 <okn_thread_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11e4 <test+0x84>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
mov    $0x0,%al
call   1030 <okn_logger_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1203 <test+0xa3>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
mov    $0x0,%al
call   1080 <okn_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1222 <test+0xc2>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <test+0xc9>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1060 <okn_list_test@plt>
test   %eax,%eax
js     11ab <test+0x4b>
xor    %eax,%eax
call   1050 <okn_array_test@plt>
test   %eax,%eax
js     11ab <test+0x4b>
xor    %eax,%eax
call   1070 <okn_carray_test@plt>
test   %eax,%eax
js     11ab <test+0x4b>
xor    %eax,%eax
call   1040 <okn_thread_test@plt>
test   %eax,%eax
js     11ab <test+0x4b>
xor    %eax,%eax
call   1030 <okn_logger_test@plt>
test   %eax,%eax
js     11ab <test+0x4b>
xor    %eax,%eax
call   1080 <okn_test@plt>
mov    %eax,%ecx
test   %eax,%eax
mov    $0x1,%eax
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @okn_list_test()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt 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 %39
8: ; preds = %0
%9 = call i32 (...) @okn_array_test()
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp slt 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 %39
14: ; preds = %8
%15 = call i32 (...) @okn_carray_test()
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = icmp slt 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 %39
20: ; preds = %14
%21 = call i32 (...) @okn_thread_test()
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = icmp slt 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 %39
26: ; preds = %20
%27 = call i32 (...) @okn_logger_test()
store i32 %27, i32* %2
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = load i32, i32* %2
store i32 %31, i32* %1
br label %39
32: ; preds = %26
%33 = call i32 (...) @okn_test()
store i32 %33, i32* %2
%34 = load i32, i32* %2
%35 = icmp slt i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32, i32* %2
store i32 %37, i32* %1
br label %39
38: ; preds = %32
store i32 1, i32* %1
br label %39
39: ; preds = %38, %36, %30, %24, %18, %12, %6
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @okn_list_test()
%2 = icmp slt i32 %1, 0
br i1 %2, label %19, label %3
3: ; preds = %0
%4 = tail call i32 (...) @okn_array_test()
%5 = icmp slt i32 %4, 0
br i1 %5, label %19, label %6
6: ; preds = %3
%7 = tail call i32 (...) @okn_carray_test()
%8 = icmp slt i32 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %6
%10 = tail call i32 (...) @okn_thread_test()
%11 = icmp slt i32 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %9
%13 = tail call i32 (...) @okn_logger_test()
%14 = icmp slt i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = tail call i32 (...) @okn_test()
%17 = icmp slt i32 %16, 0
%18 = select i1 %17, i32 %16, i32 1
br label %19
19: ; preds = %15, %12, %9, %6, %3, %0
%20 = phi i32 [ %1, %0 ], [ %4, %3 ], [ %7, %6 ], [ %10, %9 ], [ %13, %12 ], [ %18, %15 ]
ret i32 %20
}