#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 *, ...);
int /*<<< orphan*/ stderr;
int usage(const char *prog, const char *msg) {
  if (msg) {
    fprintf(stderr, "%s\n\n", msg);
  }
  fprintf(
      stderr,
      "Usage: %s [options] [<gcode-filename>]\n"
      "Options:\n"
      "  --steps-mm <axis-steps>   : steps/mm, comma separated[*] (Default "
      "160,160,160,40,0, ...).\n"
      "                                (negative for reverse)\n"
      "  --max-feedrate <rate> (-m): Max. feedrate per axis (mm/s), comma "
      "separated[*] (Default: 200,200,90,10,0, ...).\n"
      "  --accel <accel>       (-a): Acceleration per axis (mm/s^2), comma "
      "separated[*] (Default 4000,4000,1000,10000,0, ...).\n"
      "  --axis-mapping            : Axis letter mapped to which motor "
      "connector (=string pos)\n"
      "                                Use letter or '_' for empty slot.\n"
      "                                You can use the same letter multiple "
      "times for mirroring.\n"
      "                                Use lowercase to reverse. (Default: "
      "'XYZEA')\n"
      "  --range <range-mm>    (-r): Comma separated range of of axes in mm "
      "(0..range[axis]). Only\n"
      "                                values > 0 are actively clipped. "
      "(Default: 100,100,100,-1,-1, ...)\n"
      "  --min-endswitch           : Axis letter mapped to which endstop "
      "connector for negative travel (=string pos)\n"
      "                                Use letter or '_' for unused endstop.\n"
      "                                Use uppercase if endstop is used for "
      "homimg, lowercase if used for travel limit.\n"
      "  --max-endswitch           : Axis letter mapped to which endstop "
      "connector for positive travel (=string pos)\n"
      "                                Use letter or '_' for unused endstop.\n"
      "                                Use uppercase if endstop is used for "
      "homimg, lowercase if used for travel limit.\n"
      "  --home-order              : Order to home axes, all axes involved "
      "with homing should be listed (Default: ZXY)\n"
      "  --require-homing          : If set, machine refuses to work unless "
      "homed\n"
      "  --disable-range-check     : Don't limit at machine bounds. "
      "Dangerous.\n"
      "  --endswitch-polarity      : 'Hit' polarity for each endstop connector "
      "(=string pos).\n"
      "                                Use '1' or '+' for logic high trigger.\n"
      "                                Use '0' or '-' for logic low trigger.\n"
      "                                Use '_' for unused endstops.\n"
      "  --port <port>         (-p): Listen on this TCP port for GCode.\n"
      "  --bind-addr <bind-ip> (-b): Bind to this IP (Default: 0.0.0.0).\n"
      "  -f <factor>               : Print speed factor (Default 1.0).\n"
      "  -n                        : Dryrun; don't send to motors (Default: "
      "off).\n"
      "  -P                        : Verbose: Print motor commands (Default: "
      "off).\n"
      "  -S                        : Synchronous: don't queue (Default: off).\n"
      "  --loop[=count]            : Loop file number of times (no value: "
      "forever; equal sign with value important.)\n",
      prog);
  fprintf(stderr, "[*] All comma separated axis numerical values are in the "
                  "sequence X,Y,Z,E,A,B,C,U,V,W\n");
  fprintf(stderr,
          "(the actual mapping to a connector happens with --axis-mapping,\n");
  fprintf(stderr, "the default values map the channels left to right on the "
                  "Bumps-board as X,Y,Z,E,A)\n");
  fprintf(stderr, "You can either specify --port <port> to listen for commands "
                  "or give a GCode-filename\n");
  fprintf(stderr,
          "All numbers can be given as multiplicative expression\n"
          "which makes microstepping and unit conversions more readable\n"
          "e.g. --steps-mm '16*200/(25.4/4),8*200/4'\n");
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <usage+0x36>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeab(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0x18be(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
lea    0x18fe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
lea    0x1928(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
lea    0x1965(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    0x19a4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     1136 <usage+0x26>
mov    %rsi,%rdx
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x18d6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x191d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x194e(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1992(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x19d8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [2602 x i8] c"Usage: %s [options] [<gcode-filename>]\0AOptions:\0A --steps-mm <axis-steps> : steps/mm, comma separated[*] (Default 160,160,160,40,0, ...).\0A (negative for reverse)\0A --max-feedrate <rate> (-m): Max. feedrate per axis (mm/s), comma separated[*] (Default: 200,200,90,10,0, ...).\0A --accel <accel> (-a): Acceleration per axis (mm/s^2), comma separated[*] (Default 4000,4000,1000,10000,0, ...).\0A --axis-mapping : Axis letter mapped to which motor connector (=string pos)\0A Use letter or '_' for empty slot.\0A You can use the same letter multiple times for mirroring.\0A Use lowercase to reverse. (Default: 'XYZEA')\0A --range <range-mm> (-r): Comma separated range of of axes in mm (0..range[axis]). Only\0A values > 0 are actively clipped. (Default: 100,100,100,-1,-1, ...)\0A --min-endswitch : Axis letter mapped to which endstop connector for negative travel (=string pos)\0A Use letter or '_' for unused endstop.\0A Use uppercase if endstop is used for homimg, lowercase if used for travel limit.\0A --max-endswitch : Axis letter mapped to which endstop connector for positive travel (=string pos)\0A Use letter or '_' for unused endstop.\0A Use uppercase if endstop is used for homimg, lowercase if used for travel limit.\0A --home-order : Order to home axes, all axes involved with homing should be listed (Default: ZXY)\0A --require-homing : If set, machine refuses to work unless homed\0A --disable-range-check : Don't limit at machine bounds. Dangerous.\0A --endswitch-polarity : 'Hit' polarity for each endstop connector (=string pos).\0A Use '1' or '+' for logic high trigger.\0A Use '0' or '-' for logic low trigger.\0A Use '_' for unused endstops.\0A --port <port> (-p): Listen on this TCP port for GCode.\0A --bind-addr <bind-ip> (-b): Bind to this IP (Default: 0.0.0.0).\0A -f <factor> : Print speed factor (Default 1.0).\0A -n : Dryrun; don't send to motors (Default: off).\0A -P : Verbose: Print motor commands (Default: off).\0A -S : Synchronous: don't queue (Default: off).\0A --loop[=count] : Loop file number of times (no value: forever; equal sign with value important.)\0A\00"
@.str.2 = [87 x i8] c"[*] All comma separated axis numerical values are in the sequence X,Y,Z,E,A,B,C,U,V,W\0A\00"
@.str.3 = [65 x i8] c"(the actual mapping to a connector happens with --axis-mapping,\0A\00"
@.str.4 = [84 x i8] c"the default values map the channels left to right on the Bumps-board as X,Y,Z,E,A)\0A\00"
@.str.5 = [86 x i8] c"You can either specify --port <port> to listen for commands or give a GCode-filename\0A\00"
@.str.6 = [158 x i8] c"All numbers can be given as multiplicative expression\0Awhich makes microstepping and unit conversions more readable\0Ae.g. --steps-mm '16*200/(25.4/4),8*200/4'\0A\00"
define i32 @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([2602 x i8], [2602 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.4, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.6, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [2602 x i8] c"Usage: %s [options] [<gcode-filename>]\0AOptions:\0A --steps-mm <axis-steps> : steps/mm, comma separated[*] (Default 160,160,160,40,0, ...).\0A (negative for reverse)\0A --max-feedrate <rate> (-m): Max. feedrate per axis (mm/s), comma separated[*] (Default: 200,200,90,10,0, ...).\0A --accel <accel> (-a): Acceleration per axis (mm/s^2), comma separated[*] (Default 4000,4000,1000,10000,0, ...).\0A --axis-mapping : Axis letter mapped to which motor connector (=string pos)\0A Use letter or '_' for empty slot.\0A You can use the same letter multiple times for mirroring.\0A Use lowercase to reverse. (Default: 'XYZEA')\0A --range <range-mm> (-r): Comma separated range of of axes in mm (0..range[axis]). Only\0A values > 0 are actively clipped. (Default: 100,100,100,-1,-1, ...)\0A --min-endswitch : Axis letter mapped to which endstop connector for negative travel (=string pos)\0A Use letter or '_' for unused endstop.\0A Use uppercase if endstop is used for homimg, lowercase if used for travel limit.\0A --max-endswitch : Axis letter mapped to which endstop connector for positive travel (=string pos)\0A Use letter or '_' for unused endstop.\0A Use uppercase if endstop is used for homimg, lowercase if used for travel limit.\0A --home-order : Order to home axes, all axes involved with homing should be listed (Default: ZXY)\0A --require-homing : If set, machine refuses to work unless homed\0A --disable-range-check : Don't limit at machine bounds. Dangerous.\0A --endswitch-polarity : 'Hit' polarity for each endstop connector (=string pos).\0A Use '1' or '+' for logic high trigger.\0A Use '0' or '-' for logic low trigger.\0A Use '_' for unused endstops.\0A --port <port> (-p): Listen on this TCP port for GCode.\0A --bind-addr <bind-ip> (-b): Bind to this IP (Default: 0.0.0.0).\0A -f <factor> : Print speed factor (Default 1.0).\0A -n : Dryrun; don't send to motors (Default: off).\0A -P : Verbose: Print motor commands (Default: off).\0A -S : Synchronous: don't queue (Default: off).\0A --loop[=count] : Loop file number of times (no value: forever; equal sign with value important.)\0A\00"
@.str.2 = [87 x i8] c"[*] All comma separated axis numerical values are in the sequence X,Y,Z,E,A,B,C,U,V,W\0A\00"
@.str.3 = [65 x i8] c"(the actual mapping to a connector happens with --axis-mapping,\0A\00"
@.str.4 = [84 x i8] c"the default values map the channels left to right on the Bumps-board as X,Y,Z,E,A)\0A\00"
@.str.5 = [86 x i8] c"You can either specify --port <port> to listen for commands or give a GCode-filename\0A\00"
@.str.6 = [158 x i8] c"All numbers can be given as multiplicative expression\0Awhich makes microstepping and unit conversions more readable\0Ae.g. --steps-mm '16*200/(25.4/4),8*200/4'\0A\00"
define i32 @usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([2602 x i8], [2602 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.6, i64 0, i64 0))
ret i32 1
}