#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 *,
                           int);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(
      stderr,
      "usage: %s [-c] [-d driver[:arg]] [-p] command|pattern ...\n\n"
      "  -c               cycle, waiting for Pass/Fail/Quit input\n"
      "  -d driver[:arg]  use the specified driver (default: %s)\n"
      "  -p               stay in P_ON state instead of entering TRX_OFF\n\n"
      "  command is one of:\n"
      "    reg=value    set transceiver register\n"
      "    reg:[value[/mask]]\n"
      "                 read transceiver register and (optionally) verify "
      "value\n"
      "    addr!value   write one byte to SRAM\n"
      "    addr/value   read and verify one byte from SRAM\n"
      "    delay[=ms]   wait the specified number of milliseconds (default: %d "
      "ms)\n"
      "    frame        write a one-byte frame to the frame buffer\n"
      "    reset        reset the transceiver\n"
      "    slp_tr       pulse SLP_TR\n"
      "    #...         comment\n\n"
      "  pattern is a sequence of the following characters:\n"
      "    0 = output a strong 0               1 = output a strong 1\n"
      "    L = pull up, expect to read 0       H = pull up, expect to read 1\n"
      "    l/o = no pull-up, expect to read 0  h = no pull-up, expect to read "
      "1\n"
      "    Z = pull up, don't read             z = no pull-up, don't read\n"
      "    x = don't care                      . = separator\n",
      name, atrf_default_driver_name(), 10);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <atrf_default_driver_name@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe98(%rip),%rsi
mov    $0xa,%r8d
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    0xeb3(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
mov    $0xa,%r8d
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [1105 x i8] c"usage: %s [-c] [-d driver[:arg]] [-p] command|pattern ...\0A\0A -c cycle, waiting for Pass/Fail/Quit input\0A -d driver[:arg] use the specified driver (default: %s)\0A -p stay in P_ON state instead of entering TRX_OFF\0A\0A command is one of:\0A reg=value set transceiver register\0A reg:[value[/mask]]\0A read transceiver register and (optionally) verify value\0A addr!value write one byte to SRAM\0A addr/value read and verify one byte from SRAM\0A delay[=ms] wait the specified number of milliseconds (default: %d ms)\0A frame write a one-byte frame to the frame buffer\0A reset reset the transceiver\0A slp_tr pulse SLP_TR\0A #... comment\0A\0A pattern is a sequence of the following characters:\0A 0 = output a strong 0 1 = output a strong 1\0A L = pull up, expect to read 0 H = pull up, expect to read 1\0A l/o = no pull-up, expect to read 0 h = no pull-up, expect to read 1\0A Z = pull up, don't read z = no pull-up, don't read\0A x = don't care . = separator\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 = call i8* (...) @atrf_default_driver_name()
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([1105 x i8], [1105 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i32 10)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [1105 x i8] c"usage: %s [-c] [-d driver[:arg]] [-p] command|pattern ...\0A\0A -c cycle, waiting for Pass/Fail/Quit input\0A -d driver[:arg] use the specified driver (default: %s)\0A -p stay in P_ON state instead of entering TRX_OFF\0A\0A command is one of:\0A reg=value set transceiver register\0A reg:[value[/mask]]\0A read transceiver register and (optionally) verify value\0A addr!value write one byte to SRAM\0A addr/value read and verify one byte from SRAM\0A delay[=ms] wait the specified number of milliseconds (default: %d ms)\0A frame write a one-byte frame to the frame buffer\0A reset reset the transceiver\0A slp_tr pulse SLP_TR\0A #... comment\0A\0A pattern is a sequence of the following characters:\0A 0 = output a strong 0 1 = output a strong 1\0A L = pull up, expect to read 0 H = pull up, expect to read 1\0A l/o = no pull-up, expect to read 0 h = no pull-up, expect to read 1\0A Z = pull up, don't read z = no pull-up, don't read\0A x = don't care . = separator\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 ([1105 x i8], [1105 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i32 10)
%5 = tail call i32 @exit(i32 1)
unreachable
}