#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 */
typedef int j;

/* Variables and functions */
int ceil(double);
int /*<<< orphan*/ laxf_scheme_2d(double *, double **, double **, double **,
                                  double **, int, int, double, double, double);
int /*<<< orphan*/ omp_set_num_threads(int);
void solver(double *Q, double **ffx, double **ffy, double **nFx, double **nFy,
            int m, int n, double tend, double dx, double dy, double dt) {
  double bc_mask[3] = {1.0, -1.0, -1.0};
  double time;
  int i, j, k, steps;
  steps = ceil(tend / dt);
  time = 0.0;
  for (i = 0; i < steps; i++) {
    {
      for (j = 1; j < n - 1; j++) {
        for (k = 0; k < 3; k++) {
          Q[((j) + n * ((0) + m * (k)))] =
              bc_mask[k] * Q[((j) + n * ((1) + m * (k)))];
          Q[((j) + n * ((m - 1) + m * (k)))] =
              bc_mask[k] * Q[((j) + n * ((m - 2) + m * (k)))];
        }
      }
      for (j = 0; j < m; j++) {
        for (k = 0; k < 3; k++) {
          Q[((0) + n * ((j) + m * (k)))] =
              bc_mask[k] * Q[((1) + n * ((j) + m * (k)))];
          Q[((n - 1) + n * ((j) + m * (k)))] =
              bc_mask[k] * Q[((n - 2) + n * ((j) + m * (k)))];
        }
      }
    }
    omp_set_num_threads(8);
#pragma omp parallel
    { laxf_scheme_2d(Q, ffx, ffy, nFx, nFy, m, n, dx, dy, dt); }
    time += dt;
  }
}


x86 assembly (clang, -O0):
<solver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
movsd  %xmm3,-0x50(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x88(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x88(%rbp),%eax
jge    1426 <solver+0x2f6>
movl   $0x1,-0x80(%rbp)
mov    -0x80(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12c8 <solver+0x198>
movl   $0x0,-0x84(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    12b5 <solver+0x185>
movslq -0x84(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    0x10(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   -0x84(%rbp),%esi
add    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    0x10(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   -0x84(%rbp),%esi
add    $0x0,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x84(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    0x10(%rbp),%edx
mov    -0x2c(%rbp),%esi
sub    $0x2,%esi
mov    -0x2c(%rbp),%edi
imul   -0x84(%rbp),%edi
add    %edi,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    0x10(%rbp),%edx
mov    -0x2c(%rbp),%esi
sub    $0x1,%esi
mov    -0x2c(%rbp),%edi
imul   -0x84(%rbp),%edi
add    %edi,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11e0 <solver+0xb0>
jmp    12ba <solver+0x18a>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    11c5 <solver+0x95>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13cd <solver+0x29d>
movl   $0x0,-0x84(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    13ba <solver+0x28a>
movslq -0x84(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x10(%rbp),%ecx
mov    -0x80(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   -0x84(%rbp),%esi
add    %esi,%edx
imul   %edx,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x10(%rbp),%ecx
mov    -0x80(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   -0x84(%rbp),%esi
add    %esi,%edx
imul   %edx,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x84(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x10(%rbp),%ecx
sub    $0x2,%ecx
mov    0x10(%rbp),%edx
mov    -0x80(%rbp),%esi
mov    -0x2c(%rbp),%edi
imul   -0x84(%rbp),%edi
add    %edi,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    0x10(%rbp),%edx
mov    -0x80(%rbp),%esi
mov    -0x2c(%rbp),%edi
imul   -0x84(%rbp),%edi
add    %edi,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12e5 <solver+0x1b5>
jmp    13bf <solver+0x28f>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    12cf <solver+0x19f>
mov    $0x8,%edi
call   1050 <omp_set_num_threads@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%eax
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
mov    %eax,(%rsp)
call   1040 <laxf_scheme_2d@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11af <solver+0x7f>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solver>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
movsd  %xmm2,0xf0(%rsp)
movsd  %xmm1,0xe8(%rsp)
mov    %r9d,0xc(%rsp)
mov    %r8,0xe0(%rsp)
mov    %rcx,0xd8(%rsp)
mov    %rdx,0xd0(%rsp)
mov    %rsi,0xc8(%rsp)
mov    %rdi,0x10(%rsp)
movsd  %xmm3,0xf8(%rsp)
divsd  %xmm3,%xmm0
call   1030 <ceil@plt>
mov    %eax,0x24(%rsp)
test   %eax,%eax
jle    1535 <solver+0x405>
mov    0x140(%rsp),%r9d
lea    -0x1(%r9),%r14d
movslq 0xc(%rsp),%r15
movslq %r9d,%rax
movslq %r14d,%r12
lea    -0x2(%r15),%edx
imul   %r9d,%edx
movslq %edx,%r13
lea    -0x1(%r15),%esi
imul   %r9d,%esi
movslq %esi,%rcx
mov    %rcx,0x18(%rsp)
lea    0x1(%r15),%r11
imul   %rax,%r11
lea    (%r15,%r15,1),%ebp
add    $0xfffffffe,%ebp
lea    -0x1(%r15,%r15,1),%ebx
lea    (%r15,%r15,1),%rdx
lea    0x1(%r15,%r15,1),%r8
lea    -0x2(%rdx,%r15,1),%ecx
lea    (%rdx,%r15,1),%edi
add    $0xffffffff,%edi
mov    %r15d,%esi
mov    %rsi,0xc0(%rsp)
imul   %rax,%r15
imul   %r9d,%ebp
movslq %ebp,%rsi
imul   %r9d,%ebx
movslq %ebx,%rbx
imul   %rax,%r8
imul   %rax,%rdx
imul   %r9d,%ecx
movslq %ecx,%rcx
imul   %r9d,%edi
movslq %edi,%rdi
mov    0x10(%rsp),%rbp
lea    0x8(,%rdi,8),%rdi
add    %rbp,%rdi
lea    0x8(%rbp,%rcx,8),%r10
lea    0x8(%rbp,%rbx,8),%rcx
mov    %r9,%rbx
mov    %rcx,0xa8(%rsp)
lea    0x8(%rbp,%rsi,8),%rcx
mov    %rcx,0xa0(%rsp)
lea    0x8(%rbp,%rdx,8),%rcx
mov    %rcx,0x98(%rsp)
lea    0x8(%rbp,%r11,8),%rdx
lea    0x8(%rbp,%r8,8),%r8
mov    0x18(%rsp),%rcx
lea    0x8(%rbp,%rcx,8),%rsi
lea    0x8(%rbp,%r13,8),%rcx
mov    %rcx,0x88(%rsp)
lea    -0x8(,%r14,8),%rcx
ff
mov    %rcx,0x80(%rsp)
mov    %r15,%r14
shl    $0x4,%r14
lea    (%r15,%r12,1),%r13
lea    (%r14,%r12,8),%rcx
mov    %rcx,0x70(%rsp)
shl    $0x3,%r12
mov    %r12,0x18(%rsp)
lea    0x8(,%rax,8),%rcx
add    %rbp,%rcx
mov    %rcx,0x68(%rsp)
lea    0x0(,%rax,8),%r12
lea    -0x2(%r15,%rax,1),%rcx
mov    %rcx,0x58(%rsp)
lea    -0x10(,%rax,8),%rcx
ff
mov    %rcx,0x50(%rsp)
lea    -0x10(%r14,%rax,8),%rax
mov    %rax,0x40(%rsp)
movapd 0xd09(%rip),%xmm1
lea    0x8(,%r15,8),%rax
add    %rbp,%rax
mov    %rax,0x30(%rsp)
xor    %eax,%eax
mov    %rdi,0xb8(%rsp)
mov    %r10,0xb0(%rsp)
mov    %rsi,0x90(%rsp)
mov    %r13,0x78(%rsp)
mov    %r12,0x60(%rsp)
mov    %r8,0x48(%rsp)
mov    %rdx,0x38(%rsp)
mov    %r15,0x28(%rsp)
jmp    13e0 <solver+0x2b0>
nop
mov    $0x8,%edi
call   1050 <omp_set_num_threads@plt>
mov    0x140(%rsp),%eax
mov    %rax,%rbx
mov    %ebx,(%rsp)
mov    0x10(%rsp),%rdi
mov    0xc8(%rsp),%rsi
mov    0xd0(%rsp),%rdx
mov    0xd8(%rsp),%rcx
mov    0xe0(%rsp),%r8
mov    0xc(%rsp),%r9d
movsd  0xe8(%rsp),%xmm0
movsd  0xf0(%rsp),%xmm1
movsd  0xf8(%rsp),%xmm2
call   1040 <laxf_scheme_2d@plt>
movapd 0xc57(%rip),%xmm1
mov    0x100(%rsp),%rax
add    $0x1,%eax
cmp    0x24(%rsp),%eax
mov    0xb8(%rsp),%rdi
mov    0xb0(%rsp),%r10
mov    0x38(%rsp),%rdx
mov    0x48(%rsp),%r8
mov    0x90(%rsp),%rsi
je     1535 <solver+0x405>
mov    %rax,0x100(%rsp)
cmp    $0x3,%ebx
mov    0x10(%rsp),%rcx
mov    0xa8(%rsp),%rbp
mov    0xa0(%rsp),%rbx
mov    0x98(%rsp),%r15
mov    0x88(%rsp),%r11
mov    0x80(%rsp),%r13
mov    0x68(%rsp),%r12
mov    0x30(%rsp),%r9
jl     148d <solver+0x35d>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  (%r12,%rax,1),%xmm0
movsd  %xmm0,0x8(%rcx,%rax,1)
movsd  (%r11,%rax,1),%xmm0
movsd  %xmm0,(%rsi,%rax,1)
movsd  (%rdx,%rax,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%r9,%rax,1)
movsd  (%rbx,%rax,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,0x0(%rbp,%rax,1)
movsd  (%r8,%rax,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%r15,%rax,1)
movsd  (%r10,%rax,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%rdi,%rax,1)
add    $0x8,%rax
cmp    %rax,%r13
jne    1430 <solver+0x300>
mov    0xc0(%rsp),%rax
cmpl   $0x0,0xc(%rsp)
mov    0x78(%rsp),%r13
mov    0x70(%rsp),%rdx
mov    0x60(%rsp),%r12
mov    0x58(%rsp),%rdi
mov    0x50(%rsp),%rbp
mov    0x40(%rsp),%rbx
mov    0x28(%rsp),%r15
jle    1340 <solver+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,(%rcx)
movsd  (%rcx,%rbp,1),%xmm0
mov    0x18(%rsp),%rsi
movsd  %xmm0,(%rcx,%rsi,1)
movsd  0x8(%rcx,%r15,8),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%rcx,%r15,8)
movsd  (%rcx,%rdi,8),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%rcx,%r13,8)
movsd  0x8(%rcx,%r14,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%rcx,%r14,1)
movsd  (%rcx,%rbx,1),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,(%rcx,%rdx,1)
add    %r12,%rcx
add    $0xffffffffffffffff,%rax
jne    14d0 <solver+0x3a0>
jmp    1340 <solver+0x210>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.solver.bc_mask = [3 x double] [double 1.000000e+00, double -1.000000e+00, double -1.000000e+00]
define void @solver(double* %0, double** %1, double** %2, double** %3, double** %4, i32 %5, i32 %6, double %7, double %8, double %9, double %10) {
%12 = alloca double*
%13 = alloca double**
%14 = alloca double**
%15 = alloca double**
%16 = alloca double**
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca [3 x double]
%24 = alloca double
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
store double* %0, double** %12
store double** %1, double*** %13
store double** %2, double*** %14
store double** %3, double*** %15
store double** %4, double*** %16
store i32 %5, i32* %17
store i32 %6, i32* %18
store double %7, double* %19
store double %8, double* %20
store double %9, double* %21
store double %10, double* %22
%29 = bitcast [3 x double]* %23 to i8*
%30 = load double, double* %19
%31 = load double, double* %22
%32 = fdiv double %30, %31
%33 = call i32 @ceil(double %32)
store i32 %33, i32* %28
store double 0.000000e+00, double* %24
store i32 0, i32* %25
br label %34
34: ; preds = %209, %11
%35 = load i32, i32* %25
%36 = load i32, i32* %28
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %212
38: ; preds = %34
store i32 1, i32* %26
br label %39
39: ; preds = %113, %38
%40 = load i32, i32* %26
%41 = load i32, i32* %18
%42 = sub nsw i32 %41, 1
%43 = icmp slt i32 %40, %42
br i1 %43, label %44, label %116
44: ; preds = %39
store i32 0, i32* %27
br label %45
45: ; preds = %109, %44
%46 = load i32, i32* %27
%47 = icmp slt i32 %46, 3
br i1 %47, label %48, label %112
48: ; preds = %45
%49 = load i32, i32* %27
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 %50
%52 = load double, double* %51
%53 = load double*, double** %12
%54 = load i32, i32* %26
%55 = load i32, i32* %18
%56 = load i32, i32* %17
%57 = load i32, i32* %27
%58 = mul nsw i32 %56, %57
%59 = add nsw i32 1, %58
%60 = mul nsw i32 %55, %59
%61 = add nsw i32 %54, %60
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %53, i64 %62
%64 = load double, double* %63
%65 = fmul double %52, %64
%66 = load double*, double** %12
%67 = load i32, i32* %26
%68 = load i32, i32* %18
%69 = load i32, i32* %17
%70 = load i32, i32* %27
%71 = mul nsw i32 %69, %70
%72 = add nsw i32 0, %71
%73 = mul nsw i32 %68, %72
%74 = add nsw i32 %67, %73
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %66, i64 %75
store double %65, double* %76
%77 = load i32, i32* %27
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 %78
%80 = load double, double* %79
%81 = load double*, double** %12
%82 = load i32, i32* %26
%83 = load i32, i32* %18
%84 = load i32, i32* %17
%85 = sub nsw i32 %84, 2
%86 = load i32, i32* %17
%87 = load i32, i32* %27
%88 = mul nsw i32 %86, %87
%89 = add nsw i32 %85, %88
%90 = mul nsw i32 %83, %89
%91 = add nsw i32 %82, %90
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %81, i64 %92
%94 = load double, double* %93
%95 = fmul double %80, %94
%96 = load double*, double** %12
%97 = load i32, i32* %26
%98 = load i32, i32* %18
%99 = load i32, i32* %17
%100 = sub nsw i32 %99, 1
%101 = load i32, i32* %17
%102 = load i32, i32* %27
%103 = mul nsw i32 %101, %102
%104 = add nsw i32 %100, %103
%105 = mul nsw i32 %98, %104
%106 = add nsw i32 %97, %105
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %96, i64 %107
store double %95, double* %108
br label %109
109: ; preds = %48
%110 = load i32, i32* %27
%111 = add nsw i32 %110, 1
store i32 %111, i32* %27
br label %45
112: ; preds = %45
br label %113
113: ; preds = %112
%114 = load i32, i32* %26
%115 = add nsw i32 %114, 1
store i32 %115, i32* %26
br label %39
116: ; preds = %39
store i32 0, i32* %26
br label %117
117: ; preds = %190, %116
%118 = load i32, i32* %26
%119 = load i32, i32* %17
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %193
121: ; preds = %117
store i32 0, i32* %27
br label %122
122: ; preds = %186, %121
%123 = load i32, i32* %27
%124 = icmp slt i32 %123, 3
br i1 %124, label %125, label %189
125: ; preds = %122
%126 = load i32, i32* %27
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 %127
%129 = load double, double* %128
%130 = load double*, double** %12
%131 = load i32, i32* %18
%132 = load i32, i32* %26
%133 = load i32, i32* %17
%134 = load i32, i32* %27
%135 = mul nsw i32 %133, %134
%136 = add nsw i32 %132, %135
%137 = mul nsw i32 %131, %136
%138 = add nsw i32 1, %137
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %130, i64 %139
%141 = load double, double* %140
%142 = fmul double %129, %141
%143 = load double*, double** %12
%144 = load i32, i32* %18
%145 = load i32, i32* %26
%146 = load i32, i32* %17
%147 = load i32, i32* %27
%148 = mul nsw i32 %146, %147
%149 = add nsw i32 %145, %148
%150 = mul nsw i32 %144, %149
%151 = add nsw i32 0, %150
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %143, i64 %152
store double %142, double* %153
%154 = load i32, i32* %27
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 %155
%157 = load double, double* %156
%158 = load double*, double** %12
%159 = load i32, i32* %18
%160 = sub nsw i32 %159, 2
%161 = load i32, i32* %18
%162 = load i32, i32* %26
%163 = load i32, i32* %17
%164 = load i32, i32* %27
%165 = mul nsw i32 %163, %164
%166 = add nsw i32 %162, %165
%167 = mul nsw i32 %161, %166
%168 = add nsw i32 %160, %167
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %158, i64 %169
%171 = load double, double* %170
%172 = fmul double %157, %171
%173 = load double*, double** %12
%174 = load i32, i32* %18
%175 = sub nsw i32 %174, 1
%176 = load i32, i32* %18
%177 = load i32, i32* %26
%178 = load i32, i32* %17
%179 = load i32, i32* %27
%180 = mul nsw i32 %178, %179
%181 = add nsw i32 %177, %180
%182 = mul nsw i32 %176, %181
%183 = add nsw i32 %175, %182
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %173, i64 %184
store double %172, double* %185
br label %186
186: ; preds = %125
%187 = load i32, i32* %27
%188 = add nsw i32 %187, 1
store i32 %188, i32* %27
br label %122
189: ; preds = %122
br label %190
190: ; preds = %189
%191 = load i32, i32* %26
%192 = add nsw i32 %191, 1
store i32 %192, i32* %26
br label %117
193: ; preds = %117
%194 = call i32 @omp_set_num_threads(i32 8)
%195 = load double*, double** %12
%196 = load double**, double*** %13
%197 = load double**, double*** %14
%198 = load double**, double*** %15
%199 = load double**, double*** %16
%200 = load i32, i32* %17
%201 = load i32, i32* %18
%202 = load double, double* %20
%203 = load double, double* %21
%204 = load double, double* %22
%205 = call i32 @laxf_scheme_2d(double* %195, double** %196, double** %197, double** %198, double** %199, i32 %200, i32 %201, double %202, double %203, double %204)
%206 = load double, double* %22
%207 = load double, double* %24
%208 = fadd double %207, %206
store double %208, double* %24
br label %209
209: ; preds = %193
%210 = load i32, i32* %25
%211 = add nsw i32 %210, 1
store i32 %211, i32* %25
br label %34
212: ; preds = %34
ret void
}

LLVM IR (-O2):
define void @solver(double* %0, double** %1, double** %2, double** %3, double** %4, i32 %5, i32 %6, double %7, double %8, double %9, double %10) {
%12 = fdiv double %7, %10
%13 = tail call i32 @ceil(double %12)
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %140
15: ; preds = %11
%16 = add i32 %6, -1
%17 = icmp sgt i32 %6, 2
%18 = icmp sgt i32 %5, 0
%19 = add nsw i32 %6, -2
%20 = sext i32 %5 to i64
%21 = sext i32 %6 to i64
%22 = sext i32 %19 to i64
%23 = sext i32 %16 to i64
%24 = zext i32 %16 to i64
%25 = add i32 %5, -2
%26 = mul nsw i32 %25, %6
%27 = sext i32 %26 to i64
%28 = add i32 %5, -1
%29 = mul nsw i32 %28, %6
%30 = sext i32 %29 to i64
%31 = add nsw i64 %20, 1
%32 = mul nsw i64 %31, %21
%33 = mul nsw i64 %20, %21
%34 = shl i32 %5, 1
%35 = add i32 %34, -2
%36 = mul nsw i32 %35, %6
%37 = sext i32 %36 to i64
%38 = add i32 %34, -1
%39 = mul nsw i32 %38, %6
%40 = sext i32 %39 to i64
%41 = shl nsw i64 %20, 1
%42 = or i64 %41, 1
%43 = mul nsw i64 %42, %21
%44 = mul nsw i64 %41, %21
%45 = trunc i64 %41 to i32
%46 = add i32 %45, %5
%47 = add i32 %46, -2
%48 = mul nsw i32 %47, %6
%49 = sext i32 %48 to i64
%50 = add i32 %46, -1
%51 = mul nsw i32 %50, %6
%52 = sext i32 %51 to i64
%53 = zext i32 %5 to i64
%54 = shl nsw i64 %20, 1
br label %55
55: ; preds = %15, %135
%56 = phi i32 [ 0, %15 ], [ %138, %135 ]
br i1 %17, label %58, label %57
57: ; preds = %58, %55
br i1 %18, label %95, label %135
58: ; preds = %55, %58
%59 = phi i64 [ %93, %58 ], [ 1, %55 ]
%60 = add nsw i64 %59, %21
%61 = getelementptr inbounds double, double* %0, i64 %60
%62 = load double, double* %61
%63 = getelementptr inbounds double, double* %0, i64 %59
store double %62, double* %63
%64 = add nsw i64 %59, %27
%65 = getelementptr inbounds double, double* %0, i64 %64
%66 = load double, double* %65
%67 = add nsw i64 %59, %30
%68 = getelementptr inbounds double, double* %0, i64 %67
store double %66, double* %68
%69 = add nsw i64 %32, %59
%70 = getelementptr inbounds double, double* %0, i64 %69
%71 = load double, double* %70
%72 = fneg double %71
%73 = add nsw i64 %33, %59
%74 = getelementptr inbounds double, double* %0, i64 %73
store double %72, double* %74
%75 = add nsw i64 %59, %37
%76 = getelementptr inbounds double, double* %0, i64 %75
%77 = load double, double* %76
%78 = fneg double %77
%79 = add nsw i64 %59, %40
%80 = getelementptr inbounds double, double* %0, i64 %79
store double %78, double* %80
%81 = add nsw i64 %43, %59
%82 = getelementptr inbounds double, double* %0, i64 %81
%83 = load double, double* %82
%84 = fneg double %83
%85 = add nsw i64 %44, %59
%86 = getelementptr inbounds double, double* %0, i64 %85
store double %84, double* %86
%87 = add nsw i64 %59, %49
%88 = getelementptr inbounds double, double* %0, i64 %87
%89 = load double, double* %88
%90 = fneg double %89
%91 = add nsw i64 %59, %52
%92 = getelementptr inbounds double, double* %0, i64 %91
store double %90, double* %92
%93 = add nuw nsw i64 %59, 1
%94 = icmp eq i64 %93, %24
br i1 %94, label %57, label %58
95: ; preds = %57, %95
%96 = phi i64 [ %133, %95 ], [ 0, %57 ]
%97 = mul nsw i64 %96, %21
%98 = add nsw i64 %97, 1
%99 = getelementptr inbounds double, double* %0, i64 %98
%100 = load double, double* %99
%101 = getelementptr inbounds double, double* %0, i64 %97
store double %100, double* %101
%102 = add nsw i64 %97, %22
%103 = getelementptr inbounds double, double* %0, i64 %102
%104 = load double, double* %103
%105 = add nsw i64 %97, %23
%106 = getelementptr inbounds double, double* %0, i64 %105
store double %104, double* %106
%107 = add nsw i64 %96, %20
%108 = mul nsw i64 %107, %21
%109 = add nsw i64 %108, 1
%110 = getelementptr inbounds double, double* %0, i64 %109
%111 = load double, double* %110
%112 = fneg double %111
%113 = getelementptr inbounds double, double* %0, i64 %108
store double %112, double* %113
%114 = add nsw i64 %108, %22
%115 = getelementptr inbounds double, double* %0, i64 %114
%116 = load double, double* %115
%117 = fneg double %116
%118 = add nsw i64 %108, %23
%119 = getelementptr inbounds double, double* %0, i64 %118
store double %117, double* %119
%120 = add nsw i64 %54, %96
%121 = mul nsw i64 %120, %21
%122 = add nsw i64 %121, 1
%123 = getelementptr inbounds double, double* %0, i64 %122
%124 = load double, double* %123
%125 = fneg double %124
%126 = getelementptr inbounds double, double* %0, i64 %121
store double %125, double* %126
%127 = add nsw i64 %121, %22
%128 = getelementptr inbounds double, double* %0, i64 %127
%129 = load double, double* %128
%130 = fneg double %129
%131 = add nsw i64 %121, %23
%132 = getelementptr inbounds double, double* %0, i64 %131
store double %130, double* %132
%133 = add nuw nsw i64 %96, 1
%134 = icmp eq i64 %133, %53
br i1 %134, label %135, label %95
135: ; preds = %95, %57
%136 = tail call i32 @omp_set_num_threads(i32 8)
%137 = tail call i32 @laxf_scheme_2d(double* %0, double** %1, double** %2, double** %3, double** %4, i32 %5, i32 %6, double %8, double %9, double %10)
%138 = add nuw nsw i32 %56, 1
%139 = icmp eq i32 %138, %13
br i1 %139, label %140, label %55
140: ; preds = %135, %11
ret void
}