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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20010,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    11a7 <main+0x97>
movl   $0x0,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    1194 <main+0x84>
mov    -0x8(%rbp),%edx
add    -0xc(%rbp),%edx
movslq -0x8(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x9,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x8(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x9,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movl   $0x3e7,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x2d>
jmp    1199 <main+0x89>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1224 <main+0x114>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    1211 <main+0x101>
movslq -0x8(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x9,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
shl    $0x1,%edx
movslq -0x8(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x9,%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    11c1 <main+0xb1>
jmp    1216 <main+0x106>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ae <main+0x9e>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
add    $0x20010,%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 [128 x [128 x i32]]
%5 = alloca [128 x [128 x i32]]
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %33, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 128
br i1 %8, label %9, label %36
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %29, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 128
br i1 %12, label %13, label %32
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 [128 x [128 x i32]], [128 x [128 x i32]]* %4, i64 0, i64 %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [128 x i32], [128 x i32]* %19, i64 0, i64 %21
store i32 %16, i32* %22
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [128 x [128 x i32]], [128 x [128 x i32]]* %5, i64 0, i64 %24
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [128 x i32], [128 x i32]* %25, i64 0, i64 %27
store i32 999, i32* %28
br label %29
29: ; preds = %13
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %10
32: ; preds = %10
br label %33
33: ; preds = %32
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
store i32 %35, i32* %2
br label %6
36: ; preds = %6
store i32 0, i32* %2
br label %37
37: ; preds = %64, %36
%38 = load i32, i32* %2
%39 = icmp slt i32 %38, 128
br i1 %39, label %40, label %67
40: ; preds = %37
%41 = load i32, i32* %2
store i32 %41, i32* %3
br label %42
42: ; preds = %60, %40
%43 = load i32, i32* %3
%44 = icmp slt i32 %43, 128
br i1 %44, label %45, label %63
45: ; preds = %42
%46 = load i32, i32* %2
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [128 x [128 x i32]], [128 x [128 x i32]]* %4, i64 0, i64 %47
%49 = load i32, i32* %3
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [128 x i32], [128 x i32]* %48, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = mul nsw i32 2, %52
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [128 x [128 x i32]], [128 x [128 x i32]]* %5, i64 0, i64 %55
%57 = load i32, i32* %3
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [128 x i32], [128 x i32]* %56, i64 0, i64 %58
store i32 %53, i32* %59
br label %60
60: ; preds = %45
%61 = load i32, i32* %3
%62 = add nsw i32 %61, 1
store i32 %62, i32* %3
br label %42
63: ; preds = %42
br label %64
64: ; preds = %63
%65 = load i32, i32* %2
%66 = add nsw i32 %65, 1
store i32 %66, i32* %2
br label %37
67: ; preds = %37
%68 = load i32, i32* @stdout
%69 = call i32 @fflush(i32 %68)
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
}