#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 */
struct timeval {
  int tv_sec;
  long tv_usec;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, long);
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ fwrite(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int, float, float);
int remove(char *);
int main(int argc, char *argv[]) {
  int totalBytesToWrite = 10 * 1024 * 1024;
  int totalInts = totalBytesToWrite / sizeof(int);
  int valsToWrite[] = {0xffffffff, 0x00000000, 0xaaaaaaaa, 0x55555555};
  long int timeTaken[4][30];
  long int timeTakenRead[4][30];
  for (int j = 0; j < 30; j++) {
    for (int i = 0; i < 4; i++) {
      int *toWrite = (int *)malloc(sizeof(int) * totalInts);
      for (int k = 0; k < totalInts; k++) {
        toWrite[k] = valsToWrite[i];
      }
      struct timeval startTime, endTime, startRead, endRead;
      FILE *fp;
      gettimeofday(&startTime, NULL);
      fp = fopen("./test.bin", "wb");
      fwrite(toWrite, sizeof(int), totalInts, fp);
      fclose(fp);
      gettimeofday(&endTime, NULL);
      timeTaken[i][j] = ((endTime.tv_sec * 1000000 + endTime.tv_usec) -
                         (startTime.tv_sec * 1000000 + startTime.tv_usec));
      free(toWrite);
      toWrite = (int *)malloc(sizeof(int) * totalInts);
      gettimeofday(&startRead, NULL);
      fp = fopen("./test.bin", "rb");
      fread(toWrite, sizeof(int), totalInts, fp);
      fclose(fp);
      gettimeofday(&endRead, NULL);
      timeTakenRead[i][j] = ((endRead.tv_sec * 1000000 + endRead.tv_usec) -
                             (startRead.tv_sec * 1000000 + startRead.tv_usec));
      free(toWrite);
      int rem_status = remove("./test.bin");
    }
  }
  FILE *opF = fopen("./timeDistWrite.csv", "w");
  FILE *opFR = fopen("./timeDistRead.csv", "w");
  for (int i = 0; i < 4; i++) {
    float sum = 0;
    float sumR = 0;
    for (int j = 0; j < 30 - 1; j++) {
      fprintf(opF, "%ld,", timeTaken[i][j]);
      fprintf(opFR, "%ld,", timeTakenRead[i][j]);
      sum += timeTaken[i][j];
      sumR += timeTakenRead[i][j];
    }
    fprintf(opF, "%ld\n", timeTaken[i][30 - 1]);
    fprintf(opFR, "%ld\n", timeTakenRead[i][30 - 1]);
    sum += timeTaken[i][30 - 1];
    sumR += timeTakenRead[i][30 - 1];
    float mean = sum / 30;
    float meanR = sumR / 30;
    mean = mean / 1000000;
    meanR = meanR / 1000000;
    float meanWrSp = 10 / mean;
    float meanRdSp = 10 / meanR;
    printf("++++++++\n***WRITING***\nMean time for writing 0x%x = %f sec "
           "\nmean write speed = %f MBps\n",
           valsToWrite[i], mean, meanWrSp);
    printf("***READING***\nMean time for reading 0x%x = %f sec \nmean read "
           "speed = %f MBps\n",
           valsToWrite[i], meanR, meanRdSp);
  }
  fclose(opF);
  fclose(opFR);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa00000,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shr    $0x2,%rax
mov    %eax,-0x18(%rbp)
mov    0xe3e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe3b(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x7b4(%rbp)
cmpl   $0x1e,-0x7b4(%rbp)
jge    1437 <main+0x297>
movl   $0x0,-0x7b8(%rbp)
cmpl   $0x4,-0x7b8(%rbp)
jge    141e <main+0x27e>
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x7c0(%rbp)
movl   $0x0,-0x7c4(%rbp)
mov    -0x7c4(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    126e <main+0xce>
movslq -0x7b8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x7c0(%rbp),%rax
movslq -0x7c4(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x7c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c4(%rbp)
jmp    122f <main+0x8f>
lea    -0x7d8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
lea    0xd9b(%rip),%rdi
lea    0xd9f(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x810(%rbp)
mov    -0x7c0(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x810(%rbp),%rcx
mov    $0x4,%esi
call   10c0 <fwrite@plt>
mov    -0x810(%rbp),%rdi
call   1060 <fclose@plt>
lea    -0x7e8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
imul   $0xf4240,-0x7e8(%rbp),%eax
movslq %eax,%rdx
add    -0x7e0(%rbp),%rdx
imul   $0xf4240,-0x7d8(%rbp),%eax
cltq
add    -0x7d0(%rbp),%rax
sub    %rax,%rdx
movslq -0x7b8(%rbp),%rcx
lea    -0x3f0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x7b4(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x7c0(%rbp),%rdi
call   1030 <free@plt>
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x7c0(%rbp)
lea    -0x7f8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
lea    0xccb(%rip),%rdi
lea    0xcd2(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x810(%rbp)
mov    -0x7c0(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x810(%rbp),%rcx
mov    $0x4,%esi
call   1050 <fread@plt>
mov    -0x810(%rbp),%rdi
call   1060 <fclose@plt>
lea    -0x808(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
imul   $0xf4240,-0x808(%rbp),%eax
movslq %eax,%rdx
add    -0x800(%rbp),%rdx
imul   $0xf4240,-0x7f8(%rbp),%eax
cltq
add    -0x7f0(%rbp),%rax
sub    %rax,%rdx
movslq -0x7b8(%rbp),%rcx
lea    -0x7b0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x7b4(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x7c0(%rbp),%rdi
call   1030 <free@plt>
lea    0xc21(%rip),%rdi
call   1040 <remove@plt>
mov    %eax,-0x814(%rbp)
mov    -0x7b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7b8(%rbp)
jmp    1202 <main+0x62>
jmp    1423 <main+0x283>
mov    -0x7b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7b4(%rbp)
jmp    11eb <main+0x4b>
lea    0xbf3(%rip),%rdi
lea    0xc00(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x820(%rbp)
lea    0xbef(%rip),%rdi
lea    0xbe6(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x828(%rbp)
movl   $0x0,-0x82c(%rbp)
cmpl   $0x4,-0x82c(%rbp)
jge    1761 <main+0x5c1>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x830(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x834(%rbp)
ff
movl   $0x0,-0x838(%rbp)
cmpl   $0x1d,-0x838(%rbp)
jge    1599 <main+0x3f9>
mov    -0x820(%rbp),%rdi
movslq -0x82c(%rbp),%rcx
lea    -0x3f0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x838(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xb7a(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x828(%rbp),%rdi
movslq -0x82c(%rbp),%rcx
lea    -0x7b0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x838(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xb44(%rip),%rsi
call   1090 <fprintf@plt>
movslq -0x82c(%rbp),%rcx
lea    -0x3f0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x838(%rbp),%rcx
cvtsi2ssq (%rax,%rcx,8),%xmm0
addss  -0x830(%rbp),%xmm0
ff
movss  %xmm0,-0x830(%rbp)
ff
movslq -0x82c(%rbp),%rcx
lea    -0x7b0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
movslq -0x838(%rbp),%rcx
cvtsi2ssq (%rax,%rcx,8),%xmm0
addss  -0x834(%rbp),%xmm0
ff
movss  %xmm0,-0x834(%rbp)
ff
mov    -0x838(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x838(%rbp)
jmp    14a2 <main+0x302>
mov    -0x820(%rbp),%rdi
movslq -0x82c(%rbp),%rcx
lea    -0x3f0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
mov    0xe8(%rax),%rdx
lea    0xa99(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x828(%rbp),%rdi
movslq -0x82c(%rbp),%rcx
lea    -0x7b0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
mov    0xe8(%rax),%rdx
lea    0xa67(%rip),%rsi
call   1090 <fprintf@plt>
movslq -0x82c(%rbp),%rcx
lea    -0x3f0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
cvtsi2ssq 0xe8(%rax),%xmm0
addss  -0x830(%rbp),%xmm0
ff
movss  %xmm0,-0x830(%rbp)
ff
movslq -0x82c(%rbp),%rcx
lea    -0x7b0(%rbp),%rax
imul   $0xf0,%rcx,%rcx
add    %rcx,%rax
cvtsi2ssq 0xe8(%rax),%xmm0
addss  -0x834(%rbp),%xmm0
ff
movss  %xmm0,-0x834(%rbp)
ff
movss  -0x830(%rbp),%xmm0
ff
movss  0x999(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x83c(%rbp)
ff
movss  -0x834(%rbp),%xmm0
ff
movss  0x97d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x840(%rbp)
ff
movss  -0x83c(%rbp),%xmm0
ff
movss  0x95d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x83c(%rbp)
ff
movss  -0x840(%rbp),%xmm0
ff
movss  0x941(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x840(%rbp)
ff
movss  0x929(%rip),%xmm0
divss  -0x83c(%rbp),%xmm0
ff
movss  %xmm0,-0x844(%rbp)
ff
movss  0x911(%rip),%xmm0
divss  -0x840(%rbp),%xmm0
ff
movss  %xmm0,-0x848(%rbp)
ff
movslq -0x82c(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movss  -0x83c(%rbp),%xmm0
ff
movss  -0x844(%rbp),%xmm1
ff
lea    0x943(%rip),%rdi
call   1070 <printf@plt>
movslq -0x82c(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movss  -0x840(%rbp),%xmm0
ff
movss  -0x848(%rbp),%xmm1
ff
lea    0x974(%rip),%rdi
call   1070 <printf@plt>
mov    -0x82c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x82c(%rbp)
jmp    1475 <main+0x2d5>
mov    -0x820(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x828(%rbp),%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7f8,%rsp
xor    %eax,%eax
mov    %rax,0x8(%rsp)
nopl   0x0(%rax,%rax,1)
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa00000,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
lea    0xe2c(%rip),%rax
movd   (%rax,%r14,4),%xmm0
pshufd $0x0,%xmm0,%xmm0
mov    $0x3c,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqu %xmm0,-0xf0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0xe0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0xd0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0xc0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0xb0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0xa0(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0x90(%r15,%rax,4)
ff ff ff
movdqu %xmm0,-0x80(%r15,%rax,4)
movdqu %xmm0,-0x70(%r15,%rax,4)
movdqu %xmm0,-0x60(%r15,%rax,4)
movdqu %xmm0,-0x50(%r15,%rax,4)
movdqu %xmm0,-0x40(%r15,%rax,4)
movdqu %xmm0,-0x30(%r15,%rax,4)
movdqu %xmm0,-0x20(%r15,%rax,4)
movdqu %xmm0,-0x10(%r15,%rax,4)
movdqu %xmm0,(%r15,%rax,4)
add    $0x40,%rax
cmp    $0x28003c,%rax
jne    1200 <main+0x60>
lea    0x60(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
lea    0xd79(%rip),%rdi
mov    %rdi,%rbx
lea    0xd7a(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbp
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x280000,%edx
mov    %rax,%rcx
call   10c0 <fwrite@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
lea    0x50(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
movslq 0x50(%rsp),%rax
imul   $0xf4240,%rax,%rax
movslq 0x60(%rsp),%rcx
imul   $0xf4240,%rcx,%rcx
add    0x58(%rsp),%rax
add    0x68(%rsp),%rcx
sub    %rcx,%rax
imul   $0xf0,%r14,%r13
lea    (%rsp,%r13,1),%rcx
add    $0x430,%rcx
mov    0x8(%rsp),%r12
mov    %rax,(%rcx,%r12,8)
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0xa00000,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbp
lea    0x40(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
mov    %rbx,%r15
mov    %rbx,%rdi
lea    0xcde(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x280000,%edx
mov    %rax,%rcx
call   1050 <fread@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
lea    0x30(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
movslq 0x30(%rsp),%rax
imul   $0xf4240,%rax,%rax
movslq 0x40(%rsp),%rcx
imul   $0xf4240,%rcx,%rcx
add    0x38(%rsp),%rax
add    0x48(%rsp),%rcx
sub    %rcx,%rax
lea    (%rsp,%r13,1),%rcx
add    $0x70,%rcx
mov    %rax,(%rcx,%r12,8)
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1040 <remove@plt>
add    $0x1,%r14
cmp    $0x4,%r14
jne    11d0 <main+0x30>
mov    0x8(%rsp),%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x8(%rsp)
cmp    $0x1e,%rcx
jne    11c0 <main+0x20>
lea    0xc3f(%rip),%rdi
lea    0xc4c(%rip),%rbx
mov    %rbx,%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbp
lea    0xc3c(%rip),%rdi
mov    %rbx,%rsi
call   10b0 <fopen@plt>
mov    %rax,%r12
lea    0x430(%rsp),%rax
lea    0x70(%rsp),%rcx
xor    %ebx,%ebx
mov    %rbp,0x20(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %rcx,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %rbx,0x28(%rsp)
pxor   %xmm0,%xmm0
movd   %xmm0,0x8(%rsp)
mov    %rbp,%r14
xor    %r15d,%r15d
pxor   %xmm0,%xmm0
movd   %xmm0,0x4(%rsp)
lea    0xbfa(%rip),%r13
mov    0x18(%rsp),%rax
mov    (%rax,%r15,8),%rbp
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
call   1090 <fprintf@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%r15,8),%rbx
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1090 <fprintf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rbp,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rbx,%xmm1
movss  0x4(%rsp),%xmm2
addss  %xmm0,%xmm2
movss  %xmm2,0x4(%rsp)
movss  0x8(%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x8(%rsp)
add    $0x1,%r15
cmp    $0x1d,%r15
jne    1460 <main+0x2c0>
mov    0x28(%rsp),%rbx
imul   $0xf0,%rbx,%rbp
mov    0x518(%rsp,%rbp,1),%r15
mov    %r14,%rdi
lea    0xb79(%rip),%r13
mov    %r13,%rsi
mov    %r15,%rdx
call   1090 <fprintf@plt>
mov    0x158(%rsp,%rbp,1),%rbp
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
call   1090 <fprintf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r15,%xmm0
movss  0x4(%rsp),%xmm2
addss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2ss %rbp,%xmm0
movss  0x8(%rsp),%xmm3
addss  %xmm0,%xmm3
movss  0xacd(%rip),%xmm0
divss  %xmm0,%xmm2
divss  %xmm0,%xmm3
movss  0xac1(%rip),%xmm0
divss  %xmm0,%xmm2
divss  %xmm0,%xmm3
movss  %xmm3,0x8(%rsp)
movss  0xaaf(%rip),%xmm0
movaps %xmm0,%xmm1
divss  %xmm2,%xmm1
divss  %xmm3,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xa9f(%rip),%rax
mov    (%rax,%rbx,4),%ebp
lea    0xae9(%rip),%rdi
mov    %ebp,%esi
movaps %xmm2,%xmm0
call   1070 <printf@plt>
lea    0xb30(%rip),%rdi
mov    %ebp,%esi
movd   0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1070 <printf@plt>
add    $0x1,%rbx
mov    0x18(%rsp),%rax
add    $0xf0,%rax
mov    0x10(%rsp),%rcx
add    $0xf0,%rcx
cmp    $0x4,%rbx
mov    0x20(%rsp),%rbp
jne    1430 <main+0x290>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0x7f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@__const.main.valsToWrite = [4 x i32] [i32 -1, i32 0, i32 -1431655766, i32 1431655765]
@.str = [11 x i8] c"./test.bin\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [20 x i8] c"./timeDistWrite.csv\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [19 x i8] c"./timeDistRead.csv\00"
@.str.6 = [5 x i8] c"%ld,\00"
@.str.7 = [5 x i8] c"%ld\0A\00"
@.str.8 = [88 x i8] c"++++++++\0A***WRITING***\0AMean time for writing 0x%x = %f sec \0Amean write speed = %f MBps\0A\00"
@.str.9 = [78 x i8] c"***READING***\0AMean time for reading 0x%x = %f sec \0Amean read speed = %f MBps\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [4 x i32]
%9 = alloca [4 x [30 x i64]]
%10 = alloca [4 x [30 x i64]]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca %struct.timeval
%16 = alloca %struct.timeval
%17 = alloca %struct.timeval
%18 = alloca %struct.timeval
%19 = alloca i32*
%20 = alloca i32
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca i32
%24 = alloca float
%25 = alloca float
%26 = alloca i32
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10485760, i32* %6
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = udiv i64 %32, 4
%34 = trunc i64 %33 to i32
store i32 %34, i32* %7
%35 = bitcast [4 x i32]* %8 to i8*
store i32 0, i32* %11
br label %36
36: ; preds = %142, %2
%37 = load i32, i32* %11
%38 = icmp slt i32 %37, 30
br i1 %38, label %39, label %145
39: ; preds = %36
store i32 0, i32* %12
br label %40
40: ; preds = %138, %39
%41 = load i32, i32* %12
%42 = icmp slt i32 %41, 4
br i1 %42, label %43, label %141
43: ; preds = %40
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = mul i64 4, %45
%47 = trunc i64 %46 to i32
%48 = call i64 @malloc(i32 %47)
%49 = inttoptr i64 %48 to i32*
store i32* %49, i32** %13
store i32 0, i32* %14
br label %50
50: ; preds = %63, %43
%51 = load i32, i32* %14
%52 = load i32, i32* %7
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %66
54: ; preds = %50
%55 = load i32, i32* %12
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = load i32*, i32** %13
%60 = load i32, i32* %14
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %59, i64 %61
store i32 %58, i32* %62
br label %63
63: ; preds = %54
%64 = load i32, i32* %14
%65 = add nsw i32 %64, 1
store i32 %65, i32* %14
br label %50
66: ; preds = %50
%67 = call i32 @gettimeofday(%struct.timeval* %15, i32* null)
%68 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %68, i32** %19
%69 = load i32*, i32** %13
%70 = load i32, i32* %7
%71 = load i32*, i32** %19
%72 = call i32 @fwrite(i32* %69, i32 4, i32 %70, i32* %71)
%73 = load i32*, i32** %19
%74 = call i32 @fclose(i32* %73)
%75 = call i32 @gettimeofday(%struct.timeval* %16, i32* null)
%76 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 0
%77 = load i32, i32* %76
%78 = mul nsw i32 %77, 1000000
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%81 = load i64, i64* %80
%82 = add nsw i64 %79, %81
%83 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%84 = load i32, i32* %83
%85 = mul nsw i32 %84, 1000000
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%88 = load i64, i64* %87
%89 = add nsw i64 %86, %88
%90 = sub nsw i64 %82, %89
%91 = load i32, i32* %12
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %9, i64 0, i64 %92
%94 = load i32, i32* %11
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [30 x i64], [30 x i64]* %93, i64 0, i64 %95
store i64 %90, i64* %96
%97 = load i32*, i32** %13
%98 = call i32 @free(i32* %97)
%99 = load i32, i32* %7
%100 = sext i32 %99 to i64
%101 = mul i64 4, %100
%102 = trunc i64 %101 to i32
%103 = call i64 @malloc(i32 %102)
%104 = inttoptr i64 %103 to i32*
store i32* %104, i32** %13
%105 = call i32 @gettimeofday(%struct.timeval* %17, i32* null)
%106 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %106, i32** %19
%107 = load i32*, i32** %13
%108 = load i32, i32* %7
%109 = load i32*, i32** %19
%110 = call i32 @fread(i32* %107, i32 4, i32 %108, i32* %109)
%111 = load i32*, i32** %19
%112 = call i32 @fclose(i32* %111)
%113 = call i32 @gettimeofday(%struct.timeval* %18, i32* null)
%114 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 0
%115 = load i32, i32* %114
%116 = mul nsw i32 %115, 1000000
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%119 = load i64, i64* %118
%120 = add nsw i64 %117, %119
%121 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i32 0, i32 0
%122 = load i32, i32* %121
%123 = mul nsw i32 %122, 1000000
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i32 0, i32 1
%126 = load i64, i64* %125
%127 = add nsw i64 %124, %126
%128 = sub nsw i64 %120, %127
%129 = load i32, i32* %12
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %10, i64 0, i64 %130
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [30 x i64], [30 x i64]* %131, i64 0, i64 %133
store i64 %128, i64* %134
%135 = load i32*, i32** %13
%136 = call i32 @free(i32* %135)
%137 = call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %137, i32* %20
br label %138
138: ; preds = %66
%139 = load i32, i32* %12
%140 = add nsw i32 %139, 1
store i32 %140, i32* %12
br label %40
141: ; preds = %40
br label %142
142: ; preds = %141
%143 = load i32, i32* %11
%144 = add nsw i32 %143, 1
store i32 %144, i32* %11
br label %36
145: ; preds = %36
%146 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %146, i32** %21
%147 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %147, i32** %22
store i32 0, i32* %23
br label %148
148: ; preds = %254, %145
%149 = load i32, i32* %23
%150 = icmp slt i32 %149, 4
br i1 %150, label %151, label %257
151: ; preds = %148
store float 0.000000e+00, float* %24
store float 0.000000e+00, float* %25
store i32 0, i32* %26
br label %152
152: ; preds = %194, %151
%153 = load i32, i32* %26
%154 = icmp slt i32 %153, 29
br i1 %154, label %155, label %197
155: ; preds = %152
%156 = load i32*, i32** %21
%157 = load i32, i32* %23
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %9, i64 0, i64 %158
%160 = load i32, i32* %26
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [30 x i64], [30 x i64]* %159, i64 0, i64 %161
%163 = load i64, i64* %162
%164 = call i32 @fprintf(i32* %156, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %163)
%165 = load i32*, i32** %22
%166 = load i32, i32* %23
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %10, i64 0, i64 %167
%169 = load i32, i32* %26
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [30 x i64], [30 x i64]* %168, i64 0, i64 %170
%172 = load i64, i64* %171
%173 = call i32 @fprintf(i32* %165, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %172)
%174 = load i32, i32* %23
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %9, i64 0, i64 %175
%177 = load i32, i32* %26
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [30 x i64], [30 x i64]* %176, i64 0, i64 %178
%180 = load i64, i64* %179
%181 = sitofp i64 %180 to float
%182 = load float, float* %24
%183 = fadd float %182, %181
store float %183, float* %24
%184 = load i32, i32* %23
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %10, i64 0, i64 %185
%187 = load i32, i32* %26
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [30 x i64], [30 x i64]* %186, i64 0, i64 %188
%190 = load i64, i64* %189
%191 = sitofp i64 %190 to float
%192 = load float, float* %25
%193 = fadd float %192, %191
store float %193, float* %25
br label %194
194: ; preds = %155
%195 = load i32, i32* %26
%196 = add nsw i32 %195, 1
store i32 %196, i32* %26
br label %152
197: ; preds = %152
%198 = load i32*, i32** %21
%199 = load i32, i32* %23
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %9, i64 0, i64 %200
%202 = getelementptr inbounds [30 x i64], [30 x i64]* %201, i64 0, i64 29
%203 = load i64, i64* %202
%204 = call i32 @fprintf(i32* %198, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i64 %203)
%205 = load i32*, i32** %22
%206 = load i32, i32* %23
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %10, i64 0, i64 %207
%209 = getelementptr inbounds [30 x i64], [30 x i64]* %208, i64 0, i64 29
%210 = load i64, i64* %209
%211 = call i32 @fprintf(i32* %205, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i64 %210)
%212 = load i32, i32* %23
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %9, i64 0, i64 %213
%215 = getelementptr inbounds [30 x i64], [30 x i64]* %214, i64 0, i64 29
%216 = load i64, i64* %215
%217 = sitofp i64 %216 to float
%218 = load float, float* %24
%219 = fadd float %218, %217
store float %219, float* %24
%220 = load i32, i32* %23
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %10, i64 0, i64 %221
%223 = getelementptr inbounds [30 x i64], [30 x i64]* %222, i64 0, i64 29
%224 = load i64, i64* %223
%225 = sitofp i64 %224 to float
%226 = load float, float* %25
%227 = fadd float %226, %225
store float %227, float* %25
%228 = load float, float* %24
%229 = fdiv float %228, 3.000000e+01
store float %229, float* %27
%230 = load float, float* %25
%231 = fdiv float %230, 3.000000e+01
store float %231, float* %28
%232 = load float, float* %27
%233 = fdiv float %232, 1.000000e+06
store float %233, float* %27
%234 = load float, float* %28
%235 = fdiv float %234, 1.000000e+06
store float %235, float* %28
%236 = load float, float* %27
%237 = fdiv float 1.000000e+01, %236
store float %237, float* %29
%238 = load float, float* %28
%239 = fdiv float 1.000000e+01, %238
store float %239, float* %30
%240 = load i32, i32* %23
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %241
%243 = load i32, i32* %242
%244 = load float, float* %27
%245 = load float, float* %29
%246 = call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.8, i64 0, i64 0), i32 %243, float %244, float %245)
%247 = load i32, i32* %23
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %248
%250 = load i32, i32* %249
%251 = load float, float* %28
%252 = load float, float* %30
%253 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.9, i64 0, i64 0), i32 %250, float %251, float %252)
br label %254
254: ; preds = %197
%255 = load i32, i32* %23
%256 = add nsw i32 %255, 1
store i32 %256, i32* %23
br label %148
257: ; preds = %148
%258 = load i32*, i32** %21
%259 = call i32 @fclose(i32* %258)
%260 = load i32*, i32** %22
%261 = call i32 @fclose(i32* %260)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@__const.main.valsToWrite = [4 x i32] [i32 -1, i32 0, i32 -1431655766, i32 1431655765]
@.str = [11 x i8] c"./test.bin\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [20 x i8] c"./timeDistWrite.csv\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [19 x i8] c"./timeDistRead.csv\00"
@.str.6 = [5 x i8] c"%ld,\00"
@.str.7 = [5 x i8] c"%ld\0A\00"
@.str.8 = [88 x i8] c"++++++++\0A***WRITING***\0AMean time for writing 0x%x = %f sec \0Amean write speed = %f MBps\0A\00"
@.str.9 = [78 x i8] c"***READING***\0AMean time for reading 0x%x = %f sec \0Amean read speed = %f MBps\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [30 x i64]]
%4 = alloca [4 x [30 x i64]]
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = alloca %struct.timeval
%9 = bitcast [4 x [30 x i64]]* %3 to i8*
%10 = bitcast [4 x [30 x i64]]* %4 to i8*
%11 = bitcast %struct.timeval* %5 to i8*
%12 = bitcast %struct.timeval* %6 to i8*
%13 = bitcast %struct.timeval* %7 to i8*
%14 = bitcast %struct.timeval* %8 to i8*
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 0
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 1
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%18 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 0
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 1
%21 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
br label %23
23: ; preds = %2, %28
%24 = phi i64 [ 0, %2 ], [ %29, %28 ]
br label %31
25: ; preds = %28
%26 = tail call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%27 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %126
28: ; preds = %84
%29 = add nuw nsw i64 %24, 1
%30 = icmp eq i64 %29, 30
br i1 %30, label %25, label %23
31: ; preds = %23, %84
%32 = phi i64 [ 0, %23 ], [ %124, %84 ]
%33 = tail call i64 @malloc(i32 10485760)
%34 = inttoptr i64 %33 to i32*
%35 = getelementptr inbounds [4 x i32], [4 x i32]* @__const.main.valsToWrite, i64 0, i64 %32
%36 = load i32, i32* %35
%37 = insertelement <4 x i32> poison, i32 %36, i64 0
%38 = shufflevector <4 x i32> %37, <4 x i32> poison, <4 x i32> zeroinitializer
%39 = insertelement <4 x i32> poison, i32 %36, i64 0
%40 = shufflevector <4 x i32> %39, <4 x i32> poison, <4 x i32> zeroinitializer
br label %41
41: ; preds = %41, %31
%42 = phi i64 [ 0, %31 ], [ %82, %41 ]
%43 = getelementptr inbounds i32, i32* %34, i64 %42
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %44
%45 = getelementptr inbounds i32, i32* %43, i64 4
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %46
%47 = or i64 %42, 8
%48 = getelementptr inbounds i32, i32* %34, i64 %47
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %49
%50 = getelementptr inbounds i32, i32* %48, i64 4
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %51
%52 = or i64 %42, 16
%53 = getelementptr inbounds i32, i32* %34, i64 %52
%54 = bitcast i32* %53 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %54
%55 = getelementptr inbounds i32, i32* %53, i64 4
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %56
%57 = or i64 %42, 24
%58 = getelementptr inbounds i32, i32* %34, i64 %57
%59 = bitcast i32* %58 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %59
%60 = getelementptr inbounds i32, i32* %58, i64 4
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %61
%62 = or i64 %42, 32
%63 = getelementptr inbounds i32, i32* %34, i64 %62
%64 = bitcast i32* %63 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %64
%65 = getelementptr inbounds i32, i32* %63, i64 4
%66 = bitcast i32* %65 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %66
%67 = or i64 %42, 40
%68 = getelementptr inbounds i32, i32* %34, i64 %67
%69 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %69
%70 = getelementptr inbounds i32, i32* %68, i64 4
%71 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %71
%72 = or i64 %42, 48
%73 = getelementptr inbounds i32, i32* %34, i64 %72
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %74
%75 = getelementptr inbounds i32, i32* %73, i64 4
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %76
%77 = or i64 %42, 56
%78 = getelementptr inbounds i32, i32* %34, i64 %77
%79 = bitcast i32* %78 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %79
%80 = getelementptr inbounds i32, i32* %78, i64 4
%81 = bitcast i32* %80 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %81
%82 = add nuw nsw i64 %42, 64
%83 = icmp eq i64 %82, 2621440
br i1 %83, label %84, label %41
84: ; preds = %41
%85 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%86 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%87 = tail call i32 @fwrite(i32* %34, i32 4, i32 2621440, i32* %86)
%88 = tail call i32 @fclose(i32* %86)
%89 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%90 = load i32, i32* %15
%91 = mul nsw i32 %90, 1000000
%92 = sext i32 %91 to i64
%93 = load i64, i64* %16
%94 = load i32, i32* %17
%95 = mul nsw i32 %94, 1000000
%96 = sext i32 %95 to i64
%97 = load i64, i64* %18
%98 = add i64 %93, %92
%99 = add i64 %97, %96
%100 = sub i64 %98, %99
%101 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %3, i64 0, i64 %32, i64 %24
store i64 %100, i64* %101
%102 = tail call i32 @free(i32* %34)
%103 = tail call i64 @malloc(i32 10485760)
%104 = inttoptr i64 %103 to i32*
%105 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
%106 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%107 = tail call i32 @fread(i32* %104, i32 4, i32 2621440, i32* %106)
%108 = tail call i32 @fclose(i32* %106)
%109 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%110 = load i32, i32* %19
%111 = mul nsw i32 %110, 1000000
%112 = sext i32 %111 to i64
%113 = load i64, i64* %20
%114 = load i32, i32* %21
%115 = mul nsw i32 %114, 1000000
%116 = sext i32 %115 to i64
%117 = load i64, i64* %22
%118 = add i64 %113, %112
%119 = add i64 %117, %116
%120 = sub i64 %118, %119
%121 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %4, i64 0, i64 %32, i64 %24
store i64 %120, i64* %121
%122 = tail call i32 @free(i32* %104)
%123 = tail call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%124 = add nuw nsw i64 %32, 1
%125 = icmp eq i64 %124, 4
br i1 %125, label %28, label %31
126: ; preds = %25, %131
%127 = phi i64 [ 0, %25 ], [ %152, %131 ]
br label %154
128: ; preds = %131
%129 = tail call i32 @fclose(i32* %26)
%130 = tail call i32 @fclose(i32* %27)
ret i32 0
131: ; preds = %154
%132 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %3, i64 0, i64 %127, i64 29
%133 = load i64, i64* %132
%134 = tail call i32 @fprintf(i32* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i64 %133)
%135 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %4, i64 0, i64 %127, i64 29
%136 = load i64, i64* %135
%137 = tail call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i64 %136)
%138 = sitofp i64 %133 to float
%139 = fadd float %165, %138
%140 = sitofp i64 %136 to float
%141 = fadd float %167, %140
%142 = fdiv float %139, 3.000000e+01
%143 = fdiv float %141, 3.000000e+01
%144 = fdiv float %142, 1.000000e+06
%145 = fdiv float %143, 1.000000e+06
%146 = fdiv float 1.000000e+01, %144
%147 = fdiv float 1.000000e+01, %145
%148 = getelementptr inbounds [4 x i32], [4 x i32]* @__const.main.valsToWrite, i64 0, i64 %127
%149 = load i32, i32* %148
%150 = tail call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.8, i64 0, i64 0), i32 %149, float %144, float %146)
%151 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.9, i64 0, i64 0), i32 %149, float %145, float %147)
%152 = add nuw nsw i64 %127, 1
%153 = icmp eq i64 %152, 4
br i1 %153, label %128, label %126
154: ; preds = %126, %154
%155 = phi i64 [ 0, %126 ], [ %168, %154 ]
%156 = phi float [ 0.000000e+00, %126 ], [ %167, %154 ]
%157 = phi float [ 0.000000e+00, %126 ], [ %165, %154 ]
%158 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %3, i64 0, i64 %127, i64 %155
%159 = load i64, i64* %158
%160 = tail call i32 @fprintf(i32* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %159)
%161 = getelementptr inbounds [4 x [30 x i64]], [4 x [30 x i64]]* %4, i64 0, i64 %127, i64 %155
%162 = load i64, i64* %161
%163 = tail call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %162)
%164 = sitofp i64 %159 to float
%165 = fadd float %157, %164
%166 = sitofp i64 %162 to float
%167 = fadd float %156, %166
%168 = add nuw nsw i64 %155, 1
%169 = icmp eq i64 %168, 29
br i1 %169, label %131, label %154
}