#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 *, ...);
void help(char *name) {
  printf("Replicates all IO syscalls defined in file by -f option.\n\n");
  printf("Usage: %s [OPERATION] -f <file> [OPTIONS]\n\n", name);
  printf("%s is primary used to replicate recorded IO system calls.\nIn order "
         "to do that, several other helper functionality exists.\n\n",
         name);
  printf("Usage: %s -c -f <file> [-F <format>] [-o <out>] [-v]\n", name);
  printf("   converts <file> in format <format> to binary form into file "
         "<out>\n\n");
  printf("Usage: %s -S -f <file> [-v]\n", name);
  printf("   displays some statistics about syscalls recorded in <file> (must "
         "be in "
         "strace"
         " format)\n\n");
  printf("Usage: %s -P -f <file> [-F <format>] [-v]\n", name);
  printf("   prints syscalls in normalized format\n\n");
  printf("Usage: %s -C -f <file> [-F <format>] [-i <file>] [-m <file>] [-v]\n",
         name);
  printf("   checks whether local enviroment is ready for replaying traces "
         "recorded in <file>.\n\n");
  printf("Usage: %s -r -f <file> [-F <format>] [-t <mode>] [-s <factor>] [-b "
         "<number>] [-i <file>] [-m <file>] [-v]\n",
         name);
  printf("   replicates traces recorded in <file>. Use -C prior to running "
         "this.\n");
  printf(
      "\n -b --bind <number>  bind replicating process to processor number "
      "<number>\n -c --convert        file to binary form, see also -o\n -C "
      "--check          checks that all operations recorded in the file "
      "specied by -f will\n                     succeed (ie. will result in "
      "same return code).\n                     It takes -i and -m into "
      "account. See also -p.\n -d --dont-fix       turns off fixing of missing "
      "system calls (uncomplete strace output support)\n -f --file <file>    "
      "sets filename to <file>\n -F --format <fmt>   specifies input format of "
      "the file.\n                     Options: "
      "strace"
      ", "
      "bin"
      ".\n                     Check README for details. Default is "
      "strace"
      ".\n -h --help           prints this message\n -i --ignore <file>  sets "
      "file containing names which we should not touch during\n                "
      "     replaying. I.e. no syscall operation will be performed on given "
      "file.\n -m --map <file>     sets containing file names mapping. When "
      "opening file,\n                     if there is mapping for it, it will "
      "open mapped file instead.\n                     See README for more "
      "information.\n -o --output <file>  output filename when converting. "
      "Default: strace.bin.\n -p --prepare        will prepare all files "
      "accesses recorded in file specified by -f,\n                     so "
      "every IO operation will return with same exit code as in original\n     "
      "                application. See also -i and/or -m parameters.\n        "
      "             Do nothing at the moment.\n -P --print          prints "
      "recorded syscalls in normalized format regardless the format\n          "
      "           in which are the syscalls stored now\n -r --replicate      "
      "will replicate every operation stored in file specified by -f\n -s "
      "--scale <factor> scales delays between calls by the factor <factor>. "
      "Used with -r.\n -S --stats          generate stats when processing the "
      "file. Can be combined with other\n                     options.\n -t "
      "--timing         sets timing mode for replication. Options available:\n "
      "                     diff  - default mode. makes sure that gaps between "
      "calls are the same as in the original run.\n                      asap  "
      "- makes calls one just after another.\n                      exact - "
      "makes sure that calls are (approximately) done in the same time as in "
      "the original run\n                              (relative from start of "
      "the application)\n -v --verbose be more verbose (do nothing at the "
      "moment)\n -V --version prints version and exits.\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfe7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x103f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x105c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1074(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x10ee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x114b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1185(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0x10a9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10a4(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10cd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x110a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf76(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1116(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x114f(%rip),%rdi
call   1030 <puts@plt>
lea    0x118a(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Replicates all IO syscalls defined in file by -f option.\0A\0A\00"
@.str.1 = [44 x i8] c"Usage: %s [OPERATION] -f <file> [OPTIONS]\0A\0A\00"
@.str.2 = [124 x i8] c"%s is primary used to replicate recorded IO system calls.\0AIn order to do that, several other helper functionality exists.\0A\0A\00"
@.str.3 = [54 x i8] c"Usage: %s -c -f <file> [-F <format>] [-o <out>] [-v]\0A\00"
@.str.4 = [71 x i8] c" converts <file> in format <format> to binary form into file <out>\0A\0A\00"
@.str.5 = [29 x i8] c"Usage: %s -S -f <file> [-v]\0A\00"
@.str.6 = [91 x i8] c" displays some statistics about syscalls recorded in <file> (must be in strace format)\0A\0A\00"
@.str.7 = [43 x i8] c"Usage: %s -P -f <file> [-F <format>] [-v]\0A\00"
@.str.8 = [42 x i8] c" prints syscalls in normalized format\0A\0A\00"
@.str.9 = [67 x i8] c"Usage: %s -C -f <file> [-F <format>] [-i <file>] [-m <file>] [-v]\0A\00"
@.str.10 = [87 x i8] c" checks whether local enviroment is ready for replaying traces recorded in <file>.\0A\0A\00"
@.str.11 = [107 x i8] c"Usage: %s -r -f <file> [-F <format>] [-t <mode>] [-s <factor>] [-b <number>] [-i <file>] [-m <file>] [-v]\0A\00"
@.str.12 = [72 x i8] c" replicates traces recorded in <file>. Use -C prior to running this.\0A\00"
@.str.13 = [2432 x i8] c"\0A -b --bind <number> bind replicating process to processor number <number>\0A -c --convert file to binary form, see also -o\0A -C --check checks that all operations recorded in the file specied by -f will\0A succeed (ie. will result in same return code).\0A It takes -i and -m into account. See also -p.\0A -d --dont-fix turns off fixing of missing system calls (uncomplete strace output support)\0A -f --file <file> sets filename to <file>\0A -F --format <fmt> specifies input format of the file.\0A Options: strace, bin.\0A Check README for details. Default is strace.\0A -h --help prints this message\0A -i --ignore <file> sets file containing names which we should not touch during\0A replaying. I.e. no syscall operation will be performed on given file.\0A -m --map <file> sets containing file names mapping. When opening file,\0A if there is mapping for it, it will open mapped file instead.\0A See README for more information.\0A -o --output <file> output filename when converting. Default: strace.bin.\0A -p --prepare will prepare all files accesses recorded in file specified by -f,\0A so every IO operation will return with same exit code as in original\0A application. See also -i and/or -m parameters.\0A Do nothing at the moment.\0A -P --print prints recorded syscalls in normalized format regardless the format\0A in which are the syscalls stored now\0A -r --replicate will replicate every operation stored in file specified by -f\0A -s --scale <factor> scales delays between calls by the factor <factor>. Used with -r.\0A -S --stats generate stats when processing the file. Can be combined with other\0A options.\0A -t --timing sets timing mode for replication. Options available:\0A diff - default mode. makes sure that gaps between calls are the same as in the original run.\0A asap - makes calls one just after another.\0A exact - makes sure that calls are (approximately) done in the same time as in the original run\0A (relative from start of the application)\0A -v --verbose be more verbose (do nothing at the moment)\0A -V --version prints version and exits.\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.4, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.6, i64 0, i64 0))
%14 = load i8*, i8** %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%17 = load i8*, i8** %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0), i8* %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.10, i64 0, i64 0))
%20 = load i8*, i8** %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.11, i64 0, i64 0), i8* %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.12, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2432 x i8], [2432 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"Usage: %s [OPERATION] -f <file> [OPTIONS]\0A\0A\00"
@.str.2 = [124 x i8] c"%s is primary used to replicate recorded IO system calls.\0AIn order to do that, several other helper functionality exists.\0A\0A\00"
@.str.3 = [54 x i8] c"Usage: %s -c -f <file> [-F <format>] [-o <out>] [-v]\0A\00"
@.str.5 = [29 x i8] c"Usage: %s -S -f <file> [-v]\0A\00"
@.str.7 = [43 x i8] c"Usage: %s -P -f <file> [-F <format>] [-v]\0A\00"
@.str.9 = [67 x i8] c"Usage: %s -C -f <file> [-F <format>] [-i <file>] [-m <file>] [-v]\0A\00"
@.str.11 = [107 x i8] c"Usage: %s -r -f <file> [-F <format>] [-t <mode>] [-s <factor>] [-b <number>] [-i <file>] [-m <file>] [-v]\0A\00"
@str = [58 x i8] c"Replicates all IO syscalls defined in file by -f option.\0A\00"
@str.14 = [70 x i8] c" converts <file> in format <format> to binary form into file <out>\0A\00"
@str.15 = [90 x i8] c" displays some statistics about syscalls recorded in <file> (must be in strace format)\0A\00"
@str.16 = [41 x i8] c" prints syscalls in normalized format\0A\00"
@str.17 = [86 x i8] c" checks whether local enviroment is ready for replaying traces recorded in <file>.\0A\00"
@str.18 = [71 x i8] c" replicates traces recorded in <file>. Use -C prior to running this.\00"
@str.19 = [2431 x i8] c"\0A -b --bind <number> bind replicating process to processor number <number>\0A -c --convert file to binary form, see also -o\0A -C --check checks that all operations recorded in the file specied by -f will\0A succeed (ie. will result in same return code).\0A It takes -i and -m into account. See also -p.\0A -d --dont-fix turns off fixing of missing system calls (uncomplete strace output support)\0A -f --file <file> sets filename to <file>\0A -F --format <fmt> specifies input format of the file.\0A Options: strace, bin.\0A Check README for details. Default is strace.\0A -h --help prints this message\0A -i --ignore <file> sets file containing names which we should not touch during\0A replaying. I.e. no syscall operation will be performed on given file.\0A -m --map <file> sets containing file names mapping. When opening file,\0A if there is mapping for it, it will open mapped file instead.\0A See README for more information.\0A -o --output <file> output filename when converting. Default: strace.bin.\0A -p --prepare will prepare all files accesses recorded in file specified by -f,\0A so every IO operation will return with same exit code as in original\0A application. See also -i and/or -m parameters.\0A Do nothing at the moment.\0A -P --print prints recorded syscalls in normalized format regardless the format\0A in which are the syscalls stored now\0A -r --replicate will replicate every operation stored in file specified by -f\0A -s --scale <factor> scales delays between calls by the factor <factor>. Used with -r.\0A -S --stats generate stats when processing the file. Can be combined with other\0A options.\0A -t --timing sets timing mode for replication. Options available:\0A diff - default mode. makes sure that gaps between calls are the same as in the original run.\0A asap - makes calls one just after another.\0A exact - makes sure that calls are (approximately) done in the same time as in the original run\0A (relative from start of the application)\0A -v --verbose be more verbose (do nothing at the moment)\0A -V --version prints version and exits.\00"
define void @help(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([124 x i8], [124 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.14, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str.15, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.16, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0), i8* %0)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.17, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @.str.11, i64 0, i64 0), i8* %0)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.18, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2431 x i8], [2431 x i8]* @str.19, i64 0, i64 0))
ret void
}