#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 */
char *atrf_default_driver_name();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *,
                           char const *, char const *, int, char *, int, double,
                           int);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(
      stderr,
      "usage: %s [common_options] [-x] [message [repetitions]]\n"
      "       %s [common_options] -H [message]\n"
      "       %s [common_options] -E pause_s [repetitions]\n"
      "       %s [common_options] -P [max_wait_s]\n"
      "       %s [common_options] -R [-H|packets size]\n"
      "       %s [common_options] -T offset [command]\n\n"
      "  text message mode:\n"
      "    -x          message consists of hex bytes, optionally separated by\n"
      "                ' ', '.', ',', ':', or '-'\n"
      "    message     message string to send (if absent, receive)\n"
      "    repetitions number of times the message is sent (default 1)\n\n"
      "  text message mode (hard MAC):\n"
      "    -H          use hard MAC mode\n"
      "    message     message string to send (if absent, receive)\n\n"
      "  PER test mode (transmit only):\n"
      "    -E pause_s  seconds to pause between frames (floating-point)\n"
      "    repetitions number of messages to send (default: infinite)\n\n"
      "  Ping-pong mode:\n"
      "    -P          exchange packets between two stations\n"
      "    max_wait_s  generate a new packet if no response is received "
      "(master)\n\n"
      "  Round-trip time measurement:\n"
      "    -R          send/receive RTT measurement packets\n"
      "    packets     number of packets to send (master)\n"
      "    size        size of packets in bytes\n\n"
      "  constant wave test mode (transmit only):\n"
      "    -T offset   test mode. offset is the frequency offset of the "
      "constant\n"
      "                wave in MHz: -2, -0.5, or +0.5\n"
      "    command     shell command to run while transmitting (default: wait "
      "for\n"
      "                SIGINT instead)\n\n"
      "  common options: [-c channel|-f freq] [-C mhz] [-d driver[:arg]] [-o "
      "file]\n"
      "                  [-p power] [-q] [-r rate] [-t trim]\n"
      "    -c channel  channel number, 11 to 26 (default %d)\n"
      "    -C mhz      output clock at 1, 2, 4, 8, or 16 MHz (default: off)\n"
      "    -d driver[:arg]\n"
      "                use the specified driver (default: %s)\n"
      "    -f freq     frequency in MHz, 2405 to 2480 (default %d)\n"
      "    -o file     write received data to a file in pcap format\n"
      "    -p power    transmit power, -17.2 to 3.0 dBm (default %.1f)\n"
      "    -q          quick and quiet - suppress progress reports and "
      "warnings,\n"
      "                poll aggressively (currently only used when capturing)\n"
      "    -r rate     data rate, 250k, 500k, 1M, or 2M (default: 250k)\n"
      "    -t trim     trim capacitor, 0 to 15 (default %d)\n",
      name, name, name, name, name, name, 15, atrf_default_driver_name(),
      2405 + 5 * (15 - 11), -3.2, 8);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <atrf_default_driver_name@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x18(%rbp),%r11
mov    -0x10(%rbp),%r10
lea    0xe67(%rip),%rsi
movsd  0xe57(%rip),%xmm0
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
movl   $0xf,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0x979,0x20(%rsp)
movl   $0x8,0x28(%rsp)
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <atrf_default_driver_name@plt>
lea    0xebb(%rip),%rsi
movsd  0xeab(%rip),%xmm0
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %rbx,%r9
push   $0x8
push   $0x979
push   %rax
push   $0xf
push   %rbx
push   %rbx
call   1040 <fprintf@plt>
add    $0x30,%rsp
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2209 x i8] c"usage: %s [common_options] [-x] [message [repetitions]]\0A %s [common_options] -H [message]\0A %s [common_options] -E pause_s [repetitions]\0A %s [common_options] -P [max_wait_s]\0A %s [common_options] -R [-H|packets size]\0A %s [common_options] -T offset [command]\0A\0A text message mode:\0A -x message consists of hex bytes, optionally separated by\0A ' ', '.', ',', ':', or '-'\0A message message string to send (if absent, receive)\0A repetitions number of times the message is sent (default 1)\0A\0A text message mode (hard MAC):\0A -H use hard MAC mode\0A message message string to send (if absent, receive)\0A\0A PER test mode (transmit only):\0A -E pause_s seconds to pause between frames (floating-point)\0A repetitions number of messages to send (default: infinite)\0A\0A Ping-pong mode:\0A -P exchange packets between two stations\0A max_wait_s generate a new packet if no response is received (master)\0A\0A Round-trip time measurement:\0A -R send/receive RTT measurement packets\0A packets number of packets to send (master)\0A size size of packets in bytes\0A\0A constant wave test mode (transmit only):\0A -T offset test mode. offset is the frequency offset of the constant\0A wave in MHz: -2, -0.5, or +0.5\0A command shell command to run while transmitting (default: wait for\0A SIGINT instead)\0A\0A common options: [-c channel|-f freq] [-C mhz] [-d driver[:arg]] [-o file]\0A [-p power] [-q] [-r rate] [-t trim]\0A -c channel channel number, 11 to 26 (default %d)\0A -C mhz output clock at 1, 2, 4, 8, or 16 MHz (default: off)\0A -d driver[:arg]\0A use the specified driver (default: %s)\0A -f freq frequency in MHz, 2405 to 2480 (default %d)\0A -o file write received data to a file in pcap format\0A -p power transmit power, -17.2 to 3.0 dBm (default %.1f)\0A -q quick and quiet - suppress progress reports and warnings,\0A poll aggressively (currently only used when capturing)\0A -r rate data rate, 250k, 500k, 1M, or 2M (default: 250k)\0A -t trim trim capacitor, 0 to 15 (default %d)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = call i8* (...) @atrf_default_driver_name()
%11 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2209 x i8], [2209 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i32 15, i8* %10, i32 2425, double -3.200000e+00, i32 8)
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2209 x i8] c"usage: %s [common_options] [-x] [message [repetitions]]\0A %s [common_options] -H [message]\0A %s [common_options] -E pause_s [repetitions]\0A %s [common_options] -P [max_wait_s]\0A %s [common_options] -R [-H|packets size]\0A %s [common_options] -T offset [command]\0A\0A text message mode:\0A -x message consists of hex bytes, optionally separated by\0A ' ', '.', ',', ':', or '-'\0A message message string to send (if absent, receive)\0A repetitions number of times the message is sent (default 1)\0A\0A text message mode (hard MAC):\0A -H use hard MAC mode\0A message message string to send (if absent, receive)\0A\0A PER test mode (transmit only):\0A -E pause_s seconds to pause between frames (floating-point)\0A repetitions number of messages to send (default: infinite)\0A\0A Ping-pong mode:\0A -P exchange packets between two stations\0A max_wait_s generate a new packet if no response is received (master)\0A\0A Round-trip time measurement:\0A -R send/receive RTT measurement packets\0A packets number of packets to send (master)\0A size size of packets in bytes\0A\0A constant wave test mode (transmit only):\0A -T offset test mode. offset is the frequency offset of the constant\0A wave in MHz: -2, -0.5, or +0.5\0A command shell command to run while transmitting (default: wait for\0A SIGINT instead)\0A\0A common options: [-c channel|-f freq] [-C mhz] [-d driver[:arg]] [-o file]\0A [-p power] [-q] [-r rate] [-t trim]\0A -c channel channel number, 11 to 26 (default %d)\0A -C mhz output clock at 1, 2, 4, 8, or 16 MHz (default: off)\0A -d driver[:arg]\0A use the specified driver (default: %s)\0A -f freq frequency in MHz, 2405 to 2480 (default %d)\0A -o file write received data to a file in pcap format\0A -p power transmit power, -17.2 to 3.0 dBm (default %.1f)\0A -q quick and quiet - suppress progress reports and warnings,\0A poll aggressively (currently only used when capturing)\0A -r rate data rate, 250k, 500k, 1M, or 2M (default: 250k)\0A -t trim trim capacitor, 0 to 15 (default %d)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* (...) @atrf_default_driver_name()
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([2209 x i8], [2209 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i32 15, i8* %3, i32 2425, double -3.200000e+00, i32 8)
%5 = tail call i32 @exit(i32 1)
unreachable
}