#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_computation2(float, int, int, int);
int kernel2() {
  float pedro = 3.14f;
  float *pedro_addr = &pedro;
  while (1) {
#pragma acr monitor(int temporary_array_bis[l][m][n], min)
#pragma acr grid(6)
#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(0, low)
#pragma acr strategy range(1, 2, medium)
#pragma acr strategy direct(3, high)
    for (int a = 0; a < 15; ++a)
      for (int l = 0; l < 10 - 5; ++l) {
        *pedro_addr += 3;
        for (int m = 0; m < 15 + 10; ++m) {
          for (int n = 0; n < 10 + 5 - 10; ++n) {
            lin_solve_computation2(pedro, l, m, n);
          }
        }
      }
  }
#pragma acr destroy
}


x86 assembly (clang, -O0):
<kernel2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    11df <kernel2+0xcf>
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    11cc <kernel2+0xbc>
mov    -0x10(%rbp),%rax
movss  0xea9(%rip),%xmm0
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x19,-0x1c(%rbp)
jge    11b9 <kernel2+0xa9>
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    11a6 <kernel2+0x96>
movss  -0x4(%rbp),%xmm0
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1030 <lin_solve_computation2@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117b <kernel2+0x6b>
jmp    11ab <kernel2+0x9b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116a <kernel2+0x5a>
jmp    11be <kernel2+0xae>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1145 <kernel2+0x35>
jmp    11d1 <kernel2+0xc1>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <kernel2+0x24>
jmp    112d <kernel2+0x1d>

x86 assembly (clang, -O2):
<kernel2>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addss  0xebc(%rip),%xmm0
xor    %ebp,%ebp
movss  %xmm0,0xc(%rsp)
movss  0xc(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
xor    %edx,%edx
call   1030 <lin_solve_computation2@plt>
movss  0xc(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <lin_solve_computation2@plt>
movss  0xc(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x2,%edx
call   1030 <lin_solve_computation2@plt>
movss  0xc(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x3,%edx
call   1030 <lin_solve_computation2@plt>
movss  0xc(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x4,%edx
call   1030 <lin_solve_computation2@plt>
movss  0xc(%rsp),%xmm0
add    $0x1,%ebp
cmp    $0x19,%ebp
jne    1150 <kernel2+0x40>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    1140 <kernel2+0x30>
add    $0x1,%r14d
cmp    $0xf,%r14d
jne    1130 <kernel2+0x20>
jmp    1120 <kernel2+0x10>

LLVM IR (-O0):
define i32 @kernel2() {
%1 = alloca float
%2 = alloca float*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float 0x40091EB860000000, float* %1
store float* %1, float** %2
br label %7
7: ; preds = %0, %47
store i32 0, i32* %3
br label %8
8: ; preds = %44, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 15
br i1 %10, label %11, label %47
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %40, %11
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 5
br i1 %14, label %15, label %43
15: ; preds = %12
%16 = load float*, float** %2
%17 = load float, float* %16
%18 = fadd float %17, 3.000000e+00
store float %18, float* %16
store i32 0, i32* %5
br label %19
19: ; preds = %36, %15
%20 = load i32, i32* %5
%21 = icmp slt i32 %20, 25
br i1 %21, label %22, label %39
22: ; preds = %19
store i32 0, i32* %6
br label %23
23: ; preds = %32, %22
%24 = load i32, i32* %6
%25 = icmp slt i32 %24, 5
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load float, float* %1
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = load i32, i32* %6
%31 = call i32 @lin_solve_computation2(float %27, i32 %28, i32 %29, i32 %30)
br label %32
32: ; preds = %26
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %23
35: ; preds = %23
br label %36
36: ; preds = %35
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %19
39: ; preds = %19
br label %40
40: ; preds = %39
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %12
43: ; preds = %12
br label %44
44: ; preds = %43
%45 = load i32, i32* %3
%46 = add nsw i32 %45, 1
store i32 %46, i32* %3
br label %8
47: ; preds = %8
br label %7
}

LLVM IR (-O2):
define i32 @kernel2() {
br label %1
1: ; preds = %6, %0
%2 = phi float [ 0x40091EB860000000, %0 ], [ %12, %6 ]
br label %3
3: ; preds = %1, %6
%4 = phi i32 [ 0, %1 ], [ %7, %6 ]
%5 = phi float [ %2, %1 ], [ %12, %6 ]
br label %9
6: ; preds = %22
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 15
br i1 %8, label %1, label %3
9: ; preds = %3, %22
%10 = phi i32 [ 0, %3 ], [ %23, %22 ]
%11 = phi float [ %5, %3 ], [ %12, %22 ]
%12 = fadd float %11, 3.000000e+00
br label %13
13: ; preds = %9, %13
%14 = phi i32 [ 0, %9 ], [ %20, %13 ]
%15 = tail call i32 @lin_solve_computation2(float %12, i32 %10, i32 %14, i32 0)
%16 = tail call i32 @lin_solve_computation2(float %12, i32 %10, i32 %14, i32 1)
%17 = tail call i32 @lin_solve_computation2(float %12, i32 %10, i32 %14, i32 2)
%18 = tail call i32 @lin_solve_computation2(float %12, i32 %10, i32 %14, i32 3)
%19 = tail call i32 @lin_solve_computation2(float %12, i32 %10, i32 %14, i32 4)
%20 = add nuw nsw i32 %14, 1
%21 = icmp eq i32 %20, 25
br i1 %21, label %22, label %13
22: ; preds = %13
%23 = add nuw nsw i32 %10, 1
%24 = icmp eq i32 %23, 5
br i1 %24, label %6, label %9
}