#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 *, char const *);
void usage(const char *prog) {
  printf("Usage: %s\n"
         "  -h, --help               print usage information\n"
         "  -v, --verbose            verbose mode\n"
         "  -C, --card <cardno>      use this card for operation\n"
         "  -A, --accelerator-type=GENWQE|CAPI CAPI is only available "
         "for System p\n"
         "  -V, --version\n"
         "  -q, --quiet              quiece output\n"
         "  -c, --count <number>     do multiple memcopies\n"
         "  -l, --preload <number>   preload multiple ddcb's. "
         "(default 1, only for CAPI Card)\n"
         "  -X, --cpu <cpu>          only run on this CPU\n"
         "  -D, --debug              create debug data on failure\n"
         "  -G, --use-sglist         use the scatter gather list\n"
         "  -n, --nonblocking        use nonblcoking behavior\n"
         "  -p, --patternfile <filename>]\n"
         "  -s, --bufsize <bufsize>  default is 4KiB\n"
         "  -i, --pgoffs_i <offs>    byte offset for input buffer\n"
         "  -o, --pgoffs_o <offs>    byte offset for output buffer\n"
         "  -F, --force-compare <output_data.bin>\n"
         "  -t, --threads <num>      run <num> threads, default is 1\n"
         "  -Y, --inject-error <err> IN:0x1, OUT:0x2, SIZE:0x4, DDCB:0x8\n"
         "\n"
         "This utility sends memcopy DDCBs to the application\n"
         "chip unit. It can be used to check the cards health and/or\n"
         "to produce stress on the card to verify its correct\n"
         "function.\n"
         "\n"
         "Example:\n"
         "    dd if=/dev/urandom bs=4096 count=1024 of=input_data.bin\n"
         "    %s -C0 -F -D --patternfile input_data.bin output_data.bin\n"
         "    echo $?\n"
         "    diff input_data.bin output_data.bin\n"
         "    echo $?\n"
         "\n",
         prog, prog);
}


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

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

LLVM IR (-O0):
@.str = [1352 x i8] c"Usage: %s\0A -h, --help print usage information\0A -v, --verbose verbose mode\0A -C, --card <cardno> use this card for operation\0A -A, --accelerator-type=GENWQE|CAPI CAPI is only available for System p\0A -V, --version\0A -q, --quiet quiece output\0A -c, --count <number> do multiple memcopies\0A -l, --preload <number> preload multiple ddcb's. (default 1, only for CAPI Card)\0A -X, --cpu <cpu> only run on this CPU\0A -D, --debug create debug data on failure\0A -G, --use-sglist use the scatter gather list\0A -n, --nonblocking use nonblcoking behavior\0A -p, --patternfile <filename>]\0A -s, --bufsize <bufsize> default is 4KiB\0A -i, --pgoffs_i <offs> byte offset for input buffer\0A -o, --pgoffs_o <offs> byte offset for output buffer\0A -F, --force-compare <output_data.bin>\0A -t, --threads <num> run <num> threads, default is 1\0A -Y, --inject-error <err> IN:0x1, OUT:0x2, SIZE:0x4, DDCB:0x8\0A\0AThis utility sends memcopy DDCBs to the application\0Achip unit. It can be used to check the cards health and/or\0Ato produce stress on the card to verify its correct\0Afunction.\0A\0AExample:\0A dd if=/dev/urandom bs=4096 count=1024 of=input_data.bin\0A %s -C0 -F -D --patternfile input_data.bin output_data.bin\0A echo $?\0A diff input_data.bin output_data.bin\0A echo $?\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([1352 x i8], [1352 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [1352 x i8] c"Usage: %s\0A -h, --help print usage information\0A -v, --verbose verbose mode\0A -C, --card <cardno> use this card for operation\0A -A, --accelerator-type=GENWQE|CAPI CAPI is only available for System p\0A -V, --version\0A -q, --quiet quiece output\0A -c, --count <number> do multiple memcopies\0A -l, --preload <number> preload multiple ddcb's. (default 1, only for CAPI Card)\0A -X, --cpu <cpu> only run on this CPU\0A -D, --debug create debug data on failure\0A -G, --use-sglist use the scatter gather list\0A -n, --nonblocking use nonblcoking behavior\0A -p, --patternfile <filename>]\0A -s, --bufsize <bufsize> default is 4KiB\0A -i, --pgoffs_i <offs> byte offset for input buffer\0A -o, --pgoffs_o <offs> byte offset for output buffer\0A -F, --force-compare <output_data.bin>\0A -t, --threads <num> run <num> threads, default is 1\0A -Y, --inject-error <err> IN:0x1, OUT:0x2, SIZE:0x4, DDCB:0x8\0A\0AThis utility sends memcopy DDCBs to the application\0Achip unit. It can be used to check the cards health and/or\0Ato produce stress on the card to verify its correct\0Afunction.\0A\0AExample:\0A dd if=/dev/urandom bs=4096 count=1024 of=input_data.bin\0A %s -C0 -F -D --patternfile input_data.bin output_data.bin\0A echo $?\0A diff input_data.bin output_data.bin\0A echo $?\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1352 x i8], [1352 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}