#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*/ puts(char *);
void do_help(void) {
  puts("r filename[,address]      read object into memory");
  puts("d [address]               dump memory");
  puts("l [address]               list memory");
  puts("m [address]               modify memory");
  puts("f address,count,value     fill memory");
  puts("v from,to,count           move memory");
  puts("p address                 show/modify port");
  puts("g [address]               run program");
  puts("t [count]                 trace program");
  puts("return                    single step program");
  puts("x [register]              show/modify register");
  puts("x f<flag>                 modify flag");
  puts("b[no] address[,pass]      set soft breakpoint");
  puts("b                         show soft breakpoints");
  puts("b[no] c                   clear soft breakpoint");
  puts("h [address]               show history");
  puts("h c                       clear history");
  puts("z start,stop              set trigger adr for t-state count");
  puts("z                         show t-state count");
  puts("c                         measure clock frequency");
  puts("s                         show settings");
  puts("! command                 execute UNIX command");
  puts("q                         quit");
}


x86 assembly (clang, -O0):
<do_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1006(%rip),%rdi
call   1030 <puts@plt>
lea    0x1029(%rip),%rdi
call   1030 <puts@plt>
lea    0x1043(%rip),%rdi
call   1030 <puts@plt>
lea    0x1065(%rip),%rdi
call   1030 <puts@plt>
lea    0x1089(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ad(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c8(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1114(%rip),%rdi
call   1030 <puts@plt>
lea    0x1135(%rip),%rdi
call   1030 <puts@plt>
lea    0x115b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1177(%rip),%rdi
call   1030 <puts@plt>
lea    0x119a(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf42(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf78(%rip),%rdi
call   1030 <puts@plt>
lea    0xf92(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0x1009(%rip),%rdi
call   1030 <puts@plt>
lea    0x102c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1046(%rip),%rdi
call   1030 <puts@plt>
lea    0x1068(%rip),%rdi
call   1030 <puts@plt>
lea    0x108c(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cb(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e7(%rip),%rdi
call   1030 <puts@plt>
lea    0x1117(%rip),%rdi
call   1030 <puts@plt>
lea    0x1138(%rip),%rdi
call   1030 <puts@plt>
lea    0x115e(%rip),%rdi
call   1030 <puts@plt>
lea    0x117a(%rip),%rdi
call   1030 <puts@plt>
lea    0x119d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"r filename[,address] read object into memory\00"
@.str.1 = [38 x i8] c"d [address] dump memory\00"
@.str.2 = [38 x i8] c"l [address] list memory\00"
@.str.3 = [40 x i8] c"m [address] modify memory\00"
@.str.4 = [38 x i8] c"f address,count,value fill memory\00"
@.str.5 = [38 x i8] c"v from,to,count move memory\00"
@.str.6 = [43 x i8] c"p address show/modify port\00"
@.str.7 = [38 x i8] c"g [address] run program\00"
@.str.8 = [40 x i8] c"t [count] trace program\00"
@.str.9 = [46 x i8] c"return single step program\00"
@.str.10 = [47 x i8] c"x [register] show/modify register\00"
@.str.11 = [38 x i8] c"x f<flag> modify flag\00"
@.str.12 = [46 x i8] c"b[no] address[,pass] set soft breakpoint\00"
@.str.13 = [48 x i8] c"b show soft breakpoints\00"
@.str.14 = [48 x i8] c"b[no] c clear soft breakpoint\00"
@.str.15 = [39 x i8] c"h [address] show history\00"
@.str.16 = [40 x i8] c"h c clear history\00"
@.str.17 = [60 x i8] c"z start,stop set trigger adr for t-state count\00"
@.str.18 = [45 x i8] c"z show t-state count\00"
@.str.19 = [50 x i8] c"c measure clock frequency\00"
@.str.20 = [40 x i8] c"s show settings\00"
@.str.21 = [47 x i8] c"! command execute UNIX command\00"
@.str.22 = [31 x i8] c"q quit\00"
define void @do_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.22, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"r filename[,address] read object into memory\00"
@.str.1 = [38 x i8] c"d [address] dump memory\00"
@.str.2 = [38 x i8] c"l [address] list memory\00"
@.str.3 = [40 x i8] c"m [address] modify memory\00"
@.str.4 = [38 x i8] c"f address,count,value fill memory\00"
@.str.5 = [38 x i8] c"v from,to,count move memory\00"
@.str.6 = [43 x i8] c"p address show/modify port\00"
@.str.7 = [38 x i8] c"g [address] run program\00"
@.str.8 = [40 x i8] c"t [count] trace program\00"
@.str.9 = [46 x i8] c"return single step program\00"
@.str.10 = [47 x i8] c"x [register] show/modify register\00"
@.str.11 = [38 x i8] c"x f<flag> modify flag\00"
@.str.12 = [46 x i8] c"b[no] address[,pass] set soft breakpoint\00"
@.str.13 = [48 x i8] c"b show soft breakpoints\00"
@.str.14 = [48 x i8] c"b[no] c clear soft breakpoint\00"
@.str.15 = [39 x i8] c"h [address] show history\00"
@.str.16 = [40 x i8] c"h c clear history\00"
@.str.17 = [60 x i8] c"z start,stop set trigger adr for t-state count\00"
@.str.18 = [45 x i8] c"z show t-state count\00"
@.str.19 = [50 x i8] c"c measure clock frequency\00"
@.str.20 = [40 x i8] c"s show settings\00"
@.str.21 = [47 x i8] c"! command execute UNIX command\00"
@.str.22 = [31 x i8] c"q quit\00"
define void @do_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.17, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.19, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.21, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.22, i64 0, i64 0))
ret void
}