#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 ipr_ioa {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help(struct ipr_ioa *ioa, int argc, char *argv[]) {
  printf("\n");
  printf("mr4 address length                  "
         "- Read memory\n");
  printf("mw4 address data                    "
         "- Write memory\n");
  printf("bm4 address data preserve_mask      "
         "- Modify bits set to 0 in preserve_mask\n");
  printf("edf parm1 parm2                     "
         "- Enable debug function\n");
  printf("ddf parm1 parm2                     "
         "- Disable debug function\n");
  printf("raw cmd [parm1] [parm2] [length]    "
         "- Manually execute IOA debug command\n");
  printf("speeds                              "
         "- Current bus speeds for each device\n");
  printf("flit                                "
         "- Format the flit\n");
  printf("macros                              "
         "- List currently loaded macros\n");
  printf("exit                                "
         "- Exit the program\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0x114b(%rip),%rdi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
call   1030 <printf@plt>
lea    0xffb(%rip),%rdi
call   1030 <printf@plt>
lea    0x1039(%rip),%rdi
call   1030 <printf@plt>
lea    0x1064(%rip),%rdi
call   1030 <printf@plt>
lea    0x109c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xef4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8b(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbc(%rip),%rdi
call   1040 <puts@plt>
lea    0xff9(%rip),%rdi
call   1040 <puts@plt>
lea    0x1036(%rip),%rdi
call   1040 <puts@plt>
lea    0x1060(%rip),%rdi
call   1040 <puts@plt>
lea    0x1097(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ipr_ioa = type { i32 }
@.str = [2 x i8] c"\0A\00"
@.str.1 = [51 x i8] c"mr4 address length - Read memory\0A\00"
@.str.2 = [52 x i8] c"mw4 address data - Write memory\0A\00"
@.str.3 = [77 x i8] c"bm4 address data preserve_mask - Modify bits set to 0 in preserve_mask\0A\00"
@.str.4 = [61 x i8] c"edf parm1 parm2 - Enable debug function\0A\00"
@.str.5 = [62 x i8] c"ddf parm1 parm2 - Disable debug function\0A\00"
@.str.6 = [74 x i8] c"raw cmd [parm1] [parm2] [length] - Manually execute IOA debug command\0A\00"
@.str.7 = [74 x i8] c"speeds - Current bus speeds for each device\0A\00"
@.str.8 = [55 x i8] c"flit - Format the flit\0A\00"
@.str.9 = [68 x i8] c"macros - List currently loaded macros\0A\00"
@.str.10 = [57 x i8] c"exit - Exit the program\0A\0A\00"
define i32 @help(%struct.ipr_ioa* %0, i32 %1, i8** %2) {
%4 = alloca %struct.ipr_ioa*
%5 = alloca i32
%6 = alloca i8**
store %struct.ipr_ioa* %0, %struct.ipr_ioa** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.ipr_ioa = type { i32 }
@str = [50 x i8] c"mr4 address length - Read memory\00"
@str.11 = [51 x i8] c"mw4 address data - Write memory\00"
@str.12 = [76 x i8] c"bm4 address data preserve_mask - Modify bits set to 0 in preserve_mask\00"
@str.13 = [60 x i8] c"edf parm1 parm2 - Enable debug function\00"
@str.14 = [61 x i8] c"ddf parm1 parm2 - Disable debug function\00"
@str.15 = [73 x i8] c"raw cmd [parm1] [parm2] [length] - Manually execute IOA debug command\00"
@str.16 = [73 x i8] c"speeds - Current bus speeds for each device\00"
@str.17 = [54 x i8] c"flit - Format the flit\00"
@str.18 = [67 x i8] c"macros - List currently loaded macros\00"
@str.19 = [56 x i8] c"exit - Exit the program\0A\00"
define i32 @help(%struct.ipr_ioa* nocapture readnone %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.11, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.12, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.13, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.14, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.16, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.17, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.18, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.19, i64 0, i64 0))
ret i32 0
}