#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*/ assert(int);
void t23() {
  int arr[32], i;
  for (i = 0; i < 32; i++)
    arr[i] = i;
#pragma acc parallel copy(arr) num_gangs(8) num_workers(8) vector_length(32)
  {
    int j;
#pragma acc loop gang
    for (j = 0; j < 32; j++)
      if ((arr[j] % 2) != 0)
        arr[j]++;
      else
        arr[j] += 2;
  }
  for (i = 0; i < 32; i++)
    assert(arr[i] == ((i % 2) != 0) ? i + 1 : i + 2);
}


x86 assembly (clang, -O0):
<t23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x84(%rbp)
cmpl   $0x20,-0x84(%rbp)
jge    1157 <t23+0x47>
mov    -0x84(%rbp),%ecx
movslq -0x84(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1125 <t23+0x15>
movl   $0x0,-0x88(%rbp)
cmpl   $0x20,-0x88(%rbp)
jge    11cc <t23+0xbc>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11a1 <t23+0x91>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    11b3 <t23+0xa3>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x2,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    11b8 <t23+0xa8>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1161 <t23+0x51>
movl   $0x0,-0x84(%rbp)
cmpl   $0x20,-0x84(%rbp)
jge    125e <t23+0x14e>
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x84(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x8c(%rbp),%eax
cmp    $0x0,%edx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1230 <t23+0x120>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    123f <t23+0x12f>
mov    -0x84(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%edi
call   1030 <assert@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11d6 <t23+0xc6>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t23>:
push   %rbx
sub    $0x80,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,(%rsp)
movdqu 0x4(%rsp),%xmm3
movdqa 0xefb(%rip),%xmm0
movdqa %xmm3,%xmm2
pand   %xmm0,%xmm2
pxor   %xmm1,%xmm1
pcmpeqd %xmm1,%xmm2
psubd  %xmm2,%xmm3
pcmpeqd %xmm2,%xmm2
psubd  %xmm2,%xmm3
movdqu %xmm3,0x4(%rsp)
movdqu 0x14(%rsp),%xmm3
movdqa %xmm3,%xmm4
pand   %xmm0,%xmm4
pcmpeqd %xmm1,%xmm4
psubd  %xmm4,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x14(%rsp)
movdqu 0x24(%rsp),%xmm3
movdqa %xmm3,%xmm4
pand   %xmm0,%xmm4
pcmpeqd %xmm1,%xmm4
psubd  %xmm4,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x24(%rsp)
movdqu 0x34(%rsp),%xmm3
movdqa %xmm3,%xmm4
pand   %xmm0,%xmm4
pcmpeqd %xmm1,%xmm4
psubd  %xmm4,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x34(%rsp)
movdqu 0x44(%rsp),%xmm3
movdqa %xmm3,%xmm4
pand   %xmm0,%xmm4
pcmpeqd %xmm1,%xmm4
psubd  %xmm4,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x44(%rsp)
movdqu 0x54(%rsp),%xmm3
movdqa %xmm3,%xmm4
pand   %xmm0,%xmm4
pcmpeqd %xmm1,%xmm4
psubd  %xmm4,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x54(%rsp)
movdqu 0x64(%rsp),%xmm3
pand   %xmm3,%xmm0
pcmpeqd %xmm1,%xmm0
psubd  %xmm0,%xmm3
psubd  %xmm2,%xmm3
movdqu %xmm3,0x64(%rsp)
mov    0x74(%rsp),%eax
mov    0x78(%rsp),%ecx
mov    %eax,%edx
and    $0x1,%edx
cmp    $0x1,%edx
adc    $0x0,%eax
add    $0x1,%eax
mov    %ecx,%edx
and    $0x1,%edx
cmp    $0x1,%edx
adc    $0x0,%ecx
mov    %eax,0x74(%rsp)
add    $0x1,%ecx
mov    %ecx,0x78(%rsp)
mov    0x7c(%rsp),%eax
mov    %eax,%ecx
and    $0x1,%ecx
cmp    $0x1,%ecx
adc    $0x0,%eax
add    $0x1,%eax
mov    %eax,0x7c(%rsp)
xor    %ebx,%ebx
jmp    12bb <t23+0x1ab>
nopl   0x0(%rax)
call   1030 <assert@plt>
cmp    $0x20,%rbx
je     12d3 <t23+0x1c3>
mov    %rbx,%rax
mov    %eax,%ecx
and    $0x1,%ecx
add    $0x1,%rbx
mov    %ebx,%edi
cmp    %ecx,(%rsp,%rax,4)
je     12b0 <t23+0x1a0>
lea    0x2(%rax),%edi
jmp    12b0 <t23+0x1a0>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @t23() {
%1 = alloca [32 x i32]
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %2
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %4
15: ; preds = %4
store i32 0, i32* %3
br label %16
16: ; preds = %39, %15
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 32
br i1 %18, label %19, label %42
19: ; preds = %16
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = srem i32 %23, 2
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %19
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = add nsw i32 %30, 1
store i32 %31, i32* %29
br label %38
32: ; preds = %19
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = add nsw i32 %36, 2
store i32 %37, i32* %35
br label %38
38: ; preds = %32, %26
br label %39
39: ; preds = %38
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %16
42: ; preds = %16
store i32 0, i32* %2
br label %43
43: ; preds = %65, %42
%44 = load i32, i32* %2
%45 = icmp slt i32 %44, 32
br i1 %45, label %46, label %68
46: ; preds = %43
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = load i32, i32* %2
%52 = srem i32 %51, 2
%53 = icmp ne i32 %52, 0
%54 = zext i1 %53 to i32
%55 = icmp eq i32 %50, %54
br i1 %55, label %56, label %59
56: ; preds = %46
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
br label %62
59: ; preds = %46
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 2
br label %62
62: ; preds = %59, %56
%63 = phi i32 [ %58, %56 ], [ %61, %59 ]
%64 = call i32 @assert(i32 %63)
br label %65
65: ; preds = %62
%66 = load i32, i32* %2
%67 = add nsw i32 %66, 1
store i32 %67, i32* %2
br label %43
68: ; preds = %43
ret void
}

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