#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 *, char const *,
                          char const *);
void print_help_message(const char *self) {
  printf(
      "Usage: %s [options] {actions...}\n"
      "Options:\n"
      "  --mem         Use /dev/mem instead of /dev/vpmu-device-0 for "
      "communication\n"
      ""
      "  --jit         Enable just-in-time model selection on performance "
      "simulation\n"
      "  --trace       Enable VPMU event tracing and function tracking "
      "ability\n"
      "                If \"--trace\" is set, the process will be traced "
      "automatically\n"
      "  --phase       Enable VPMU phase detection, --trace will be forced to "
      "set\n"
      "  --[MODEL]     [MODEL] could be one of the following\n"
      "                    inst, cache, branch, pipeline, all_models\n"
      "  --monitor     Enable VPMU event tracing and set the binary without\n"
      "                executing them when using -e action\n"
      "  --remove      Remove binary (specified by -e option) from monitoring "
      "list\n"
      "  --help        Show this message\n"
      "\n\n"
      "Actions:\n"
      "  -r, --read  <address>          Read data from <address> of VPMU and "
      "print it "
      "out with \"\\n\"\n"
      "  -w, --write <address> <data>   Write <data> to <address> of VPMU\n"
      "  --start       Start VPMU profiling with all performance simulators "
      "ON\n"
      "                If \"--trace\" is set, \"--start\" do nothing\n"
      "  --end         End/Stop VPMU profiling and report the results\n"
      "                If \"--trace\" is set, \"--end\" do nothing\n"
      "  --report      Simply report the current results. It can be used while "
      "profiling "
      "\n"
      "  -e, --exec    Run the program/executable.\n"
      "                If \"--trace\" is set, the controller will also pass "
      "some of the "
      "sections\n"
      "                (i.e. symbol table, dynamic libraries) of target binary "
      "to VPMU.\n"
      "\n"
      "Example:\n"
      "    %s --all_models --start --exec \"ls -la\" --end\n"
      "    %s --all_models --phase -e \"ls -la\"\n"
      "    %s --all_models --monitor -e ls\n",
      self, self, self, self);
}


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

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

LLVM IR (-O0):
@.str = [1622 x i8] c"Usage: %s [options] {actions...}\0AOptions:\0A --mem Use /dev/mem instead of /dev/vpmu-device-0 for communication\0A --jit Enable just-in-time model selection on performance simulation\0A --trace Enable VPMU event tracing and function tracking ability\0A If \22--trace\22 is set, the process will be traced automatically\0A --phase Enable VPMU phase detection, --trace will be forced to set\0A --[MODEL] [MODEL] could be one of the following\0A inst, cache, branch, pipeline, all_models\0A --monitor Enable VPMU event tracing and set the binary without\0A executing them when using -e action\0A --remove Remove binary (specified by -e option) from monitoring list\0A --help Show this message\0A\0A\0AActions:\0A -r, --read <address> Read data from <address> of VPMU and print it out with \22\\n\22\0A -w, --write <address> <data> Write <data> to <address> of VPMU\0A --start Start VPMU profiling with all performance simulators ON\0A If \22--trace\22 is set, \22--start\22 do nothing\0A --end End/Stop VPMU profiling and report the results\0A If \22--trace\22 is set, \22--end\22 do nothing\0A --report Simply report the current results. It can be used while profiling \0A -e, --exec Run the program/executable.\0A If \22--trace\22 is set, the controller will also pass some of the sections\0A (i.e. symbol table, dynamic libraries) of target binary to VPMU.\0A\0AExample:\0A %s --all_models --start --exec \22ls -la\22 --end\0A %s --all_models --phase -e \22ls -la\22\0A %s --all_models --monitor -e ls\0A\00"
define void @print_help_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([1622 x i8], [1622 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [1622 x i8] c"Usage: %s [options] {actions...}\0AOptions:\0A --mem Use /dev/mem instead of /dev/vpmu-device-0 for communication\0A --jit Enable just-in-time model selection on performance simulation\0A --trace Enable VPMU event tracing and function tracking ability\0A If \22--trace\22 is set, the process will be traced automatically\0A --phase Enable VPMU phase detection, --trace will be forced to set\0A --[MODEL] [MODEL] could be one of the following\0A inst, cache, branch, pipeline, all_models\0A --monitor Enable VPMU event tracing and set the binary without\0A executing them when using -e action\0A --remove Remove binary (specified by -e option) from monitoring list\0A --help Show this message\0A\0A\0AActions:\0A -r, --read <address> Read data from <address> of VPMU and print it out with \22\\n\22\0A -w, --write <address> <data> Write <data> to <address> of VPMU\0A --start Start VPMU profiling with all performance simulators ON\0A If \22--trace\22 is set, \22--start\22 do nothing\0A --end End/Stop VPMU profiling and report the results\0A If \22--trace\22 is set, \22--end\22 do nothing\0A --report Simply report the current results. It can be used while profiling \0A -e, --exec Run the program/executable.\0A If \22--trace\22 is set, the controller will also pass some of the sections\0A (i.e. symbol table, dynamic libraries) of target binary to VPMU.\0A\0AExample:\0A %s --all_models --start --exec \22ls -la\22 --end\0A %s --all_models --phase -e \22ls -la\22\0A %s --all_models --monitor -e ls\0A\00"
define void @print_help_message(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1622 x i8], [1622 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
ret void
}