#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 printHelp() {
  printf("Available commands are:\n");
  printf("%20s%70s\n", "help", "prints info on available commands");
  printf("%20s%70s\n", "add <key> <val>", "adds a node to the tree");
  printf("%20s%70s\n", "delete <key>",
         "tries to delete a node with the given key");
  printf("%20s%70s\n", "lookup <key>",
         "retrieves the data associated with the given key");
  printf("%20s%70s\n\n", "quit | exit", "finishes session");
}


x86 assembly (clang, -O0):
<printHelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xef1(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0xefe(%rip),%rsi
lea    0xf07(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0xf0a(%rip),%rsi
lea    0xf10(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
lea    0xf25(%rip),%rsi
lea    0xf2b(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
lea    0xf52(%rip),%rsi
lea    0xf57(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHelp>:
push   %rbx
lea    0xfce(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
lea    0xecf(%rip),%rsi
lea    0xecd(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rsi
lea    0xef4(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0d(%rip),%rsi
lea    0xf13(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf33(%rip),%rdi
lea    0xf37(%rip),%rsi
lea    0xf3c(%rip),%rdx
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Available commands are:\0A\00"
@.str.1 = [10 x i8] c"%20s%70s\0A\00"
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [34 x i8] c"prints info on available commands\00"
@.str.4 = [16 x i8] c"add <key> <val>\00"
@.str.5 = [24 x i8] c"adds a node to the tree\00"
@.str.6 = [13 x i8] c"delete <key>\00"
@.str.7 = [42 x i8] c"tries to delete a node with the given key\00"
@.str.8 = [13 x i8] c"lookup <key>\00"
@.str.9 = [49 x i8] c"retrieves the data associated with the given key\00"
@.str.10 = [11 x i8] c"%20s%70s\0A\0A\00"
@.str.11 = [12 x i8] c"quit | exit\00"
@.str.12 = [17 x i8] c"finishes session\00"
define void @printHelp() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%20s%70s\0A\00"
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [34 x i8] c"prints info on available commands\00"
@.str.4 = [16 x i8] c"add <key> <val>\00"
@.str.5 = [24 x i8] c"adds a node to the tree\00"
@.str.6 = [13 x i8] c"delete <key>\00"
@.str.7 = [42 x i8] c"tries to delete a node with the given key\00"
@.str.8 = [13 x i8] c"lookup <key>\00"
@.str.9 = [49 x i8] c"retrieves the data associated with the given key\00"
@.str.10 = [11 x i8] c"%20s%70s\0A\0A\00"
@.str.11 = [12 x i8] c"quit | exit\00"
@.str.12 = [17 x i8] c"finishes session\00"
@str = [24 x i8] c"Available commands are:\00"
define void @printHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
ret void
}