#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*/ fprintf(int /*<<< orphan*/, char *);
int omp_get_num_procs();
int omp_get_num_threads();
int omp_in_parallel();
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ stderr;
main(int argc, char **argv) {
  int i, n = 16, chunk, a[n], suma = 0;
  if (argc < 3) {
    fprintf(stderr, "\nFalta iteraciones o chunk \n");
    exit(-1);
  }
  n = atoi(argv[1]);
  if (n > 200)
    n = 200;
  chunk = atoi(argv[2]);
  for (i = 0; i < n; i++)
    a[i] = i;
#pragma omp parallel
  {
#pragma omp master
    {
      printf("Dentro del parallel omp_get_num_threads(): %d \n",
             omp_get_num_threads());
      printf("Dentro del parallel omp_get_num_procs(): %d \n",
             omp_get_num_procs());
      printf("Dentro del parallel omp_in_parallel(): %d \n", omp_in_parallel());
    }
#pragma omp for firstprivate(suma) lastprivate(suma) schedule(dynamic, chunk)
    for (i = 0; i < n; i++) {
      suma = suma + a[i];
      printf(" thread %d suma a[%d]=%d suma=%d \n", 0, i, a[i], suma);
    }
  }
  printf("Fuera de 'parallel for' suma=%d\n", suma);
  printf("Fuera del parallel omp_get_num_threads(): %d \n",
         omp_get_num_threads());
  printf("Fuera del parallel omp_get_num_procs(): %d \n", omp_get_num_procs());
  printf("Fuera del parallel omp_in_parallel(): %d \n", omp_in_parallel());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x10,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11e4 <main+0x74>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    0xe2b(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xc8,-0x18(%rbp)
jle    1208 <main+0x98>
movl   $0xc8,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1247 <main+0xd7>
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%edx
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    121f <main+0xaf>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,%esi
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <omp_get_num_procs@plt>
mov    %eax,%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <omp_in_parallel@plt>
mov    %eax,%esi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12dc <main+0x16c>
mov    -0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
movslq -0x14(%rbp),%rdx
add    (%rax,%rdx,4),%ecx
mov    %ecx,-0x34(%rbp)
mov    -0x14(%rbp),%edx
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x34(%rbp),%r8d
lea    0xde2(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1293 <main+0x123>
mov    -0x34(%rbp),%esi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,%esi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <omp_get_num_procs@plt>
mov    %eax,%esi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <omp_in_parallel@plt>
mov    %eax,%esi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
cmp    $0x2,%edi
jle    1451 <main+0x2e1>
mov    0x8(%rsi),%rdi
call   1080 <atoi@plt>
cmp    $0xc8,%eax
mov    $0xc8,%ebx
cmovl  %eax,%ebx
test   %eax,%eax
jle    11b7 <main+0x47>
mov    %eax,%r14d
cmp    $0x2,%ebx
mov    $0x1,%eax
cmovge %ebx,%eax
cmp    $0x8,%eax
jae    1203 <main+0x93>
xor    %ecx,%ecx
jmp    1360 <main+0x1f0>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xee6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <omp_get_num_procs@plt>
lea    0xeff(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_in_parallel@plt>
lea    0xf16(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    13ef <main+0x27f>
mov    %eax,%ecx
and    $0x7ffffff8,%ecx
lea    -0x8(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x18,%rdi
jae    1234 <main+0xc4>
movdqa 0xdd3(%rip),%xmm0
xor    %edi,%edi
jmp    1308 <main+0x198>
and    $0xfffffffffffffffc,%rsi
movdqa 0xdc0(%rip),%xmm0
xor    %edi,%edi
movdqa 0xdc5(%rip),%xmm8
movdqa 0xdcc(%rip),%xmm9
movdqa 0xdd3(%rip),%xmm10
movdqa 0xddb(%rip),%xmm4
movdqa 0xde3(%rip),%xmm5
movdqa 0xdeb(%rip),%xmm6
movdqa 0xdf3(%rip),%xmm7
movdqa 0xdfb(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqa %xmm0,(%rsp,%rdi,4)
movdqa %xmm2,0x10(%rsp,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqa %xmm2,0x20(%rsp,%rdi,4)
movdqa %xmm3,0x30(%rsp,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqa %xmm2,0x40(%rsp,%rdi,4)
movdqa %xmm3,0x50(%rsp,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqa %xmm2,0x60(%rsp,%rdi,4)
movdqa %xmm3,0x70(%rsp,%rdi,4)
add    $0x20,%rdi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rsi
jne    1290 <main+0x120>
test   %rdx,%rdx
je     1350 <main+0x1e0>
lea    (%rsp,%rdi,4),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movdqa 0xced(%rip),%xmm1
movdqa 0xcf5(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqa %xmm0,-0x10(%rsi,%rdi,1)
movdqa %xmm3,(%rsi,%rdi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1330 <main+0x1c0>
cmp    %rax,%rcx
je     136c <main+0x1fc>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,(%rsp,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1360 <main+0x1f0>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xd31(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <omp_get_num_procs@plt>
lea    0xd4a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_in_parallel@plt>
lea    0xd61(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    13ef <main+0x27f>
cmp    $0x2,%ebx
mov    $0x1,%r15d
cmovge %ebx,%r15d
lea    0xd6b(%rip),%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
mov    (%rsp,%rbx,4),%ecx
add    %ecx,%ebp
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %ebp,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    13d0 <main+0x260>
lea    0xd64(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xd6e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <omp_get_num_procs@plt>
lea    0xd86(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_in_parallel@plt>
lea    0xd9c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b88(%rip),%rax
mov    (%rax),%edi
lea    0xc2f(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"\0AFalta iteraciones o chunk \0A\00"
@.str.1 = [48 x i8] c"Dentro del parallel omp_get_num_threads(): %d \0A\00"
@.str.2 = [46 x i8] c"Dentro del parallel omp_get_num_procs(): %d \0A\00"
@.str.3 = [44 x i8] c"Dentro del parallel omp_in_parallel(): %d \0A\00"
@.str.4 = [35 x i8] c" thread %d suma a[%d]=%d suma=%d \0A\00"
@.str.5 = [33 x i8] c"Fuera de 'parallel for' suma=%d\0A\00"
@.str.6 = [47 x i8] c"Fuera del parallel omp_get_num_threads(): %d \0A\00"
@.str.7 = [45 x i8] c"Fuera del parallel omp_get_num_procs(): %d \0A\00"
@.str.8 = [43 x i8] c"Fuera del parallel omp_in_parallel(): %d \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 i8*
%10 = alloca i64
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 16, i32* %7
%12 = load i32, i32* %7
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %9
%15 = alloca i32, i64 %13
store i64 %13, i64* %10
store i32 0, i32* %11
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %22
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 -1)
unreachable
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %7
%27 = load i32, i32* %7
%28 = icmp sgt i32 %27, 200
br i1 %28, label %29, label %30
29: ; preds = %22
store i32 200, i32* %7
br label %30
30: ; preds = %29, %22
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i32 @atoi(i8* %33)
store i32 %34, i32* %8
store i32 0, i32* %6
br label %35
35: ; preds = %44, %30
%36 = load i32, i32* %6
%37 = load i32, i32* %7
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %47
39: ; preds = %35
%40 = load i32, i32* %6
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i32, i32* %15, i64 %42
store i32 %40, i32* %43
br label %44
44: ; preds = %39
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %35
47: ; preds = %35
%48 = call i32 (...) @omp_get_num_threads()
%49 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %48)
%50 = call i32 (...) @omp_get_num_procs()
%51 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = call i32 (...) @omp_in_parallel()
%53 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %52)
store i32 0, i32* %6
br label %54
54: ; preds = %72, %47
%55 = load i32, i32* %6
%56 = load i32, i32* %7
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %75
58: ; preds = %54
%59 = load i32, i32* %11
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %15, i64 %61
%63 = load i32, i32* %62
%64 = add nsw i32 %59, %63
store i32 %64, i32* %11
%65 = load i32, i32* %6
%66 = load i32, i32* %6
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i32, i32* %15, i64 %67
%69 = load i32, i32* %68
%70 = load i32, i32* %11
%71 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 %65, i32 %69, i32 %70)
br label %72
72: ; preds = %58
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %54
75: ; preds = %54
%76 = load i32, i32* %11
%77 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %76)
%78 = call i32 (...) @omp_get_num_threads()
%79 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i32 %78)
%80 = call i32 (...) @omp_get_num_procs()
%81 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %80)
%82 = call i32 (...) @omp_in_parallel()
%83 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %82)
%84 = load i8*, i8** %9
%85 = load i32, i32* %3
ret i32 %85
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"\0AFalta iteraciones o chunk \0A\00"
@.str.1 = [48 x i8] c"Dentro del parallel omp_get_num_threads(): %d \0A\00"
@.str.2 = [46 x i8] c"Dentro del parallel omp_get_num_procs(): %d \0A\00"
@.str.3 = [44 x i8] c"Dentro del parallel omp_in_parallel(): %d \0A\00"
@.str.4 = [35 x i8] c" thread %d suma a[%d]=%d suma=%d \0A\00"
@.str.5 = [33 x i8] c"Fuera de 'parallel for' suma=%d\0A\00"
@.str.6 = [47 x i8] c"Fuera del parallel omp_get_num_threads(): %d \0A\00"
@.str.7 = [45 x i8] c"Fuera del parallel omp_get_num_procs(): %d \0A\00"
@.str.8 = [43 x i8] c"Fuera del parallel omp_in_parallel(): %d \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i32]
%4 = icmp slt i32 %0, 3
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = icmp slt i32 %12, 200
%14 = select i1 %13, i32 %12, i32 200
%15 = icmp sgt i32 %12, 0
br i1 %15, label %16, label %110
16: ; preds = %9
%17 = call i32 @llvm.smax.i32(i32 %14, i32 1)
%18 = zext i32 %17 to i64
%19 = icmp ult i32 %17, 8
br i1 %19, label %82, label %20
20: ; preds = %16
%21 = and i64 %18, 2147483640
%22 = add nsw i64 %21, -8
%23 = lshr exact i64 %22, 3
%24 = add nuw nsw i64 %23, 1
%25 = and i64 %24, 3
%26 = icmp ult i64 %22, 24
br i1 %26, label %63, label %27
27: ; preds = %20
%28 = and i64 %24, 4611686018427387900
br label %29
29: ; preds = %29, %27
%30 = phi i64 [ 0, %27 ], [ %59, %29 ]
%31 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %27 ], [ %60, %29 ]
%32 = phi i64 [ 0, %27 ], [ %61, %29 ]
%33 = add <4 x i32> %31, <i32 4, i32 4, i32 4, i32 4>
%34 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %30
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> %31, <4 x i32>* %35
%36 = getelementptr inbounds i32, i32* %34, i64 4
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> %33, <4 x i32>* %37
%38 = or i64 %30, 8
%39 = add <4 x i32> %31, <i32 8, i32 8, i32 8, i32 8>
%40 = add <4 x i32> %31, <i32 12, i32 12, i32 12, i32 12>
%41 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %38
%42 = bitcast i32* %41 to <4 x i32>*
store <4 x i32> %39, <4 x i32>* %42
%43 = getelementptr inbounds i32, i32* %41, i64 4
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %44
%45 = or i64 %30, 16
%46 = add <4 x i32> %31, <i32 16, i32 16, i32 16, i32 16>
%47 = add <4 x i32> %31, <i32 20, i32 20, i32 20, i32 20>
%48 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %45
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %46, <4 x i32>* %49
%50 = getelementptr inbounds i32, i32* %48, i64 4
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> %47, <4 x i32>* %51
%52 = or i64 %30, 24
%53 = add <4 x i32> %31, <i32 24, i32 24, i32 24, i32 24>
%54 = add <4 x i32> %31, <i32 28, i32 28, i32 28, i32 28>
%55 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %52
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> %53, <4 x i32>* %56
%57 = getelementptr inbounds i32, i32* %55, i64 4
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> %54, <4 x i32>* %58
%59 = add nuw i64 %30, 32
%60 = add <4 x i32> %31, <i32 32, i32 32, i32 32, i32 32>
%61 = add i64 %32, 4
%62 = icmp eq i64 %61, %28
br i1 %62, label %63, label %29
63: ; preds = %29, %20
%64 = phi i64 [ 0, %20 ], [ %59, %29 ]
%65 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %20 ], [ %60, %29 ]
%66 = icmp eq i64 %25, 0
br i1 %66, label %80, label %67
67: ; preds = %63, %67
%68 = phi i64 [ %76, %67 ], [ %64, %63 ]
%69 = phi <4 x i32> [ %77, %67 ], [ %65, %63 ]
%70 = phi i64 [ %78, %67 ], [ 0, %63 ]
%71 = add <4 x i32> %69, <i32 4, i32 4, i32 4, i32 4>
%72 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %68
%73 = bitcast i32* %72 to <4 x i32>*
store <4 x i32> %69, <4 x i32>* %73
%74 = getelementptr inbounds i32, i32* %72, i64 4
%75 = bitcast i32* %74 to <4 x i32>*
store <4 x i32> %71, <4 x i32>* %75
%76 = add nuw i64 %68, 8
%77 = add <4 x i32> %69, <i32 8, i32 8, i32 8, i32 8>
%78 = add i64 %70, 1
%79 = icmp eq i64 %78, %25
br i1 %79, label %80, label %67
80: ; preds = %67, %63
%81 = icmp eq i64 %21, %18
br i1 %81, label %90, label %82
82: ; preds = %16, %80
%83 = phi i64 [ 0, %16 ], [ %21, %80 ]
br label %84
84: ; preds = %82, %84
%85 = phi i64 [ %88, %84 ], [ %83, %82 ]
%86 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %85
%87 = trunc i64 %85 to i32
store i32 %87, i32* %86
%88 = add nuw nsw i64 %85, 1
%89 = icmp eq i64 %88, %18
br i1 %89, label %90, label %84
90: ; preds = %84, %80
%91 = tail call i32 (...) @omp_get_num_threads()
%92 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %91)
%93 = tail call i32 (...) @omp_get_num_procs()
%94 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %93)
%95 = tail call i32 (...) @omp_in_parallel()
%96 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %95)
br i1 %15, label %97, label %117
97: ; preds = %90
%98 = call i32 @llvm.smax.i32(i32 %14, i32 1)
%99 = zext i32 %98 to i64
br label %100
100: ; preds = %97, %100
%101 = phi i64 [ 0, %97 ], [ %108, %100 ]
%102 = phi i32 [ 0, %97 ], [ %105, %100 ]
%103 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %101
%104 = load i32, i32* %103
%105 = add nsw i32 %104, %102
%106 = trunc i64 %101 to i32
%107 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 %106, i32 %104, i32 %105)
%108 = add nuw nsw i64 %101, 1
%109 = icmp eq i64 %108, %99
br i1 %109, label %117, label %100
110: ; preds = %9
%111 = tail call i32 (...) @omp_get_num_threads()
%112 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %111)
%113 = tail call i32 (...) @omp_get_num_procs()
%114 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %113)
%115 = tail call i32 (...) @omp_in_parallel()
%116 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %115)
br label %117
117: ; preds = %100, %110, %90
%118 = phi i32 [ 0, %90 ], [ 0, %110 ], [ %105, %100 ]
%119 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %118)
%120 = tail call i32 (...) @omp_get_num_threads()
%121 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i32 %120)
%122 = tail call i32 (...) @omp_get_num_procs()
%123 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %122)
%124 = tail call i32 (...) @omp_in_parallel()
%125 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %124)
ret i32 0
}