#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 *);
int pthread_create_join_test();
int pthread_mutex_performance();
int pthread_setaffinity_test();
int main(int argc, char **argv) {
  int r = 0;
  r = pthread_mutex_performance();
  if (r != 0) {
    ;
  }
  r = pthread_setaffinity_test();
  if (r != 0) {
    ;
  }
  r = pthread_create_join_test();
  if (r != 0) {
    ;
  }
  printf("TESTS PASSED\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <pthread_mutex_performance@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1176 <main+0x36>
jmp    1176 <main+0x36>
mov    $0x0,%al
call   1050 <pthread_setaffinity_test@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     118f <main+0x4f>
jmp    118f <main+0x4f>
mov    $0x0,%al
call   1060 <pthread_create_join_test@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11a8 <main+0x68>
jmp    11a8 <main+0x68>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_mutex_performance@plt>
xor    %eax,%eax
call   1050 <pthread_setaffinity_test@plt>
xor    %eax,%eax
call   1060 <pthread_create_join_test@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"TESTS PASSED\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 (...) @pthread_mutex_performance()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %2
%12 = call i32 (...) @pthread_setaffinity_test()
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
br label %16
16: ; preds = %15, %11
%17 = call i32 (...) @pthread_create_join_test()
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
br label %21
21: ; preds = %20, %16
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"TESTS PASSED\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pthread_mutex_performance()
%4 = tail call i32 (...) @pthread_setaffinity_test()
%5 = tail call i32 (...) @pthread_create_join_test()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}