#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, j;
  int N = 256;
  int temp;
  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 - 1] | chunk(0 : 1)->B[2 : N - 1] | chunk(0 : 1)
  for (i = 2; i < N - 1; i = i + 2) {
    temp = 0;
    for (j = 0; j < 2; j++) {
      temp += A[i + j];
    }
    B[i] = temp;
    B[i + 1] = temp;
  }
#pragma species endkernel example07
#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,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11ad <main+0x9d>
mov    -0x38(%rbp),%rax
mov    -0x40(%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
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    122c <main+0x11c>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1201 <main+0xf1>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d3 <main+0xc3>
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    11b4 <main+0xa4>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%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 i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %1
store i32 256, i32* %4
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %6
%12 = alloca i32, i64 %10
store i64 %10, i64* %7
%13 = load i32, i32* %4
%14 = zext i32 %13 to i64
%15 = alloca i32, i64 %14
store i64 %14, i64* %8
store i32 0, i32* %2
br label %16
16: ; preds = %30, %0
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %33
20: ; preds = %16
%21 = load i32, i32* %2
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %12, i64 %23
store i32 %21, i32* %24
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 5
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %15, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %20
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %16
33: ; preds = %16
store i32 2, i32* %2
br label %34
34: ; preds = %65, %33
%35 = load i32, i32* %2
%36 = load i32, i32* %4
%37 = sub nsw i32 %36, 1
%38 = icmp slt i32 %35, %37
br i1 %38, label %39, label %68
39: ; preds = %34
store i32 0, i32* %5
store i32 0, i32* %3
br label %40
40: ; preds = %52, %39
%41 = load i32, i32* %3
%42 = icmp slt i32 %41, 2
br i1 %42, label %43, label %55
43: ; preds = %40
%44 = load i32, i32* %2
%45 = load i32, i32* %3
%46 = add nsw i32 %44, %45
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %12, i64 %47
%49 = load i32, i32* %48
%50 = load i32, i32* %5
%51 = add nsw i32 %50, %49
store i32 %51, i32* %5
br label %52
52: ; preds = %43
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %40
55: ; preds = %40
%56 = load i32, i32* %5
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %15, i64 %58
store i32 %56, i32* %59
%60 = load i32, i32* %5
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %15, i64 %63
store i32 %60, i32* %64
br label %65
65: ; preds = %55
%66 = load i32, i32* %2
%67 = add nsw i32 %66, 2
store i32 %67, i32* %2
br label %34
68: ; preds = %34
%69 = load i32, i32* @stdout
%70 = call i32 @fflush(i32 %69)
store i32 0, i32* %1
%71 = load i8*, i8** %6
%72 = load i32, i32* %1
ret i32 %72
}

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
}