#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *argv[]) {
  fprintf(
      stderr,
      "Usage: %s [-s seed] [-f files] [-S size] [-r] [-u] [-U] [-C dir]\n"
      "\n"
      "disk-filltest "
      "0.8.2"
      " is a simple program which fills a path with random\n"
      "data and then rereads the files to check that the random sequence was\n"
      "correctly stored.\n"
      "\n"
      "Options: \n"
      "  -C <dir>          Change into given directory before starting work.\n"
      "  -f <file number>  Only write this number of 1 GiB sized files.\n"
      "  -N                Skip verification, e.g. for just wiping a disk.\n"
      "  -r                Only verify existing data files with given random "
      "seed.\n"
      "  -R <times>        Repeat fill/test/wipe steps given number of times.\n"
      "  -s <random seed>  Use random seed to write or verify data files.\n"
      "  -S <size>         Size of each random file in MiB (default: 1024).\n"
      "  -u                Remove files after successful test.\n"
      "  -U                Immediately remove files, write and verify via file "
      "handles.\n"
      "  -V                Print version and exit.\n"
      "\n",
      argv[0]);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [905 x i8] c"Usage: %s [-s seed] [-f files] [-S size] [-r] [-u] [-U] [-C dir]\0A\0Adisk-filltest 0.8.2 is a simple program which fills a path with random\0Adata and then rereads the files to check that the random sequence was\0Acorrectly stored.\0A\0AOptions: \0A -C <dir> Change into given directory before starting work.\0A -f <file number> Only write this number of 1 GiB sized files.\0A -N Skip verification, e.g. for just wiping a disk.\0A -r Only verify existing data files with given random seed.\0A -R <times> Repeat fill/test/wipe steps given number of times.\0A -s <random seed> Use random seed to write or verify data files.\0A -S <size> Size of each random file in MiB (default: 1024).\0A -u Remove files after successful test.\0A -U Immediately remove files, write and verify via file handles.\0A -V Print version and exit.\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([905 x i8], [905 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [905 x i8] c"Usage: %s [-s seed] [-f files] [-S size] [-r] [-u] [-U] [-C dir]\0A\0Adisk-filltest 0.8.2 is a simple program which fills a path with random\0Adata and then rereads the files to check that the random sequence was\0Acorrectly stored.\0A\0AOptions: \0A -C <dir> Change into given directory before starting work.\0A -f <file number> Only write this number of 1 GiB sized files.\0A -N Skip verification, e.g. for just wiping a disk.\0A -r Only verify existing data files with given random seed.\0A -R <times> Repeat fill/test/wipe steps given number of times.\0A -s <random seed> Use random seed to write or verify data files.\0A -S <size> Size of each random file in MiB (default: 1024).\0A -u Remove files after successful test.\0A -U Immediately remove files, write and verify via file handles.\0A -V Print version and exit.\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([905 x i8], [905 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}