#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*/ assert(int);
int main() {
  int b[3] = {1, 2, 3};
#pragma omp task firstprivate(b)
  {
    assert(b[0] == 1);
    assert(b[1] == 2);
    assert(b[2] == 3);
    b[0] = -1;
    b[1] = -2;
    b[2] = -3;
  }
  assert(b[0] == 1);
  assert(b[1] == 2);
  assert(b[2] == 3);
#pragma omp taskwait
  assert(b[0] == 1);
  assert(b[1] == 2);
  assert(b[2] == 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0xffffffff,-0xc(%rbp)
movl   $0xfffffffe,-0x8(%rbp)
movl   $0xfffffffd,-0x4(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.b = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 3
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 -1, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 -2, i32* %19
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 -3, i32* %20
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 1
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 2
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%32 = load i32, i32* %31
%33 = icmp eq i32 %32, 3
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 1
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%42 = load i32, i32* %41
%43 = icmp eq i32 %42, 2
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 3
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 0)
%5 = tail call i32 @assert(i32 0)
%6 = tail call i32 @assert(i32 0)
%7 = tail call i32 @assert(i32 0)
%8 = tail call i32 @assert(i32 0)
%9 = tail call i32 @assert(i32 0)
ret i32 0
}