#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 *);
help() {
  printf("\nAvailable Commands: \n");
  printf(" - s: Switch to the next ready process.\n");
  printf(" - q: Makes the currently running process a zombie.\n");
  printf(" - f: Forks a new process from the free processes.\n");
  printf(" - r: Resurrects all zombie processes and puts them on the free "
         "list.\n");
  printf(" - ?: Brings up this help menu!\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <printf@plt>
lea    0xf32(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf97(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\0AAvailable Commands: \0A\00"
@.str.1 = [41 x i8] c" - s: Switch to the next ready process.\0A\00"
@.str.2 = [53 x i8] c" - q: Makes the currently running process a zombie.\0A\00"
@.str.3 = [52 x i8] c" - f: Forks a new process from the free processes.\0A\00"
@.str.4 = [71 x i8] c" - r: Resurrects all zombie processes and puts them on the free list.\0A\00"
@.str.5 = [33 x i8] c" - ?: Brings up this help menu!\0A\00"
define i32 @help() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [22 x i8] c"\0AAvailable Commands: \00"
@str.6 = [40 x i8] c" - s: Switch to the next ready process.\00"
@str.7 = [52 x i8] c" - q: Makes the currently running process a zombie.\00"
@str.8 = [51 x i8] c" - f: Forks a new process from the free processes.\00"
@str.9 = [70 x i8] c" - r: Resurrects all zombie processes and puts them on the free list.\00"
@str.10 = [32 x i8] c" - ?: Brings up this help menu!\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.6, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.7, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.8, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.10, i64 0, i64 0))
ret i32 undef
}