#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 usage() {
  printf("Usage for KERNEL benchmarks:\n\n");
  printf("\t -b, --bench NAME \t NAME of the benchmark - possible values are "
         "blas_op, stencil, fileparse and cg.\n");
  printf(
      "\t -s, --size N \t\t N number of elements, default is 200.\n"
      "\t\t\t\t --> for the fileparse benchmark this is the number of rows.\n"
      "\t\t\t\t --> for CG it is the number of rows/columns of the matrix.\n"
      "\t\t\t\t --> for stencil, size dictates to size of the work buffer.\n"
      "\t\t\t\t     It is size^2 for 5 and 9 point stencils, and size^3 for 19 "
      "and 27 point stencils.\n"
      "\t\t\t\t --> for the BLAS operations it is the vector length or size of "
      "the matrix. \n"
      "\t\t\t\t     Note: this is not applicable for BLAS operations spmv and "
      "spgemm, where the size is dictated by the input matrix.\n");
  printf("\t -r, --reps N \t\t N number of repetitions. Default value is 1.\n"
         "\t\t\t\t --> for the BLAS operations spmv and spgemm, this can be "
         "used to run the operation multiple times.\n");
  printf("\t -o, --op TYPE \t\t TYPE of operation.\n");
  printf("\t\t\t\t --> for BLAS benchmark: \"dot_product\", \"scalar_mult\", "
         "\"norm\", \"axpy\", \"dmv\", \"spmv\" and \"spgemm\". \n"
         "\t\t\t\t     Default is \"dot_product\".\n");
  printf(
      "\t\t\t\t --> for stencil benchmark: \"27\", \"19\", \"9\" and \"5\". \n"
      "\t\t\t\t     Default is \"27\".\n");
  printf(
      "\t -d, --dtype DATATYPE \t DATATYPE to be used for the BLAS benchmarks. "
      "Default is double.\n"
      "\t\t\t\t --> for norm, dot_product, scalar_product, axpy and dmv "
      "possible values are int, float, double.\n"
      "\t\t\t\t --> for stencil possible values are float and double.\n"
      "\t\t\t\t --> for spmv and spgemm possible values are float, double.\n");
  printf("\t -i, --info \t\t Print out system information such as current CPU "
         "frequency, core counts, cache size, plus datatype sizes.\n");
  printf("\t -h, --help \t\t Displays this help.\n");
  printf("\n\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
call   1030 <printf@plt>
lea    0x1167(%rip),%rdi
call   1030 <printf@plt>
lea    0x1203(%rip),%rdi
call   1030 <printf@plt>
lea    0x121e(%rip),%rdi
call   1030 <printf@plt>
lea    0x129e(%rip),%rdi
call   1030 <printf@plt>
lea    0x12e7(%rip),%rdi
call   1030 <printf@plt>
lea    0x1415(%rip),%rdi
call   1030 <printf@plt>
lea    0x1484(%rip),%rdi
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0x1167(%rip),%rdi
call   1030 <puts@plt>
lea    0x1202(%rip),%rdi
call   1030 <puts@plt>
lea    0x121c(%rip),%rdi
call   1030 <puts@plt>
lea    0x129b(%rip),%rdi
call   1030 <puts@plt>
lea    0x12e3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1410(%rip),%rdi
call   1030 <puts@plt>
lea    0x147e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage for KERNEL benchmarks:\0A\0A\00"
@.str.1 = [102 x i8] c"\09 -b, --bench NAME \09 NAME of the benchmark - possible values are blas_op, stencil, fileparse and cg.\0A\00"
@.str.2 = [545 x i8] c"\09 -s, --size N \09\09 N number of elements, default is 200.\0A\09\09\09\09 --> for the fileparse benchmark this is the number of rows.\0A\09\09\09\09 --> for CG it is the number of rows/columns of the matrix.\0A\09\09\09\09 --> for stencil, size dictates to size of the work buffer.\0A\09\09\09\09 It is size^2 for 5 and 9 point stencils, and size^3 for 19 and 27 point stencils.\0A\09\09\09\09 --> for the BLAS operations it is the vector length or size of the matrix. \0A\09\09\09\09 Note: this is not applicable for BLAS operations spmv and spgemm, where the size is dictated by the input matrix.\0A\00"
@.str.3 = [168 x i8] c"\09 -r, --reps N \09\09 N number of repetitions. Default value is 1.\0A\09\09\09\09 --> for the BLAS operations spmv and spgemm, this can be used to run the operation multiple times.\0A\00"
@.str.4 = [39 x i8] c"\09 -o, --op TYPE \09\09 TYPE of operation.\0A\00"
@.str.5 = [140 x i8] c"\09\09\09\09 --> for BLAS benchmark: \22dot_product\22, \22scalar_mult\22, \22norm\22, \22axpy\22, \22dmv\22, \22spmv\22 and \22spgemm\22. \0A\09\09\09\09 Default is \22dot_product\22.\0A\00"
@.str.6 = [85 x i8] c"\09\09\09\09 --> for stencil benchmark: \2227\22, \2219\22, \229\22 and \225\22. \0A\09\09\09\09 Default is \2227\22.\0A\00"
@.str.7 = [314 x i8] c"\09 -d, --dtype DATATYPE \09 DATATYPE to be used for the BLAS benchmarks. Default is double.\0A\09\09\09\09 --> for norm, dot_product, scalar_product, axpy and dmv possible values are int, float, double.\0A\09\09\09\09 --> for stencil possible values are float and double.\0A\09\09\09\09 --> for spmv and spgemm possible values are float, double.\0A\00"
@.str.8 = [123 x i8] c"\09 -i, --info \09\09 Print out system information such as current CPU frequency, core counts, cache size, plus datatype sizes.\0A\00"
@.str.9 = [37 x i8] c"\09 -h, --help \09\09 Displays this help.\0A\00"
@.str.10 = [3 x i8] c"\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([545 x i8], [545 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([314 x i8], [314 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"Usage for KERNEL benchmarks:\0A\00"
@str.11 = [101 x i8] c"\09 -b, --bench NAME \09 NAME of the benchmark - possible values are blas_op, stencil, fileparse and cg.\00"
@str.12 = [544 x i8] c"\09 -s, --size N \09\09 N number of elements, default is 200.\0A\09\09\09\09 --> for the fileparse benchmark this is the number of rows.\0A\09\09\09\09 --> for CG it is the number of rows/columns of the matrix.\0A\09\09\09\09 --> for stencil, size dictates to size of the work buffer.\0A\09\09\09\09 It is size^2 for 5 and 9 point stencils, and size^3 for 19 and 27 point stencils.\0A\09\09\09\09 --> for the BLAS operations it is the vector length or size of the matrix. \0A\09\09\09\09 Note: this is not applicable for BLAS operations spmv and spgemm, where the size is dictated by the input matrix.\00"
@str.13 = [167 x i8] c"\09 -r, --reps N \09\09 N number of repetitions. Default value is 1.\0A\09\09\09\09 --> for the BLAS operations spmv and spgemm, this can be used to run the operation multiple times.\00"
@str.14 = [38 x i8] c"\09 -o, --op TYPE \09\09 TYPE of operation.\00"
@str.15 = [139 x i8] c"\09\09\09\09 --> for BLAS benchmark: \22dot_product\22, \22scalar_mult\22, \22norm\22, \22axpy\22, \22dmv\22, \22spmv\22 and \22spgemm\22. \0A\09\09\09\09 Default is \22dot_product\22.\00"
@str.16 = [84 x i8] c"\09\09\09\09 --> for stencil benchmark: \2227\22, \2219\22, \229\22 and \225\22. \0A\09\09\09\09 Default is \2227\22.\00"
@str.17 = [313 x i8] c"\09 -d, --dtype DATATYPE \09 DATATYPE to be used for the BLAS benchmarks. Default is double.\0A\09\09\09\09 --> for norm, dot_product, scalar_product, axpy and dmv possible values are int, float, double.\0A\09\09\09\09 --> for stencil possible values are float and double.\0A\09\09\09\09 --> for spmv and spgemm possible values are float, double.\00"
@str.18 = [122 x i8] c"\09 -i, --info \09\09 Print out system information such as current CPU frequency, core counts, cache size, plus datatype sizes.\00"
@str.19 = [36 x i8] c"\09 -h, --help \09\09 Displays this help.\00"
@str.20 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([101 x i8], [101 x i8]* @str.11, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([544 x i8], [544 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([167 x i8], [167 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([139 x i8], [139 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([313 x i8], [313 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([122 x i8], [122 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.20, i64 0, i64 0))
ret void
}