#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*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *me) {
  fprintf(stderr, "Usage: %s tunable_vars [options] prog [prog_args]\n", me);
  fprintf(
      stderr,
      "\n"
      "  Tunes an application by modifying its input parameters.  The tunable\n"
      "  variables are specified using parameters described in the \"Tunable\n"
      "  Variable Description\" section below.  After all options, the "
      "program\n"
      "  binary to launch should be provided.  Optionally, additional "
      "arguments\n"
      "  may be provided to control how the variables should be supplied to "
      "the\n"
      "  client application.  The format of this string is described in the\n"
      "  \"Optional Argument String\" section below.\n"
      "\n"
      "Tunable Variable Description\n"
      "  -i=name,min,max,step    Describe an integer number variable called\n"
      "                            <name> where valid values fall between "
      "<min>\n"
      "                            and <max> with strides of size <step>.\n"
      "  -r=name,min,max,step    Describe a real number variable called "
      "<name>\n"
      "                            where valid values fall between <min> and\n"
      "                            <max> with strides of size <step>.\n"
      "  -e=name,val_1,..,val_n  Describe an enumerated variable called "
      "<name>\n"
      "                            whose values must be <val_1> or <val_2> or "
      "..\n"
      "                            or <val_n>.\n"
      "\n"
      "Options\n"
      "  -m=<metric>             Calculate performance of child process using\n"
      "                            one of the following metrics:\n"
      "                              wall   = Wall time. (default)\n"
      "                              user   = Reported user CPU time.\n"
      "                              sys    = Reported system CPU time.\n"
      "                              output = Read final line of child "
      "output.\n"
      "  -q                      Suppress client application output.\n"
      "  -v                      Print additional informational output.\n"
      "  -n=<num>                Run child program at most <num> times.\n"
      "\n"
      "Controlling Program Arguments\n"
      "  If the tunable variables cannot be supplied directly as arguments to\n"
      "  the client application, then you must provide additional parameters "
      "to\n"
      "  describe the format of the argument vector.  Each argument (starting "
      "with\n"
      "  and including the program binary) may include a percent sign (%%)\n"
      "  followed by the name of a previously defined tunable variable.  This\n"
      "  identifier may be optionally bracketed by curly-braces.  Values from "
      "the\n"
      "  tuning server will then be used to complete a command-line instance.\n"
      "  A backslash (\\) may be used to produce a literal %%.  For example:\n"
      "\n"
      "    %s -i=tile,1,10,1 -i=unroll,1,10,1 \\\n"
      "        ./matrix_mult -t %%tile -u %%unroll`\n\n",
      me);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef9(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s tunable_vars [options] prog [prog_args]\0A\00"
@.str.1 = [2385 x i8] c"\0A Tunes an application by modifying its input parameters. The tunable\0A variables are specified using parameters described in the \22Tunable\0A Variable Description\22 section below. After all options, the program\0A binary to launch should be provided. Optionally, additional arguments\0A may be provided to control how the variables should be supplied to the\0A client application. The format of this string is described in the\0A \22Optional Argument String\22 section below.\0A\0ATunable Variable Description\0A -i=name,min,max,step Describe an integer number variable called\0A <name> where valid values fall between <min>\0A and <max> with strides of size <step>.\0A -r=name,min,max,step Describe a real number variable called <name>\0A where valid values fall between <min> and\0A <max> with strides of size <step>.\0A -e=name,val_1,..,val_n Describe an enumerated variable called <name>\0A whose values must be <val_1> or <val_2> or ..\0A or <val_n>.\0A\0AOptions\0A -m=<metric> Calculate performance of child process using\0A one of the following metrics:\0A wall = Wall time. (default)\0A user = Reported user CPU time.\0A sys = Reported system CPU time.\0A output = Read final line of child output.\0A -q Suppress client application output.\0A -v Print additional informational output.\0A -n=<num> Run child program at most <num> times.\0A\0AControlling Program Arguments\0A If the tunable variables cannot be supplied directly as arguments to\0A the client application, then you must provide additional parameters to\0A describe the format of the argument vector. Each argument (starting with\0A and including the program binary) may include a percent sign (%%)\0A followed by the name of a previously defined tunable variable. This\0A identifier may be optionally bracketed by curly-braces. Values from the\0A tuning server will then be used to complete a command-line instance.\0A A backslash (\\) may be used to produce a literal %%. For example:\0A\0A %s -i=tile,1,10,1 -i=unroll,1,10,1 \\\0A ./matrix_mult -t %%tile -u %%unroll`\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([2385 x i8], [2385 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s tunable_vars [options] prog [prog_args]\0A\00"
@.str.1 = [2385 x i8] c"\0A Tunes an application by modifying its input parameters. The tunable\0A variables are specified using parameters described in the \22Tunable\0A Variable Description\22 section below. After all options, the program\0A binary to launch should be provided. Optionally, additional arguments\0A may be provided to control how the variables should be supplied to the\0A client application. The format of this string is described in the\0A \22Optional Argument String\22 section below.\0A\0ATunable Variable Description\0A -i=name,min,max,step Describe an integer number variable called\0A <name> where valid values fall between <min>\0A and <max> with strides of size <step>.\0A -r=name,min,max,step Describe a real number variable called <name>\0A where valid values fall between <min> and\0A <max> with strides of size <step>.\0A -e=name,val_1,..,val_n Describe an enumerated variable called <name>\0A whose values must be <val_1> or <val_2> or ..\0A or <val_n>.\0A\0AOptions\0A -m=<metric> Calculate performance of child process using\0A one of the following metrics:\0A wall = Wall time. (default)\0A user = Reported user CPU time.\0A sys = Reported system CPU time.\0A output = Read final line of child output.\0A -q Suppress client application output.\0A -v Print additional informational output.\0A -n=<num> Run child program at most <num> times.\0A\0AControlling Program Arguments\0A If the tunable variables cannot be supplied directly as arguments to\0A the client application, then you must provide additional parameters to\0A describe the format of the argument vector. Each argument (starting with\0A and including the program binary) may include a percent sign (%%)\0A followed by the name of a previously defined tunable variable. This\0A identifier may be optionally bracketed by curly-braces. Values from the\0A tuning server will then be used to complete a command-line instance.\0A A backslash (\\) may be used to produce a literal %%. For example:\0A\0A %s -i=tile,1,10,1 -i=unroll,1,10,1 \\\0A ./matrix_mult -t %%tile -u %%unroll`\0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([2385 x i8], [2385 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}