#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 */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *asctime(struct tm *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int printHeaders(FILE *fp, FILE *fp2, char *testName, double UsedMem,
                 double overhead, double threshold_lo) {
  FILE *pipe;
  time_t rawtime;
  struct tm *timeinfo;
  char tmpStr[64];
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  fprintf(stdout, "\n\n PAW v%s\n %s", "1.6",
          "=================================\n");
  fprintf(stdout, " %s", asctime(timeinfo));
  fprintf(stdout, "\n %s test in progress ... \n", testName);
  fprintf(stdout, "\n\tMemory Used Per Task : %6.1f MB", UsedMem / 1.0E6);
  fprintf(stdout, "\n\tTimer Overhead       : %6.1f ns", overhead / 1.0E-9);
  fprintf(stdout, "\n\tTimer Threshold      : %6.1f ns\n",
          threshold_lo / 1.0E-9);
  fflush(stdout);
  fprintf(fp, "%s%s%s%s%s",
          "#=======================================================\n",
          "# PAW - Performance Assessment Workbench v1.6\n#\n",
          "# Carlos Rosales-Fernandez\n",
          "# carlos.rosales.fernandez@gmail.com\n",
          "#=======================================================\n");
  fprintf(fp, "# Date : %s", asctime(timeinfo));
  fprintf(fp, "# Test : %s", testName);
  fprintf(fp2, "%s%s%s%s%s",
          "#=======================================================\n",
          "# PAW - Performance Assessment Workbench v1.6\n#\n",
          "# Carlos Rosales-Fernandez\n",
          "# carlos.rosales.fernandez@gmail.com\n",
          "#=======================================================\n");
  fprintf(fp2, "# Date : %s", asctime(timeinfo));
  fprintf(fp2, "# Test : %s", testName);
  if (strcmp(testName, "MPI_RATE") == 0) {
    fprintf(fp, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE(B)\t\tAVG(us)\t\t\t\tMIN(us)\t\t\t\tMAX(us)\t\t\tstdDev(us)"
            "\t\t\tNLOOP\tNREPS\n");
    fprintf(fp2, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE(B)\t\tAVG(MIO/s)\t\t\tMIN(MIO/s)\t\t\tMAX(MIO/"
            "s)\t\tstdDev(MIO/s)\t\tNLOOP\tNREPS\n");
  } else if (strncmp(testName, "MPI", 3) == 0 ||
             strcmp(testName, "GPU_TRANSFER") == 0 ||
             strncmp(testName, "PHI", 3) == 0) {
    fprintf(fp, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE(B)\t\tAVG(us)\t\t\t\tMIN(us)\t\t\t\tMAX(us)\t\t\tstdDev(us)"
            "\t\t\tNLOOP\tNREPS\n");
    fprintf(fp2, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE(B)\t\tAVG(MB/s)\t\t\tMIN(MB/s)\t\t\tMAX(MB/s)\t\tstdDev(MB/"
            "s)\t\tNLOOP\tNREPS\n");
  } else {
    fprintf(fp, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE\t\tAVG(s)\t\t\t\tMIN(s)\t\t\t\tMAX(s)\t\t\tstdDev(s)"
            "\t\t\tNLOOP\tNREPS\n");
    fprintf(fp2, "\n%s%s",
            "#=======================================================\n",
            "#\n# "
            "SIZE\t\t\tAVG(GFP/s)\t\t\tMIN(GFP/s)\t\t\tMAX(GFP/"
            "s)\t\tstdDev(GFP/s)\t\tNLOOP\tNREPS\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<printHeaders>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
lea    -0x3c(%rbp),%rdi
call   1080 <time@plt>
lea    -0x3c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x48(%rbp)
mov    0x2e2d(%rip),%rax
mov    (%rax),%rdi
lea    0xe53(%rip),%rsi
lea    0xe5b(%rip),%rdx
lea    0xefd(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x48(%rbp),%rdi
call   1050 <asctime@plt>
mov    -0xa8(%rbp),%rdi
mov    %rax,%rdx
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe0a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%rdi
movsd  -0x20(%rbp),%xmm0
movsd  0xdd1(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdfd(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%rdi
movsd  -0x28(%rbp),%xmm0
movsd  0xda0(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdf6(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x2d67(%rip),%rax
mov    (%rax),%rdi
movsd  -0x30(%rbp),%xmm0
movsd  0xd77(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdef(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%rdi
call   1090 <fflush@plt>
mov    -0x8(%rbp),%rdi
lea    0xdf1(%rip),%rsi
lea    0xdf5(%rip),%rax
lea    0xe28(%rip),%rcx
lea    0xe52(%rip),%r8
lea    0xe67(%rip),%r9
mov    %rax,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x48(%rbp),%rdi
call   1050 <asctime@plt>
mov    -0xa0(%rbp),%rdi
mov    %rax,%rdx
lea    0xe5a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe50(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xd7a(%rip),%rsi
lea    0xd7e(%rip),%rax
lea    0xdb1(%rip),%rcx
lea    0xddb(%rip),%r8
lea    0xdf0(%rip),%r9
mov    %rax,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x48(%rbp),%rdi
call   1050 <asctime@plt>
mov    -0x98(%rbp),%rdi
mov    %rax,%rdx
lea    0xde3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xdd3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13f7 <printHeaders+0x287>
mov    -0x8(%rbp),%rdi
lea    0xdc2(%rip),%rsi
lea    0xced(%rip),%rdx
lea    0xdba(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xda2(%rip),%rsi
lea    0xccd(%rip),%rdx
lea    0xde1(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <printHeaders+0x369>
mov    -0x18(%rbp),%rdi
lea    0xe19(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     144f <printHeaders+0x2df>
mov    -0x18(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     144f <printHeaders+0x2df>
mov    -0x18(%rbp),%rdi
lea    0xdf1(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1494 <printHeaders+0x324>
mov    -0x8(%rbp),%rdi
lea    0xd25(%rip),%rsi
lea    0xc50(%rip),%rdx
lea    0xd1d(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xd05(%rip),%rsi
lea    0xc30(%rip),%rdx
lea    0xda8(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d4 <printHeaders+0x364>
mov    -0x8(%rbp),%rdi
lea    0xce0(%rip),%rsi
lea    0xc0b(%rip),%rdx
lea    0xdce(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xcc0(%rip),%rsi
lea    0xbeb(%rip),%rdx
lea    0xdee(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <printHeaders+0x369>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHeaders>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %rdx,%r14
mov    %rsi,0x28(%rsp)
mov    %rdi,%r15
lea    0x34(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%r12
mov    0x2e26(%rip),%rbp
mov    0x0(%rbp),%rdi
lea    0xe4b(%rip),%rsi
lea    0xe53(%rip),%rdx
lea    0xef5(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rbx
mov    %r12,%rdi
call   1050 <asctime@plt>
lea    0xe2e(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rdi
lea    0xe1e(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rdi
movsd  0x18(%rsp),%xmm0
divsd  0xddf(%rip),%xmm0
lea    0xe17(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rdi
movsd  0x20(%rsp),%xmm0
divsd  0xdc7(%rip),%xmm0
lea    0xe19(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rdi
movsd  0x10(%rsp),%xmm0
divsd  0xda7(%rip),%xmm0
lea    0xe1b(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    0x0(%rbp),%rdi
call   1090 <fflush@plt>
lea    0xe32(%rip),%rbx
mov    %rbx,(%rsp)
lea    0xe1c(%rip),%rsi
lea    0xe5a(%rip),%rcx
lea    0xe84(%rip),%r8
lea    0xe99(%rip),%r9
mov    %r15,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r12,%rdi
call   1050 <asctime@plt>
lea    0xea3(%rip),%rsi
mov    %r15,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe9b(%rip),%r13
mov    %r15,0x10(%rsp)
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,(%rsp)
mov    0x28(%rsp),%r15
mov    %r15,%rdi
lea    0xdaf(%rip),%rsi
mov    %rbx,%rdx
lea    0xdea(%rip),%rcx
lea    0xe14(%rip),%r8
lea    0xe29(%rip),%r9
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r12,%rdi
call   1050 <asctime@plt>
mov    %r15,%rdi
lea    0xe36(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe2d(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
lea    0xe2d(%rip),%r12
test   %rax,%rax
je     13bf <printHeaders+0x24f>
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
lea    0xeb8(%rip),%r13
test   %rax,%rax
je     13c6 <printHeaders+0x256>
lea    0xe9b(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     13c6 <printHeaders+0x256>
lea    0xe94(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
mov    0x10(%rsp),%rdi
je     13cb <printHeaders+0x25b>
lea    0xf05(%rip),%r13
lea    0xebe(%rip),%r12
jmp    13cb <printHeaders+0x25b>
lea    0xe06(%rip),%r13
mov    0x10(%rsp),%rdi
lea    0xdad(%rip),%rbx
lea    0xcd8(%rip),%rbp
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@stdout = global i32* null
@.str = [15 x i8] c"\0A\0A PAW v%s\0A %s\00"
@.str.1 = [4 x i8] c"1.6\00"
@.str.2 = [35 x i8] c"=================================\0A\00"
@.str.3 = [4 x i8] c" %s\00"
@.str.4 = [28 x i8] c"\0A %s test in progress ... \0A\00"
@.str.5 = [34 x i8] c"\0A\09Memory Used Per Task : %6.1f MB\00"
@.str.6 = [34 x i8] c"\0A\09Timer Overhead : %6.1f ns\00"
@.str.7 = [35 x i8] c"\0A\09Timer Threshold : %6.1f ns\0A\00"
@.str.8 = [11 x i8] c"%s%s%s%s%s\00"
@.str.9 = [58 x i8] c"#=======================================================\0A\00"
@.str.10 = [49 x i8] c"# PAW - Performance Assessment Workbench v1.6\0A#\0A\00"
@.str.11 = [28 x i8] c"# Carlos Rosales-Fernandez\0A\00"
@.str.12 = [38 x i8] c"# carlos.rosales.fernandez@gmail.com\0A\00"
@.str.13 = [12 x i8] c"# Date : %s\00"
@.str.14 = [12 x i8] c"# Test : %s\00"
@.str.15 = [9 x i8] c"MPI_RATE\00"
@.str.16 = [6 x i8] c"\0A%s%s\00"
@.str.17 = [71 x i8] c"#\0A# SIZE(B)\09\09AVG(us)\09\09\09\09MIN(us)\09\09\09\09MAX(us)\09\09\09stdDev(us)\09\09\09NLOOP\09NREPS\0A\00"
@.str.18 = [79 x i8] c"#\0A# SIZE(B)\09\09AVG(MIO/s)\09\09\09MIN(MIO/s)\09\09\09MAX(MIO/s)\09\09stdDev(MIO/s)\09\09NLOOP\09NREPS\0A\00"
@.str.19 = [4 x i8] c"MPI\00"
@.str.20 = [13 x i8] c"GPU_TRANSFER\00"
@.str.21 = [4 x i8] c"PHI\00"
@.str.22 = [75 x i8] c"#\0A# SIZE(B)\09\09AVG(MB/s)\09\09\09MIN(MB/s)\09\09\09MAX(MB/s)\09\09stdDev(MB/s)\09\09NLOOP\09NREPS\0A\00"
@.str.23 = [64 x i8] c"#\0A# SIZE\09\09AVG(s)\09\09\09\09MIN(s)\09\09\09\09MAX(s)\09\09\09stdDev(s)\09\09\09NLOOP\09NREPS\0A\00"
@.str.24 = [77 x i8] c"#\0A# SIZE\09\09\09AVG(GFP/s)\09\09\09MIN(GFP/s)\09\09\09MAX(GFP/s)\09\09stdDev(GFP/s)\09\09NLOOP\09NREPS\0A\00"
define i32 @printHeaders(i32* %0, i32* %1, i8* %2, double %3, double %4, double %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32*
%14 = alloca i32
%15 = alloca %struct.tm*
%16 = alloca [64 x i8]
store i32* %0, i32** %7
store i32* %1, i32** %8
store i8* %2, i8** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%17 = call i32 @time(i32* %14)
%18 = call %struct.tm* @localtime(i32* %14)
store %struct.tm* %18, %struct.tm** %15
%19 = load i32*, i32** @stdout
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32*, i32** @stdout
%22 = load %struct.tm*, %struct.tm** %15
%23 = call i8* @asctime(%struct.tm* %22)
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = load i32*, i32** @stdout
%26 = load i8*, i8** %9
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* %26)
%28 = load i32*, i32** @stdout
%29 = load double, double* %10
%30 = fdiv double %29, 1.000000e+06
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), double %30)
%32 = load i32*, i32** @stdout
%33 = load double, double* %11
%34 = fdiv double %33, 1.000000e-09
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), double %34)
%36 = load i32*, i32** @stdout
%37 = load double, double* %12
%38 = fdiv double %37, 1.000000e-09
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %38)
%40 = load i32*, i32** @stdout
%41 = call i32 @fflush(i32* %40)
%42 = load i32*, i32** %7
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%44 = load i32*, i32** %7
%45 = load %struct.tm*, %struct.tm** %15
%46 = call i8* @asctime(%struct.tm* %45)
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %46)
%48 = load i32*, i32** %7
%49 = load i8*, i8** %9
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i8* %49)
%51 = load i32*, i32** %8
%52 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%53 = load i32*, i32** %8
%54 = load %struct.tm*, %struct.tm** %15
%55 = call i8* @asctime(%struct.tm* %54)
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %55)
%57 = load i32*, i32** %8
%58 = load i8*, i8** %9
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i8* %58)
%60 = load i8*, i8** %9
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %68
63: ; preds = %6
%64 = load i32*, i32** %7
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0))
%66 = load i32*, i32** %8
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.18, i64 0, i64 0))
br label %91
68: ; preds = %6
%69 = load i8*, i8** %9
%70 = call i64 @strncmp(i8* %69, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 3)
%71 = icmp eq i64 %70, 0
br i1 %71, label %80, label %72
72: ; preds = %68
%73 = load i8*, i8** %9
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %80, label %76
76: ; preds = %72
%77 = load i8*, i8** %9
%78 = call i64 @strncmp(i8* %77, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 3)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %85
80: ; preds = %76, %72, %68
%81 = load i32*, i32** %7
%82 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0))
%83 = load i32*, i32** %8
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0))
br label %90
85: ; preds = %76
%86 = load i32*, i32** %7
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.23, i64 0, i64 0))
%88 = load i32*, i32** %8
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.24, i64 0, i64 0))
br label %90
90: ; preds = %85, %80
br label %91
91: ; preds = %90, %63
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@stdout = global i32* null
@.str = [15 x i8] c"\0A\0A PAW v%s\0A %s\00"
@.str.1 = [4 x i8] c"1.6\00"
@.str.2 = [35 x i8] c"=================================\0A\00"
@.str.3 = [4 x i8] c" %s\00"
@.str.4 = [28 x i8] c"\0A %s test in progress ... \0A\00"
@.str.5 = [34 x i8] c"\0A\09Memory Used Per Task : %6.1f MB\00"
@.str.6 = [34 x i8] c"\0A\09Timer Overhead : %6.1f ns\00"
@.str.7 = [35 x i8] c"\0A\09Timer Threshold : %6.1f ns\0A\00"
@.str.8 = [11 x i8] c"%s%s%s%s%s\00"
@.str.9 = [58 x i8] c"#=======================================================\0A\00"
@.str.10 = [49 x i8] c"# PAW - Performance Assessment Workbench v1.6\0A#\0A\00"
@.str.11 = [28 x i8] c"# Carlos Rosales-Fernandez\0A\00"
@.str.12 = [38 x i8] c"# carlos.rosales.fernandez@gmail.com\0A\00"
@.str.13 = [12 x i8] c"# Date : %s\00"
@.str.14 = [12 x i8] c"# Test : %s\00"
@.str.15 = [9 x i8] c"MPI_RATE\00"
@.str.16 = [6 x i8] c"\0A%s%s\00"
@.str.17 = [71 x i8] c"#\0A# SIZE(B)\09\09AVG(us)\09\09\09\09MIN(us)\09\09\09\09MAX(us)\09\09\09stdDev(us)\09\09\09NLOOP\09NREPS\0A\00"
@.str.18 = [79 x i8] c"#\0A# SIZE(B)\09\09AVG(MIO/s)\09\09\09MIN(MIO/s)\09\09\09MAX(MIO/s)\09\09stdDev(MIO/s)\09\09NLOOP\09NREPS\0A\00"
@.str.19 = [4 x i8] c"MPI\00"
@.str.20 = [13 x i8] c"GPU_TRANSFER\00"
@.str.21 = [4 x i8] c"PHI\00"
@.str.22 = [75 x i8] c"#\0A# SIZE(B)\09\09AVG(MB/s)\09\09\09MIN(MB/s)\09\09\09MAX(MB/s)\09\09stdDev(MB/s)\09\09NLOOP\09NREPS\0A\00"
@.str.23 = [64 x i8] c"#\0A# SIZE\09\09AVG(s)\09\09\09\09MIN(s)\09\09\09\09MAX(s)\09\09\09stdDev(s)\09\09\09NLOOP\09NREPS\0A\00"
@.str.24 = [77 x i8] c"#\0A# SIZE\09\09\09AVG(GFP/s)\09\09\09MIN(GFP/s)\09\09\09MAX(GFP/s)\09\09stdDev(GFP/s)\09\09NLOOP\09NREPS\0A\00"
define i32 @printHeaders(i32* nocapture %0, i32* nocapture %1, i8* %2, double %3, double %4, double %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = call i32 @time(i32* %7)
%10 = call %struct.tm* @localtime(i32* %7)
%11 = load i32*, i32** @stdout
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%13 = load i32*, i32** @stdout
%14 = call i8* @asctime(%struct.tm* %10)
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %14)
%16 = load i32*, i32** @stdout
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%18 = load i32*, i32** @stdout
%19 = fdiv double %3, 1.000000e+06
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = load i32*, i32** @stdout
%22 = fdiv double %4, 1.000000e-09
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), double %22)
%24 = load i32*, i32** @stdout
%25 = fdiv double %5, 1.000000e-09
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %25)
%27 = load i32*, i32** @stdout
%28 = call i32 @fflush(i32* %27)
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%30 = call i8* @asctime(%struct.tm* %10)
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %30)
%32 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i8* %2)
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%34 = call i8* @asctime(%struct.tm* %10)
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %34)
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i8* %2)
%37 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %49, label %39
39: ; preds = %6
%40 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 3)
%41 = icmp eq i64 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %39
%43 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %49, label %45
45: ; preds = %42
%46 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 3)
%47 = icmp eq i64 %46, 0
br i1 %47, label %49, label %48
48: ; preds = %45
br label %49
49: ; preds = %39, %42, %45, %6, %48
%50 = phi i8* [ getelementptr inbounds ([64 x i8], [64 x i8]* @.str.23, i64 0, i64 0), %48 ], [ getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0), %6 ], [ getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0), %45 ], [ getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0), %42 ], [ getelementptr inbounds ([71 x i8], [71 x i8]* @.str.17, i64 0, i64 0), %39 ]
%51 = phi i8* [ getelementptr inbounds ([77 x i8], [77 x i8]* @.str.24, i64 0, i64 0), %48 ], [ getelementptr inbounds ([79 x i8], [79 x i8]* @.str.18, i64 0, i64 0), %6 ], [ getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0), %45 ], [ getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0), %42 ], [ getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0), %39 ]
%52 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* %50)
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* %51)
ret i32 0
}