#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 <mum>         number of pokes, 1: default\n"
         "  -r, --read-back           read back and verify.\n"
         "  -p, --psl-bar <bar>       access PSL bar (CAPI only)\n"
         "  -m, --mask <mask>         x = (x & ~mask) | (val & mask)\n"
         "  <addr> <val>\n"
         "\n"
         "Example:\n"
         "  genwqe_poke 0x0000000 0xdeadbeef\n"
         "\n"
         "Testcase to trigger error recovery code on genwqe card:\n"
         "   Fatal GFIR:\n"
         "     genwqe_poke -C0 0x00000008 0x001\n"
         "   Info GFIR by writing to VF:\n"
         "     genwqe_poke -C2 0x00020020 0x800\n"
         "\n"
         "   Registers for Capi card (-A CAPI)\n"
         "     FIR Reg:      0x1000 ... 0x1028, 6 Regs\n"
         "     Err. Inj Reg: 0x1800 and 0x1808\n"
         "     Agr. Regs:    0x2000 and 0x2078\n"
         "     Gzip Regs:    0x2100 and 0x2178\n"
         "\n"
         "   Only CAPI (debugging):\n"
         "     genwqe_poke -ACAPI -C0 --psl-bar=2 --width=64 --mask <mask> "
         "<offs> <data>\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 = [1148 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 <mum> number of pokes, 1: default\0A -r, --read-back read back and verify.\0A -p, --psl-bar <bar> access PSL bar (CAPI only)\0A -m, --mask <mask> x = (x & ~mask) | (val & mask)\0A <addr> <val>\0A\0AExample:\0A genwqe_poke 0x0000000 0xdeadbeef\0A\0ATestcase to trigger error recovery code on genwqe card:\0A Fatal GFIR:\0A genwqe_poke -C0 0x00000008 0x001\0A Info GFIR by writing to VF:\0A genwqe_poke -C2 0x00020020 0x800\0A\0A Registers for Capi card (-A CAPI)\0A FIR Reg: 0x1000 ... 0x1028, 6 Regs\0A Err. Inj Reg: 0x1800 and 0x1808\0A Agr. Regs: 0x2000 and 0x2078\0A Gzip Regs: 0x2100 and 0x2178\0A\0A Only CAPI (debugging):\0A genwqe_poke -ACAPI -C0 --psl-bar=2 --width=64 --mask <mask> <offs> <data>\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 ([1148 x i8], [1148 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [1148 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 <mum> number of pokes, 1: default\0A -r, --read-back read back and verify.\0A -p, --psl-bar <bar> access PSL bar (CAPI only)\0A -m, --mask <mask> x = (x & ~mask) | (val & mask)\0A <addr> <val>\0A\0AExample:\0A genwqe_poke 0x0000000 0xdeadbeef\0A\0ATestcase to trigger error recovery code on genwqe card:\0A Fatal GFIR:\0A genwqe_poke -C0 0x00000008 0x001\0A Info GFIR by writing to VF:\0A genwqe_poke -C2 0x00020020 0x800\0A\0A Registers for Capi card (-A CAPI)\0A FIR Reg: 0x1000 ... 0x1028, 6 Regs\0A Err. Inj Reg: 0x1800 and 0x1808\0A Agr. Regs: 0x2000 and 0x2078\0A Gzip Regs: 0x2100 and 0x2178\0A\0A Only CAPI (debugging):\0A genwqe_poke -ACAPI -C0 --psl-bar=2 --width=64 --mask <mask> <offs> <data>\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1148 x i8], [1148 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}