#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 */
struct prompt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ prompt_Printf(struct prompt *, char *);
void prompt_ShowHelp(struct prompt *p) {
  prompt_Printf(p, "The following commands are available:\n");
  prompt_Printf(p, " ~p\tEnter Packet mode\n");
  prompt_Printf(p, " ~t\tShow timers\n");
  prompt_Printf(p, " ~m\tShow memory map\n");
  prompt_Printf(p, " ~.\tTerminate program\n");
  prompt_Printf(p, " ~?\tThis help\n");
}


x86 assembly (clang, -O0):
<prompt_ShowHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <prompt_Printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef0(%rip),%rsi
call   1030 <prompt_Printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef7(%rip),%rsi
call   1030 <prompt_Printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef8(%rip),%rsi
call   1030 <prompt_Printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xefd(%rip),%rsi
call   1030 <prompt_Printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf04(%rip),%rsi
call   1030 <prompt_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_ShowHelp>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <prompt_Printf@plt>
lea    0xf00(%rip),%rsi
mov    %rbx,%rdi
call   1030 <prompt_Printf@plt>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
call   1030 <prompt_Printf@plt>
lea    0xf0a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <prompt_Printf@plt>
lea    0xf10(%rip),%rsi
mov    %rbx,%rdi
call   1030 <prompt_Printf@plt>
lea    0xf18(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <prompt_Printf@plt>

LLVM IR (-O0):
%struct.prompt = type { i32 }
@.str = [39 x i8] c"The following commands are available:\0A\00"
@.str.1 = [23 x i8] c" ~p\09Enter Packet mode\0A\00"
@.str.2 = [17 x i8] c" ~t\09Show timers\0A\00"
@.str.3 = [21 x i8] c" ~m\09Show memory map\0A\00"
@.str.4 = [23 x i8] c" ~.\09Terminate program\0A\00"
@.str.5 = [15 x i8] c" ~?\09This help\0A\00"
define void @prompt_ShowHelp(%struct.prompt* %0) {
%2 = alloca %struct.prompt*
store %struct.prompt* %0, %struct.prompt** %2
%3 = load %struct.prompt*, %struct.prompt** %2
%4 = call i32 @prompt_Printf(%struct.prompt* %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.prompt*, %struct.prompt** %2
%6 = call i32 @prompt_Printf(%struct.prompt* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%7 = load %struct.prompt*, %struct.prompt** %2
%8 = call i32 @prompt_Printf(%struct.prompt* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%9 = load %struct.prompt*, %struct.prompt** %2
%10 = call i32 @prompt_Printf(%struct.prompt* %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%11 = load %struct.prompt*, %struct.prompt** %2
%12 = call i32 @prompt_Printf(%struct.prompt* %11, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%13 = load %struct.prompt*, %struct.prompt** %2
%14 = call i32 @prompt_Printf(%struct.prompt* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.prompt = type { i32 }
@.str = [39 x i8] c"The following commands are available:\0A\00"
@.str.1 = [23 x i8] c" ~p\09Enter Packet mode\0A\00"
@.str.2 = [17 x i8] c" ~t\09Show timers\0A\00"
@.str.3 = [21 x i8] c" ~m\09Show memory map\0A\00"
@.str.4 = [23 x i8] c" ~.\09Terminate program\0A\00"
@.str.5 = [15 x i8] c" ~?\09This help\0A\00"
define void @prompt_ShowHelp(%struct.prompt* %0) {
%2 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @prompt_Printf(%struct.prompt* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}