#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 main() {
  int a = 1, b = 2, c = 4, d[7];
#pragma omp taskgroup
  {
#pragma omp target enter data nowait map(to : a, b, c) depend(out : d[0])
#pragma omp target nowait map(alloc : a, b) depend(in : d[0]) depend(out : d[1])
    {
#pragma omp atomic update
      a |= 4;
#pragma omp atomic update
      b |= 8;
    }
#pragma omp target nowait map(alloc : a, c) depend(in : d[0]) depend(out : d[2])
    {
#pragma omp atomic update
      a |= 16;
#pragma omp atomic update
      c |= 32;
    }
#pragma omp target exit data nowait map(from : a, b, c) depend(in : d[1], d[2])
  }
  if (a != 21 || b != 10 || c != 36)
    abort();
#pragma omp target map(tofrom : a, b) nowait
  {
    a &= ~16;
    b &= ~2;
  }
#pragma omp target map(tofrom : c) nowait
  { c |= 8; }
#pragma omp barrier
  if (a != 5 || b != 8 || c != 44)
    abort();
#pragma omp target map(tofrom : a, b) nowait
  {
    a |= 32;
    b |= 4;
  }
#pragma omp target map(tofrom : c) nowait
  { c &= ~4; }
#pragma omp taskwait
  if (a != 37 || b != 12 || c != 40)
    abort();
#pragma omp target nowait map(tofrom : a, b) depend(out : d[3])
  {
#pragma omp atomic update
    a = a + 9;
    b -= 8;
  }
#pragma omp target nowait map(tofrom : a, c) depend(out : d[4])
  {
#pragma omp atomic update
    a = a + 4;
    c >>= 1;
  }
#pragma omp task if (0) depend(in : d[3], d[4]) shared(a, b, c)
  if (a != 50 || b != 4 || c != 20)
    abort();
#pragma omp task shared(a)
  a += 50;
#pragma omp target nowait map(tofrom : b)
  b++;
#pragma omp target map(tofrom : c) nowait
  c--;
#pragma omp taskwait
  if (a != 100 || b != 5 || c != 19)
    abort();
#pragma omp target map(tofrom : a) nowait depend(out : d[5])
  a++;
#pragma omp target map(tofrom : b) nowait depend(out : d[6])
  b++;
#pragma omp target map(tofrom : a, b) depend(in : d[5], d[6])
  {
    if (a != 101 || b != 6)
      a = -9;
    else {
      a = 24;
      b = 38;
    }
  }
  if (a != 24 || b != 38)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x15,-0x8(%rbp)
jne    1176 <main+0x66>
cmpl   $0xa,-0xc(%rbp)
jne    1176 <main+0x66>
cmpl   $0x24,-0x10(%rbp)
je     117d <main+0x6d>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
and    $0xffffffef,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    11b6 <main+0xa6>
cmpl   $0x8,-0xc(%rbp)
jne    11b6 <main+0xa6>
cmpl   $0x2c,-0x10(%rbp)
je     11bd <main+0xad>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x25,-0x8(%rbp)
jne    11f6 <main+0xe6>
cmpl   $0xc,-0xc(%rbp)
jne    11f6 <main+0xe6>
cmpl   $0x28,-0x10(%rbp)
je     11fd <main+0xed>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x32,-0x8(%rbp)
jne    123f <main+0x12f>
cmpl   $0x4,-0xc(%rbp)
jne    123f <main+0x12f>
cmpl   $0x14,-0x10(%rbp)
je     1246 <main+0x136>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
add    $0x32,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x64,-0x8(%rbp)
jne    127f <main+0x16f>
cmpl   $0x5,-0xc(%rbp)
jne    127f <main+0x16f>
cmpl   $0x13,-0x10(%rbp)
je     1286 <main+0x176>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x65,-0x8(%rbp)
jne    12ac <main+0x19c>
cmpl   $0x6,-0xc(%rbp)
je     12b8 <main+0x1a8>
movl   $0xfffffff7,-0x8(%rbp)
jmp    12c6 <main+0x1b6>
movl   $0x18,-0x8(%rbp)
movl   $0x26,-0xc(%rbp)
cmpl   $0x18,-0x8(%rbp)
jne    12da <main+0x1ca>
cmpl   $0x26,-0xc(%rbp)
je     12e1 <main+0x1d1>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [7 x i32]
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 4, i32* %4
%6 = load i32, i32* %2
%7 = or i32 %6, 4
store i32 %7, i32* %2
%8 = load i32, i32* %3
%9 = or i32 %8, 8
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = or i32 %10, 16
store i32 %11, i32* %2
%12 = load i32, i32* %4
%13 = or i32 %12, 32
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 21
br i1 %15, label %22, label %16
16: ; preds = %0
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 10
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 36
br i1 %21, label %22, label %24
22: ; preds = %19, %16, %0
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %19
%25 = load i32, i32* %2
%26 = and i32 %25, -17
store i32 %26, i32* %2
%27 = load i32, i32* %3
%28 = and i32 %27, -3
store i32 %28, i32* %3
%29 = load i32, i32* %4
%30 = or i32 %29, 8
store i32 %30, i32* %4
%31 = load i32, i32* %2
%32 = icmp ne i32 %31, 5
br i1 %32, label %39, label %33
33: ; preds = %24
%34 = load i32, i32* %3
%35 = icmp ne i32 %34, 8
br i1 %35, label %39, label %36
36: ; preds = %33
%37 = load i32, i32* %4
%38 = icmp ne i32 %37, 44
br i1 %38, label %39, label %41
39: ; preds = %36, %33, %24
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %36
%42 = load i32, i32* %2
%43 = or i32 %42, 32
store i32 %43, i32* %2
%44 = load i32, i32* %3
%45 = or i32 %44, 4
store i32 %45, i32* %3
%46 = load i32, i32* %4
%47 = and i32 %46, -5
store i32 %47, i32* %4
%48 = load i32, i32* %2
%49 = icmp ne i32 %48, 37
br i1 %49, label %56, label %50
50: ; preds = %41
%51 = load i32, i32* %3
%52 = icmp ne i32 %51, 12
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* %4
%55 = icmp ne i32 %54, 40
br i1 %55, label %56, label %58
56: ; preds = %53, %50, %41
%57 = call i32 (...) @abort()
unreachable
58: ; preds = %53
%59 = load i32, i32* %2
%60 = add nsw i32 %59, 9
store i32 %60, i32* %2
%61 = load i32, i32* %3
%62 = sub nsw i32 %61, 8
store i32 %62, i32* %3
%63 = load i32, i32* %2
%64 = add nsw i32 %63, 4
store i32 %64, i32* %2
%65 = load i32, i32* %4
%66 = ashr i32 %65, 1
store i32 %66, i32* %4
%67 = load i32, i32* %2
%68 = icmp ne i32 %67, 50
br i1 %68, label %75, label %69
69: ; preds = %58
%70 = load i32, i32* %3
%71 = icmp ne i32 %70, 4
br i1 %71, label %75, label %72
72: ; preds = %69
%73 = load i32, i32* %4
%74 = icmp ne i32 %73, 20
br i1 %74, label %75, label %77
75: ; preds = %72, %69, %58
%76 = call i32 (...) @abort()
unreachable
77: ; preds = %72
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 50
store i32 %79, i32* %2
%80 = load i32, i32* %3
%81 = add nsw i32 %80, 1
store i32 %81, i32* %3
%82 = load i32, i32* %4
%83 = add nsw i32 %82, -1
store i32 %83, i32* %4
%84 = load i32, i32* %2
%85 = icmp ne i32 %84, 100
br i1 %85, label %92, label %86
86: ; preds = %77
%87 = load i32, i32* %3
%88 = icmp ne i32 %87, 5
br i1 %88, label %92, label %89
89: ; preds = %86
%90 = load i32, i32* %4
%91 = icmp ne i32 %90, 19
br i1 %91, label %92, label %94
92: ; preds = %89, %86, %77
%93 = call i32 (...) @abort()
unreachable
94: ; preds = %89
%95 = load i32, i32* %2
%96 = add nsw i32 %95, 1
store i32 %96, i32* %2
%97 = load i32, i32* %3
%98 = add nsw i32 %97, 1
store i32 %98, i32* %3
%99 = load i32, i32* %2
%100 = icmp ne i32 %99, 101
br i1 %100, label %104, label %101
101: ; preds = %94
%102 = load i32, i32* %3
%103 = icmp ne i32 %102, 6
br i1 %103, label %104, label %105
104: ; preds = %101, %94
store i32 -9, i32* %2
br label %106
105: ; preds = %101
store i32 24, i32* %2
store i32 38, i32* %3
br label %106
106: ; preds = %105, %104
%107 = load i32, i32* %2
%108 = icmp ne i32 %107, 24
br i1 %108, label %112, label %109
109: ; preds = %106
%110 = load i32, i32* %3
%111 = icmp ne i32 %110, 38
br i1 %111, label %112, label %114
112: ; preds = %109, %106
%113 = call i32 (...) @abort()
unreachable
114: ; preds = %109
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}