#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 A[100][16];
  int B[100][16];
  for (i = 0; i < 100; i++) {
    for (j = 0; j < 16; j++) {
      A[i][j] = i + j;
    }
  }
#pragma scop
#pragma species kernel A[0 : 99, 0 : 15] | element->B[0 : 99, 0 : 15] | element
  for (i = 0; i < 100; i++) {
    for (j = 0; j < 16; j++) {
      B[i][j] = 2 * A[i][j];
    }
  }
#pragma species endkernel example1
#pragma endscop
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3210,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1184 <main+0x74>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1171 <main+0x61>
mov    -0x8(%rbp),%edx
add    -0xc(%rbp),%edx
movslq -0x8(%rbp),%rcx
lea    -0x1910(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
jmp    1176 <main+0x66>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11fc <main+0xec>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    11e9 <main+0xd9>
movslq -0x8(%rbp),%rcx
lea    -0x1910(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
shl    $0x1,%edx
movslq -0x8(%rbp),%rcx
lea    -0x3210(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    119c <main+0x8c>
jmp    11ee <main+0xde>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118b <main+0x7b>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
add    $0x3210,%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 [100 x [16 x i32]]
%5 = alloca [100 x [16 x i32]]
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %27, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 100
br i1 %8, label %9, label %30
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %23, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 16
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x [16 x i32]], [100 x [16 x i32]]* %4, i64 0, i64 %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [16 x i32], [16 x i32]* %19, i64 0, i64 %21
store i32 %16, i32* %22
br label %23
23: ; preds = %13
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %10
26: ; preds = %10
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
br label %6
30: ; preds = %6
store i32 0, i32* %2
br label %31
31: ; preds = %57, %30
%32 = load i32, i32* %2
%33 = icmp slt i32 %32, 100
br i1 %33, label %34, label %60
34: ; preds = %31
store i32 0, i32* %3
br label %35
35: ; preds = %53, %34
%36 = load i32, i32* %3
%37 = icmp slt i32 %36, 16
br i1 %37, label %38, label %56
38: ; preds = %35
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [100 x [16 x i32]], [100 x [16 x i32]]* %4, i64 0, i64 %40
%42 = load i32, i32* %3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [16 x i32], [16 x i32]* %41, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = mul nsw i32 2, %45
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [100 x [16 x i32]], [100 x [16 x i32]]* %5, i64 0, i64 %48
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [16 x i32], [16 x i32]* %49, i64 0, i64 %51
store i32 %46, i32* %52
br label %53
53: ; preds = %38
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %35
56: ; preds = %35
br label %57
57: ; preds = %56
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
br label %31
60: ; preds = %31
%61 = load i32, i32* @stdout
%62 = call i32 @fflush(i32 %61)
ret i32 0
}

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
}