#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printf(char *, ...);
main(int argc, char **argv) {
  double *Array, *Check, serial_sum, sum_private, sum, my_sum;
  int array_size, i, threadid, tval, Noofthreads;
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Email : RarchK");
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Objective : Managing Private and Shared Data");
  printf("\n\t\t Find the Sum of elements of one-dimensional real array.  ");
  printf("\n\t\t OpenMP Parallel for directive , Private and Shared Clause and "
         "Critical section is used ");
  printf("\n\t\t..............................................................."
         "...........\n");
  if (argc != 3) {
    printf("\t\t Very Few Arguments\n ");
    printf("\t\t Syntax : exec <Threads> <array-size> \n");
    exit(-1);
  }
  Noofthreads = atoi(argv[1]);
  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);
  }
  array_size = atoi(argv[2]);
  if (array_size <= 0) {
    printf("\n\t\t Array Size Should Be Of Positive Value ");
    exit(1);
  }
  printf("\n\t\t Threads     : %d ", Noofthreads);
  printf("\n\t\t Array Size  : %d ", array_size);
  Array = (double *)malloc(sizeof(double) * array_size);
  Check = (double *)malloc(sizeof(double) * array_size);
  for (i = 0; i < array_size; i++) {
    Array[i] = i * 5;
    Check[i] = Array[i];
  }
  sum = 0.0;
  omp_set_num_threads(Noofthreads);
#pragma omp parallel shared(sum)
  {
    my_sum = 0.0;
#pragma omp for
    for (i = 0; i < array_size; i++)
      my_sum = my_sum + Array[i];
#pragma omp critical
    sum = sum + my_sum;
  }
  sum_private = 0;
#pragma omp parallel private(my_sum) shared(sum)
  {
    my_sum = 0.0;
#pragma omp for
    for (i = 0; i < array_size; i++)
      my_sum = my_sum + Array[i];
#pragma omp critical
    sum_private = sum_private + my_sum;
  }
  serial_sum = 0.0;
  for (i = 0; i < array_size; i++)
    serial_sum = serial_sum + Check[i];
  printf("\n\n\t\t The compuation of the sum of the elements of the Array "
         "........... Done ");
  free(Check);
  free(Array);
  printf("\n\n\t\t The SumOfElements Of The Array Using OpenMP Directives "
         "without Private Clause : %lf",
         sum);
  printf("\n\t\t The SumOfElements Of The Array Using OpenMP Directives and "
         "Private Clause Is    : %lf",
         sum_private);
  printf("\n\t\t The SumOfElements Of The Array By Serial Calculation Is       "
         "                  : %lf\n\n",
         serial_sum);
  printf("\n\t\t..............................................................."
         "...........\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
je     1208 <main+0xa8>
lea    0xf93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x1,-0x54(%rbp)
je     1262 <main+0x102>
cmpl   $0x2,-0x54(%rbp)
je     1262 <main+0x102>
cmpl   $0x4,-0x54(%rbp)
je     1262 <main+0x102>
cmpl   $0x8,-0x54(%rbp)
je     1262 <main+0x102>
cmpl   $0x10,-0x54(%rbp)
je     1262 <main+0x102>
lea    0xf6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jg     1294 <main+0x134>
lea    0xf88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x54(%rbp),%esi
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    132c <main+0x1cc>
imul   $0x5,-0x48(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12e3 <main+0x183>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x54(%rbp),%edi
call   1060 <omp_set_num_threads@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    137c <main+0x21c>
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    134b <main+0x1eb>
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13d3 <main+0x273>
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    13a2 <main+0x242>
movsd  -0x30(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1422 <main+0x2c2>
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    13f1 <main+0x291>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x38(%rbp),%xmm0
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xef0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xcab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xeb5(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeee(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf41(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x115c(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x3,%r14d
jne    1681 <main+0x511>
mov    0x8(%rbx),%rdi
call   1080 <atoi@plt>
cmp    $0x10,%eax
ja     16bd <main+0x54d>
mov    %eax,%r12d
mov    $0x10116,%eax
bt     %r12d,%eax
jae    16bd <main+0x54d>
mov    0x10(%rbx),%rdi
call   1080 <atoi@plt>
test   %eax,%eax
jle    16a5 <main+0x535>
mov    %eax,%r15d
lea    0xf85(%rip),%rdi
xor    %ebp,%ebp
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf88(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x0(,%r15,8),%r14d
mov    %r14d,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %r14d,%edi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %r15d,%r13d
cmp    $0x4,%r15d
jb     1391 <main+0x221>
lea    (%r14,%r13,8),%rax
cmp    %rax,%rbx
jae    128d <main+0x11d>
lea    (%rbx,%r13,8),%rax
cmp    %rax,%r14
jae    128d <main+0x11d>
xor    %ebp,%ebp
jmp    1391 <main+0x221>
mov    %r13d,%ebp
and    $0xfffffffc,%ebp
lea    -0x4(%rbp),%rax
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rax,%rax
je     1669 <main+0x4f9>
mov    %rcx,%rdx
and    $0xfffffffffffffffe,%rdx
movdqa 0xd46(%rip),%xmm0
xor    %eax,%eax
movdqa 0xd4c(%rip),%xmm1
movdqa 0xd54(%rip),%xmm2
movdqa 0xd5c(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm4
pslld  $0x2,%xmm4
paddd  %xmm0,%xmm4
cvtdq2pd %xmm4,%xmm5
paddd  %xmm1,%xmm4
cvtdq2pd %xmm4,%xmm4
movups %xmm5,(%rbx,%rax,8)
movups %xmm4,0x10(%rbx,%rax,8)
movdqa %xmm0,%xmm6
paddd  %xmm2,%xmm6
movdqa %xmm6,%xmm7
pslld  $0x2,%xmm7
paddd  %xmm6,%xmm7
cvtdq2pd %xmm7,%xmm6
movups %xmm5,(%r14,%rax,8)
paddd  %xmm1,%xmm7
cvtdq2pd %xmm7,%xmm5
movups %xmm4,0x10(%r14,%rax,8)
movups %xmm6,0x20(%rbx,%rax,8)
movups %xmm5,0x30(%rbx,%rax,8)
movups %xmm6,0x20(%r14,%rax,8)
movups %xmm5,0x30(%r14,%rax,8)
add    $0x8,%rax
paddd  %xmm3,%xmm0
add    $0xfffffffffffffffe,%rdx
jne    12e0 <main+0x170>
test   $0x1,%cl
je     138c <main+0x21c>
movdqa %xmm0,%xmm1
pslld  $0x2,%xmm1
paddd  %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm0
paddd  0xca0(%rip),%xmm1
cvtdq2pd %xmm1,%xmm1
movdqu %xmm0,(%rbx,%rax,8)
movdqu %xmm1,0x10(%rbx,%rax,8)
movdqu %xmm0,(%r14,%rax,8)
movdqu %xmm1,0x10(%r14,%rax,8)
cmp    %r13,%rbp
je     13f5 <main+0x285>
mov    %rbp,%rax
not    %rax
test   $0x1,%r13b
je     13b7 <main+0x247>
lea    0x0(%rbp,%rbp,4),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movsd  %xmm0,(%r14,%rbp,8)
or     $0x1,%rbp
add    %r13,%rax
je     13f5 <main+0x285>
lea    0x0(%rbp,%rbp,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movsd  %xmm0,(%r14,%rbp,8)
lea    0x5(%rax),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x8(%rbx,%rbp,8)
movsd  %xmm0,0x8(%r14,%rbp,8)
add    $0x2,%rbp
add    $0xa,%eax
cmp    %rbp,%r13
jne    13c0 <main+0x250>
mov    %r12d,%edi
call   1070 <omp_set_num_threads@plt>
test   %r15d,%r15d
jle    141a <main+0x2aa>
lea    -0x1(%r13),%rax
mov    %r13d,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1433 <main+0x2c3>
pxor   %xmm0,%xmm0
xor    %edx,%edx
jmp    1478 <main+0x308>
pxor   %xmm0,%xmm0
movq   %xmm0,0x8(%rsp)
pxor   %xmm0,%xmm0
movq   %xmm0,0x10(%rsp)
jmp    1575 <main+0x405>
mov    %r13d,%esi
and    $0xfffffff8,%esi
pxor   %xmm0,%xmm0
xor    %edx,%edx
nop
addsd  (%rbx,%rdx,8),%xmm0
addsd  0x8(%rbx,%rdx,8),%xmm0
addsd  0x10(%rbx,%rdx,8),%xmm0
addsd  0x18(%rbx,%rdx,8),%xmm0
addsd  0x20(%rbx,%rdx,8),%xmm0
addsd  0x28(%rbx,%rdx,8),%xmm0
addsd  0x30(%rbx,%rdx,8),%xmm0
addsd  0x38(%rbx,%rdx,8),%xmm0
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    1440 <main+0x2d0>
test   %rcx,%rcx
je     149e <main+0x32e>
lea    (%rbx,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%rdx,%rsi,8),%xmm0
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    1490 <main+0x320>
pxor   %xmm1,%xmm1
addsd  %xmm1,%xmm0
test   %r15d,%r15d
movsd  %xmm0,0x10(%rsp)
jle    14c5 <main+0x355>
mov    %r13d,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    14dd <main+0x36d>
xorpd  %xmm1,%xmm1
xor    %edx,%edx
jmp    1528 <main+0x3b8>
xorpd  %xmm1,%xmm1
movsd  %xmm1,(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    15f3 <main+0x483>
mov    %r13d,%esi
and    $0xfffffff8,%esi
xorpd  %xmm1,%xmm1
xor    %edx,%edx
nopl   0x0(%rax)
addsd  (%rbx,%rdx,8),%xmm1
addsd  0x8(%rbx,%rdx,8),%xmm1
addsd  0x10(%rbx,%rdx,8),%xmm1
addsd  0x18(%rbx,%rdx,8),%xmm1
addsd  0x20(%rbx,%rdx,8),%xmm1
addsd  0x28(%rbx,%rdx,8),%xmm1
addsd  0x30(%rbx,%rdx,8),%xmm1
addsd  0x38(%rbx,%rdx,8),%xmm1
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    14f0 <main+0x380>
test   %rcx,%rcx
je     154e <main+0x3de>
lea    (%rbx,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%rdx,%rsi,8),%xmm1
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    1540 <main+0x3d0>
pxor   %xmm2,%xmm2
addsd  %xmm2,%xmm1
test   %r15d,%r15d
movsd  %xmm1,0x8(%rsp)
jle    1575 <main+0x405>
mov    %r13d,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1580 <main+0x410>
xorpd  %xmm2,%xmm2
xor    %eax,%eax
jmp    15d0 <main+0x460>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
jmp    15f3 <main+0x483>
and    $0xfffffff8,%r13d
xorpd  %xmm2,%xmm2
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
addsd  (%r14,%rax,8),%xmm2
addsd  0x8(%r14,%rax,8),%xmm2
addsd  0x10(%r14,%rax,8),%xmm2
addsd  0x18(%r14,%rax,8),%xmm2
addsd  0x20(%r14,%rax,8),%xmm2
addsd  0x28(%r14,%rax,8),%xmm2
addsd  0x30(%r14,%rax,8),%xmm2
addsd  0x38(%r14,%rax,8),%xmm2
add    $0x8,%rax
cmp    %rax,%r13
jne    1590 <main+0x420>
test   %rcx,%rcx
je     15ee <main+0x47e>
lea    (%r14,%rax,8),%rax
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
addsd  (%rax,%rdx,8),%xmm2
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    15e0 <main+0x470>
movsd  %xmm2,(%rsp)
lea    0xbe3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xc13(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xc58(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xc9e(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xce7(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movdqa 0x98f(%rip),%xmm0
xor    %eax,%eax
test   $0x1,%cl
jne    1357 <main+0x1e7>
jmp    138c <main+0x21c>
lea    0xae5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd3e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
lea    0xad9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xcc4(%rip),%rdi
jmp    1696 <main+0x526>

LLVM IR (-O0):
@.str = [79 x i8] c"\0A\09\09---------------------------------------------------------------------------\00"
@.str.1 = [19 x i8] c"\0A\09\09 Email : RarchK\00"
@.str.2 = [49 x i8] c"\0A\09\09 Objective : Managing Private and Shared Data\00"
@.str.3 = [62 x i8] c"\0A\09\09 Find the Sum of elements of one-dimensional real array. \00"
@.str.4 = [92 x i8] c"\0A\09\09 OpenMP Parallel for directive , Private and Shared Clause and Critical section is used \00"
@.str.5 = [79 x i8] c"\0A\09\09..........................................................................\0A\00"
@.str.6 = [24 x i8] c"\09\09 Very Few Arguments\0A \00"
@.str.7 = [42 x i8] c"\09\09 Syntax : exec <Threads> <array-size> \0A\00"
@.str.8 = [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.9 = [44 x i8] c"\0A\09\09 Array Size Should Be Of Positive Value \00"
@.str.10 = [22 x i8] c"\0A\09\09 Threads : %d \00"
@.str.11 = [22 x i8] c"\0A\09\09 Array Size : %d \00"
@.str.12 = [78 x i8] c"\0A\0A\09\09 The compuation of the sum of the elements of the Array ........... Done \00"
@.str.13 = [89 x i8] c"\0A\0A\09\09 The SumOfElements Of The Array Using OpenMP Directives without Private Clause : %lf\00"
@.str.14 = [90 x i8] c"\0A\09\09 The SumOfElements Of The Array Using OpenMP Directives and Private Clause Is : %lf\00"
@.str.15 = [92 x i8] c"\0A\09\09 The SumOfElements Of The Array By Serial Calculation Is : %lf\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double*
%7 = alloca double*
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 3
br i1 %25, label %26, label %30
26: ; preds = %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @exit(i32 -1)
unreachable
30: ; preds = %2
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @atoi(i8* %33)
store i32 %34, i32* %16
%35 = load i32, i32* %16
%36 = icmp ne i32 %35, 1
br i1 %36, label %37, label %52
37: ; preds = %30
%38 = load i32, i32* %16
%39 = icmp ne i32 %38, 2
br i1 %39, label %40, label %52
40: ; preds = %37
%41 = load i32, i32* %16
%42 = icmp ne i32 %41, 4
br i1 %42, label %43, label %52
43: ; preds = %40
%44 = load i32, i32* %16
%45 = icmp ne i32 %44, 8
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = load i32, i32* %16
%48 = icmp ne i32 %47, 16
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
%51 = call i32 @exit(i32 -1)
unreachable
52: ; preds = %46, %43, %40, %37, %30
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 2
%55 = load i8*, i8** %54
%56 = call i32 @atoi(i8* %55)
store i32 %56, i32* %12
%57 = load i32, i32* %12
%58 = icmp sle i32 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %52
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 @exit(i32 1)
unreachable
62: ; preds = %52
%63 = load i32, i32* %16
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %12
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %12
%68 = sext i32 %67 to i64
%69 = mul i64 8, %68
%70 = trunc i64 %69 to i32
%71 = call i64 @malloc(i32 %70)
%72 = inttoptr i64 %71 to double*
store double* %72, double** %6
%73 = load i32, i32* %12
%74 = sext i32 %73 to i64
%75 = mul i64 8, %74
%76 = trunc i64 %75 to i32
%77 = call i64 @malloc(i32 %76)
%78 = inttoptr i64 %77 to double*
store double* %78, double** %7
store i32 0, i32* %13
br label %79
79: ; preds = %100, %62
%80 = load i32, i32* %13
%81 = load i32, i32* %12
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %103
83: ; preds = %79
%84 = load i32, i32* %13
%85 = mul nsw i32 %84, 5
%86 = sitofp i32 %85 to double
%87 = load double*, double** %6
%88 = load i32, i32* %13
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %87, i64 %89
store double %86, double* %90
%91 = load double*, double** %6
%92 = load i32, i32* %13
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
%96 = load double*, double** %7
%97 = load i32, i32* %13
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
store double %95, double* %99
br label %100
100: ; preds = %83
%101 = load i32, i32* %13
%102 = add nsw i32 %101, 1
store i32 %102, i32* %13
br label %79
103: ; preds = %79
store double 0.000000e+00, double* %10
%104 = load i32, i32* %16
%105 = call i32 @omp_set_num_threads(i32 %104)
store double 0.000000e+00, double* %11
store i32 0, i32* %13
br label %106
106: ; preds = %118, %103
%107 = load i32, i32* %13
%108 = load i32, i32* %12
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %121
110: ; preds = %106
%111 = load double, double* %11
%112 = load double*, double** %6
%113 = load i32, i32* %13
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = fadd double %111, %116
store double %117, double* %11
br label %118
118: ; preds = %110
%119 = load i32, i32* %13
%120 = add nsw i32 %119, 1
store i32 %120, i32* %13
br label %106
121: ; preds = %106
%122 = load double, double* %10
%123 = load double, double* %11
%124 = fadd double %122, %123
store double %124, double* %10
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %11
store i32 0, i32* %13
br label %125
125: ; preds = %137, %121
%126 = load i32, i32* %13
%127 = load i32, i32* %12
%128 = icmp slt i32 %126, %127
br i1 %128, label %129, label %140
129: ; preds = %125
%130 = load double, double* %11
%131 = load double*, double** %6
%132 = load i32, i32* %13
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
%135 = load double, double* %134
%136 = fadd double %130, %135
store double %136, double* %11
br label %137
137: ; preds = %129
%138 = load i32, i32* %13
%139 = add nsw i32 %138, 1
store i32 %139, i32* %13
br label %125
140: ; preds = %125
%141 = load double, double* %9
%142 = load double, double* %11
%143 = fadd double %141, %142
store double %143, double* %9
store double 0.000000e+00, double* %8
store i32 0, i32* %13
br label %144
144: ; preds = %156, %140
%145 = load i32, i32* %13
%146 = load i32, i32* %12
%147 = icmp slt i32 %145, %146
br i1 %147, label %148, label %159
148: ; preds = %144
%149 = load double, double* %8
%150 = load double*, double** %7
%151 = load i32, i32* %13
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %150, i64 %152
%154 = load double, double* %153
%155 = fadd double %149, %154
store double %155, double* %8
br label %156
156: ; preds = %148
%157 = load i32, i32* %13
%158 = add nsw i32 %157, 1
store i32 %158, i32* %13
br label %144
159: ; preds = %144
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.12, i64 0, i64 0))
%161 = load double*, double** %7
%162 = call i32 @free(double* %161)
%163 = load double*, double** %6
%164 = call i32 @free(double* %163)
%165 = load double, double* %10
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.13, i64 0, i64 0), double %165)
%167 = load double, double* %9
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.14, i64 0, i64 0), double %167)
%169 = load double, double* %8
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.15, i64 0, i64 0), double %169)
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%172 = load i32, i32* %3
ret i32 %172
}

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