#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 doHelp(char *s) {
  (void)(&s);
  printf("\nCommands available:");
  printf("\nMorse <text>         English to Morse");
  printf("\nEnglish <morse>      Morse to English");
  printf("\nQuit or Exit         Exit Program");
  printf("\nHelp or Info         Display this text");
  printf("\n\nCommands are case-insensitive,\n");
  printf("eg., Morse and morse are the same");
  return (-1);
}


x86 assembly (clang, -O0):
<doHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf65(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doHelp>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
call   1040 <printf@plt>
lea    0xefc(%rip),%rdi
call   1040 <printf@plt>
lea    0xf17(%rip),%rdi
call   1040 <printf@plt>
lea    0xf2e(%rip),%rdi
call   1040 <printf@plt>
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0ACommands available:\00"
@.str.1 = [39 x i8] c"\0AMorse <text> English to Morse\00"
@.str.2 = [39 x i8] c"\0AEnglish <morse> Morse to English\00"
@.str.3 = [35 x i8] c"\0AQuit or Exit Exit Program\00"
@.str.4 = [40 x i8] c"\0AHelp or Info Display this text\00"
@.str.5 = [34 x i8] c"\0A\0ACommands are case-insensitive,\0A\00"
@.str.6 = [34 x i8] c"eg., Morse and morse are the same\00"
define i32 @doHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0ACommands available:\00"
@.str.1 = [39 x i8] c"\0AMorse <text> English to Morse\00"
@.str.2 = [39 x i8] c"\0AEnglish <morse> Morse to English\00"
@.str.3 = [35 x i8] c"\0AQuit or Exit Exit Program\00"
@.str.4 = [40 x i8] c"\0AHelp or Info Display this text\00"
@.str.6 = [34 x i8] c"eg., Morse and morse are the same\00"
@str = [33 x i8] c"\0A\0ACommands are case-insensitive,\00"
define i32 @doHelp(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
ret i32 -1
}