#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*/ lin_solve_computation(int, int, int);
int kernel1() {
  int i, j, k;
  while (1) {
#pragma acr grid(5)
#pragma acr monitor(temporary_array[l][m], max)
#pragma acr alternative low(parameter, N = 1)
#pragma acr alternative medium(parameter, N = 2)
#pragma acr alternative high(parameter, N = 3)
#pragma acr strategy direct(1, low)
#pragma acr strategy direct(2, medium)
#pragma acr strategy direct(3, high)
#pragma scop
    for (k = 0; k <= 15; ++k)
      for (i = 0; i <= 150; ++i)
        for (j = 0; j <= 150; ++j)
          lin_solve_computation(k, i, j);
#pragma endscop
  }
#pragma acr destroy
}


x86 assembly (clang, -O0):
<kernel1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
cmpl   $0xf,-0xc(%rbp)
jg     1193 <kernel1+0x83>
movl   $0x0,-0x4(%rbp)
cmpl   $0x96,-0x4(%rbp)
jg     1180 <kernel1+0x70>
movl   $0x0,-0x8(%rbp)
cmpl   $0x96,-0x8(%rbp)
jg     116d <kernel1+0x5d>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <lin_solve_computation@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <kernel1+0x34>
jmp    1172 <kernel1+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <kernel1+0x20>
jmp    1185 <kernel1+0x75>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <kernel1+0xf>
jmp    1118 <kernel1+0x8>

x86 assembly (clang, -O2):
<kernel1>:
push   %rbp
push   %r14
push   %rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <lin_solve_computation@plt>
add    $0x1,%ebx
cmp    $0x97,%ebx
jne    1150 <kernel1+0x40>
add    $0x1,%ebp
cmp    $0x97,%ebp
jne    1140 <kernel1+0x30>
add    $0x1,%r14d
cmp    $0x10,%r14d
jne    1130 <kernel1+0x20>
jmp    1120 <kernel1+0x10>

LLVM IR (-O0):
define i32 @kernel1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
br label %4
4: ; preds = %0, %32
store i32 0, i32* %3
br label %5
5: ; preds = %29, %4
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 15
br i1 %7, label %8, label %32
8: ; preds = %5
store i32 0, i32* %1
br label %9
9: ; preds = %25, %8
%10 = load i32, i32* %1
%11 = icmp sle i32 %10, 150
br i1 %11, label %12, label %28
12: ; preds = %9
store i32 0, i32* %2
br label %13
13: ; preds = %21, %12
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 150
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %3
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = call i32 @lin_solve_computation(i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %16
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %13
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* %1
%27 = add nsw i32 %26, 1
store i32 %27, i32* %1
br label %9
28: ; preds = %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %5
32: ; preds = %5
br label %4
}

LLVM IR (-O2):
define i32 @kernel1() {
br label %1
1: ; preds = %14, %0
br label %2
2: ; preds = %1, %14
%3 = phi i32 [ 0, %1 ], [ %15, %14 ]
br label %4
4: ; preds = %2, %11
%5 = phi i32 [ 0, %2 ], [ %12, %11 ]
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ 0, %4 ], [ %9, %6 ]
%8 = tail call i32 @lin_solve_computation(i32 %3, i32 %5, i32 %7)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 151
br i1 %10, label %11, label %6
11: ; preds = %6
%12 = add nuw nsw i32 %5, 1
%13 = icmp eq i32 %12, 151
br i1 %13, label %14, label %4
14: ; preds = %11
%15 = add nuw nsw i32 %3, 1
%16 = icmp eq i32 %15, 16
br i1 %16, label %1, label %2
}