#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 SCHED_FIFO;
int SCHED_OTHER;
int SCHED_RR;
int _POSIX_THREAD_PRIORITY_SCHEDULING;
int /*<<< orphan*/ printf(char *, int);
void checkPthreadSupport() {
  printf("Support %d\n", _POSIX_THREAD_PRIORITY_SCHEDULING);
  printf("FIFO %d\n", SCHED_FIFO);
  printf("RR %d\n", SCHED_RR);
  printf("OTHER %d\n", SCHED_OTHER);
}


x86 assembly (clang, -O0):
<checkPthreadSupport>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkPthreadSupport>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Support %d\0A\00"
@_POSIX_THREAD_PRIORITY_SCHEDULING = global i32 0
@.str.1 = [9 x i8] c"FIFO %d\0A\00"
@SCHED_FIFO = global i32 0
@.str.2 = [7 x i8] c"RR %d\0A\00"
@SCHED_RR = global i32 0
@.str.3 = [10 x i8] c"OTHER %d\0A\00"
@SCHED_OTHER = global i32 0
define void @checkPthreadSupport() {
%1 = load i32, i32* @_POSIX_THREAD_PRIORITY_SCHEDULING
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @SCHED_FIFO
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @SCHED_RR
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @SCHED_OTHER
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Support %d\0A\00"
@_POSIX_THREAD_PRIORITY_SCHEDULING = global i32 0
@.str.1 = [9 x i8] c"FIFO %d\0A\00"
@SCHED_FIFO = global i32 0
@.str.2 = [7 x i8] c"RR %d\0A\00"
@SCHED_RR = global i32 0
@.str.3 = [10 x i8] c"OTHER %d\0A\00"
@SCHED_OTHER = global i32 0
define void @checkPthreadSupport() {
%1 = load i32, i32* @_POSIX_THREAD_PRIORITY_SCHEDULING
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @SCHED_FIFO
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @SCHED_RR
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @SCHED_OTHER
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret void
}