#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 *);
void help(void) {
  printf("\nHELP:\n\n");
  printf("This is a reverse polish calculator. You must use it like so:\n");
  printf("1 + 1 is written as:\n");
  printf("1 1 +\n");
  printf("(1 - 2) * (4 + 5) is written as:\n");
  printf("1 2 - 4 5 + *\n\n");
  printf("COMMANDS:\n\n");
  printf("A\tPrints top of stack.\n");
  printf("B\tSwaps the top two values.\n");
  printf("C\tClear the stack.\n");
  printf("D\tDuplicate the top value.\n");
  printf("P\tPop the stack.\n");
  printf("E\tEmpty the stack into the terminal.\n");
  printf("?\tShow this message.\n\n");
  printf("OPERATORS:\n\n");
  printf("S\tSine\n");
  printf("O\tCosine\n");
  printf("T\tTangent\n");
  printf("^\tPower\n");
  printf("Q\tSquare root\n\n");
  printf("VARIABLES:\n\n");
  printf("You can assign any lowercase letter to be a variable.\n");
  printf("To assign a variable, you must use the = operator like so:\n");
  printf("42 n =\n");
  printf("That assigns 42 to the variable n.\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
lea    0xf15(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
call   1030 <printf@plt>
lea    0xf40(%rip),%rdi
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
call   1030 <printf@plt>
lea    0xf59(%rip),%rdi
call   1030 <printf@plt>
lea    0xf69(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf89(%rip),%rdi
call   1030 <printf@plt>
lea    0xf94(%rip),%rdi
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
call   1030 <printf@plt>
lea    0xf91(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf90(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbb(%rip),%rdi
call   1030 <printf@plt>
lea    0xfeb(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe7(%rip),%rdi
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf06(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf09(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf21(%rip),%rdi
call   1040 <puts@plt>
lea    0xf20(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf42(%rip),%rdi
call   1040 <puts@plt>
lea    0xf51(%rip),%rdi
call   1040 <puts@plt>
lea    0xf56(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
call   1040 <puts@plt>
lea    0xf74(%rip),%rdi
call   1040 <puts@plt>
lea    0xf71(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf98(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\0AHELP:\0A\0A\00"
@.str.1 = [63 x i8] c"This is a reverse polish calculator. You must use it like so:\0A\00"
@.str.2 = [22 x i8] c"1 + 1 is written as:\0A\00"
@.str.3 = [7 x i8] c"1 1 +\0A\00"
@.str.4 = [34 x i8] c"(1 - 2) * (4 + 5) is written as:\0A\00"
@.str.5 = [16 x i8] c"1 2 - 4 5 + *\0A\0A\00"
@.str.6 = [12 x i8] c"COMMANDS:\0A\0A\00"
@.str.7 = [24 x i8] c"A\09Prints top of stack.\0A\00"
@.str.8 = [29 x i8] c"B\09Swaps the top two values.\0A\00"
@.str.9 = [20 x i8] c"C\09Clear the stack.\0A\00"
@.str.10 = [28 x i8] c"D\09Duplicate the top value.\0A\00"
@.str.11 = [18 x i8] c"P\09Pop the stack.\0A\00"
@.str.12 = [38 x i8] c"E\09Empty the stack into the terminal.\0A\00"
@.str.13 = [23 x i8] c"?\09Show this message.\0A\0A\00"
@.str.14 = [13 x i8] c"OPERATORS:\0A\0A\00"
@.str.15 = [8 x i8] c"S\09Sine\0A\00"
@.str.16 = [10 x i8] c"O\09Cosine\0A\00"
@.str.17 = [11 x i8] c"T\09Tangent\0A\00"
@.str.18 = [9 x i8] c"^\09Power\0A\00"
@.str.19 = [16 x i8] c"Q\09Square root\0A\0A\00"
@.str.20 = [13 x i8] c"VARIABLES:\0A\0A\00"
@.str.21 = [55 x i8] c"You can assign any lowercase letter to be a variable.\0A\00"
@.str.22 = [60 x i8] c"To assign a variable, you must use the = operator like so:\0A\00"
@.str.23 = [8 x i8] c"42 n =\0A\00"
@.str.24 = [36 x i8] c"That assigns 42 to the variable n.\0A\00"
@.str.25 = [2 x i8] c"\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"\0AHELP:\0A\00"
@str.26 = [62 x i8] c"This is a reverse polish calculator. You must use it like so:\00"
@str.27 = [21 x i8] c"1 + 1 is written as:\00"
@str.28 = [6 x i8] c"1 1 +\00"
@str.29 = [33 x i8] c"(1 - 2) * (4 + 5) is written as:\00"
@str.30 = [15 x i8] c"1 2 - 4 5 + *\0A\00"
@str.31 = [11 x i8] c"COMMANDS:\0A\00"
@str.32 = [23 x i8] c"A\09Prints top of stack.\00"
@str.33 = [28 x i8] c"B\09Swaps the top two values.\00"
@str.34 = [19 x i8] c"C\09Clear the stack.\00"
@str.35 = [27 x i8] c"D\09Duplicate the top value.\00"
@str.36 = [17 x i8] c"P\09Pop the stack.\00"
@str.37 = [37 x i8] c"E\09Empty the stack into the terminal.\00"
@str.38 = [22 x i8] c"?\09Show this message.\0A\00"
@str.39 = [12 x i8] c"OPERATORS:\0A\00"
@str.40 = [7 x i8] c"S\09Sine\00"
@str.41 = [9 x i8] c"O\09Cosine\00"
@str.42 = [10 x i8] c"T\09Tangent\00"
@str.43 = [8 x i8] c"^\09Power\00"
@str.44 = [15 x i8] c"Q\09Square root\0A\00"
@str.45 = [12 x i8] c"VARIABLES:\0A\00"
@str.46 = [54 x i8] c"You can assign any lowercase letter to be a variable.\00"
@str.47 = [59 x i8] c"To assign a variable, you must use the = operator like so:\00"
@str.48 = [7 x i8] c"42 n =\00"
@str.49 = [35 x i8] c"That assigns 42 to the variable n.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.26, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.27, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.28, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.29, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.30, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.31, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.32, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.33, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.34, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.35, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.36, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.37, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.38, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.39, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.40, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.41, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.42, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.43, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.44, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.45, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.46, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.48, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.49, i64 0, i64 0))
%26 = tail call i32 @putchar(i32 10)
ret void
}