int main() {
  double array[10];
  int i;
  int cond;
  for (i = 0; i < 10; i++) {
    array[i] = (double)i;
  }
#pragma acc parallel copyin(array) if (123)
#pragma acc loop
  for (i = 0; i < 10; i++) {
    array[i] = 0.0;
  }
  for (i = 0; i < 10; i++) {
    if (array[i] != (double)i) {
      return 1;
    }
  }
#pragma acc parallel copyin(array) if (0)
#pragma acc loop
  for (i = 0; i < 10; i++) {
    array[i] = 1.0;
  }
  for (i = 0; i < 10; i++) {
    if (array[i] != 1.0) {
      return 2;
    }
  }
  cond = 456;
#pragma acc parallel copyin(array) if (cond)
#pragma acc loop
  for (i = 0; i < 10; i++) {
    array[i] += 2.0;
  }
  for (i = 0; i < 10; i++) {
    if (array[i] != 1.0) {
      return 3;
    }
  }
  cond = 0;
#pragma acc parallel copyin(array) if (cond)
#pragma acc loop
  for (i = 0; i < 10; i++) {
    array[i] += 3.0;
  }
  for (i = 0; i < 10; i++) {
    if (array[i] != 4.0) {
      return 4;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    1139 <main+0x39>
cvtsi2sdl -0x64(%rbp),%xmm0
movslq -0x64(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1112 <main+0x12>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    1165 <main+0x65>
movslq -0x64(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1140 <main+0x40>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    11b9 <main+0xb9>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
cvtsi2sdl -0x64(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jne    119a <main+0x9a>
jp     119a <main+0x9a>
jmp    11a6 <main+0xa6>
movl   $0x1,-0x4(%rbp)
jmp    1372 <main+0x272>
jmp    11ab <main+0xab>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    116c <main+0x6c>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    11ea <main+0xea>
movslq -0x64(%rbp),%rax
movsd  0xe3a(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11c0 <main+0xc0>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    1241 <main+0x141>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  0xe03(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1222 <main+0x122>
jp     1222 <main+0x122>
jmp    122e <main+0x12e>
movl   $0x2,-0x4(%rbp)
jmp    1372 <main+0x272>
jmp    1233 <main+0x133>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11f1 <main+0xf1>
movl   $0x1c8,-0x68(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    127f <main+0x17f>
movslq -0x64(%rbp),%rax
movsd  0xdb3(%rip),%xmm0
addsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    124f <main+0x14f>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    12d6 <main+0x1d6>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  0xd6e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12b7 <main+0x1b7>
jp     12b7 <main+0x1b7>
jmp    12c3 <main+0x1c3>
movl   $0x3,-0x4(%rbp)
jmp    1372 <main+0x272>
jmp    12c8 <main+0x1c8>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1286 <main+0x186>
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    1314 <main+0x214>
movslq -0x64(%rbp),%rax
movsd  0xd0e(%rip),%xmm0
addsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    12e4 <main+0x1e4>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    136b <main+0x26b>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  0xcc9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    134c <main+0x24c>
jp     134c <main+0x24c>
jmp    1358 <main+0x258>
movl   $0x4,-0x4(%rbp)
jmp    1372 <main+0x272>
jmp    135d <main+0x25d>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    131b <main+0x21b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x double]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %12
store double %10, double* %13
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
store i32 0, i32* %3
br label %18
18: ; preds = %25, %17
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %23
store double 0.000000e+00, double* %24
br label %25
25: ; preds = %21
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %18
28: ; preds = %18
store i32 0, i32* %3
br label %29
29: ; preds = %42, %28
%30 = load i32, i32* %3
%31 = icmp slt i32 %30, 10
br i1 %31, label %32, label %45
32: ; preds = %29
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %34
%36 = load double, double* %35
%37 = load i32, i32* %3
%38 = sitofp i32 %37 to double
%39 = fcmp une double %36, %38
br i1 %39, label %40, label %41
40: ; preds = %32
store i32 1, i32* %1
br label %128
41: ; preds = %32
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %29
45: ; preds = %29
store i32 0, i32* %3
br label %46
46: ; preds = %53, %45
%47 = load i32, i32* %3
%48 = icmp slt i32 %47, 10
br i1 %48, label %49, label %56
49: ; preds = %46
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %51
store double 1.000000e+00, double* %52
br label %53
53: ; preds = %49
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %46
56: ; preds = %46
store i32 0, i32* %3
br label %57
57: ; preds = %68, %56
%58 = load i32, i32* %3
%59 = icmp slt i32 %58, 10
br i1 %59, label %60, label %71
60: ; preds = %57
%61 = load i32, i32* %3
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %62
%64 = load double, double* %63
%65 = fcmp une double %64, 1.000000e+00
br i1 %65, label %66, label %67
66: ; preds = %60
store i32 2, i32* %1
br label %128
67: ; preds = %60
br label %68
68: ; preds = %67
%69 = load i32, i32* %3
%70 = add nsw i32 %69, 1
store i32 %70, i32* %3
br label %57
71: ; preds = %57
store i32 456, i32* %4
store i32 0, i32* %3
br label %72
72: ; preds = %81, %71
%73 = load i32, i32* %3
%74 = icmp slt i32 %73, 10
br i1 %74, label %75, label %84
75: ; preds = %72
%76 = load i32, i32* %3
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %77
%79 = load double, double* %78
%80 = fadd double %79, 2.000000e+00
store double %80, double* %78
br label %81
81: ; preds = %75
%82 = load i32, i32* %3
%83 = add nsw i32 %82, 1
store i32 %83, i32* %3
br label %72
84: ; preds = %72
store i32 0, i32* %3
br label %85
85: ; preds = %96, %84
%86 = load i32, i32* %3
%87 = icmp slt i32 %86, 10
br i1 %87, label %88, label %99
88: ; preds = %85
%89 = load i32, i32* %3
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %90
%92 = load double, double* %91
%93 = fcmp une double %92, 1.000000e+00
br i1 %93, label %94, label %95
94: ; preds = %88
store i32 3, i32* %1
br label %128
95: ; preds = %88
br label %96
96: ; preds = %95
%97 = load i32, i32* %3
%98 = add nsw i32 %97, 1
store i32 %98, i32* %3
br label %85
99: ; preds = %85
store i32 0, i32* %4
store i32 0, i32* %3
br label %100
100: ; preds = %109, %99
%101 = load i32, i32* %3
%102 = icmp slt i32 %101, 10
br i1 %102, label %103, label %112
103: ; preds = %100
%104 = load i32, i32* %3
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %105
%107 = load double, double* %106
%108 = fadd double %107, 3.000000e+00
store double %108, double* %106
br label %109
109: ; preds = %103
%110 = load i32, i32* %3
%111 = add nsw i32 %110, 1
store i32 %111, i32* %3
br label %100
112: ; preds = %100
store i32 0, i32* %3
br label %113
113: ; preds = %124, %112
%114 = load i32, i32* %3
%115 = icmp slt i32 %114, 10
br i1 %115, label %116, label %127
116: ; preds = %113
%117 = load i32, i32* %3
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %118
%120 = load double, double* %119
%121 = fcmp une double %120, 4.000000e+00
br i1 %121, label %122, label %123
122: ; preds = %116
store i32 4, i32* %1
br label %128
123: ; preds = %116
br label %124
124: ; preds = %123
%125 = load i32, i32* %3
%126 = add nsw i32 %125, 1
store i32 %126, i32* %3
br label %113
127: ; preds = %113
store i32 0, i32* %1
br label %128
128: ; preds = %127, %122, %94, %66, %40
%129 = load i32, i32* %1
ret i32 %129
}

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