#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 *, char *);
scalar_t__ spsc_new_fail();
scalar_t__ spsc_new_pass();
scalar_t__ spsc_trypop_slot_pass();
scalar_t__ spsc_trypush_slot_pass();
int main() {
  if (spsc_new_pass())
    printf("PASS: %s\n", "spsc_new_pass()");
  else
    printf("FAIL: %s\n", "spsc_new_pass()");
  ;
  if (spsc_new_fail())
    printf("PASS: %s\n", "spsc_new_fail()");
  else
    printf("FAIL: %s\n", "spsc_new_fail()");
  ;
  if (spsc_trypush_slot_pass())
    printf("PASS: %s\n", "spsc_trypush_slot_pass()");
  else
    printf("FAIL: %s\n", "spsc_trypush_slot_pass()");
  ;
  if (spsc_trypop_slot_pass())
    printf("PASS: %s\n", "spsc_trypop_slot_pass()");
  else
    printf("FAIL: %s\n", "spsc_trypop_slot_pass()");
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <spsc_new_pass@plt>
cmp    $0x0,%rax
je     1188 <main+0x38>
lea    0xe89(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <printf@plt>
jmp    119b <main+0x4b>
lea    0xe8b(%rip),%rdi
lea    0xe74(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <spsc_new_fail@plt>
cmp    $0x0,%rax
je     11c4 <main+0x74>
lea    0xe4d(%rip),%rdi
lea    0xe6a(%rip),%rsi
call   1030 <printf@plt>
jmp    11d7 <main+0x87>
lea    0xe4f(%rip),%rdi
lea    0xe52(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <spsc_trypush_slot_pass@plt>
cmp    $0x0,%rax
je     1200 <main+0xb0>
lea    0xe11(%rip),%rdi
lea    0xe3e(%rip),%rsi
call   1030 <printf@plt>
jmp    1213 <main+0xc3>
lea    0xe13(%rip),%rdi
lea    0xe26(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <spsc_trypop_slot_pass@plt>
cmp    $0x0,%rax
je     123c <main+0xec>
lea    0xdd5(%rip),%rdi
lea    0xe1b(%rip),%rsi
call   1030 <printf@plt>
jmp    124f <main+0xff>
lea    0xdd7(%rip),%rdi
lea    0xe03(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <spsc_new_pass@plt>
test   %rax,%rax
lea    0xeb5(%rip),%r14
lea    0xe94(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
lea    0xe90(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <spsc_new_fail@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r14,%rdi
lea    0xe8d(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1070 <spsc_trypush_slot_pass@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r14,%rdi
lea    0xe80(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <spsc_trypop_slot_pass@plt>
test   %rax,%rax
cmove  %r14,%rbx
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"PASS: %s\0A\00"
@.str.1 = [16 x i8] c"spsc_new_pass()\00"
@.str.2 = [10 x i8] c"FAIL: %s\0A\00"
@.str.3 = [16 x i8] c"spsc_new_fail()\00"
@.str.4 = [25 x i8] c"spsc_trypush_slot_pass()\00"
@.str.5 = [24 x i8] c"spsc_trypop_slot_pass()\00"
define i32 @main() {
%1 = tail call i64 (...) @spsc_new_pass()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i64 (...) @spsc_new_fail()
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i64 (...) @spsc_trypush_slot_pass()
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%12 = tail call i32 @printf(i8* %11, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%13 = tail call i64 (...) @spsc_trypop_slot_pass()
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%16 = tail call i32 @printf(i8* %15, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}