#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 timezone {
  int dummy;
};
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int atoi(char *);
float cos(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
scalar_t__ malloc(int);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printf(char *, ...);
main(int argc, char **argv) {
  int i, j, Noofthreads, Matsize;
  float **Matrix;
  struct timeval TimeValue_Start, TimeValue_Start1;
  struct timezone TimeZone_Start, TimeZone_Start1;
  struct timeval TimeValue_Final, TimeValue_Final1;
  struct timezone TimeZone_Final, TimeZone_Final1;
  long time_start, time_end;
  double time_overhead1, time_overhead2;
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Email : RarchK");
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Objective :  OpenMP Program to demonstrate  Performance "
         "improvement ");
  printf("\n\t\t by doing the loop inverting. .");
  printf("\n\t\t..............................................................."
         "...........\n");
  if (argc != 3) {
    printf("\t\t Very Few Arguments\n ");
    printf("\t\t Syntax : exec <Threads> <matrix-size>\n");
    exit(-1);
  }
  Noofthreads = atoi(argv[1]);
  Matsize = atoi(argv[2]);
  if ((Noofthreads != 1) && (Noofthreads != 2) && (Noofthreads != 4) &&
      (Noofthreads != 8) && (Noofthreads != 16)) {
    printf("\n Number of threads should be 1,2,4,8 or 16 for the execution of "
           "program. \n\n");
    exit(-1);
  }
  printf("\n\t\t Threads               : %d", Noofthreads);
  printf("\n\t\t Matrix Size           : %d", Matsize);
  Matrix = (float **)malloc(Matsize * sizeof(float *));
  for (i = 0; i < Matsize; i++) {
    Matrix[i] = (float *)malloc(Matsize * sizeof(float));
    for (j = 0; j < Matsize; j++) {
      Matrix[i][j] = cos(i * 1.0);
    }
  }
  gettimeofday(&TimeValue_Start, &TimeZone_Start);
  omp_set_num_threads(Noofthreads);
  for (i = 1; i < Matsize; i++) {
#pragma omp parallel for
    for (j = 1; j < Matsize; j++) {
      Matrix[i][j] = 2 * Matrix[i - 1][j];
    }
  }
  gettimeofday(&TimeValue_Final, &TimeZone_Final);
  time_start = TimeValue_Start.tv_sec * 1000000 + TimeValue_Start.tv_usec;
  time_end = TimeValue_Final.tv_sec * 1000000 + TimeValue_Final.tv_usec;
  time_overhead1 = (time_end - time_start) / 1000000.0;
  time_start = 0;
  time_end = 0;
  gettimeofday(&TimeValue_Start1, &TimeZone_Start1);
#pragma omp parallel for private(i)
  for (j = 1; j < Matsize; j++) {
    for (i = 1; i < Matsize; i++) {
      Matrix[i][j] = 2 * Matrix[i - 1][j];
    }
  }
  gettimeofday(&TimeValue_Final1, &TimeZone_Final1);
  time_start = TimeValue_Start1.tv_sec * 1000000 + TimeValue_Start1.tv_usec;
  time_end = TimeValue_Final1.tv_sec * 1000000 + TimeValue_Final1.tv_usec;
  time_overhead2 = (time_end - time_start) / 1000000.0;
  printf("\n\n\t\t Time Taken in Seconds (By Parallel Computation )           "
         ":%lf  ",
         time_overhead1);
  printf("\n\t\t Time Taken in Seconds (By Inverting loop Computation )     "
         ":%lf \n ",
         time_overhead2);
  printf("\n\t\t..............................................................."
         "...........\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
je     120d <main+0x9d>
lea    0xf43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x1c(%rbp)
je     1277 <main+0x107>
cmpl   $0x2,-0x1c(%rbp)
je     1277 <main+0x107>
cmpl   $0x4,-0x1c(%rbp)
je     1277 <main+0x107>
cmpl   $0x8,-0x1c(%rbp)
je     1277 <main+0x107>
cmpl   $0x10,-0x1c(%rbp)
je     1277 <main+0x107>
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x1c(%rbp),%esi
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xf4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1340 <main+0x1d0>
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    132d <main+0x1bd>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xd0b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <cos@plt>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12e4 <main+0x174>
jmp    1332 <main+0x1c2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b3 <main+0x143>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <gettimeofday@plt>
mov    -0x1c(%rbp),%edi
call   1060 <omp_set_num_threads@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13d3 <main+0x263>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13c0 <main+0x250>
mov    -0x28(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movss  0xc78(%rip),%xmm0
mulss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    136f <main+0x1ff>
jmp    13c5 <main+0x255>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    135c <main+0x1ec>
lea    -0x50(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <gettimeofday@plt>
imul   $0xf4240,-0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
cltq
mov    %rax,-0x70(%rbp)
imul   $0xf4240,-0x50(%rbp),%eax
add    -0x4c(%rbp),%eax
cltq
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
sub    -0x70(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xbeb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movq   $0x0,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
lea    -0x38(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1040 <gettimeofday@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14b9 <main+0x349>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14a6 <main+0x336>
mov    -0x28(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movss  0xb92(%rip),%xmm0
mulss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1455 <main+0x2e5>
jmp    14ab <main+0x33b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1442 <main+0x2d2>
lea    -0x58(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   1040 <gettimeofday@plt>
imul   $0xf4240,-0x38(%rbp),%eax
add    -0x34(%rbp),%eax
cltq
mov    %rax,-0x70(%rbp)
imul   $0xf4240,-0x58(%rbp),%eax
add    -0x54(%rbp),%eax
cltq
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
sub    -0x70(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xb05(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
lea    0xceb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x88(%rbp),%xmm0
ff
lea    0xd1c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xbab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xe6d(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfda(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x3,%r14d
jne    16ed <main+0x56d>
mov    0x8(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1090 <atoi@plt>
mov    %rax,0x8(%rsp)
cmp    $0x10,%ebp
ja     1711 <main+0x591>
mov    $0x10116,%eax
bt     %ebp,%eax
jae    1711 <main+0x591>
lea    0xec8(%rip),%rdi
mov    %ebp,0x1c(%rsp)
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    0x8(%rsp),%rbp
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x0(,%rbp,8),%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%r15d
test   %ebp,%ebp
jle    1350 <main+0x1d0>
mov    0x8(%rsp),%rax
lea    0x0(,%rax,4),%eax
mov    %eax,0x10(%rsp)
lea    -0x1(%r15),%rax
mov    %rax,0x40(%rsp)
mov    %r15d,%eax
and    $0x3,%eax
mov    %rax,(%rsp)
mov    %r15d,%r13d
and    $0xfffffffc,%r13d
xor    %ebp,%ebp
jmp    129d <main+0x11d>
add    $0x1,%rbp
cmp    %r15,%rbp
je     1350 <main+0x1d0>
mov    0x10(%rsp),%edi
call   1060 <malloc@plt>
mov    %rax,(%rbx,%rbp,8)
cmpq   $0x3,0x40(%rsp)
jae    12c0 <main+0x140>
xor    %r14d,%r14d
jmp    1320 <main+0x1a0>
nopw   0x0(%rax,%rax,1)
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edi
call   1080 <cos@plt>
mov    (%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%r14,4)
mov    %ebp,%edi
call   1080 <cos@plt>
mov    (%rbx,%rbp,8),%rax
movss  %xmm0,0x4(%rax,%r14,4)
mov    %ebp,%edi
call   1080 <cos@plt>
mov    (%rbx,%rbp,8),%rax
movss  %xmm0,0x8(%rax,%r14,4)
mov    %ebp,%edi
call   1080 <cos@plt>
mov    (%rbx,%rbp,8),%rax
movss  %xmm0,0xc(%rax,%r14,4)
add    $0x4,%r14
cmp    %r14,%r13
jne    12d0 <main+0x150>
cmpq   $0x0,(%rsp)
je     1290 <main+0x110>
mov    (%rsp),%r12
nop
mov    %ebp,%edi
call   1080 <cos@plt>
mov    (%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%r14,4)
add    $0x1,%r14
add    $0xffffffffffffffff,%r12
jne    1330 <main+0x1b0>
jmp    1290 <main+0x110>
lea    0x38(%rsp),%rdi
lea    0x60(%rsp),%rsi
call   1050 <gettimeofday@plt>
mov    0x1c(%rsp),%edi
call   1070 <omp_set_num_threads@plt>
cmpl   $0x2,0x8(%rsp)
jl     150c <main+0x38c>
lea    -0x1(%r15),%r12
lea    -0x9(%r15),%r10
mov    %r10,%r14
shr    $0x3,%r14
add    $0x1,%r14
mov    %r12,%r11
and    $0xfffffffffffffff8,%r11
lea    0x1(%r11),%r9
mov    %r14,%r8
and    $0xfffffffffffffffe,%r8
mov    $0x1,%ebp
jmp    13ad <main+0x22d>
nop
add    $0x1,%rbp
cmp    %r15,%rbp
je     150c <main+0x38c>
mov    -0x8(%rbx,%rbp,8),%rdi
mov    (%rbx,%rbp,8),%rcx
mov    $0x1,%esi
cmp    $0x8,%r12
jb     1470 <main+0x2f0>
lea    0x4(%rcx),%rax
lea    (%rdi,%r15,4),%rdx
cmp    %rdx,%rax
jae    13e8 <main+0x268>
lea    (%rcx,%r15,4),%rax
lea    0x4(%rdi),%rdx
mov    $0x1,%esi
cmp    %rax,%rdx
jb     1470 <main+0x2f0>
cmp    $0x8,%r10
jae    13f2 <main+0x272>
xor    %esi,%esi
jmp    143e <main+0x2be>
mov    %r8,%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movups 0x4(%rdi,%rsi,4),%xmm0
movups 0x14(%rdi,%rsi,4),%xmm1
addps  %xmm0,%xmm0
addps  %xmm1,%xmm1
movups %xmm0,0x4(%rcx,%rsi,4)
movups %xmm1,0x14(%rcx,%rsi,4)
movups 0x24(%rdi,%rsi,4),%xmm0
movups 0x34(%rdi,%rsi,4),%xmm1
addps  %xmm0,%xmm0
addps  %xmm1,%xmm1
movups %xmm0,0x24(%rcx,%rsi,4)
movups %xmm1,0x34(%rcx,%rsi,4)
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdx
jne    1400 <main+0x280>
test   $0x1,%r14b
je     1464 <main+0x2e4>
shl    $0x2,%rsi
or     $0x4,%rsi
movups (%rdi,%rsi,1),%xmm0
movups 0x10(%rdi,%rsi,1),%xmm1
addps  %xmm0,%xmm0
addps  %xmm1,%xmm1
movups %xmm0,(%rcx,%rsi,1)
movups %xmm1,0x10(%rcx,%rsi,1)
mov    %r9,%rsi
cmp    %r11,%r12
je     13a0 <main+0x220>
mov    %r15d,%eax
sub    %esi,%eax
mov    %rsi,%rdx
not    %rdx
add    %r15,%rdx
and    $0x3,%rax
je     14a8 <main+0x328>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  (%rdi,%rsi,4),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,(%rcx,%rsi,4)
add    $0x1,%rsi
add    $0xffffffffffffffff,%rax
jne    1490 <main+0x310>
cmp    $0x3,%rdx
jb     13a0 <main+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rdi,%rsi,4),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,(%rcx,%rsi,4)
movss  0x4(%rdi,%rsi,4),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,0x4(%rcx,%rsi,4)
movss  0x8(%rdi,%rsi,4),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,0x8(%rcx,%rsi,4)
movss  0xc(%rdi,%rsi,4),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,0xc(%rcx,%rsi,4)
add    $0x4,%rsi
cmp    %rsi,%r15
jne    14c0 <main+0x340>
jmp    13a0 <main+0x220>
lea    0x28(%rsp),%rdi
lea    0x50(%rsp),%rsi
call   1050 <gettimeofday@plt>
movslq 0x38(%rsp),%r12
movslq 0x3c(%rsp),%rax
mov    %rax,(%rsp)
movslq 0x28(%rsp),%r13
movslq 0x2c(%rsp),%r14
lea    0x30(%rsp),%rdi
lea    0x58(%rsp),%rsi
call   1050 <gettimeofday@plt>
cmpl   $0x2,0x8(%rsp)
jl     162c <main+0x4ac>
mov    (%rbx),%r8
lea    -0x1(%r15),%rcx
lea    -0x2(%r15),%r9
mov    %ecx,%esi
and    $0x3,%esi
and    $0xfffffffffffffffc,%rcx
mov    $0x1,%edi
jmp    157d <main+0x3fd>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
cmp    %r15,%rdi
je     162c <main+0x4ac>
movss  (%r8,%rdi,4),%xmm0
cmp    $0x3,%r9
jae    15a0 <main+0x420>
mov    $0x1,%ebp
test   %rsi,%rsi
jne    15fe <main+0x47e>
jmp    1570 <main+0x3f0>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addss  %xmm0,%xmm0
mov    0x8(%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%rdi,4)
addss  %xmm0,%xmm0
mov    0x10(%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%rdi,4)
addss  %xmm0,%xmm0
mov    0x18(%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%rdi,4)
addss  %xmm0,%xmm0
mov    0x20(%rbx,%rbp,8),%rax
movss  %xmm0,(%rax,%rdi,4)
add    $0x4,%rbp
cmp    %rbp,%rcx
jne    15b0 <main+0x430>
add    $0x1,%rbp
test   %rsi,%rsi
je     1570 <main+0x3f0>
lea    (%rbx,%rbp,8),%rbp
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addss  %xmm0,%xmm0
mov    0x0(%rbp,%rax,8),%rdx
movss  %xmm0,(%rdx,%rdi,4)
add    $0x1,%rax
cmp    %rax,%rsi
jne    1610 <main+0x490>
jmp    1570 <main+0x3f0>
imul   $0xf4240,%r13,%rax
add    %r14,%rax
imul   $0xf4240,%r12,%rcx
add    (%rsp),%rcx
sub    %rcx,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  0x9ac(%rip),%xmm0
movsd  %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1050 <gettimeofday@plt>
movslq 0x30(%rsp),%rax
imul   $0xf4240,%rax,%rax
movslq 0x34(%rsp),%rcx
add    %rax,%rcx
movslq 0x20(%rsp),%rax
imul   $0xf4240,%rax,%rax
movslq 0x24(%rsp),%rdx
add    %rax,%rdx
sub    %rcx,%rdx
xorps  %xmm0,%xmm0
cvtsi2sd %rdx,%xmm0
divsd  0x95d(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xa7c(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xab0(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xae3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x9e2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb52(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
lea    0xaf0(%rip),%rdi
jmp    1702 <main+0x582>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
%struct.timezone = type { i32 }
@.str = [79 x i8] c"\0A\09\09---------------------------------------------------------------------------\00"
@.str.1 = [19 x i8] c"\0A\09\09 Email : RarchK\00"
@.str.2 = [73 x i8] c"\0A\09\09 Objective : OpenMP Program to demonstrate Performance improvement \00"
@.str.3 = [35 x i8] c"\0A\09\09 by doing the loop inverting. .\00"
@.str.4 = [79 x i8] c"\0A\09\09..........................................................................\0A\00"
@.str.5 = [24 x i8] c"\09\09 Very Few Arguments\0A \00"
@.str.6 = [42 x i8] c"\09\09 Syntax : exec <Threads> <matrix-size>\0A\00"
@.str.7 = [77 x i8] c"\0A Number of threads should be 1,2,4,8 or 16 for the execution of program. \0A\0A\00"
@.str.8 = [31 x i8] c"\0A\09\09 Threads : %d\00"
@.str.9 = [31 x i8] c"\0A\09\09 Matrix Size : %d\00"
@.str.10 = [71 x i8] c"\0A\0A\09\09 Time Taken in Seconds (By Parallel Computation ) :%lf \00"
@.str.11 = [71 x i8] c"\0A\09\09 Time Taken in Seconds (By Inverting loop Computation ) :%lf \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 i32
%9 = alloca i32
%10 = alloca float**
%11 = alloca %struct.timeval
%12 = alloca %struct.timeval
%13 = alloca %struct.timezone
%14 = alloca %struct.timezone
%15 = alloca %struct.timeval
%16 = alloca %struct.timeval
%17 = alloca %struct.timezone
%18 = alloca %struct.timezone
%19 = alloca i64
%20 = alloca i64
%21 = alloca double
%22 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.4, i64 0, i64 0))
%29 = load i32, i32* %4
%30 = icmp ne i32 %29, 3
br i1 %30, label %31, label %35
31: ; preds = %2
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 @exit(i32 -1)
unreachable
35: ; preds = %2
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32 @atoi(i8* %38)
store i32 %39, i32* %8
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 2
%42 = load i8*, i8** %41
%43 = call i32 @atoi(i8* %42)
store i32 %43, i32* %9
%44 = load i32, i32* %8
%45 = icmp ne i32 %44, 1
br i1 %45, label %46, label %61
46: ; preds = %35
%47 = load i32, i32* %8
%48 = icmp ne i32 %47, 2
br i1 %48, label %49, label %61
49: ; preds = %46
%50 = load i32, i32* %8
%51 = icmp ne i32 %50, 4
br i1 %51, label %52, label %61
52: ; preds = %49
%53 = load i32, i32* %8
%54 = icmp ne i32 %53, 8
br i1 %54, label %55, label %61
55: ; preds = %52
%56 = load i32, i32* %8
%57 = icmp ne i32 %56, 16
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.7, i64 0, i64 0))
%60 = call i32 @exit(i32 -1)
unreachable
61: ; preds = %55, %52, %49, %46, %35
%62 = load i32, i32* %8
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %9
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %9
%67 = sext i32 %66 to i64
%68 = mul i64 %67, 8
%69 = trunc i64 %68 to i32
%70 = call i64 @malloc(i32 %69)
%71 = inttoptr i64 %70 to float**
store float** %71, float*** %10
store i32 0, i32* %6
br label %72
72: ; preds = %109, %61
%73 = load i32, i32* %6
%74 = load i32, i32* %9
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %112
76: ; preds = %72
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = mul i64 %78, 4
%80 = trunc i64 %79 to i32
%81 = call i64 @malloc(i32 %80)
%82 = inttoptr i64 %81 to float*
%83 = load float**, float*** %10
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds float*, float** %83, i64 %85
store float* %82, float** %86
store i32 0, i32* %7
br label %87
87: ; preds = %105, %76
%88 = load i32, i32* %7
%89 = load i32, i32* %9
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %108
91: ; preds = %87
%92 = load i32, i32* %6
%93 = sitofp i32 %92 to double
%94 = fmul double %93, 1.000000e+00
%95 = fptosi double %94 to i32
%96 = call float @cos(i32 %95)
%97 = load float**, float*** %10
%98 = load i32, i32* %6
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds float*, float** %97, i64 %99
%101 = load float*, float** %100
%102 = load i32, i32* %7
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds float, float* %101, i64 %103
store float %96, float* %104
br label %105
105: ; preds = %91
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 1
store i32 %107, i32* %7
br label %87
108: ; preds = %87
br label %109
109: ; preds = %108
%110 = load i32, i32* %6
%111 = add nsw i32 %110, 1
store i32 %111, i32* %6
br label %72
112: ; preds = %72
%113 = call i32 @gettimeofday(%struct.timeval* %11, %struct.timezone* %13)
%114 = load i32, i32* %8
%115 = call i32 @omp_set_num_threads(i32 %114)
store i32 1, i32* %6
br label %116
116: ; preds = %149, %112
%117 = load i32, i32* %6
%118 = load i32, i32* %9
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %152
120: ; preds = %116
store i32 1, i32* %7
br label %121
121: ; preds = %145, %120
%122 = load i32, i32* %7
%123 = load i32, i32* %9
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %148
125: ; preds = %121
%126 = load float**, float*** %10
%127 = load i32, i32* %6
%128 = sub nsw i32 %127, 1
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds float*, float** %126, i64 %129
%131 = load float*, float** %130
%132 = load i32, i32* %7
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds float, float* %131, i64 %133
%135 = load float, float* %134
%136 = fmul float 2.000000e+00, %135
%137 = load float**, float*** %10
%138 = load i32, i32* %6
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds float*, float** %137, i64 %139
%141 = load float*, float** %140
%142 = load i32, i32* %7
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds float, float* %141, i64 %143
store float %136, float* %144
br label %145
145: ; preds = %125
%146 = load i32, i32* %7
%147 = add nsw i32 %146, 1
store i32 %147, i32* %7
br label %121
148: ; preds = %121
br label %149
149: ; preds = %148
%150 = load i32, i32* %6
%151 = add nsw i32 %150, 1
store i32 %151, i32* %6
br label %116
152: ; preds = %116
%153 = call i32 @gettimeofday(%struct.timeval* %15, %struct.timezone* %17)
%154 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
%155 = load i32, i32* %154
%156 = mul nsw i32 %155, 1000000
%157 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 1
%158 = load i32, i32* %157
%159 = add nsw i32 %156, %158
%160 = sext i32 %159 to i64
store i64 %160, i64* %19
%161 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%162 = load i32, i32* %161
%163 = mul nsw i32 %162, 1000000
%164 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%165 = load i32, i32* %164
%166 = add nsw i32 %163, %165
%167 = sext i32 %166 to i64
store i64 %167, i64* %20
%168 = load i64, i64* %20
%169 = load i64, i64* %19
%170 = sub nsw i64 %168, %169
%171 = sitofp i64 %170 to double
%172 = fdiv double %171, 1.000000e+06
store double %172, double* %21
store i64 0, i64* %19
store i64 0, i64* %20
%173 = call i32 @gettimeofday(%struct.timeval* %12, %struct.timezone* %14)
store i32 1, i32* %7
br label %174
174: ; preds = %207, %152
%175 = load i32, i32* %7
%176 = load i32, i32* %9
%177 = icmp slt i32 %175, %176
br i1 %177, label %178, label %210
178: ; preds = %174
store i32 1, i32* %6
br label %179
179: ; preds = %203, %178
%180 = load i32, i32* %6
%181 = load i32, i32* %9
%182 = icmp slt i32 %180, %181
br i1 %182, label %183, label %206
183: ; preds = %179
%184 = load float**, float*** %10
%185 = load i32, i32* %6
%186 = sub nsw i32 %185, 1
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds float*, float** %184, i64 %187
%189 = load float*, float** %188
%190 = load i32, i32* %7
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds float, float* %189, i64 %191
%193 = load float, float* %192
%194 = fmul float 2.000000e+00, %193
%195 = load float**, float*** %10
%196 = load i32, i32* %6
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds float*, float** %195, i64 %197
%199 = load float*, float** %198
%200 = load i32, i32* %7
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds float, float* %199, i64 %201
store float %194, float* %202
br label %203
203: ; preds = %183
%204 = load i32, i32* %6
%205 = add nsw i32 %204, 1
store i32 %205, i32* %6
br label %179
206: ; preds = %179
br label %207
207: ; preds = %206
%208 = load i32, i32* %7
%209 = add nsw i32 %208, 1
store i32 %209, i32* %7
br label %174
210: ; preds = %174
%211 = call i32 @gettimeofday(%struct.timeval* %16, %struct.timezone* %18)
%212 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%213 = load i32, i32* %212
%214 = mul nsw i32 %213, 1000000
%215 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%216 = load i32, i32* %215
%217 = add nsw i32 %214, %216
%218 = sext i32 %217 to i64
store i64 %218, i64* %19
%219 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 0
%220 = load i32, i32* %219
%221 = mul nsw i32 %220, 1000000
%222 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%223 = load i32, i32* %222
%224 = add nsw i32 %221, %223
%225 = sext i32 %224 to i64
store i64 %225, i64* %20
%226 = load i64, i64* %20
%227 = load i64, i64* %19
%228 = sub nsw i64 %226, %227
%229 = sitofp i64 %228 to double
%230 = fdiv double %229, 1.000000e+06
store double %230, double* %22
%231 = load double, double* %21
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.10, i64 0, i64 0), double %231)
%233 = load double, double* %22
%234 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), double %233)
%235 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.4, i64 0, i64 0))
%236 = load i32, i32* %3
ret i32 %236
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
%struct.timezone = type { i32 }
@.str = [79 x i8] c"\0A\09\09---------------------------------------------------------------------------\00"
@.str.1 = [19 x i8] c"\0A\09\09 Email : RarchK\00"
@.str.2 = [73 x i8] c"\0A\09\09 Objective : OpenMP Program to demonstrate Performance improvement \00"
@.str.3 = [35 x i8] c"\0A\09\09 by doing the loop inverting. .\00"
@.str.5 = [24 x i8] c"\09\09 Very Few Arguments\0A \00"
@.str.8 = [31 x i8] c"\0A\09\09 Threads : %d\00"
@.str.9 = [31 x i8] c"\0A\09\09 Matrix Size : %d\00"
@.str.10 = [71 x i8] c"\0A\0A\09\09 Time Taken in Seconds (By Parallel Computation ) :%lf \00"
@.str.11 = [71 x i8] c"\0A\09\09 Time Taken in Seconds (By Inverting loop Computation ) :%lf \0A \00"
@str.12 = [78 x i8] c"\0A\09\09..........................................................................\00"
@str.13 = [76 x i8] c"\0A Number of threads should be 1,2,4,8 or 16 for the execution of program. \0A\00"
@str.14 = [41 x i8] c"\09\09 Syntax : exec <Threads> <matrix-size>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.timezone
%6 = alloca %struct.timezone
%7 = alloca %struct.timeval
%8 = alloca %struct.timeval
%9 = alloca %struct.timezone
%10 = alloca %struct.timezone
%11 = bitcast %struct.timeval* %3 to i8*
%12 = bitcast %struct.timeval* %4 to i8*
%13 = bitcast %struct.timezone* %5 to i8*
%14 = bitcast %struct.timezone* %6 to i8*
%15 = bitcast %struct.timeval* %7 to i8*
%16 = bitcast %struct.timeval* %8 to i8*
%17 = bitcast %struct.timezone* %9 to i8*
%18 = bitcast %struct.timezone* %10 to i8*
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.12, i64 0, i64 0))
%25 = icmp eq i32 %0, 3
br i1 %25, label %30, label %26
26: ; preds = %2
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.14, i64 0, i64 0))
%29 = tail call i32 @exit(i32 -1)
unreachable
30: ; preds = %2
%31 = getelementptr inbounds i8*, i8** %1, i64 1
%32 = load i8*, i8** %31
%33 = tail call i32 @atoi(i8* %32)
%34 = getelementptr inbounds i8*, i8** %1, i64 2
%35 = load i8*, i8** %34
%36 = tail call i32 @atoi(i8* %35)
switch i32 %33, label %37 [
i32 16, label %40
i32 8, label %40
i32 4, label %40
i32 2, label %40
i32 1, label %40
]
37: ; preds = %30
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.13, i64 0, i64 0))
%39 = tail call i32 @exit(i32 -1)
unreachable
40: ; preds = %30, %30, %30, %30, %30
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %33)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %36)
%43 = shl i32 %36, 3
%44 = tail call i64 @malloc(i32 %43)
%45 = inttoptr i64 %44 to float**
%46 = icmp sgt i32 %36, 0
br i1 %46, label %47, label %96
47: ; preds = %40
%48 = shl i32 %36, 2
%49 = zext i32 %36 to i64
%50 = add nsw i64 %49, -1
%51 = and i64 %49, 3
%52 = icmp ult i64 %50, 3
%53 = and i64 %49, 4294967292
%54 = icmp eq i64 %51, 0
br label %55
55: ; preds = %93, %47
%56 = phi i64 [ 0, %47 ], [ %94, %93 ]
%57 = tail call i64 @malloc(i32 %48)
%58 = inttoptr i64 %57 to float*
%59 = getelementptr inbounds float*, float** %45, i64 %56
store float* %58, float** %59
%60 = trunc i64 %56 to i32
br i1 %52, label %82, label %61
61: ; preds = %55, %61
%62 = phi i64 [ %79, %61 ], [ 0, %55 ]
%63 = phi i64 [ %80, %61 ], [ 0, %55 ]
%64 = tail call float @cos(i32 %60)
%65 = load float*, float** %59
%66 = getelementptr inbounds float, float* %65, i64 %62
store float %64, float* %66
%67 = or i64 %62, 1
%68 = tail call float @cos(i32 %60)
%69 = load float*, float** %59
%70 = getelementptr inbounds float, float* %69, i64 %67
store float %68, float* %70
%71 = or i64 %62, 2
%72 = tail call float @cos(i32 %60)
%73 = load float*, float** %59
%74 = getelementptr inbounds float, float* %73, i64 %71
store float %72, float* %74
%75 = or i64 %62, 3
%76 = tail call float @cos(i32 %60)
%77 = load float*, float** %59
%78 = getelementptr inbounds float, float* %77, i64 %75
store float %76, float* %78
%79 = add nuw nsw i64 %62, 4
%80 = add i64 %63, 4
%81 = icmp eq i64 %80, %53
br i1 %81, label %82, label %61
82: ; preds = %61, %55
%83 = phi i64 [ 0, %55 ], [ %79, %61 ]
br i1 %54, label %93, label %84
84: ; preds = %82, %84
%85 = phi i64 [ %90, %84 ], [ %83, %82 ]
%86 = phi i64 [ %91, %84 ], [ 0, %82 ]
%87 = tail call float @cos(i32 %60)
%88 = load float*, float** %59
%89 = getelementptr inbounds float, float* %88, i64 %85
store float %87, float* %89
%90 = add nuw nsw i64 %85, 1
%91 = add i64 %86, 1
%92 = icmp eq i64 %91, %51
br i1 %92, label %93, label %84
93: ; preds = %84, %82
%94 = add nuw nsw i64 %56, 1
%95 = icmp eq i64 %94, %49
br i1 %95, label %96, label %55
96: ; preds = %93, %40
%97 = call i32 @gettimeofday(%struct.timeval* %3, %struct.timezone* %5)
%98 = tail call i32 @omp_set_num_threads(i32 %33)
%99 = icmp sgt i32 %36, 1
br i1 %99, label %100, label %225
100: ; preds = %96
%101 = zext i32 %36 to i64
%102 = add nsw i64 %101, -1
%103 = add nsw i64 %101, -9
%104 = lshr i64 %103, 3
%105 = add nuw nsw i64 %104, 1
%106 = icmp ult i64 %102, 8
%107 = and i64 %102, -8
%108 = or i64 %107, 1
%109 = and i64 %105, 1
%110 = icmp ult i64 %103, 8
%111 = and i64 %105, 4611686018427387902
%112 = icmp eq i64 %109, 0
%113 = icmp eq i64 %102, %107
br label %114
114: ; preds = %222, %100
%115 = phi i64 [ 1, %100 ], [ %223, %222 ]
%116 = add nsw i64 %115, -1
%117 = getelementptr inbounds float*, float** %45, i64 %116
%118 = load float*, float** %117
%119 = getelementptr inbounds float*, float** %45, i64 %115
%120 = load float*, float** %119
br i1 %106, label %179, label %121
121: ; preds = %114
%122 = getelementptr float, float* %120, i64 1
%123 = getelementptr float, float* %120, i64 %101
%124 = getelementptr float, float* %118, i64 1
%125 = getelementptr float, float* %118, i64 %101
%126 = icmp ult float* %122, %125
%127 = icmp ult float* %124, %123
%128 = and i1 %126, %127
br i1 %128, label %179, label %129
129: ; preds = %121
br i1 %110, label %162, label %130
130: ; preds = %129, %130
%131 = phi i64 [ %159, %130 ], [ 0, %129 ]
%132 = phi i64 [ %160, %130 ], [ 0, %129 ]
%133 = or i64 %131, 1
%134 = getelementptr inbounds float, float* %118, i64 %133
%135 = bitcast float* %134 to <4 x float>*
%136 = load <4 x float>, <4 x float>* %135
%137 = getelementptr inbounds float, float* %134, i64 4
%138 = bitcast float* %137 to <4 x float>*
%139 = load <4 x float>, <4 x float>* %138
%140 = fmul <4 x float> %136, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%141 = fmul <4 x float> %139, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%142 = getelementptr inbounds float, float* %120, i64 %133
%143 = bitcast float* %142 to <4 x float>*
store <4 x float> %140, <4 x float>* %143
%144 = getelementptr inbounds float, float* %142, i64 4
%145 = bitcast float* %144 to <4 x float>*
store <4 x float> %141, <4 x float>* %145
%146 = or i64 %131, 9
%147 = getelementptr inbounds float, float* %118, i64 %146
%148 = bitcast float* %147 to <4 x float>*
%149 = load <4 x float>, <4 x float>* %148
%150 = getelementptr inbounds float, float* %147, i64 4
%151 = bitcast float* %150 to <4 x float>*
%152 = load <4 x float>, <4 x float>* %151
%153 = fmul <4 x float> %149, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%154 = fmul <4 x float> %152, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%155 = getelementptr inbounds float, float* %120, i64 %146
%156 = bitcast float* %155 to <4 x float>*
store <4 x float> %153, <4 x float>* %156
%157 = getelementptr inbounds float, float* %155, i64 4
%158 = bitcast float* %157 to <4 x float>*
store <4 x float> %154, <4 x float>* %158
%159 = add nuw i64 %131, 16
%160 = add i64 %132, 2
%161 = icmp eq i64 %160, %111
br i1 %161, label %162, label %130
162: ; preds = %130, %129
%163 = phi i64 [ 0, %129 ], [ %159, %130 ]
br i1 %112, label %178, label %164
164: ; preds = %162
%165 = or i64 %163, 1
%166 = getelementptr inbounds float, float* %118, i64 %165
%167 = bitcast float* %166 to <4 x float>*
%168 = load <4 x float>, <4 x float>* %167
%169 = getelementptr inbounds float, float* %166, i64 4
%170 = bitcast float* %169 to <4 x float>*
%171 = load <4 x float>, <4 x float>* %170
%172 = fmul <4 x float> %168, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%173 = fmul <4 x float> %171, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
%174 = getelementptr inbounds float, float* %120, i64 %165
%175 = bitcast float* %174 to <4 x float>*
store <4 x float> %172, <4 x float>* %175
%176 = getelementptr inbounds float, float* %174, i64 4
%177 = bitcast float* %176 to <4 x float>*
store <4 x float> %173, <4 x float>* %177
br label %178
178: ; preds = %162, %164
br i1 %113, label %222, label %179
179: ; preds = %121, %114, %178
%180 = phi i64 [ 1, %121 ], [ 1, %114 ], [ %108, %178 ]
%181 = sub nsw i64 %101, %180
%182 = xor i64 %180, -1
%183 = add nsw i64 %182, %101
%184 = and i64 %181, 3
%185 = icmp eq i64 %184, 0
br i1 %185, label %196, label %186
186: ; preds = %179, %186
%187 = phi i64 [ %193, %186 ], [ %180, %179 ]
%188 = phi i64 [ %194, %186 ], [ 0, %179 ]
%189 = getelementptr inbounds float, float* %118, i64 %187
%190 = load float, float* %189
%191 = fmul float %190, 2.000000e+00
%192 = getelementptr inbounds float, float* %120, i64 %187
store float %191, float* %192
%193 = add nuw nsw i64 %187, 1
%194 = add i64 %188, 1
%195 = icmp eq i64 %194, %184
br i1 %195, label %196, label %186
196: ; preds = %186, %179
%197 = phi i64 [ %180, %179 ], [ %193, %186 ]
%198 = icmp ult i64 %183, 3
br i1 %198, label %222, label %199
199: ; preds = %196, %199
%200 = phi i64 [ %220, %199 ], [ %197, %196 ]
%201 = getelementptr inbounds float, float* %118, i64 %200
%202 = load float, float* %201
%203 = fmul float %202, 2.000000e+00
%204 = getelementptr inbounds float, float* %120, i64 %200
store float %203, float* %204
%205 = add nuw nsw i64 %200, 1
%206 = getelementptr inbounds float, float* %118, i64 %205
%207 = load float, float* %206
%208 = fmul float %207, 2.000000e+00
%209 = getelementptr inbounds float, float* %120, i64 %205
store float %208, float* %209
%210 = add nuw nsw i64 %200, 2
%211 = getelementptr inbounds float, float* %118, i64 %210
%212 = load float, float* %211
%213 = fmul float %212, 2.000000e+00
%214 = getelementptr inbounds float, float* %120, i64 %210
store float %213, float* %214
%215 = add nuw nsw i64 %200, 3
%216 = getelementptr inbounds float, float* %118, i64 %215
%217 = load float, float* %216
%218 = fmul float %217, 2.000000e+00
%219 = getelementptr inbounds float, float* %120, i64 %215
store float %218, float* %219
%220 = add nuw nsw i64 %200, 4
%221 = icmp eq i64 %220, %101
br i1 %221, label %222, label %199
222: ; preds = %196, %199, %178
%223 = add nuw nsw i64 %115, 1
%224 = icmp eq i64 %223, %101
br i1 %224, label %225, label %114
225: ; preds = %222, %96
%226 = call i32 @gettimeofday(%struct.timeval* %7, %struct.timezone* %9)
%227 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%228 = load i32, i32* %227
%229 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
%230 = load i32, i32* %229
%231 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%232 = load i32, i32* %231
%233 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
%234 = load i32, i32* %233
%235 = call i32 @gettimeofday(%struct.timeval* %4, %struct.timezone* %6)
br i1 %99, label %236, label %292
236: ; preds = %225
%237 = zext i32 %36 to i64
%238 = load float*, float** %45
%239 = add nsw i64 %237, -1
%240 = add nsw i64 %237, -2
%241 = and i64 %239, 3
%242 = icmp ult i64 %240, 3
%243 = and i64 %239, -4
%244 = icmp eq i64 %241, 0
br label %245
245: ; preds = %289, %236
%246 = phi i64 [ 1, %236 ], [ %290, %289 ]
%247 = getelementptr inbounds float, float* %238, i64 %246
%248 = load float, float* %247
br i1 %242, label %275, label %249
249: ; preds = %245, %249
%250 = phi float [ %268, %249 ], [ %248, %245 ]
%251 = phi i64 [ %272, %249 ], [ 1, %245 ]
%252 = phi i64 [ %273, %249 ], [ 0, %245 ]
%253 = fmul float %250, 2.000000e+00
%254 = getelementptr inbounds float*, float** %45, i64 %251
%255 = load float*, float** %254
%256 = getelementptr inbounds float, float* %255, i64 %246
store float %253, float* %256
%257 = add nuw nsw i64 %251, 1
%258 = fmul float %253, 2.000000e+00
%259 = getelementptr inbounds float*, float** %45, i64 %257
%260 = load float*, float** %259
%261 = getelementptr inbounds float, float* %260, i64 %246
store float %258, float* %261
%262 = add nuw nsw i64 %251, 2
%263 = fmul float %258, 2.000000e+00
%264 = getelementptr inbounds float*, float** %45, i64 %262
%265 = load float*, float** %264
%266 = getelementptr inbounds float, float* %265, i64 %246
store float %263, float* %266
%267 = add nuw nsw i64 %251, 3
%268 = fmul float %263, 2.000000e+00
%269 = getelementptr inbounds float*, float** %45, i64 %267
%270 = load float*, float** %269
%271 = getelementptr inbounds float, float* %270, i64 %246
store float %268, float* %271
%272 = add nuw nsw i64 %251, 4
%273 = add i64 %252, 4
%274 = icmp eq i64 %273, %243
br i1 %274, label %275, label %249
275: ; preds = %249, %245
%276 = phi float [ %248, %245 ], [ %268, %249 ]
%277 = phi i64 [ 1, %245 ], [ %272, %249 ]
br i1 %244, label %289, label %278
278: ; preds = %275, %278
%279 = phi float [ %282, %278 ], [ %276, %275 ]
%280 = phi i64 [ %286, %278 ], [ %277, %275 ]
%281 = phi i64 [ %287, %278 ], [ 0, %275 ]
%282 = fmul float %279, 2.000000e+00
%283 = getelementptr inbounds float*, float** %45, i64 %280
%284 = load float*, float** %283
%285 = getelementptr inbounds float, float* %284, i64 %246
store float %282, float* %285
%286 = add nuw nsw i64 %280, 1
%287 = add i64 %281, 1
%288 = icmp eq i64 %287, %241
br i1 %288, label %289, label %278
289: ; preds = %278, %275
%290 = add nuw nsw i64 %246, 1
%291 = icmp eq i64 %290, %237
br i1 %291, label %292, label %245
292: ; preds = %289, %225
%293 = mul nsw i32 %232, 1000000
%294 = add nsw i32 %293, %234
%295 = sext i32 %294 to i64
%296 = mul nsw i32 %228, 1000000
%297 = add nsw i32 %296, %230
%298 = sext i32 %297 to i64
%299 = sub nsw i64 %295, %298
%300 = sitofp i64 %299 to double
%301 = fdiv double %300, 1.000000e+06
%302 = call i32 @gettimeofday(%struct.timeval* %8, %struct.timezone* %10)
%303 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%304 = load i32, i32* %303
%305 = mul nsw i32 %304, 1000000
%306 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%307 = load i32, i32* %306
%308 = add nsw i32 %305, %307
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 0
%311 = load i32, i32* %310
%312 = mul nsw i32 %311, 1000000
%313 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 1
%314 = load i32, i32* %313
%315 = add nsw i32 %312, %314
%316 = sext i32 %315 to i64
%317 = sub nsw i64 %316, %309
%318 = sitofp i64 %317 to double
%319 = fdiv double %318, 1.000000e+06
%320 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.10, i64 0, i64 0), double %301)
%321 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), double %319)
%322 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.12, i64 0, i64 0))
ret i32 0
}