#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 arg, char *argv[]) {
  int x[10][20];
  int i, j;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 20; j++) {
      x[i][j] = 1;
    }
  }
#pragma omp task inout(x[1][2])
  { x[1][2] += 41; }
#pragma omp task in(x[1][2])
  {
    if (x[1][2] != 42)
      abort();
  }
#pragma omp taskwait
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x334(%rbp)
cmpl   $0xa,-0x334(%rbp)
jge    11a7 <main+0x97>
movl   $0x0,-0x338(%rbp)
cmpl   $0x14,-0x338(%rbp)
jge    118e <main+0x7e>
movslq -0x334(%rbp),%rcx
lea    -0x330(%rbp),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x338(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x338(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x338(%rbp)
jmp    114a <main+0x3a>
jmp    1193 <main+0x83>
mov    -0x334(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x334(%rbp)
jmp    1133 <main+0x23>
mov    -0x2d8(%rbp),%eax
add    $0x29,%eax
mov    %eax,-0x2d8(%rbp)
cmpl   $0x2a,-0x2d8(%rbp)
je     11ca <main+0xba>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x328,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x290(%rsp)
movaps %xmm0,0x2a0(%rsp)
movaps %xmm0,0x2b0(%rsp)
movaps %xmm0,0x2c0(%rsp)
movaps %xmm0,0x2d0(%rsp)
movaps %xmm0,0x2e0(%rsp)
movaps %xmm0,0x2f0(%rsp)
movaps %xmm0,0x300(%rsp)
movaps %xmm0,0x310(%rsp)
cmpl   $0x1,0x58(%rsp)
jne    12a6 <main+0x196>
xor    %eax,%eax
add    $0x328,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x [20 x i32]]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %9
9: ; preds = %27, %2
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %30
12: ; preds = %9
store i32 0, i32* %8
br label %13
13: ; preds = %23, %12
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 20
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x [20 x i32]], [10 x [20 x i32]]* %6, i64 0, i64 %18
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [20 x i32], [20 x i32]* %19, i64 0, i64 %21
store i32 1, i32* %22
br label %23
23: ; preds = %16
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %13
26: ; preds = %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %9
30: ; preds = %9
%31 = getelementptr inbounds [10 x [20 x i32]], [10 x [20 x i32]]* %6, i64 0, i64 1
%32 = getelementptr inbounds [20 x i32], [20 x i32]* %31, i64 0, i64 2
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 41
store i32 %34, i32* %32
%35 = getelementptr inbounds [10 x [20 x i32]], [10 x [20 x i32]]* %6, i64 0, i64 1
%36 = getelementptr inbounds [20 x i32], [20 x i32]* %35, i64 0, i64 2
%37 = load i32, i32* %36
%38 = icmp ne i32 %37, 42
br i1 %38, label %39, label %41
39: ; preds = %30
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %30
ret i32 0
}

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