#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 /*<<< orphan*/ consumer(int, int *);
int /*<<< orphan*/ produce_v(int *);
int /*<<< orphan*/ produce_y(int *);
int /*<<< orphan*/ produce_z(int *);
int main() {
  int y = -1, z = -1;
  int v[3] = {-1};
  produce_y(&y);
  produce_z(&z);
  produce_v(v);
  consumer(z + y, v);
#pragma omp taskwait
  assert(y == 1);
  assert(z == 2);
  assert(v[0] == 0);
  assert(v[1] == 1);
  assert(v[2] == 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xffffffff,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    0xe93(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xe91(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0x4(%rbp),%rdi
call   1060 <produce_y@plt>
lea    -0x8(%rbp),%rdi
call   1040 <produce_z@plt>
lea    -0x14(%rbp),%rdi
call   1030 <produce_v@plt>
mov    -0x8(%rbp),%edi
add    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1070 <consumer@plt>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
movl   $0xffffffff,0x8(%rsp)
ff
mov    0xe9d(%rip),%eax
mov    %eax,0x18(%rsp)
mov    0xe8a(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xc(%rsp),%rdi
call   1060 <produce_y@plt>
lea    0x8(%rsp),%rdi
call   1040 <produce_z@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <produce_v@plt>
mov    0xc(%rsp),%edi
add    0x8(%rsp),%edi
mov    %rbx,%rsi
call   1070 <consumer@plt>
xor    %edi,%edi
cmpl   $0x1,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x2,0x8(%rsp)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x0,0x10(%rsp)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x1,0x14(%rsp)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x2,0x18(%rsp)
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.v = [3 x i32] [i32 -1, i32 0, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 -1, i32* %1
store i32 -1, i32* %2
%4 = bitcast [3 x i32]* %3 to i8*
%5 = call i32 @produce_y(i32* %1)
%6 = call i32 @produce_z(i32* %2)
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%8 = call i32 @produce_v(i32* %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %1
%11 = add nsw i32 %9, %10
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%13 = call i32 @consumer(i32 %11, i32* %12)
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 2
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%23 = load i32, i32* %22
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 1
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 2
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
ret i32 0
}

LLVM IR (-O2):
@__const.main.v = [3 x i32] [i32 -1, i32 0, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
%4 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%6 = bitcast [3 x i32]* %3 to i8*
%7 = call i32 @produce_y(i32* %1)
%8 = call i32 @produce_z(i32* %2)
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%10 = call i32 @produce_v(i32* %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = add nsw i32 %12, %11
%14 = call i32 @consumer(i32 %13, i32* %9)
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 1
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 2
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i32, i32* %9
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 1
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 2
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
ret i32 0
}