#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];
  int B[N];
  for (i = 0; i < N; i++) {
    A[i] = i;
    B[i] = i + 5;
  }
#pragma scop
#pragma species kernel A[2 : N] | neighbourhood(0 : 1)->B[2 : N - 1] | element
  for (i = 2; i < N; i++) {
    B[i] = A[i] + A[i + 1];
  }
#pragma species endkernel example05
#pragma endscop
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ad <main+0x9d>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rdx
mov    %esi,(%rcx,%rdx,4)
mov    -0x8(%rbp),%edx
add    $0x5,%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <main+0x64>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f0 <main+0xe0>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x8(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
mov    -0x8(%rbp),%esi
add    $0x1,%esi
movslq %esi,%rsi
add    (%rcx,%rsi,4),%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b4 <main+0xa4>
mov    0x2de9(%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>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
pop    %rcx
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
%6 = alloca i64
store i32 0, i32* %1
store i32 256, i32* %3
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %4
%10 = alloca i32, i64 %8
store i64 %8, i64* %5
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = alloca i32, i64 %12
store i64 %12, i64* %6
store i32 0, i32* %2
br label %14
14: ; preds = %28, %0
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %10, i64 %21
store i32 %19, i32* %22
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 5
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %13, i64 %26
store i32 %24, i32* %27
br label %28
28: ; preds = %18
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %14
31: ; preds = %14
store i32 2, i32* %2
br label %32
32: ; preds = %50, %31
%33 = load i32, i32* %2
%34 = load i32, i32* %3
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %53
36: ; preds = %32
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %10, i64 %38
%40 = load i32, i32* %39
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %10, i64 %43
%45 = load i32, i32* %44
%46 = add nsw i32 %40, %45
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %13, i64 %48
store i32 %46, i32* %49
br label %50
50: ; preds = %36
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
br label %32
53: ; preds = %32
%54 = load i32, i32* @stdout
%55 = call i32 @fflush(i32 %54)
store i32 0, i32* %1
%56 = load i8*, i8** %4
%57 = load i32, i32* %1
ret i32 %57
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret i32 0
}