#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main() {
#pragma xmp nodes p(*)
#pragma xmp template t(0 : 63)
#pragma xmp distribute t(block) onto p
  int a[64];
#pragma xmp align a[i] with t(i)
#pragma xmp shadow a[1]
  int b[66];
  int result = 0;
#pragma xmp loop on t(i)
  for (int i = 0; i < 64; i++) {
    a[i] = i;
  }
  b[0] = 63;
  for (int i = 1; i < 65; i++) {
    b[i] = i - 1;
  }
  b[65] = 0;
#pragma xmp reflect(a) width(/ periodic / 1 : 1)
#pragma xmp loop on t(i) reduction(+ : result)
  for (int i = 0; i < 64; i++) {
    if (a[i - 1] != b[i]) {
      result = 1;
    }
    if (a[i] != b[i + 1]) {
      result = 1;
    }
    if (a[i + 1] != b[i + 2]) {
      result = 1;
    }
  }
#pragma xmp task on p(1)
  {
    if (result == 0) {
      printf("PASS\n");
    } else {
      printf("ERROR\n");
      exit(1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x224(%rbp)
movl   $0x0,-0x228(%rbp)
cmpl   $0x40,-0x228(%rbp)
jge    117b <main+0x5b>
mov    -0x228(%rbp),%ecx
movslq -0x228(%rbp),%rax
mov    %ecx,-0x110(%rbp,%rax,4)
mov    -0x228(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x228(%rbp)
jmp    1146 <main+0x26>
movl   $0x3f,-0x220(%rbp)
movl   $0x1,-0x22c(%rbp)
cmpl   $0x41,-0x22c(%rbp)
jge    11c7 <main+0xa7>
mov    -0x22c(%rbp),%ecx
sub    $0x1,%ecx
movslq -0x22c(%rbp),%rax
mov    %ecx,-0x220(%rbp,%rax,4)
mov    -0x22c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x22c(%rbp)
jmp    118f <main+0x6f>
movl   $0x0,-0x11c(%rbp)
movl   $0x0,-0x230(%rbp)
cmpl   $0x40,-0x230(%rbp)
jge    1297 <main+0x177>
mov    -0x230(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x110(%rbp,%rax,4),%eax
movslq -0x230(%rbp),%rcx
cmp    -0x220(%rbp,%rcx,4),%eax
je     1218 <main+0xf8>
movl   $0x1,-0x224(%rbp)
movslq -0x230(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%eax
mov    -0x230(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x220(%rbp,%rcx,4),%eax
je     1249 <main+0x129>
movl   $0x1,-0x224(%rbp)
mov    -0x230(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x110(%rbp,%rax,4),%eax
mov    -0x230(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
cmp    -0x220(%rbp,%rcx,4),%eax
je     127e <main+0x15e>
movl   $0x1,-0x224(%rbp)
jmp    1283 <main+0x163>
mov    -0x230(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x230(%rbp)
jmp    11db <main+0xbb>
cmpl   $0x0,-0x224(%rbp)
jne    12b5 <main+0x195>
lea    0xd55(%rip),%rdi
call   1030 <printf@plt>
jmp    12cb <main+0x1ab>
lea    0xd4a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x210,%rsp
movaps 0xed0(%rip),%xmm8
movaps %xmm8,0x110(%rsp)
movaps 0xecf(%rip),%xmm9
movaps %xmm9,0x120(%rsp)
movaps 0xece(%rip),%xmm10
movaps %xmm10,0x130(%rsp)
movaps 0xecd(%rip),%xmm11
movaps %xmm11,0x140(%rsp)
movaps 0xecc(%rip),%xmm12
movaps %xmm12,0x150(%rsp)
movaps 0xecb(%rip),%xmm13
movaps %xmm13,0x160(%rsp)
movaps 0xeca(%rip),%xmm14
movaps %xmm14,0x170(%rsp)
movaps 0xec9(%rip),%xmm15
movaps %xmm15,0x180(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xeca(%rip),%xmm1
movaps %xmm1,0x1a0(%rsp)
movaps 0xecb(%rip),%xmm2
movaps %xmm2,0x1b0(%rsp)
movaps 0xecc(%rip),%xmm3
movaps %xmm3,0x1c0(%rsp)
movaps 0xecd(%rip),%xmm4
movaps %xmm4,0x1d0(%rsp)
movaps 0xece(%rip),%xmm5
movaps %xmm5,0x1e0(%rsp)
movaps 0xecf(%rip),%xmm6
movaps %xmm6,0x1f0(%rsp)
movaps 0xed0(%rip),%xmm7
movaps %xmm7,0x200(%rsp)
movl   $0x3f,(%rsp)
movups %xmm8,0x4(%rsp)
movups %xmm9,0x14(%rsp)
movups %xmm10,0x24(%rsp)
movups %xmm11,0x34(%rsp)
movups %xmm12,0x44(%rsp)
movups %xmm13,0x54(%rsp)
movups %xmm14,0x64(%rsp)
movups %xmm15,0x74(%rsp)
movups %xmm0,0x84(%rsp)
movups %xmm1,0x94(%rsp)
movups %xmm2,0xa4(%rsp)
movups %xmm3,0xb4(%rsp)
movups %xmm4,0xc4(%rsp)
movups %xmm5,0xd4(%rsp)
movups %xmm6,0xe4(%rsp)
movups %xmm7,0xf4(%rsp)
movl   $0x0,0x104(%rsp)
mov    0x110(%rsp),%r9d
xor    %eax,%eax
mov    $0x3f,%edi
mov    0x4(%rsp),%esi
mov    $0x1,%r8d
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %r9d,%esi
xor    %r11d,%edi
or     %esi,%edi
mov    0x114(%rsp,%rax,4),%r11d
mov    0x118(%rsp,%rax,4),%r9d
mov    0x8(%rsp,%rax,4),%r10d
mov    0xc(%rsp,%rax,4),%esi
add    $0x2,%rax
mov    %r11d,%edx
xor    %r10d,%edx
mov    %r9d,%ebx
xor    %esi,%ebx
or     %edx,%ebx
or     %edi,%ebx
cmovne %r8d,%ecx
mov    %r10d,%edi
cmp    $0x40,%rax
jne    12d0 <main+0x1b0>
test   %ecx,%ecx
jne    132c <main+0x20c>
lea    0xdea(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbx
ret
lea    0xdcd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
@.str.1 = [7 x i8] c"ERROR\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i32]
%3 = alloca [66 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %16, %0
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 64
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32, i32* %5
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %14
store i32 %12, i32* %15
br label %16
16: ; preds = %11
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
%20 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 0
store i32 63, i32* %20
store i32 1, i32* %6
br label %21
21: ; preds = %30, %19
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 65
br i1 %23, label %24, label %33
24: ; preds = %21
%25 = load i32, i32* %6
%26 = sub nsw i32 %25, 1
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %24
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %21
33: ; preds = %21
%34 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 65
store i32 0, i32* %34
store i32 0, i32* %7
br label %35
35: ; preds = %76, %33
%36 = load i32, i32* %7
%37 = icmp slt i32 %36, 64
br i1 %37, label %38, label %79
38: ; preds = %35
%39 = load i32, i32* %7
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = icmp ne i32 %43, %47
br i1 %48, label %49, label %50
49: ; preds = %38
store i32 1, i32* %4
br label %50
50: ; preds = %49, %38
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = icmp ne i32 %54, %59
br i1 %60, label %61, label %62
61: ; preds = %50
store i32 1, i32* %4
br label %62
62: ; preds = %61, %50
%63 = load i32, i32* %7
%64 = add nsw i32 %63, 1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [66 x i32], [66 x i32]* %3, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = icmp ne i32 %67, %72
br i1 %73, label %74, label %75
74: ; preds = %62
store i32 1, i32* %4
br label %75
75: ; preds = %74, %62
br label %76
76: ; preds = %75
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
br label %35
79: ; preds = %35
%80 = load i32, i32* %4
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %87
84: ; preds = %79
%85 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%86 = call i32 @exit(i32 1)
unreachable
87: ; preds = %82
ret i32 0
}

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