#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 print_help(void) {
  printf("VMWos Shell Version %s\n\n", "13.2");
  printf("\tblink on/off	- turns on/off heartbeat LED\n");
  printf("\tcd		- change directory\n");
  printf("\tclear		- clears the screen\n");
  printf("\tcolor X	- set text to color #X\n");
  printf("\techo X	- prints string X\n");
  printf("\tfont X	- sets the font to font #X\n");
  printf("\tgetpid	- print current process ID\n");
  printf("\tgradient	- make background look cool\n");
  printf("\thelp		- prints this help message\n");
  printf("\trandom	- print random number\n");
  printf("\treboot	- reboot the machine\n");
  printf("\tsleep	X	- sleep for X seconds\n");
  printf("\ttemp		- print the temperature\n");
  printf("\tuptime	- print seconds since boot\n");
  printf("\tver		- print version\n");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xeda(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xef0(%rip),%rdi
call   1040 <puts@plt>
lea    0xefc(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf20(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf45(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf76(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfaf(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1040 <puts@plt>
lea    0xfec(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"VMWos Shell Version %s\0A\0A\00"
@.str.1 = [5 x i8] c"13.2\00"
@.str.2 = [44 x i8] c"\09blink on/off\09- turns on/off heartbeat LED\0A\00"
@.str.3 = [25 x i8] c"\09cd\09\09- change directory\0A\00"
@.str.4 = [29 x i8] c"\09clear\09\09- clears the screen\0A\00"
@.str.5 = [33 x i8] c"\09color X\09- set text to color #X\0A\00"
@.str.6 = [27 x i8] c"\09echo X\09- prints string X\0A\00"
@.str.7 = [36 x i8] c"\09font X\09- sets the font to font #X\0A\00"
@.str.8 = [36 x i8] c"\09getpid\09- print current process ID\0A\00"
@.str.9 = [39 x i8] c"\09gradient\09- make background look cool\0A\00"
@.str.10 = [35 x i8] c"\09help\09\09- prints this help message\0A\00"
@.str.11 = [31 x i8] c"\09random\09- print random number\0A\00"
@.str.12 = [30 x i8] c"\09reboot\09- reboot the machine\0A\00"
@.str.13 = [32 x i8] c"\09sleep\09X\09- sleep for X seconds\0A\00"
@.str.14 = [32 x i8] c"\09temp\09\09- print the temperature\0A\00"
@.str.15 = [36 x i8] c"\09uptime\09- print seconds since boot\0A\00"
@.str.16 = [23 x i8] c"\09ver\09\09- print version\0A\00"
@.str.17 = [2 x i8] c"\0A\00"
define i32 @print_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"VMWos Shell Version %s\0A\0A\00"
@.str.1 = [5 x i8] c"13.2\00"
@str = [43 x i8] c"\09blink on/off\09- turns on/off heartbeat LED\00"
@str.18 = [24 x i8] c"\09cd\09\09- change directory\00"
@str.19 = [28 x i8] c"\09clear\09\09- clears the screen\00"
@str.20 = [32 x i8] c"\09color X\09- set text to color #X\00"
@str.21 = [26 x i8] c"\09echo X\09- prints string X\00"
@str.22 = [35 x i8] c"\09font X\09- sets the font to font #X\00"
@str.23 = [35 x i8] c"\09getpid\09- print current process ID\00"
@str.24 = [38 x i8] c"\09gradient\09- make background look cool\00"
@str.25 = [34 x i8] c"\09help\09\09- prints this help message\00"
@str.26 = [30 x i8] c"\09random\09- print random number\00"
@str.27 = [29 x i8] c"\09reboot\09- reboot the machine\00"
@str.28 = [31 x i8] c"\09sleep\09X\09- sleep for X seconds\00"
@str.29 = [31 x i8] c"\09temp\09\09- print the temperature\00"
@str.30 = [35 x i8] c"\09uptime\09- print seconds since boot\00"
@str.31 = [22 x i8] c"\09ver\09\09- print version\00"
define i32 @print_help() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.18, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.19, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.20, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.21, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.22, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.23, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.24, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.25, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.26, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.27, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.28, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.29, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.31, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
ret i32 0
}