#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__ bl_mpmc_b_tests();
scalar_t__ bl_mpmc_bpm_tests();
scalar_t__ bl_mpmc_bt_tests();
scalar_t__ bl_mpsc_i_tests();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int failed = 0;
  if (bl_mpmc_bt_tests() != 0) {
    ++failed;
  }
  if (bl_mpmc_b_tests() != 0) {
    ++failed;
  }
  if (bl_mpmc_bpm_tests() != 0) {
    ++failed;
  }
  if (bl_mpsc_i_tests() != 0) {
    ++failed;
  }
  printf("\n[SUITE ERR ] %d suite(s)\n", failed);
  return failed;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <bl_mpmc_bt_tests@plt>
cmp    $0x0,%rax
je     1180 <main+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <bl_mpmc_b_tests@plt>
cmp    $0x0,%rax
je     119a <main+0x4a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <bl_mpmc_bpm_tests@plt>
cmp    $0x0,%rax
je     11b4 <main+0x64>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <bl_mpsc_i_tests@plt>
cmp    $0x0,%rax
je     11ce <main+0x7e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe28(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <bl_mpmc_bt_tests@plt>
xor    %r14d,%r14d
test   %rax,%rax
setne  %r14b
xor    %eax,%eax
call   1030 <bl_mpmc_b_tests@plt>
lea    0x1(%r14),%ebx
test   %rax,%rax
cmove  %r14d,%ebx
xor    %eax,%eax
call   1060 <bl_mpmc_bpm_tests@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
xor    %eax,%eax
call   1070 <bl_mpsc_i_tests@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
lea    0xe66(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0A[SUITE ERR ] %d suite(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 (...) @bl_mpmc_bt_tests()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %0
%9 = call i64 (...) @bl_mpmc_b_tests()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %8
%15 = call i64 (...) @bl_mpmc_bpm_tests()
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %14
%21 = call i64 (...) @bl_mpsc_i_tests()
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %26
26: ; preds = %23, %20
%27 = load i32, i32* %2
%28 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A[SUITE ERR ] %d suite(s)\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @bl_mpmc_bt_tests()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i64 (...) @bl_mpmc_b_tests()
%5 = icmp eq i64 %4, 0
%6 = select i1 %2, i32 2, i32 1
%7 = select i1 %5, i32 %3, i32 %6
%8 = tail call i64 (...) @bl_mpmc_bpm_tests()
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = tail call i64 (...) @bl_mpsc_i_tests()
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %11, %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 %15
}