#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*/ printf(char *, char const *);
void usage(const char *prog) {
  printf("Usage: %s [-h] [-v,--verbose]\n"
         "  -C,--card <cardno> can be (0...3)\n"
         "  -A, --accelerator-type=GENWQE|CAPI CAPI is only available "
         "for System p\n"
         "  -V, --version             print version.\n"
         "  -q, --quiet               quiece output.\n"
         "  -w, --width <32|64>       access width, 64: default\n"
         "  -X, --cpu <id>            only run on this CPU.\n"
         "  -i, --interval <intv>     interval in usec, 0: default.\n"
         "  -c, --count <num>         number of peeks do be done, 1: default.\n"
         "  -e, --must-be <value>     compare and exit if not equal.\n"
         "  -n, --must-not-be <value> compare and exit if equal.\n"
         "  -a, --and-mask <value>    mask read value before compare.\n"
         "  -p, --psl-bar <bar>       access PSL bar (CAPI only)\n"
         "  <addr>\n"
         "\n"
         "Example:\n"
         "  genwqe_peek 0x0000\n"
         "  [00000000] 000000021032a178\n\n"
         "  for CAPI card (-A CAPI)\n"
         "    Reg 0x0000 CAPI Card Version Reg 1 (RO)\n"
         "    Reg 0x0008 CAPI Card Version Reg 2 (RO)\n"
         "    Reg 0x0080 CAPI Card Free Run Timer in 4 nsec (RO)\n"
         "    Reg 0x0180 Queue Work Time in 4 nsec (RO)\n"
         "    Reg 0x1000 ... 0x1028  6 Fir Registers (RW)\n"
         "\n"
         "   Only CAPI (debugging):\n"
         "     genwqe_peek -ACAPI -C0 --psl-bar=2 --width=64 0x150\n"
         "\n",
         prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1104 x i8] c"Usage: %s [-h] [-v,--verbose]\0A -C,--card <cardno> can be (0...3)\0A -A, --accelerator-type=GENWQE|CAPI CAPI is only available for System p\0A -V, --version print version.\0A -q, --quiet quiece output.\0A -w, --width <32|64> access width, 64: default\0A -X, --cpu <id> only run on this CPU.\0A -i, --interval <intv> interval in usec, 0: default.\0A -c, --count <num> number of peeks do be done, 1: default.\0A -e, --must-be <value> compare and exit if not equal.\0A -n, --must-not-be <value> compare and exit if equal.\0A -a, --and-mask <value> mask read value before compare.\0A -p, --psl-bar <bar> access PSL bar (CAPI only)\0A <addr>\0A\0AExample:\0A genwqe_peek 0x0000\0A [00000000] 000000021032a178\0A\0A for CAPI card (-A CAPI)\0A Reg 0x0000 CAPI Card Version Reg 1 (RO)\0A Reg 0x0008 CAPI Card Version Reg 2 (RO)\0A Reg 0x0080 CAPI Card Free Run Timer in 4 nsec (RO)\0A Reg 0x0180 Queue Work Time in 4 nsec (RO)\0A Reg 0x1000 ... 0x1028 6 Fir Registers (RW)\0A\0A Only CAPI (debugging):\0A genwqe_peek -ACAPI -C0 --psl-bar=2 --width=64 0x150\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([1104 x i8], [1104 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [1104 x i8] c"Usage: %s [-h] [-v,--verbose]\0A -C,--card <cardno> can be (0...3)\0A -A, --accelerator-type=GENWQE|CAPI CAPI is only available for System p\0A -V, --version print version.\0A -q, --quiet quiece output.\0A -w, --width <32|64> access width, 64: default\0A -X, --cpu <id> only run on this CPU.\0A -i, --interval <intv> interval in usec, 0: default.\0A -c, --count <num> number of peeks do be done, 1: default.\0A -e, --must-be <value> compare and exit if not equal.\0A -n, --must-not-be <value> compare and exit if equal.\0A -a, --and-mask <value> mask read value before compare.\0A -p, --psl-bar <bar> access PSL bar (CAPI only)\0A <addr>\0A\0AExample:\0A genwqe_peek 0x0000\0A [00000000] 000000021032a178\0A\0A for CAPI card (-A CAPI)\0A Reg 0x0000 CAPI Card Version Reg 1 (RO)\0A Reg 0x0008 CAPI Card Version Reg 2 (RO)\0A Reg 0x0080 CAPI Card Free Run Timer in 4 nsec (RO)\0A Reg 0x0180 Queue Work Time in 4 nsec (RO)\0A Reg 0x1000 ... 0x1028 6 Fir Registers (RW)\0A\0A Only CAPI (debugging):\0A genwqe_peek -ACAPI -C0 --psl-bar=2 --width=64 0x150\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1104 x i8], [1104 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}