#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 printUsage() {
  printf("\n");
  printf("Supported commands:\n\n");
  printf("Arithmetic: "
         "\n\t'+', '-', '*', '/, '^', "
         "\n\t'_s' (sin), '_c' (cos), '_e' (exp)\n\n");
  printf("Advanced: \n\t'p'- print stack, "
         "\n\t's' - swap the top two in stack,"
         "\n\t'd' - duplicate stack, "
         "\n\t'c' - clear stack\n\n");
  printf("Variables: "
         "\n\t'_l' (last result), "
         "\n\t'@[0-9]' (set gen. purpose variable),"
         "\n\t'_[0-9]' (use gen. purpose variable)\n\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0x1026(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [22 x i8] c"Supported commands:\0A\0A\00"
@.str.2 = [77 x i8] c"Arithmetic: \0A\09'+', '-', '*', '/, '^', \0A\09'_s' (sin), '_c' (cos), '_e' (exp)\0A\0A\00"
@.str.3 = [111 x i8] c"Advanced: \0A\09'p'- print stack, \0A\09's' - swap the top two in stack,\0A\09'd' - duplicate stack, \0A\09'c' - clear stack\0A\0A\00"
@.str.4 = [113 x i8] c"Variables: \0A\09'_l' (last result), \0A\09'@[0-9]' (set gen. purpose variable),\0A\09'_[0-9]' (use gen. purpose variable)\0A\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Supported commands:\0A\00"
@str.5 = [76 x i8] c"Arithmetic: \0A\09'+', '-', '*', '/, '^', \0A\09'_s' (sin), '_c' (cos), '_e' (exp)\0A\00"
@str.6 = [110 x i8] c"Advanced: \0A\09'p'- print stack, \0A\09's' - swap the top two in stack,\0A\09'd' - duplicate stack, \0A\09'c' - clear stack\0A\00"
@str.7 = [112 x i8] c"Variables: \0A\09'_l' (last result), \0A\09'@[0-9]' (set gen. purpose variable),\0A\09'_[0-9]' (use gen. purpose variable)\0A\00"
define void @printUsage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([112 x i8], [112 x i8]* @str.7, i64 0, i64 0))
ret void
}