#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(int *);
scalar_t__ is_prime(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printf(char *, ...);
main(int argc, char **argv) {
  int *Array, *Primearray, *Check, Noofthreads, i;
  int Countdatarace = 0, Countparallel = 0, Count = 0, number, Maxnumber;
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Email : RarchK");
  printf("\n\t\t---------------------------------------------------------------"
         "------------");
  printf("\n\t\t Objective : Data Race condition  ");
  printf("\n\t\t OpenMP program to find the total prime numbers between a "
         "given range of numbers ");
  printf("\n\t\t using OpenMP Parallel for directive and Critical Section ");
  printf("\n\t\t..............................................................."
         "...........\n");
  if (argc != 3) {
    printf("\t\t Very Few Arguments\n ");
    printf("\t\t Syntax : exec <Threads> <upper bound to fine prime nos.>\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);
  }
  Maxnumber = atoi(argv[2]);
  if (Maxnumber <= 0) {
    printf("\n\t\t To find the Prime number the upper bound should be greater "
           "than 2 \n ");
    exit(-1);
  }
  printf("\n\t\t Threads                        :     %d ", Noofthreads);
  printf("\n\t\t Range to find Prime No. is     : 1 - %d ", Maxnumber);
  Array = (int *)malloc(sizeof(int) * Maxnumber);
  Primearray = (int *)malloc(sizeof(int) * Maxnumber);
  Check = (int *)malloc(sizeof(int) * Maxnumber);
  for (i = 0; i < Maxnumber; i++) {
    Array[i] = 0;
    Primearray[i] = 0;
    Check[i] = 0;
  }
  omp_set_num_threads(Noofthreads);
#pragma omp parallel for
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
      Array[Countdatarace] = number;
      Countdatarace++;
    }
  }
#pragma omp parallel for
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
#pragma omp critical
      {
        Primearray[Countparallel] = number;
        Countparallel++;
      }
    }
  }
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
      Check[Count] = number;
      Count++;
    }
  }
  printf("\n\n\t\t Prime number calculation between [ 1 - %d ] ...........Done "
         "\n\n ",
         Maxnumber);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by parallel calculation "
         "( without critical section ) is : %d ",
         Maxnumber, Countdatarace);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by parallel calculation "
         "(with critical section ) is     : %d ",
         Maxnumber, Countparallel);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by serial calculation is "
         "                               : %d ",
         Maxnumber, Count);
  free(Array);
  free(Primearray);
  free(Check);
  printf("\n\n\t\t............................................................."
         "................................\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
je     122d <main+0xbd>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
je     1287 <main+0x117>
cmpl   $0x2,-0x2c(%rbp)
je     1287 <main+0x117>
cmpl   $0x4,-0x2c(%rbp)
je     1287 <main+0x117>
cmpl   $0x8,-0x2c(%rbp)
je     1287 <main+0x117>
cmpl   $0x10,-0x2c(%rbp)
je     1287 <main+0x117>
lea    0xf49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jg     12b9 <main+0x149>
lea    0xf64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x2c(%rbp),%esi
lea    0xf92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x44(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1362 <main+0x1f2>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    131b <main+0x1ab>
mov    -0x2c(%rbp),%edi
call   1070 <omp_set_num_threads@plt>
movl   $0x3,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13b9 <main+0x249>
mov    -0x40(%rbp),%edi
call   1050 <is_prime@plt>
cmp    $0x0,%rax
je     13a6 <main+0x236>
mov    -0x40(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ab <main+0x23b>
mov    -0x40(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x40(%rbp)
jmp    1371 <main+0x201>
movl   $0x3,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1408 <main+0x298>
mov    -0x40(%rbp),%edi
call   1050 <is_prime@plt>
cmp    $0x0,%rax
je     13f5 <main+0x285>
mov    -0x40(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13fa <main+0x28a>
mov    -0x40(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x40(%rbp)
jmp    13c0 <main+0x250>
movl   $0x3,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1457 <main+0x2e7>
mov    -0x40(%rbp),%edi
call   1050 <is_prime@plt>
cmp    $0x0,%rax
je     1444 <main+0x2d4>
mov    -0x40(%rbp),%edx
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1449 <main+0x2d9>
mov    -0x40(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x40(%rbp)
jmp    140f <main+0x29f>
mov    -0x44(%rbp),%esi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xf63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%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,%r15
mov    %edi,%r14d
lea    0xe65(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xefd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1162(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x3,%r14d
jne    1588 <main+0x408>
mov    0x8(%r15),%rdi
call   1090 <atoi@plt>
cmp    $0x10,%eax
ja     15c4 <main+0x444>
mov    %eax,%ebx
mov    $0x10116,%eax
bt     %ebx,%eax
jae    15c4 <main+0x444>
mov    0x10(%r15),%rdi
call   1090 <atoi@plt>
test   %eax,%eax
jle    15ac <main+0x42c>
mov    %eax,%r14d
lea    0xf42(%rip),%rdi
xor    %ebp,%ebp
mov    %ebx,0x8(%rsp)
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf59(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x0(,%r14,4),%ebx
mov    %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %r14d,%eax
mov    %r14,0x10(%rsp)
cmp    $0x8,%r14d
jb     139f <main+0x21f>
lea    0x0(,%rax,4),%rdx
add    %r13,%rdx
lea    (%r15,%rax,4),%rsi
lea    (%r12,%rax,4),%rdi
cmp    %rsi,%r13
setb   %r9b
cmp    %rdx,%r15
setb   %bl
cmp    %rdi,%r13
setb   %cl
cmp    %rdx,%r12
setb   %r8b
cmp    %rdi,%r15
setb   %dl
cmp    %rsi,%r12
setb   %sil
xor    %ebp,%ebp
test   %bl,%r9b
jne    139f <main+0x21f>
and    %r8b,%cl
jne    139f <main+0x21f>
and    %sil,%dl
jne    139f <main+0x21f>
mov    %eax,%ebp
and    $0xfffffff8,%ebp
lea    -0x8(%rbp),%rdx
mov    %rdx,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1578 <main+0x3f8>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups %xmm0,0x0(%r13,%rdx,4)
movups %xmm0,0x10(%r13,%rdx,4)
movups %xmm0,(%r15,%rdx,4)
movups %xmm0,0x10(%r15,%rdx,4)
movups %xmm0,(%r12,%rdx,4)
movups %xmm0,0x10(%r12,%rdx,4)
movups %xmm0,0x20(%r13,%rdx,4)
movups %xmm0,0x30(%r13,%rdx,4)
movups %xmm0,0x20(%r15,%rdx,4)
movups %xmm0,0x30(%r15,%rdx,4)
movups %xmm0,0x20(%r12,%rdx,4)
movups %xmm0,0x30(%r12,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1320 <main+0x1a0>
test   $0x1,%cl
je     139a <main+0x21a>
xorps  %xmm0,%xmm0
movups %xmm0,0x0(%r13,%rdx,4)
movups %xmm0,0x10(%r13,%rdx,4)
movups %xmm0,(%r15,%rdx,4)
movups %xmm0,0x10(%r15,%rdx,4)
movups %xmm0,(%r12,%rdx,4)
movups %xmm0,0x10(%r12,%rdx,4)
cmp    %rax,%rbp
je     140d <main+0x28d>
mov    %rbp,%rcx
not    %rcx
test   $0x1,%al
je     13c6 <main+0x246>
movl   $0x0,0x0(%r13,%rbp,4)
movl   $0x0,(%r15,%rbp,4)
movl   $0x0,(%r12,%rbp,4)
or     $0x1,%rbp
add    %rax,%rcx
je     140d <main+0x28d>
nopl   0x0(%rax,%rax,1)
movl   $0x0,0x0(%r13,%rbp,4)
movl   $0x0,(%r15,%rbp,4)
movl   $0x0,(%r12,%rbp,4)
movl   $0x0,0x4(%r13,%rbp,4)
movl   $0x0,0x4(%r15,%rbp,4)
movl   $0x0,0x4(%r12,%rbp,4)
add    $0x2,%rbp
cmp    %rbp,%rax
jne    13d0 <main+0x250>
mov    0x8(%rsp),%edi
call   1080 <omp_set_num_threads@plt>
xor    %r14d,%r14d
mov    $0x0,%ebp
mov    $0x0,%eax
cmpl   $0x4,0x10(%rsp)
jl     14ef <main+0x36f>
xor    %ebp,%ebp
mov    $0x3,%ebx
mov    0x10(%rsp),%r14
jmp    1448 <main+0x2c8>
nopl   0x0(%rax)
add    $0x2,%ebx
cmp    %r14d,%ebx
jge    1461 <main+0x2e1>
mov    %ebx,%edi
call   1060 <is_prime@plt>
test   %rax,%rax
je     1440 <main+0x2c0>
movslq %ebp,%rbp
mov    %ebx,0x0(%r13,%rbp,4)
add    $0x1,%ebp
jmp    1440 <main+0x2c0>
mov    %r14,%rax
xor    %r14d,%r14d
cmp    $0x4,%eax
jl     14a2 <main+0x322>
xor    %r14d,%r14d
mov    $0x3,%ebx
jmp    1489 <main+0x309>
cs nopw 0x0(%rax,%rax,1)
add    $0x2,%ebx
cmp    0x10(%rsp),%ebx
jge    14a6 <main+0x326>
mov    %ebx,%edi
call   1060 <is_prime@plt>
test   %rax,%rax
je     1480 <main+0x300>
movslq %r14d,%r14
mov    %ebx,(%r15,%r14,4)
add    $0x1,%r14d
jmp    1480 <main+0x300>
xor    %eax,%eax
jmp    14ef <main+0x36f>
xor    %eax,%eax
cmpl   $0x4,0x10(%rsp)
jl     14ef <main+0x36f>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    $0x3,%ebx
jmp    14c9 <main+0x349>
nopl   (%rax)
add    $0x2,%ebx
cmp    0x10(%rsp),%ebx
jge    14ea <main+0x36a>
mov    %ebx,%edi
call   1060 <is_prime@plt>
test   %rax,%rax
je     14c0 <main+0x340>
mov    0x8(%rsp),%rax
cltq
mov    %ebx,(%r12,%rax,4)
add    $0x1,%eax
mov    %rax,0x8(%rsp)
jmp    14c0 <main+0x340>
mov    0x8(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0xcdb(%rip),%rdi
mov    0x10(%rsp),%rbx
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd0b(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd60(%rip),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdb4(%rip),%rdi
mov    %ebx,%esi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
lea    0xe3c(%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
xor    %edx,%edx
test   $0x1,%cl
jne    1375 <main+0x1f5>
jmp    139a <main+0x21a>
lea    0xb8c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeaf(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
lea    0xb80(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
lea    0xe35(%rip),%rdi
jmp    159d <main+0x41d>

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 = [38 x i8] c"\0A\09\09 Objective : Data Race condition \00"
@.str.3 = [85 x i8] c"\0A\09\09 OpenMP program to find the total prime numbers between a given range of numbers \00"
@.str.4 = [62 x i8] c"\0A\09\09 using OpenMP Parallel for directive and Critical Section \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 = [61 x i8] c"\09\09 Syntax : exec <Threads> <upper bound to fine prime nos.>\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 = [73 x i8] c"\0A\09\09 To find the Prime number the upper bound should be greater than 2 \0A \00"
@.str.10 = [45 x i8] c"\0A\09\09 Threads : %d \00"
@.str.11 = [45 x i8] c"\0A\09\09 Range to find Prime No. is : 1 - %d \00"
@.str.12 = [69 x i8] c"\0A\0A\09\09 Prime number calculation between [ 1 - %d ] ...........Done \0A\0A \00"
@.str.13 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by parallel calculation ( without critical section ) is : %d \00"
@.str.14 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by parallel calculation (with critical section ) is : %d \00"
@.str.15 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by serial calculation is : %d \00"
@.str.16 = [99 x i8] c"\0A\0A\09\09.............................................................................................\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 i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* %4
%24 = icmp ne i32 %23, 3
br i1 %24, label %25, label %29
25: ; preds = %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
%28 = call i32 @exit(i32 -1)
unreachable
29: ; preds = %2
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %9
%34 = load i32, i32* %9
%35 = icmp ne i32 %34, 1
br i1 %35, label %36, label %51
36: ; preds = %29
%37 = load i32, i32* %9
%38 = icmp ne i32 %37, 2
br i1 %38, label %39, label %51
39: ; preds = %36
%40 = load i32, i32* %9
%41 = icmp ne i32 %40, 4
br i1 %41, label %42, label %51
42: ; preds = %39
%43 = load i32, i32* %9
%44 = icmp ne i32 %43, 8
br i1 %44, label %45, label %51
45: ; preds = %42
%46 = load i32, i32* %9
%47 = icmp ne i32 %46, 16
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
%50 = call i32 @exit(i32 -1)
unreachable
51: ; preds = %45, %42, %39, %36, %29
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 2
%54 = load i8*, i8** %53
%55 = call i32 @atoi(i8* %54)
store i32 %55, i32* %15
%56 = load i32, i32* %15
%57 = icmp sle i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %51
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.9, i64 0, i64 0))
%60 = call i32 @exit(i32 -1)
unreachable
61: ; preds = %51
%62 = load i32, i32* %9
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %15
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.11, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %15
%67 = sext i32 %66 to i64
%68 = mul i64 4, %67
%69 = trunc i64 %68 to i32
%70 = call i64 @malloc(i32 %69)
%71 = inttoptr i64 %70 to i32*
store i32* %71, i32** %6
%72 = load i32, i32* %15
%73 = sext i32 %72 to i64
%74 = mul i64 4, %73
%75 = trunc i64 %74 to i32
%76 = call i64 @malloc(i32 %75)
%77 = inttoptr i64 %76 to i32*
store i32* %77, i32** %7
%78 = load i32, i32* %15
%79 = sext i32 %78 to i64
%80 = mul i64 4, %79
%81 = trunc i64 %80 to i32
%82 = call i64 @malloc(i32 %81)
%83 = inttoptr i64 %82 to i32*
store i32* %83, i32** %8
store i32 0, i32* %10
br label %84
84: ; preds = %101, %61
%85 = load i32, i32* %10
%86 = load i32, i32* %15
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %104
88: ; preds = %84
%89 = load i32*, i32** %6
%90 = load i32, i32* %10
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i32, i32* %89, i64 %91
store i32 0, i32* %92
%93 = load i32*, i32** %7
%94 = load i32, i32* %10
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %93, i64 %95
store i32 0, i32* %96
%97 = load i32*, i32** %8
%98 = load i32, i32* %10
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %97, i64 %99
store i32 0, i32* %100
br label %101
101: ; preds = %88
%102 = load i32, i32* %10
%103 = add nsw i32 %102, 1
store i32 %103, i32* %10
br label %84
104: ; preds = %84
%105 = load i32, i32* %9
%106 = call i32 @omp_set_num_threads(i32 %105)
store i32 3, i32* %14
br label %107
107: ; preds = %124, %104
%108 = load i32, i32* %14
%109 = load i32, i32* %15
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %127
111: ; preds = %107
%112 = load i32, i32* %14
%113 = call i64 @is_prime(i32 %112)
%114 = icmp ne i64 %113, 0
br i1 %114, label %115, label %123
115: ; preds = %111
%116 = load i32, i32* %14
%117 = load i32*, i32** %6
%118 = load i32, i32* %11
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i32, i32* %117, i64 %119
store i32 %116, i32* %120
%121 = load i32, i32* %11
%122 = add nsw i32 %121, 1
store i32 %122, i32* %11
br label %123
123: ; preds = %115, %111
br label %124
124: ; preds = %123
%125 = load i32, i32* %14
%126 = add nsw i32 %125, 2
store i32 %126, i32* %14
br label %107
127: ; preds = %107
store i32 3, i32* %14
br label %128
128: ; preds = %145, %127
%129 = load i32, i32* %14
%130 = load i32, i32* %15
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %148
132: ; preds = %128
%133 = load i32, i32* %14
%134 = call i64 @is_prime(i32 %133)
%135 = icmp ne i64 %134, 0
br i1 %135, label %136, label %144
136: ; preds = %132
%137 = load i32, i32* %14
%138 = load i32*, i32** %7
%139 = load i32, i32* %12
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i32, i32* %138, i64 %140
store i32 %137, i32* %141
%142 = load i32, i32* %12
%143 = add nsw i32 %142, 1
store i32 %143, i32* %12
br label %144
144: ; preds = %136, %132
br label %145
145: ; preds = %144
%146 = load i32, i32* %14
%147 = add nsw i32 %146, 2
store i32 %147, i32* %14
br label %128
148: ; preds = %128
store i32 3, i32* %14
br label %149
149: ; preds = %166, %148
%150 = load i32, i32* %14
%151 = load i32, i32* %15
%152 = icmp slt i32 %150, %151
br i1 %152, label %153, label %169
153: ; preds = %149
%154 = load i32, i32* %14
%155 = call i64 @is_prime(i32 %154)
%156 = icmp ne i64 %155, 0
br i1 %156, label %157, label %165
157: ; preds = %153
%158 = load i32, i32* %14
%159 = load i32*, i32** %8
%160 = load i32, i32* %13
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %159, i64 %161
store i32 %158, i32* %162
%163 = load i32, i32* %13
%164 = add nsw i32 %163, 1
store i32 %164, i32* %13
br label %165
165: ; preds = %157, %153
br label %166
166: ; preds = %165
%167 = load i32, i32* %14
%168 = add nsw i32 %167, 2
store i32 %168, i32* %14
br label %149
169: ; preds = %149
%170 = load i32, i32* %15
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0), i32 %170)
%172 = load i32, i32* %15
%173 = load i32, i32* %11
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.13, i64 0, i64 0), i32 %172, i32 %173)
%175 = load i32, i32* %15
%176 = load i32, i32* %12
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.14, i64 0, i64 0), i32 %175, i32 %176)
%178 = load i32, i32* %15
%179 = load i32, i32* %13
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.15, i64 0, i64 0), i32 %178, i32 %179)
%181 = load i32*, i32** %6
%182 = call i32 @free(i32* %181)
%183 = load i32*, i32** %7
%184 = call i32 @free(i32* %183)
%185 = load i32*, i32** %8
%186 = call i32 @free(i32* %185)
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.16, i64 0, i64 0))
%188 = load i32, i32* %3
ret i32 %188
}

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 = [38 x i8] c"\0A\09\09 Objective : Data Race condition \00"
@.str.3 = [85 x i8] c"\0A\09\09 OpenMP program to find the total prime numbers between a given range of numbers \00"
@.str.4 = [62 x i8] c"\0A\09\09 using OpenMP Parallel for directive and Critical Section \00"
@.str.6 = [24 x i8] c"\09\09 Very Few Arguments\0A \00"
@.str.9 = [73 x i8] c"\0A\09\09 To find the Prime number the upper bound should be greater than 2 \0A \00"
@.str.10 = [45 x i8] c"\0A\09\09 Threads : %d \00"
@.str.11 = [45 x i8] c"\0A\09\09 Range to find Prime No. is : 1 - %d \00"
@.str.12 = [69 x i8] c"\0A\0A\09\09 Prime number calculation between [ 1 - %d ] ...........Done \0A\0A \00"
@.str.13 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by parallel calculation ( without critical section ) is : %d \00"
@.str.14 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by parallel calculation (with critical section ) is : %d \00"
@.str.15 = [103 x i8] c"\0A\09\09 The Prime No. found range [ 1 - %d ] by serial calculation is : %d \00"
@str = [78 x i8] c"\0A\09\09..........................................................................\00"
@str.17 = [98 x i8] c"\0A\0A\09\09.............................................................................................\00"
@str.18 = [76 x i8] c"\0A Number of threads should be 1,2,4,8 or 16 for the execution of program. \0A\00"
@str.19 = [60 x i8] c"\09\09 Syntax : exec <Threads> <upper bound to fine prime nos.>\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 ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 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, 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 ([60 x i8], [60 x i8]* @str.19, 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.18, 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 ([73 x i8], [73 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 ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i32 %18)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.11, i64 0, i64 0), i32 %25)
%33 = shl i32 %25, 2
%34 = tail call i64 @malloc(i32 %33)
%35 = inttoptr i64 %34 to i32*
%36 = inttoptr i64 %34 to i8*
%37 = tail call i64 @malloc(i32 %33)
%38 = inttoptr i64 %37 to i32*
%39 = inttoptr i64 %37 to i8*
%40 = tail call i64 @malloc(i32 %33)
%41 = inttoptr i64 %40 to i32*
%42 = inttoptr i64 %40 to i8*
%43 = zext i32 %25 to i64
%44 = icmp ult i32 %25, 8
br i1 %44, label %121, label %45
45: ; preds = %30
%46 = getelementptr i32, i32* %35, i64 %43
%47 = bitcast i32* %46 to i8*
%48 = getelementptr i32, i32* %38, i64 %43
%49 = bitcast i32* %48 to i8*
%50 = getelementptr i32, i32* %41, i64 %43
%51 = bitcast i32* %50 to i8*
%52 = icmp ult i8* %36, %49
%53 = icmp ult i8* %39, %47
%54 = and i1 %52, %53
%55 = icmp ult i8* %36, %51
%56 = icmp ult i8* %42, %47
%57 = and i1 %55, %56
%58 = or i1 %54, %57
%59 = icmp ult i8* %39, %51
%60 = icmp ult i8* %42, %49
%61 = and i1 %59, %60
%62 = or i1 %58, %61
br i1 %62, label %121, label %63
63: ; preds = %45
%64 = and i64 %43, 4294967288
%65 = add nsw i64 %64, -8
%66 = lshr exact i64 %65, 3
%67 = add nuw nsw i64 %66, 1
%68 = and i64 %67, 1
%69 = icmp eq i64 %65, 0
br i1 %69, label %103, label %70
70: ; preds = %63
%71 = and i64 %67, 4611686018427387902
br label %72
72: ; preds = %72, %70
%73 = phi i64 [ 0, %70 ], [ %100, %72 ]
%74 = phi i64 [ 0, %70 ], [ %101, %72 ]
%75 = getelementptr inbounds i32, i32* %35, i64 %73
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %76
%77 = getelementptr inbounds i32, i32* %75, i64 4
%78 = bitcast i32* %77 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %78
%79 = getelementptr inbounds i32, i32* %38, i64 %73
%80 = bitcast i32* %79 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %80
%81 = getelementptr inbounds i32, i32* %79, i64 4
%82 = bitcast i32* %81 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %82
%83 = getelementptr inbounds i32, i32* %41, i64 %73
%84 = bitcast i32* %83 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %84
%85 = getelementptr inbounds i32, i32* %83, i64 4
%86 = bitcast i32* %85 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %86
%87 = or i64 %73, 8
%88 = getelementptr inbounds i32, i32* %35, i64 %87
%89 = bitcast i32* %88 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %89
%90 = getelementptr inbounds i32, i32* %88, i64 4
%91 = bitcast i32* %90 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %91
%92 = getelementptr inbounds i32, i32* %38, i64 %87
%93 = bitcast i32* %92 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %93
%94 = getelementptr inbounds i32, i32* %92, i64 4
%95 = bitcast i32* %94 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %95
%96 = getelementptr inbounds i32, i32* %41, i64 %87
%97 = bitcast i32* %96 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %97
%98 = getelementptr inbounds i32, i32* %96, i64 4
%99 = bitcast i32* %98 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %99
%100 = add nuw i64 %73, 16
%101 = add i64 %74, 2
%102 = icmp eq i64 %101, %71
br i1 %102, label %103, label %72
103: ; preds = %72, %63
%104 = phi i64 [ 0, %63 ], [ %100, %72 ]
%105 = icmp eq i64 %68, 0
br i1 %105, label %119, label %106
106: ; preds = %103
%107 = getelementptr inbounds i32, i32* %35, i64 %104
%108 = bitcast i32* %107 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %108
%109 = getelementptr inbounds i32, i32* %107, i64 4
%110 = bitcast i32* %109 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %110
%111 = getelementptr inbounds i32, i32* %38, i64 %104
%112 = bitcast i32* %111 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %112
%113 = getelementptr inbounds i32, i32* %111, i64 4
%114 = bitcast i32* %113 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %114
%115 = getelementptr inbounds i32, i32* %41, i64 %104
%116 = bitcast i32* %115 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %116
%117 = getelementptr inbounds i32, i32* %115, i64 4
%118 = bitcast i32* %117 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %118
br label %119
119: ; preds = %103, %106
%120 = icmp eq i64 %64, %43
br i1 %120, label %146, label %121
121: ; preds = %45, %30, %119
%122 = phi i64 [ 0, %45 ], [ 0, %30 ], [ %64, %119 ]
%123 = xor i64 %122, -1
%124 = and i64 %43, 1
%125 = icmp eq i64 %124, 0
br i1 %125, label %131, label %126
126: ; preds = %121
%127 = getelementptr inbounds i32, i32* %35, i64 %122
store i32 0, i32* %127
%128 = getelementptr inbounds i32, i32* %38, i64 %122
store i32 0, i32* %128
%129 = getelementptr inbounds i32, i32* %41, i64 %122
store i32 0, i32* %129
%130 = or i64 %122, 1
br label %131
131: ; preds = %126, %121
%132 = phi i64 [ %122, %121 ], [ %130, %126 ]
%133 = sub nsw i64 0, %43
%134 = icmp eq i64 %123, %133
br i1 %134, label %146, label %135
135: ; preds = %131, %135
%136 = phi i64 [ %144, %135 ], [ %132, %131 ]
%137 = getelementptr inbounds i32, i32* %35, i64 %136
store i32 0, i32* %137
%138 = getelementptr inbounds i32, i32* %38, i64 %136
store i32 0, i32* %138
%139 = getelementptr inbounds i32, i32* %41, i64 %136
store i32 0, i32* %139
%140 = add nuw nsw i64 %136, 1
%141 = getelementptr inbounds i32, i32* %35, i64 %140
store i32 0, i32* %141
%142 = getelementptr inbounds i32, i32* %38, i64 %140
store i32 0, i32* %142
%143 = getelementptr inbounds i32, i32* %41, i64 %140
store i32 0, i32* %143
%144 = add nuw nsw i64 %136, 2
%145 = icmp eq i64 %144, %43
br i1 %145, label %146, label %135
146: ; preds = %131, %135, %119
%147 = tail call i32 @omp_set_num_threads(i32 %18)
%148 = icmp sgt i32 %25, 3
br i1 %148, label %150, label %190
149: ; preds = %159
br i1 %148, label %164, label %190
150: ; preds = %146, %159
%151 = phi i32 [ %161, %159 ], [ 3, %146 ]
%152 = phi i32 [ %160, %159 ], [ 0, %146 ]
%153 = tail call i64 @is_prime(i32 %151)
%154 = icmp eq i64 %153, 0
br i1 %154, label %159, label %155
155: ; preds = %150
%156 = sext i32 %152 to i64
%157 = getelementptr inbounds i32, i32* %35, i64 %156
store i32 %151, i32* %157
%158 = add nsw i32 %152, 1
br label %159
159: ; preds = %150, %155
%160 = phi i32 [ %158, %155 ], [ %152, %150 ]
%161 = add nuw nsw i32 %151, 2
%162 = icmp slt i32 %161, %25
br i1 %162, label %150, label %149
163: ; preds = %173
br i1 %148, label %177, label %190
164: ; preds = %149, %173
%165 = phi i32 [ %175, %173 ], [ 3, %149 ]
%166 = phi i32 [ %174, %173 ], [ 0, %149 ]
%167 = tail call i64 @is_prime(i32 %165)
%168 = icmp eq i64 %167, 0
br i1 %168, label %173, label %169
169: ; preds = %164
%170 = sext i32 %166 to i64
%171 = getelementptr inbounds i32, i32* %38, i64 %170
store i32 %165, i32* %171
%172 = add nsw i32 %166, 1
br label %173
173: ; preds = %164, %169
%174 = phi i32 [ %172, %169 ], [ %166, %164 ]
%175 = add nuw nsw i32 %165, 2
%176 = icmp slt i32 %175, %25
br i1 %176, label %164, label %163
177: ; preds = %163, %186
%178 = phi i32 [ %188, %186 ], [ 3, %163 ]
%179 = phi i32 [ %187, %186 ], [ 0, %163 ]
%180 = tail call i64 @is_prime(i32 %178)
%181 = icmp eq i64 %180, 0
br i1 %181, label %186, label %182
182: ; preds = %177
%183 = sext i32 %179 to i64
%184 = getelementptr inbounds i32, i32* %41, i64 %183
store i32 %178, i32* %184
%185 = add nsw i32 %179, 1
br label %186
186: ; preds = %177, %182
%187 = phi i32 [ %185, %182 ], [ %179, %177 ]
%188 = add nuw nsw i32 %178, 2
%189 = icmp slt i32 %188, %25
br i1 %189, label %177, label %190
190: ; preds = %186, %146, %149, %163
%191 = phi i32 [ %174, %163 ], [ 0, %149 ], [ 0, %146 ], [ %174, %186 ]
%192 = phi i32 [ %160, %163 ], [ %160, %149 ], [ 0, %146 ], [ %160, %186 ]
%193 = phi i32 [ 0, %163 ], [ 0, %149 ], [ 0, %146 ], [ %187, %186 ]
%194 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%195 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.13, i64 0, i64 0), i32 %25, i32 %192)
%196 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.14, i64 0, i64 0), i32 %25, i32 %191)
%197 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.15, i64 0, i64 0), i32 %25, i32 %193)
%198 = tail call i32 @free(i32* %35)
%199 = tail call i32 @free(i32* %38)
%200 = tail call i32 @free(i32* %41)
%201 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @str.17, i64 0, i64 0))
ret i32 0
}