#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr,
      "\n"
      "usage: m [options] [arg] [arg] [op] [....]\n"
      "\n"
      "if no options given, all output formats are done simultaneously.\n"
      "\n"
      "    -s       assembly format output\n"
      "    -b       binary format output\n"
      "    -B base  output in arbitrary base\n"
      "    -d       decimal format output\n"
      "    -u       unsigned decimal output\n"
      "    -h       hex output\n"
      "    -o       octal output\n"
      "    -x       print this help message\n"
      "    -4       restrict output to 32 bits (4 bytes)\n"
      "\n"
      "when inputting hex numbers, can use either '0x' prefix or 'h' suffix.\n"
      "if hex number contains letters, no prefix or suffix required. \n"
      "ppc assembly format also supported, enter in form '@ha,@l' with comma.\n"
      "\n"
      "calculations are stack-based -- push args then call operation. "
      "operation\n"
      "pops required arguments then pushes back result. stack can be up to 20 "
      "deep\n"
      "but must be only one deep after final calculation. operations when "
      "there\n"
      "are not enough stack args for calculation results in error. more than "
      "one\n"
      "stack item left at the end is also an error.\n"
      "\n"
      "valid ops are: + - * times / %% and or xor not swap32 swap16 \n"
      "               rshift >> lshift << lt < lteq <= gt > gteq >= eq == \n"
      "\n"
      "examples:\n"
      "\n"
      "    m -d 4 1 +          gives '5'\n"
      "    m -h 4f29e 814f -   gives '0004714f'\n"
      "    m -d 4 4            gives 'stack not reduced to one item' error\n"
      "    m -d 4 +            gives 'not enough args for +' error\n"
      "    m -s 0x294f81       gives '41,20353'\n"
      "    m -h 41,0x4f81      gives '00414f81'\n"
      "\n"
      "note on the last example that even though @ha looks like decimal it is\n"
      "interpreted as hex because the @l is given in hex.  @ha and @l can be "
      "in\n"
      "hex or dec, but they must both be the same radix.\n"
      "\n"
      "input numbers can be of the following forms: \n"
      "                       -?[0-7]+o : octal\n"
      "                         -?[0-9] : decimal\n"
      "                       [0-9a-f]+ : hex (implicit)\n"
      "                   -?0x[0-9a-f]+ : hex (prefix format)\n"
      "                      [0-9a-f]+h : hex (emon format)\n"
      "               -?[0-9]+,-?[0-9]+ : assembly decimal implicit\n"
      "     -?0x[0-9a-f]+,-?0x[0-9a-f]+ : assembly hex explicit\n"
      "           -?[0-9A-Za-z]+@[0-9]+ : arbitrary base (number@base)\n"
      "                        [01]+bin : binary explicit\n"
      "\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2122 x i8] c"\0Ausage: m [options] [arg] [arg] [op] [....]\0A\0Aif no options given, all output formats are done simultaneously.\0A\0A -s assembly format output\0A -b binary format output\0A -B base output in arbitrary base\0A -d decimal format output\0A -u unsigned decimal output\0A -h hex output\0A -o octal output\0A -x print this help message\0A -4 restrict output to 32 bits (4 bytes)\0A\0Awhen inputting hex numbers, can use either '0x' prefix or 'h' suffix.\0Aif hex number contains letters, no prefix or suffix required. \0Appc assembly format also supported, enter in form '@ha,@l' with comma.\0A\0Acalculations are stack-based -- push args then call operation. operation\0Apops required arguments then pushes back result. stack can be up to 20 deep\0Abut must be only one deep after final calculation. operations when there\0Aare not enough stack args for calculation results in error. more than one\0Astack item left at the end is also an error.\0A\0Avalid ops are: + - * times / %% and or xor not swap32 swap16 \0A rshift >> lshift << lt < lteq <= gt > gteq >= eq == \0A\0Aexamples:\0A\0A m -d 4 1 + gives '5'\0A m -h 4f29e 814f - gives '0004714f'\0A m -d 4 4 gives 'stack not reduced to one item' error\0A m -d 4 + gives 'not enough args for +' error\0A m -s 0x294f81 gives '41,20353'\0A m -h 41,0x4f81 gives '00414f81'\0A\0Anote on the last example that even though @ha looks like decimal it is\0Ainterpreted as hex because the @l is given in hex. @ha and @l can be in\0Ahex or dec, but they must both be the same radix.\0A\0Ainput numbers can be of the following forms: \0A -?[0-7]+o : octal\0A -?[0-9] : decimal\0A [0-9a-f]+ : hex (implicit)\0A -?0x[0-9a-f]+ : hex (prefix format)\0A [0-9a-f]+h : hex (emon format)\0A -?[0-9]+,-?[0-9]+ : assembly decimal implicit\0A -?0x[0-9a-f]+,-?0x[0-9a-f]+ : assembly hex explicit\0A -?[0-9A-Za-z]+@[0-9]+ : arbitrary base (number@base)\0A [01]+bin : binary explicit\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2122 x i8], [2122 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2122 x i8] c"\0Ausage: m [options] [arg] [arg] [op] [....]\0A\0Aif no options given, all output formats are done simultaneously.\0A\0A -s assembly format output\0A -b binary format output\0A -B base output in arbitrary base\0A -d decimal format output\0A -u unsigned decimal output\0A -h hex output\0A -o octal output\0A -x print this help message\0A -4 restrict output to 32 bits (4 bytes)\0A\0Awhen inputting hex numbers, can use either '0x' prefix or 'h' suffix.\0Aif hex number contains letters, no prefix or suffix required. \0Appc assembly format also supported, enter in form '@ha,@l' with comma.\0A\0Acalculations are stack-based -- push args then call operation. operation\0Apops required arguments then pushes back result. stack can be up to 20 deep\0Abut must be only one deep after final calculation. operations when there\0Aare not enough stack args for calculation results in error. more than one\0Astack item left at the end is also an error.\0A\0Avalid ops are: + - * times / %% and or xor not swap32 swap16 \0A rshift >> lshift << lt < lteq <= gt > gteq >= eq == \0A\0Aexamples:\0A\0A m -d 4 1 + gives '5'\0A m -h 4f29e 814f - gives '0004714f'\0A m -d 4 4 gives 'stack not reduced to one item' error\0A m -d 4 + gives 'not enough args for +' error\0A m -s 0x294f81 gives '41,20353'\0A m -h 41,0x4f81 gives '00414f81'\0A\0Anote on the last example that even though @ha looks like decimal it is\0Ainterpreted as hex because the @l is given in hex. @ha and @l can be in\0Ahex or dec, but they must both be the same radix.\0A\0Ainput numbers can be of the following forms: \0A -?[0-7]+o : octal\0A -?[0-9] : decimal\0A [0-9a-f]+ : hex (implicit)\0A -?0x[0-9a-f]+ : hex (prefix format)\0A [0-9a-f]+h : hex (emon format)\0A -?[0-9]+,-?[0-9]+ : assembly decimal implicit\0A -?0x[0-9a-f]+,-?0x[0-9a-f]+ : assembly hex explicit\0A -?[0-9A-Za-z]+@[0-9]+ : arbitrary base (number@base)\0A [01]+bin : binary explicit\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2122 x i8], [2122 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}