#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void usage(FILE *output) {
  fprintf(
      output,
      " Usage: ioping [options...] directory|file|device\n"
      "        ioping -h | -v\n"
      "\n"
      " options:\n"
      "      -A, -async                 use asynchronous I/O\n"
      "      -C, -cached                use cached I/O (no cache flush/drop)\n"
      "      -D, -direct                use direct I/O (O_DIRECT)\n"
      "      -G, -read-write            read-write ping-pong mode\n"
      "      -L, -linear                use sequential operations\n"
      "      -N, -nowait                use nowait I/O (RWF_NOWAIT)\n"
      "      -W, -write                 use write I/O (please read manpage)\n"
      "      -Y, -sync                  use sync I/O (O_SYNC)\n"
      "      -y, -dsync                 use data sync I/O (O_DSYNC)\n"
      "      -R, -rapid                 test with rapid I/O during 3s (-q -i 0 "
      "-w 3)\n"
      "      -k, -keep                  keep and reuse temporary file "
      "(ioping.tmp)\n"
      "\n"
      " parameters:\n"
      "      -a, -warmup <count>        ignore <count> first requests (1)\n"
      "      -b, -burst <count>         make <count> requsts without delay "
      "(0)\n"
      "      -c, -count <count>         stop after <count> requests\n"
      "      -e, -entropy <seed>        seed for random number generator (0)\n"
      "      -i, -interval <time>       interval between requests (1s)\n"
      "      -s, -size <size>           request size (4k)\n"
      "      -S, -work-size <size>      working set size (1m)\n"
      "      -o, -work-offset <size>    working set offset (0)\n"
      "      -w, -work-time <time>      stop after <time> passed\n"
      "      -l, -speed-limit <size>    limit speed with <size> per second\n"
      "      -r, -rate-limit <count>    limit rate with <count> per second\n"
      "      -t, -min-time <time>       minimal valid request time (0us)\n"
      "      -T, -max-time <time>       maximum valid request time\n"
      "\n"
      " output:\n"
      "      -B, -batch                 print final statistics in raw format\n"
      "      -I, -time [format]         print current time for every request\n"
      "      -J, -json                  print output in JSON format\n"
      "      -p, -print-count <count>   print statistics for every <count> "
      "requests\n"
      "      -P, -print-interval <time> print statistics for every <time>\n"
      "      -q, -quiet                 suppress human-readable output\n"
      "      -h, -help                  display this message and exit\n"
      "      -v, -version               display version and exit\n"
      "\n");
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x86c,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [2157 x i8] c" Usage: ioping [options...] directory|file|device\0A ioping -h | -v\0A\0A options:\0A -A, -async use asynchronous I/O\0A -C, -cached use cached I/O (no cache flush/drop)\0A -D, -direct use direct I/O (O_DIRECT)\0A -G, -read-write read-write ping-pong mode\0A -L, -linear use sequential operations\0A -N, -nowait use nowait I/O (RWF_NOWAIT)\0A -W, -write use write I/O (please read manpage)\0A -Y, -sync use sync I/O (O_SYNC)\0A -y, -dsync use data sync I/O (O_DSYNC)\0A -R, -rapid test with rapid I/O during 3s (-q -i 0 -w 3)\0A -k, -keep keep and reuse temporary file (ioping.tmp)\0A\0A parameters:\0A -a, -warmup <count> ignore <count> first requests (1)\0A -b, -burst <count> make <count> requsts without delay (0)\0A -c, -count <count> stop after <count> requests\0A -e, -entropy <seed> seed for random number generator (0)\0A -i, -interval <time> interval between requests (1s)\0A -s, -size <size> request size (4k)\0A -S, -work-size <size> working set size (1m)\0A -o, -work-offset <size> working set offset (0)\0A -w, -work-time <time> stop after <time> passed\0A -l, -speed-limit <size> limit speed with <size> per second\0A -r, -rate-limit <count> limit rate with <count> per second\0A -t, -min-time <time> minimal valid request time (0us)\0A -T, -max-time <time> maximum valid request time\0A\0A output:\0A -B, -batch print final statistics in raw format\0A -I, -time [format] print current time for every request\0A -J, -json print output in JSON format\0A -p, -print-count <count> print statistics for every <count> requests\0A -P, -print-interval <time> print statistics for every <time>\0A -q, -quiet suppress human-readable output\0A -h, -help display this message and exit\0A -v, -version display version and exit\0A\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([2157 x i8], [2157 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2157 x i8] c" Usage: ioping [options...] directory|file|device\0A ioping -h | -v\0A\0A options:\0A -A, -async use asynchronous I/O\0A -C, -cached use cached I/O (no cache flush/drop)\0A -D, -direct use direct I/O (O_DIRECT)\0A -G, -read-write read-write ping-pong mode\0A -L, -linear use sequential operations\0A -N, -nowait use nowait I/O (RWF_NOWAIT)\0A -W, -write use write I/O (please read manpage)\0A -Y, -sync use sync I/O (O_SYNC)\0A -y, -dsync use data sync I/O (O_DSYNC)\0A -R, -rapid test with rapid I/O during 3s (-q -i 0 -w 3)\0A -k, -keep keep and reuse temporary file (ioping.tmp)\0A\0A parameters:\0A -a, -warmup <count> ignore <count> first requests (1)\0A -b, -burst <count> make <count> requsts without delay (0)\0A -c, -count <count> stop after <count> requests\0A -e, -entropy <seed> seed for random number generator (0)\0A -i, -interval <time> interval between requests (1s)\0A -s, -size <size> request size (4k)\0A -S, -work-size <size> working set size (1m)\0A -o, -work-offset <size> working set offset (0)\0A -w, -work-time <time> stop after <time> passed\0A -l, -speed-limit <size> limit speed with <size> per second\0A -r, -rate-limit <count> limit rate with <count> per second\0A -t, -min-time <time> minimal valid request time (0us)\0A -T, -max-time <time> maximum valid request time\0A\0A output:\0A -B, -batch print final statistics in raw format\0A -I, -time [format] print current time for every request\0A -J, -json print output in JSON format\0A -p, -print-count <count> print statistics for every <count> requests\0A -P, -print-interval <time> print statistics for every <time>\0A -q, -quiet suppress human-readable output\0A -h, -help display this message and exit\0A -v, -version display version and exit\0A\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([2157 x i8], [2157 x i8]* @.str, i64 0, i64 0), i64 2156, i64 1, i32* %0)
ret void
}