#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*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(char *);
void help(char *progname) {
  usage(progname);
  printf("Each option represents one or more machine control or configuration "
         "messages.  Messages are output in the order that their corresponding "
         "options were provided.  Repeated options will result in repeated "
         "messages.\n");
  char *commands[][3] = {
      {"s", "speed", "Set movement speed."},
      {"p", "[x]:[y]:[z]", "Rapid positioning (G0)."},
      {"l", "[x]:[y]:[z]", "Linear move (G1)."},
      {"d", "time\t", "Dwell for <time> seconds (G4)."},
      {"i", NULL, "Set units to inches (G20)."},
      {"m", NULL, "Set units to milimeters (default) (G21)."},
      {"a", NULL, "Use absolute coordinates (default) (G90)."},
      {"r", NULL, "Use relative/incremental coordinates (G91)."},
      {"e", "on|reverse|off", "Set extruder motor state (M101/M102/M103)."},
      {"t", "temperature", "Set extrusion temperature in Celsius (M104)."},
      {"f", "speed", "Sets extrusion motor speed (M108)."},
      {"z", "[x][y][z]", "Zeroes the axes named in the argument."},
      {"h", NULL, "Displays this help message."},
      {NULL, NULL, NULL}};
  size_t i = 0;
  while (commands[i][0] != NULL) {
    fprintf(stderr, "\t-%s %s\t%s\n", commands[i][0],
            (commands[i][1] ? commands[i][1] : "\t"), commands[i][2]);
    i++;
  }
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <usage@plt>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x160(%rbp),%rdi
lea    0x2b4e(%rip),%rsi
mov    $0x150,%edx
call   1050 <memcpy@plt>
movq   $0x0,-0x168(%rbp)
lea    -0x160(%rbp),%rax
imul   $0x18,-0x168(%rbp),%rcx
18
add    %rcx,%rax
cmpq   $0x0,(%rax)
je     126d <help+0x12d>
mov    0x2e2e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x174(%rbp)
lea    -0x160(%rbp),%rax
imul   $0x18,-0x168(%rbp),%rcx
18
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x170(%rbp)
lea    -0x160(%rbp),%rax
imul   $0x18,-0x168(%rbp),%rcx
18
add    %rcx,%rax
cmpq   $0x0,0x8(%rax)
je     120d <help+0xcd>
lea    -0x160(%rbp),%rax
imul   $0x18,-0x168(%rbp),%rcx
18
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0x180(%rbp)
jmp    1220 <help+0xe0>
lea    0xf1b(%rip),%rax
mov    %rax,-0x180(%rbp)
jmp    1220 <help+0xe0>
mov    -0x170(%rbp),%rdx
mov    -0x174(%rbp),%edi
mov    -0x180(%rbp),%rcx
lea    -0x160(%rbp),%rax
imul   $0x18,-0x168(%rbp),%rsi
18
add    %rsi,%rax
mov    0x10(%rax),%r8
lea    0x108a(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x168(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x168(%rbp)
jmp    1187 <help+0x47>
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
call   1050 <usage@plt>
lea    0x10cb(%rip),%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdx
lea    0x2b7e(%rip),%rbx
xor    %r15d,%r15d
mov    0x2e74(%rip),%r12
lea    0xeef(%rip),%r13
mov    $0x30f0,%ebp
lea    0x108f(%rip),%r14
jmp    11a1 <help+0x71>
nopl   0x0(%rax)
mov    (%r12),%edi
mov    -0x8(%rbx),%r8
mov    %r14,%rsi
call   1040 <fprintf@plt>
add    $0x1,%r15
mov    (%rbx),%rdx
add    $0x18,%rbx
cmp    $0xd,%r15
je     11b0 <help+0x80>
bt     %r15,%rbp
mov    %r13,%rcx
jb     1180 <help+0x50>
mov    -0x10(%rbx),%rcx
jmp    1180 <help+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [213 x i8] c"Each option represents one or more machine control or configuration messages. Messages are output in the order that their corresponding options were provided. Repeated options will result in repeated messages.\0A\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [6 x i8] c"speed\00"
@.str.3 = [20 x i8] c"Set movement speed.\00"
@.str.4 = [2 x i8] c"p\00"
@.str.5 = [12 x i8] c"[x]:[y]:[z]\00"
@.str.6 = [24 x i8] c"Rapid positioning (G0).\00"
@.str.7 = [2 x i8] c"l\00"
@.str.8 = [18 x i8] c"Linear move (G1).\00"
@.str.9 = [2 x i8] c"d\00"
@.str.10 = [6 x i8] c"time\09\00"
@.str.11 = [31 x i8] c"Dwell for <time> seconds (G4).\00"
@.str.12 = [2 x i8] c"i\00"
@.str.13 = [27 x i8] c"Set units to inches (G20).\00"
@.str.14 = [2 x i8] c"m\00"
@.str.15 = [41 x i8] c"Set units to milimeters (default) (G21).\00"
@.str.16 = [2 x i8] c"a\00"
@.str.17 = [42 x i8] c"Use absolute coordinates (default) (G90).\00"
@.str.18 = [2 x i8] c"r\00"
@.str.19 = [44 x i8] c"Use relative/incremental coordinates (G91).\00"
@.str.20 = [2 x i8] c"e\00"
@.str.21 = [15 x i8] c"on|reverse|off\00"
@.str.22 = [43 x i8] c"Set extruder motor state (M101/M102/M103).\00"
@.str.23 = [2 x i8] c"t\00"
@.str.24 = [12 x i8] c"temperature\00"
@.str.25 = [45 x i8] c"Set extrusion temperature in Celsius (M104).\00"
@.str.26 = [2 x i8] c"f\00"
@.str.27 = [35 x i8] c"Sets extrusion motor speed (M108).\00"
@.str.28 = [2 x i8] c"z\00"
@.str.29 = [10 x i8] c"[x][y][z]\00"
@.str.30 = [39 x i8] c"Zeroes the axes named in the argument.\00"
@.str.31 = [2 x i8] c"h\00"
@.str.32 = [28 x i8] c"Displays this help message.\00"
@__const.help.commands = [14 x [3 x i8*]] [[3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.17, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.22, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.25, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.27, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.30, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.32, i32 0, i32 0)], [3 x i8*] zeroinitializer]
@stderr = global i32 0
@.str.33 = [12 x i8] c"\09-%s %s\09%s\0A\00"
@.str.34 = [2 x i8] c"\09\00"
define void @help(i8* %0) {
%2 = alloca i8*
%3 = alloca [14 x [3 x i8*]]
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @usage(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str, i64 0, i64 0))
%8 = bitcast [14 x [3 x i8*]]* %3 to i8*
store i64 0, i64* %4
br label %9
9: ; preds = %32, %1
%10 = load i64, i64* %4
%11 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* %3, i64 0, i64 %10
%12 = getelementptr inbounds [3 x i8*], [3 x i8*]* %11, i64 0, i64 0
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %41
15: ; preds = %9
%16 = load i32, i32* @stderr
%17 = load i64, i64* %4
%18 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* %3, i64 0, i64 %17
%19 = getelementptr inbounds [3 x i8*], [3 x i8*]* %18, i64 0, i64 0
%20 = load i8*, i8** %19
%21 = load i64, i64* %4
%22 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* %3, i64 0, i64 %21
%23 = getelementptr inbounds [3 x i8*], [3 x i8*]* %22, i64 0, i64 1
%24 = load i8*, i8** %23
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %31
26: ; preds = %15
%27 = load i64, i64* %4
%28 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* %3, i64 0, i64 %27
%29 = getelementptr inbounds [3 x i8*], [3 x i8*]* %28, i64 0, i64 1
%30 = load i8*, i8** %29
br label %32
31: ; preds = %15
br label %32
32: ; preds = %31, %26
%33 = phi i8* [ %30, %26 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.34, i64 0, i64 0), %31 ]
%34 = load i64, i64* %4
%35 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* %3, i64 0, i64 %34
%36 = getelementptr inbounds [3 x i8*], [3 x i8*]* %35, i64 0, i64 2
%37 = load i8*, i8** %36
%38 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.33, i64 0, i64 0), i8* %20, i8* %33, i8* %37)
%39 = load i64, i64* %4
%40 = add i64 %39, 1
store i64 %40, i64* %4
br label %9
41: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [6 x i8] c"speed\00"
@.str.3 = [20 x i8] c"Set movement speed.\00"
@.str.4 = [2 x i8] c"p\00"
@.str.5 = [12 x i8] c"[x]:[y]:[z]\00"
@.str.6 = [24 x i8] c"Rapid positioning (G0).\00"
@.str.7 = [2 x i8] c"l\00"
@.str.8 = [18 x i8] c"Linear move (G1).\00"
@.str.9 = [2 x i8] c"d\00"
@.str.10 = [6 x i8] c"time\09\00"
@.str.11 = [31 x i8] c"Dwell for <time> seconds (G4).\00"
@.str.12 = [2 x i8] c"i\00"
@.str.13 = [27 x i8] c"Set units to inches (G20).\00"
@.str.14 = [2 x i8] c"m\00"
@.str.15 = [41 x i8] c"Set units to milimeters (default) (G21).\00"
@.str.16 = [2 x i8] c"a\00"
@.str.17 = [42 x i8] c"Use absolute coordinates (default) (G90).\00"
@.str.18 = [2 x i8] c"r\00"
@.str.19 = [44 x i8] c"Use relative/incremental coordinates (G91).\00"
@.str.20 = [2 x i8] c"e\00"
@.str.21 = [15 x i8] c"on|reverse|off\00"
@.str.22 = [43 x i8] c"Set extruder motor state (M101/M102/M103).\00"
@.str.23 = [2 x i8] c"t\00"
@.str.24 = [12 x i8] c"temperature\00"
@.str.25 = [45 x i8] c"Set extrusion temperature in Celsius (M104).\00"
@.str.26 = [2 x i8] c"f\00"
@.str.27 = [35 x i8] c"Sets extrusion motor speed (M108).\00"
@.str.28 = [2 x i8] c"z\00"
@.str.29 = [10 x i8] c"[x][y][z]\00"
@.str.30 = [39 x i8] c"Zeroes the axes named in the argument.\00"
@.str.31 = [2 x i8] c"h\00"
@.str.32 = [28 x i8] c"Displays this help message.\00"
@__const.help.commands = [14 x [3 x i8*]] [[3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.17, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.22, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.25, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.27, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.30, i32 0, i32 0)], [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.32, i32 0, i32 0)], [3 x i8*] zeroinitializer]
@stderr = global i32 0
@.str.33 = [12 x i8] c"\09-%s %s\09%s\0A\00"
@.str.34 = [2 x i8] c"\09\00"
@str = [212 x i8] c"Each option represents one or more machine control or configuration messages. Messages are output in the order that their corresponding options were provided. Repeated options will result in repeated messages.\00"
define void @help(i8* %0) {
%2 = tail call i32 @usage(i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([212 x i8], [212 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %1, %14
%5 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %1 ], [ %21, %14 ]
%6 = phi i64 [ 0, %1 ], [ %19, %14 ]
%7 = load i32, i32* @stderr
%8 = lshr i64 12528, %6
%9 = and i64 %8, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* @__const.help.commands, i64 0, i64 %6, i64 1
%13 = load i8*, i8** %12
br label %14
14: ; preds = %4, %11
%15 = phi i8* [ %13, %11 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.34, i64 0, i64 0), %4 ]
%16 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* @__const.help.commands, i64 0, i64 %6, i64 2
%17 = load i8*, i8** %16
%18 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.33, i64 0, i64 0), i8* %5, i8* %15, i8* %17)
%19 = add nuw nsw i64 %6, 1
%20 = getelementptr inbounds [14 x [3 x i8*]], [14 x [3 x i8*]]* @__const.help.commands, i64 0, i64 %19, i64 0
%21 = load i8*, i8** %20
%22 = icmp eq i64 %19, 13
br i1 %22, label %23, label %4
23: ; preds = %14
ret void
}