#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 func(int *);
int /*<<< orphan*/ printf(char *);
int main() {
  int i, a[20];
#pragma acc data create(a)
  {
#pragma acc parallel loop
    for (i = 0; i < 20; i++) {
      a[i] = i;
    }
    int result = func(&a[5]);
    if (result != 95) {
      printf("FAILED\n");
      return 1;
    }
  }
  printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1159 <main+0x39>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    -0x60(%rbp),%rdi
add    $0x14,%rdi
call   1040 <func@plt>
mov    %eax,-0x64(%rbp)
cmpl   $0x5f,-0x64(%rbp)
je     118b <main+0x6b>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    119e <main+0x7e>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x14(%rsp),%rdi
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
call   1040 <func@plt>
xor    %ebx,%ebx
cmp    $0x5f,%eax
setne  %bl
lea    0xed7(%rip),%rax
lea    0xed5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"FAILED\0A\00"
@.str.1 = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [20 x i32]
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 20
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 %11
store i32 %9, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 5
%18 = call i32 @func(i32* %17)
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 95
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %25
23: ; preds = %16
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %25
25: ; preds = %23, %21
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
@str.2 = [7 x i8] c"FAILED\00"
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = bitcast [20 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %3
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 4
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 5
%6 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %6
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 8
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %8
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 12
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %10
%11 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 16
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %12
%13 = call i32 @func(i32* %5)
%14 = icmp eq i32 %13, 95
%15 = select i1 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.2, i64 0, i64 0)
%16 = xor i1 %14, true
%17 = zext i1 %16 to i32
%18 = call i32 @puts(i8* dereferenceable(1) %15)
ret i32 %17
}