#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(void) {
  void *a, *a_1, *a_2;
  a = (void *)0x123;
#pragma acc data copyout(a_1, a_2)
#pragma acc kernels deviceptr(a)
  {
    a_1 = a;
    a_2 = &a;
  }
  if (a != (void *)0x123)
    abort();
  if (a_1 != a)
    abort();
  if (a_2 == &a)
    abort();
  a_1 = a_2 = 0;
#pragma acc data deviceptr(a)
#pragma acc parallel copyout(a_1, a_2)
  {
    a_1 = a;
    a_2 = &a;
  }
  if (a != (void *)0x123)
    abort();
  if (a_1 != a)
    abort();
  if (a_2 == &a)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x123,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x123,%eax
cmp    %rax,-0x10(%rbp)
je     114e <main+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1163 <main+0x53>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x20(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jne    117b <main+0x6b>
mov    $0x0,%al
call   1030 <abort@plt>
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x123,%eax
cmp    %rax,-0x10(%rbp)
je     11b1 <main+0xa1>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     11c6 <main+0xb6>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x20(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jne    11de <main+0xce>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}