#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 /*<<< orphan*/ abort();
int /*<<< orphan*/ parloop(int *);
main() {
  int i, a[10];
#pragma omp parallel shared(a)
  { parloop(a); }
  for (i = 0; i < 10; i++)
    if (a[i] != i + 3)
      abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <parloop@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1179 <main+0x59>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    -0x8(%rbp),%ecx
add    $0x3,%ecx
cmp    %ecx,%eax
je     1166 <main+0x46>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    116b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    %rsp,%rdi
call   1040 <parloop@plt>
movdqa (%rsp),%xmm0
movdqa 0x10(%rsp),%xmm1
pcmpeqd 0xec1(%rip),%xmm1
pcmpeqd %xmm2,%xmm2
pxor   %xmm2,%xmm1
pcmpeqd 0xec1(%rip),%xmm0
pxor   %xmm2,%xmm0
packssdw %xmm1,%xmm0
pmovmskb %xmm0,%eax
test   %eax,%eax
jne    1174 <main+0x54>
cmpl   $0xb,0x20(%rsp)
jne    1174 <main+0x54>
cmpl   $0xc,0x24(%rsp)
jne    1174 <main+0x54>
xor    %eax,%eax
add    $0x28,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%5 = call i32 @parloop(i32* %4)
store i32 0, i32* %2
br label %6
6: ; preds = %20, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 3
%16 = icmp ne i32 %13, %15
br i1 %16, label %17, label %19
17: ; preds = %9
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %9
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %6
23: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @parloop(i32* %3)
%5 = bitcast [10 x i32]* %1 to <8 x i32>*
%6 = load <8 x i32>, <8 x i32>* %5
%7 = freeze <8 x i32> %6
%8 = icmp ne <8 x i32> %7, <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10>
%9 = bitcast <8 x i1> %8 to i8
%10 = icmp eq i8 %9, 0
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 11
%14 = select i1 %10, i1 %13, i1 false
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 12
%18 = select i1 %14, i1 %17, i1 false
br i1 %18, label %19, label %20
19: ; preds = %0
ret i32 0
20: ; preds = %0
%21 = call i32 (...) @abort()
unreachable
}