#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*/ printf(char *);
int main() {
  int n = 50;
  int a[50], b[50];
  int i, j;
  for (i = 0; i < n; i++) {
    a[i] = 4 * i + 1;
    b[i] = -1;
  }
#pragma acc data copyin(a [0:n]), copy(b [0:n])
  {
#pragma acc kernels
#pragma acc loop independent
    for (i = 1; i < n - 1; i++) {
      b[i] = a[i];
    }
  }
  for (i = 1; i < n - 1; i++) {
    if (b[i] != 4 * i + 1)
      return 1;
  }
  if (b[0] != -1 || b[n - 1] != -1)
    return 2;
  printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1182 <main+0x72>
mov    -0x1a4(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0xd0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
movl   $0xffffffff,-0x1a0(%rbp,%rax,4)
ff ff ff ff
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1133 <main+0x23>
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11d0 <main+0xc0>
movslq -0x1a4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    118c <main+0x7c>
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1235 <main+0x125>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    -0x1a4(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     121c <main+0x10c>
movl   $0x1,-0x4(%rbp)
jmp    1277 <main+0x167>
jmp    1221 <main+0x111>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11da <main+0xca>
cmpl   $0xffffffff,-0x1a0(%rbp)
jne    1258 <main+0x148>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0xffffffff,-0x1a0(%rbp,%rax,4)
ff
je     1264 <main+0x154>
movl   $0x2,-0x4(%rbp)
jmp    1277 <main+0x167>
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x198,%rsp
pcmpeqd %xmm0,%xmm0
movdqa %xmm0,0xb0(%rsp)
movdqa %xmm0,0xa0(%rsp)
movdqa %xmm0,0x90(%rsp)
movdqa %xmm0,0x80(%rsp)
movdqa %xmm0,0x70(%rsp)
movdqa %xmm0,0x60(%rsp)
movdqa %xmm0,0x50(%rsp)
movdqa %xmm0,0x40(%rsp)
movdqa %xmm0,0x30(%rsp)
movdqa %xmm0,0x20(%rsp)
movdqa %xmm0,0x10(%rsp)
movdqa %xmm0,(%rsp)
movq   $0xffffffffffffffff,0xc0(%rsp)
movaps 0xe6f(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xe70(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xe71(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xe72(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xe73(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xe74(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xe75(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xe76(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xe77(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xe78(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xe79(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xe7a(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movabs $0xc5000000c1,%rax
mov    %rax,0x190(%rsp)
lea    0x4(%rsp),%rdi
lea    0xd4(%rsp),%rsi
mov    $0xc0,%edx
call   1040 <memcpy@plt>
mov    $0x11,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    -0xd(%rsp,%rcx,1),%edx
lea    -0xc(%rcx),%rsi
cmp    %rdx,%rsi
jne    12cb <main+0x1ab>
mov    -0x9(%rsp,%rcx,1),%edx
lea    -0x8(%rcx),%rsi
cmp    %rdx,%rsi
jne    12cb <main+0x1ab>
mov    -0x5(%rsp,%rcx,1),%edx
lea    -0x4(%rcx),%rsi
cmp    %rdx,%rsi
jne    12cb <main+0x1ab>
mov    -0x1(%rsp,%rcx,1),%edx
cmp    %rdx,%rcx
jne    12cb <main+0x1ab>
add    $0x10,%rcx
cmp    $0xd1,%rcx
jne    1280 <main+0x160>
lea    0xdfc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x198,%rsp
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = alloca [50 x i32]
%2 = alloca [50 x i32]
%3 = bitcast [50 x i32]* %2 to i8*
%4 = bitcast [50 x i32]* %1 to i8*
%5 = bitcast [50 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 5, i32 9, i32 13>, <4 x i32>* %5
%6 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 4
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 17, i32 21, i32 25, i32 29>, <4 x i32>* %7
%8 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 8
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 33, i32 37, i32 41, i32 45>, <4 x i32>* %9
%10 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 12
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 49, i32 53, i32 57, i32 61>, <4 x i32>* %11
%12 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 16
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 65, i32 69, i32 73, i32 77>, <4 x i32>* %13
%14 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 20
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 81, i32 85, i32 89, i32 93>, <4 x i32>* %15
%16 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 24
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 97, i32 101, i32 105, i32 109>, <4 x i32>* %17
%18 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 28
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 113, i32 117, i32 121, i32 125>, <4 x i32>* %19
%20 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 32
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 129, i32 133, i32 137, i32 141>, <4 x i32>* %21
%22 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 36
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 145, i32 149, i32 153, i32 157>, <4 x i32>* %23
%24 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 40
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 161, i32 165, i32 169, i32 173>, <4 x i32>* %25
%26 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 44
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 177, i32 181, i32 185, i32 189>, <4 x i32>* %27
%28 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 48
store i32 193, i32* %28
%29 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 49
store i32 197, i32* %29
%30 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 1
%31 = bitcast i32* %30 to i8*
%32 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 1
%33 = bitcast i32* %32 to i8*
br label %61
34: ; preds = %61
%35 = add nuw nsw i64 %62, 1
%36 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = shl nuw nsw i64 %35, 2
%39 = or i64 %38, 1
%40 = zext i32 %37 to i64
%41 = icmp eq i64 %39, %40
br i1 %41, label %42, label %71
42: ; preds = %34
%43 = add nuw nsw i64 %62, 2
%44 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = shl nuw nsw i64 %43, 2
%47 = or i64 %46, 1
%48 = zext i32 %45 to i64
%49 = icmp eq i64 %47, %48
br i1 %49, label %50, label %71
50: ; preds = %42
%51 = add nuw nsw i64 %62, 3
%52 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = shl nuw nsw i64 %51, 2
%55 = or i64 %54, 1
%56 = zext i32 %53 to i64
%57 = icmp eq i64 %55, %56
br i1 %57, label %58, label %71
58: ; preds = %50
%59 = add nuw nsw i64 %62, 4
%60 = icmp eq i64 %59, 49
br i1 %60, label %69, label %61
61: ; preds = %58, %0
%62 = phi i64 [ 1, %0 ], [ %59, %58 ]
%63 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = shl nuw nsw i64 %62, 2
%66 = or i64 %65, 1
%67 = zext i32 %64 to i64
%68 = icmp eq i64 %66, %67
br i1 %68, label %34, label %71
69: ; preds = %58
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %71
71: ; preds = %61, %34, %42, %50, %69
%72 = phi i32 [ 0, %69 ], [ 1, %50 ], [ 1, %42 ], [ 1, %34 ], [ 1, %61 ]
ret i32 %72
}