#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(void) {
  int i;
  int N = 256;
  int A[N];
  for (i = 0; i < N; i++) {
    A[i] = i;
  }
#pragma scop
  {
#pragma species kernel A[1 : 8 * N - 7] | element->A[6 : 2 * N + 4] | element
    for (i = 0; i < N; i++) {
      A[2 * i + 6] = A[8 * i + 1];
    }
#pragma species endkernel example01_k1
  }
#pragma endscop
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x100,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117c <main+0x6c>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x44>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11bf <main+0xaf>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1183 <main+0x73>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x408,%rsp
movdqa 0xee1(%rip),%xmm0
xor    %eax,%eax
movdqa 0xee6(%rip),%xmm8
movdqa 0xeed(%rip),%xmm9
movdqa 0xef4(%rip),%xmm10
movdqa 0xefc(%rip),%xmm4
movdqa 0xf04(%rip),%xmm5
movdqa 0xf0c(%rip),%xmm6
movdqa 0xf14(%rip),%xmm7
movdqa 0xf1c(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqa %xmm0,(%rsp,%rax,4)
movdqa %xmm2,0x10(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqa %xmm2,0x20(%rsp,%rax,4)
movdqa %xmm3,0x30(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqa %xmm2,0x40(%rsp,%rax,4)
movdqa %xmm3,0x50(%rsp,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqa %xmm2,0x60(%rsp,%rax,4)
movdqa %xmm3,0x70(%rsp,%rax,4)
add    $0x20,%rax
paddd  %xmm1,%xmm0
cmp    $0x100,%rax
jne    1170 <main+0x60>
xor    %eax,%eax
nopl   0x0(%rax)
mov    0x4(%rsp,%rax,4),%ecx
mov    %ecx,0x18(%rsp,%rax,1)
mov    0x24(%rsp,%rax,4),%ecx
mov    %ecx,0x20(%rsp,%rax,1)
add    $0x10,%rax
cmp    $0x800,%rax
jne    11f0 <main+0xe0>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
add    $0x408,%rsp
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 0, i32* %1
store i32 256, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %4
%9 = alloca i32, i64 %7
store i64 %7, i64* %5
store i32 0, i32* %2
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %9, i64 %17
store i32 %15, i32* %18
br label %19
19: ; preds = %14
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %10
22: ; preds = %10
store i32 0, i32* %2
br label %23
23: ; preds = %39, %22
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %42
27: ; preds = %23
%28 = load i32, i32* %2
%29 = mul nsw i32 8, %28
%30 = add nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %9, i64 %31
%33 = load i32, i32* %32
%34 = load i32, i32* %2
%35 = mul nsw i32 2, %34
%36 = add nsw i32 %35, 6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %9, i64 %37
store i32 %33, i32* %38
br label %39
39: ; preds = %27
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
br label %23
42: ; preds = %23
%43 = load i32, i32* @stdout
%44 = call i32 @fflush(i32 %43)
store i32 0, i32* %1
%45 = load i8*, i8** %4
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = alloca [256 x i32]
br label %2
2: ; preds = %2, %0
%3 = phi i64 [ 0, %0 ], [ %31, %2 ]
%4 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %32, %2 ]
%5 = add <4 x i32> %4, <i32 4, i32 4, i32 4, i32 4>
%6 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %3
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %6, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %9
%10 = or i64 %3, 8
%11 = add <4 x i32> %4, <i32 8, i32 8, i32 8, i32 8>
%12 = add <4 x i32> %4, <i32 12, i32 12, i32 12, i32 12>
%13 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %10
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %14
%15 = getelementptr inbounds i32, i32* %13, i64 4
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %16
%17 = or i64 %3, 16
%18 = add <4 x i32> %4, <i32 16, i32 16, i32 16, i32 16>
%19 = add <4 x i32> %4, <i32 20, i32 20, i32 20, i32 20>
%20 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %17
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %21
%22 = getelementptr inbounds i32, i32* %20, i64 4
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %23
%24 = or i64 %3, 24
%25 = add <4 x i32> %4, <i32 24, i32 24, i32 24, i32 24>
%26 = add <4 x i32> %4, <i32 28, i32 28, i32 28, i32 28>
%27 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %24
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> %25, <4 x i32>* %28
%29 = getelementptr inbounds i32, i32* %27, i64 4
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> %26, <4 x i32>* %30
%31 = add nuw nsw i64 %3, 32
%32 = add <4 x i32> %4, <i32 32, i32 32, i32 32, i32 32>
%33 = icmp eq i64 %31, 256
br i1 %33, label %34, label %2
34: ; preds = %2, %34
%35 = phi i64 [ %51, %34 ], [ 0, %2 ]
%36 = shl nuw nsw i64 %35, 3
%37 = or i64 %36, 1
%38 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = shl nuw nsw i64 %35, 1
%41 = add nuw nsw i64 %40, 6
%42 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %41
store i32 %39, i32* %42
%43 = or i64 %35, 1
%44 = shl nuw nsw i64 %43, 3
%45 = or i64 %44, 1
%46 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = shl nuw nsw i64 %43, 1
%49 = add nuw nsw i64 %48, 6
%50 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %49
store i32 %47, i32* %50
%51 = add nuw nsw i64 %35, 2
%52 = icmp eq i64 %51, 256
br i1 %52, label %53, label %34
53: ; preds = %34
%54 = load i32, i32* @stdout
%55 = tail call i32 @fflush(i32 %54)
ret i32 0
}