#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*/ boundaryvalues_pressure(double ***, int ***, int, int, int);
int /*<<< orphan*/ init_matrix2(double ***, int /*<<< orphan*/, int,
                                int /*<<< orphan*/, int, int /*<<< orphan*/,
                                int, double);
int /*<<< orphan*/ isfluid(int);
scalar_t__ strcmp(char *, char *);
void init_uvwp(double UI, double VI, double WI, double PI, int ***Flag,
               int imax, int jmax, int kmax, double ***U, double ***V,
               double ***W, double ***P, char *problem) {
  int i, j, k;
  init_matrix2(U, 0, imax + 1, 0, jmax + 1, 0, kmax + 1, UI);
  init_matrix2(V, 0, imax + 1, 0, jmax + 1, 0, kmax + 1, VI);
  init_matrix2(W, 0, imax + 1, 0, jmax + 1, 0, kmax + 1, WI);
  init_matrix2(P, 0, imax + 1, 0, jmax + 1, 0, kmax + 1, PI);
  for (i = 1; i <= imax + 1; i++) {
    for (j = 1; j <= jmax + 1; j++) {
      for (k = 1; k <= kmax + 1; k++) {
        if (!isfluid(Flag[i][j][k])) {
          U[i][j][k] = 0;
          U[i - 1][j][k] = 0;
          V[i][j][k] = 0;
          V[i][j - 1][k] = 0;
          W[i][j][k] = 0;
          W[i][j][k - 1] = 0;
          P[i][j][k] = 0;
        }
      }
    }
  }
  if (strcmp(problem, "step.pgm") == 0) {
    for (i = 0; i <= imax + 1; i++) {
      for (j = 0; j <= jmax + 1; j++) {
        for (k = 0; k <= kmax * 0.5; k++) {
          U[i][j][k] = 0;
        }
      }
    }
  }
  boundaryvalues_pressure(P, Flag, imax, jmax, kmax);
}


x86 assembly (clang, -O0):
<init_uvwp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %edx,-0x30(%rbp)
mov    %ecx,-0x34(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%r8d
add    $0x1,%r8d
mov    -0x34(%rbp),%eax
add    $0x1,%eax
movsd  -0x8(%rbp),%xmm0
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1060 <init_matrix2@plt>
mov    -0x48(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%r8d
add    $0x1,%r8d
mov    -0x34(%rbp),%eax
add    $0x1,%eax
movsd  -0x10(%rbp),%xmm0
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1060 <init_matrix2@plt>
mov    0x10(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%r8d
add    $0x1,%r8d
mov    -0x34(%rbp),%eax
add    $0x1,%eax
movsd  -0x18(%rbp),%xmm0
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1060 <init_matrix2@plt>
mov    0x18(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%r8d
add    $0x1,%r8d
mov    -0x34(%rbp),%eax
add    $0x1,%eax
movsd  -0x20(%rbp),%xmm0
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1060 <init_matrix2@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     13ce <init_uvwp+0x28e>
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     13bb <init_uvwp+0x27b>
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     13a8 <init_uvwp+0x268>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    1395 <init_uvwp+0x255>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x50(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    139a <init_uvwp+0x25a>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    126c <init_uvwp+0x12c>
jmp    13ad <init_uvwp+0x26d>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1254 <init_uvwp+0x114>
jmp    13c0 <init_uvwp+0x280>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    123c <init_uvwp+0xfc>
mov    0x20(%rbp),%rdi
lea    0xc2f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1498 <init_uvwp+0x358>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     1493 <init_uvwp+0x353>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     1480 <init_uvwp+0x340>
movl   $0x0,-0x54(%rbp)
cvtsi2sdl -0x54(%rbp),%xmm1
cvtsi2sdl -0x34(%rbp),%xmm0
movsd  0xbcf(%rip),%xmm2
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     146d <init_uvwp+0x32d>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    141f <init_uvwp+0x2df>
jmp    1472 <init_uvwp+0x332>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1407 <init_uvwp+0x2c7>
jmp    1485 <init_uvwp+0x345>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13ef <init_uvwp+0x2af>
jmp    1498 <init_uvwp+0x358>
mov    0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
call   1050 <boundaryvalues_pressure@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_uvwp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,%r13
mov    %edx,%r14d
mov    %rsi,0x20(%rsp)
mov    %rdi,%rbx
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x18(%rsp)
mov    0xb0(%rsp),%rax
mov    %rax,0x48(%rsp)
mov    0xa8(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0xa0(%rsp),%rax
mov    %rax,0x40(%rsp)
lea    0x1(%rsi),%r12d
lea    0x1(%r14),%r15d
mov    %rcx,0x8(%rsp)
lea    0x1(%rcx),%ebp
mov    %ebp,(%rsp)
mov    %r8,0x10(%rsp)
mov    %r8,%rdi
xor    %esi,%esi
mov    %r12d,%edx
xor    %ecx,%ecx
mov    %r15d,%r8d
xor    %r9d,%r9d
call   1060 <init_matrix2@plt>
mov    %ebp,(%rsp)
mov    %r13,0x60(%rsp)
mov    %r13,%rdi
xor    %esi,%esi
mov    %r12d,%edx
xor    %ecx,%ecx
mov    %r15d,%r8d
xor    %r9d,%r9d
movsd  0x18(%rsp),%xmm0
call   1060 <init_matrix2@plt>
mov    %ebp,(%rsp)
mov    0x40(%rsp),%rdi
mov    %rdi,%r13
xor    %esi,%esi
mov    %r12d,%edx
xor    %ecx,%ecx
mov    %r15d,%r8d
xor    %r9d,%r9d
movsd  0x28(%rsp),%xmm0
call   1060 <init_matrix2@plt>
mov    %ebp,(%rsp)
mov    0x38(%rsp),%rdi
xor    %esi,%esi
mov    %r12,0x18(%rsp)
mov    %r12d,%edx
xor    %ecx,%ecx
mov    %r15,0x50(%rsp)
mov    %r15d,%r8d
xor    %r9d,%r9d
movsd  0x30(%rsp),%xmm0
call   1060 <init_matrix2@plt>
cmpl   $0x0,0x20(%rsp)
js     1359 <init_uvwp+0x219>
mov    0x8(%rsp),%rax
add    $0x2,%eax
lea    0x2(%r14),%ecx
mov    %rcx,0x30(%rsp)
mov    0x20(%rsp),%rcx
add    $0x2,%ecx
mov    %rcx,0x28(%rsp)
lea    -0x4(,%rax,4),%r12
ff
mov    $0x1,%ebp
mov    %r14,0x58(%rsp)
jmp    1284 <init_uvwp+0x144>
nop
add    $0x1,%rbp
cmp    0x28(%rsp),%rbp
mov    0x58(%rsp),%r14
je     1359 <init_uvwp+0x219>
test   %r14d,%r14d
js     1270 <init_uvwp+0x130>
mov    $0x1,%r15d
jmp    12ab <init_uvwp+0x16b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    0x30(%rsp),%r15
je     1270 <init_uvwp+0x130>
cmpl   $0x0,0x8(%rsp)
js     12a0 <init_uvwp+0x160>
xor    %r14d,%r14d
jmp    12c9 <init_uvwp+0x189>
nopw   0x0(%rax,%rax,1)
add    $0x4,%r14
cmp    %r14,%r12
je     12a0 <init_uvwp+0x160>
mov    (%rbx,%rbp,8),%rax
mov    (%rax,%r15,8),%rax
mov    0x4(%rax,%r14,1),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    12c0 <init_uvwp+0x180>
mov    0x10(%rsp),%rcx
mov    (%rcx,%rbp,8),%rax
mov    (%rax,%r15,8),%rax
movq   $0x0,0x8(%rax,%r14,2)
mov    -0x8(%rcx,%rbp,8),%rax
mov    (%rax,%r15,8),%rax
movq   $0x0,0x8(%rax,%r14,2)
mov    0x60(%rsp),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%r15,8),%rcx
movq   $0x0,0x8(%rcx,%r14,2)
mov    -0x8(%rax,%r15,8),%rax
movq   $0x0,0x8(%rax,%r14,2)
mov    0x0(%r13,%rbp,8),%rax
mov    (%rax,%r15,8),%rax
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rax,%r14,2)
mov    0x38(%rsp),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%r15,8),%rax
movq   $0x0,0x8(%rax,%r14,2)
jmp    12c0 <init_uvwp+0x180>
lea    0xcc0(%rip),%rsi
mov    0x48(%rsp),%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%r8
mov    0x50(%rsp),%r9
jne    149b <init_uvwp+0x35b>
cmp    $0xffffffff,%edx
jl     149b <init_uvwp+0x35b>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0xc64(%rip),%xmm0
xor    %eax,%eax
test   %r9d,%r9d
cmovle %eax,%r9d
add    $0x1,%r9d
test   %r8d,%r8d
cmovle %eax,%r8d
add    $0x1,%r8d
mov    %r9d,%ecx
and    $0xfffffffe,%ecx
xorpd  %xmm1,%xmm1
jmp    13cd <init_uvwp+0x28d>
add    $0x1,%rax
cmp    %r8,%rax
je     149b <init_uvwp+0x35b>
cmp    $0xffffffff,%r14d
jl     13c0 <init_uvwp+0x280>
xor    %ebp,%ebp
test   %r14d,%r14d
jns    1429 <init_uvwp+0x2e9>
test   $0x1,%r9b
je     13c0 <init_uvwp+0x280>
ucomisd %xmm1,%xmm0
jb     13c0 <init_uvwp+0x280>
mov    0x10(%rsp),%rsi
mov    (%rsi,%rax,8),%rsi
mov    (%rsi,%rbp,8),%rdi
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movq   $0x0,(%rdi,%rsi,8)
add    $0x1,%rsi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
ucomisd %xmm2,%xmm0
jae    1400 <init_uvwp+0x2c0>
jmp    13c0 <init_uvwp+0x280>
nopl   0x0(%rax,%rax,1)
add    $0x2,%rbp
cmp    %rcx,%rbp
je     13da <init_uvwp+0x29a>
ucomisd %xmm1,%xmm0
jb     1420 <init_uvwp+0x2e0>
mov    0x10(%rsp),%rsi
mov    (%rsi,%rax,8),%rsi
mov    (%rsi,%rbp,8),%rsi
xor    %edi,%edi
xchg   %ax,%ax
movq   $0x0,(%rsi,%rdi,8)
add    $0x1,%rdi
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
ucomisd %xmm2,%xmm0
jae    1440 <init_uvwp+0x300>
ucomisd %xmm1,%xmm0
jb     1420 <init_uvwp+0x2e0>
lea    0x0(,%rbp,8),%rsi
mov    0x10(%rsp),%rdi
mov    (%rdi,%rax,8),%rdi
or     $0x8,%rsi
mov    (%rdi,%rsi,1),%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movq   $0x0,(%rsi,%rdi,8)
add    $0x1,%rdi
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
ucomisd %xmm2,%xmm0
jae    1480 <init_uvwp+0x340>
jmp    1420 <init_uvwp+0x2e0>
mov    0x38(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14d,%ecx
mov    0x8(%rsp),%r8
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <boundaryvalues_pressure@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"step.pgm\00"
define void @init_uvwp(double %0, double %1, double %2, double %3, i32*** %4, i32 %5, i32 %6, i32 %7, double*** %8, double*** %9, double*** %10, double*** %11, i8* %12) {
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32***
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double***
%23 = alloca double***
%24 = alloca double***
%25 = alloca double***
%26 = alloca i8*
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store double %0, double* %14
store double %1, double* %15
store double %2, double* %16
store double %3, double* %17
store i32*** %4, i32**** %18
store i32 %5, i32* %19
store i32 %6, i32* %20
store i32 %7, i32* %21
store double*** %8, double**** %22
store double*** %9, double**** %23
store double*** %10, double**** %24
store double*** %11, double**** %25
store i8* %12, i8** %26
%30 = load double***, double**** %22
%31 = load i32, i32* %19
%32 = add nsw i32 %31, 1
%33 = load i32, i32* %20
%34 = add nsw i32 %33, 1
%35 = load i32, i32* %21
%36 = add nsw i32 %35, 1
%37 = load double, double* %14
%38 = call i32 @init_matrix2(double*** %30, i32 0, i32 %32, i32 0, i32 %34, i32 0, i32 %36, double %37)
%39 = load double***, double**** %23
%40 = load i32, i32* %19
%41 = add nsw i32 %40, 1
%42 = load i32, i32* %20
%43 = add nsw i32 %42, 1
%44 = load i32, i32* %21
%45 = add nsw i32 %44, 1
%46 = load double, double* %15
%47 = call i32 @init_matrix2(double*** %39, i32 0, i32 %41, i32 0, i32 %43, i32 0, i32 %45, double %46)
%48 = load double***, double**** %24
%49 = load i32, i32* %19
%50 = add nsw i32 %49, 1
%51 = load i32, i32* %20
%52 = add nsw i32 %51, 1
%53 = load i32, i32* %21
%54 = add nsw i32 %53, 1
%55 = load double, double* %16
%56 = call i32 @init_matrix2(double*** %48, i32 0, i32 %50, i32 0, i32 %52, i32 0, i32 %54, double %55)
%57 = load double***, double**** %25
%58 = load i32, i32* %19
%59 = add nsw i32 %58, 1
%60 = load i32, i32* %20
%61 = add nsw i32 %60, 1
%62 = load i32, i32* %21
%63 = add nsw i32 %62, 1
%64 = load double, double* %17
%65 = call i32 @init_matrix2(double*** %57, i32 0, i32 %59, i32 0, i32 %61, i32 0, i32 %63, double %64)
store i32 1, i32* %27
br label %66
66: ; preds = %196, %13
%67 = load i32, i32* %27
%68 = load i32, i32* %19
%69 = add nsw i32 %68, 1
%70 = icmp sle i32 %67, %69
br i1 %70, label %71, label %199
71: ; preds = %66
store i32 1, i32* %28
br label %72
72: ; preds = %192, %71
%73 = load i32, i32* %28
%74 = load i32, i32* %20
%75 = add nsw i32 %74, 1
%76 = icmp sle i32 %73, %75
br i1 %76, label %77, label %195
77: ; preds = %72
store i32 1, i32* %29
br label %78
78: ; preds = %188, %77
%79 = load i32, i32* %29
%80 = load i32, i32* %21
%81 = add nsw i32 %80, 1
%82 = icmp sle i32 %79, %81
br i1 %82, label %83, label %191
83: ; preds = %78
%84 = load i32***, i32**** %18
%85 = load i32, i32* %27
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32**, i32*** %84, i64 %86
%88 = load i32**, i32*** %87
%89 = load i32, i32* %28
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i32*, i32** %88, i64 %90
%92 = load i32*, i32** %91
%93 = load i32, i32* %29
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i32, i32* %92, i64 %94
%96 = load i32, i32* %95
%97 = call i32 @isfluid(i32 %96)
%98 = icmp ne i32 %97, 0
br i1 %98, label %187, label %99
99: ; preds = %83
%100 = load double***, double**** %22
%101 = load i32, i32* %27
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double**, double*** %100, i64 %102
%104 = load double**, double*** %103
%105 = load i32, i32* %28
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double*, double** %104, i64 %106
%108 = load double*, double** %107
%109 = load i32, i32* %29
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
store double 0.000000e+00, double* %111
%112 = load double***, double**** %22
%113 = load i32, i32* %27
%114 = sub nsw i32 %113, 1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double**, double*** %112, i64 %115
%117 = load double**, double*** %116
%118 = load i32, i32* %28
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double*, double** %117, i64 %119
%121 = load double*, double** %120
%122 = load i32, i32* %29
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
store double 0.000000e+00, double* %124
%125 = load double***, double**** %23
%126 = load i32, i32* %27
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double**, double*** %125, i64 %127
%129 = load double**, double*** %128
%130 = load i32, i32* %28
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double*, double** %129, i64 %131
%133 = load double*, double** %132
%134 = load i32, i32* %29
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
store double 0.000000e+00, double* %136
%137 = load double***, double**** %23
%138 = load i32, i32* %27
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double**, double*** %137, i64 %139
%141 = load double**, double*** %140
%142 = load i32, i32* %28
%143 = sub nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double*, double** %141, i64 %144
%146 = load double*, double** %145
%147 = load i32, i32* %29
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
store double 0.000000e+00, double* %149
%150 = load double***, double**** %24
%151 = load i32, i32* %27
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double**, double*** %150, i64 %152
%154 = load double**, double*** %153
%155 = load i32, i32* %28
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double*, double** %154, i64 %156
%158 = load double*, double** %157
%159 = load i32, i32* %29
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
store double 0.000000e+00, double* %161
%162 = load double***, double**** %24
%163 = load i32, i32* %27
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double**, double*** %162, i64 %164
%166 = load double**, double*** %165
%167 = load i32, i32* %28
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double*, double** %166, i64 %168
%170 = load double*, double** %169
%171 = load i32, i32* %29
%172 = sub nsw i32 %171, 1
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %170, i64 %173
store double 0.000000e+00, double* %174
%175 = load double***, double**** %25
%176 = load i32, i32* %27
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double**, double*** %175, i64 %177
%179 = load double**, double*** %178
%180 = load i32, i32* %28
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double*, double** %179, i64 %181
%183 = load double*, double** %182
%184 = load i32, i32* %29
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
store double 0.000000e+00, double* %186
br label %187
187: ; preds = %99, %83
br label %188
188: ; preds = %187
%189 = load i32, i32* %29
%190 = add nsw i32 %189, 1
store i32 %190, i32* %29
br label %78
191: ; preds = %78
br label %192
192: ; preds = %191
%193 = load i32, i32* %28
%194 = add nsw i32 %193, 1
store i32 %194, i32* %28
br label %72
195: ; preds = %72
br label %196
196: ; preds = %195
%197 = load i32, i32* %27
%198 = add nsw i32 %197, 1
store i32 %198, i32* %27
br label %66
199: ; preds = %66
%200 = load i8*, i8** %26
%201 = call i64 @strcmp(i8* %200, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%202 = icmp eq i64 %201, 0
br i1 %202, label %203, label %248
203: ; preds = %199
store i32 0, i32* %27
br label %204
204: ; preds = %244, %203
%205 = load i32, i32* %27
%206 = load i32, i32* %19
%207 = add nsw i32 %206, 1
%208 = icmp sle i32 %205, %207
br i1 %208, label %209, label %247
209: ; preds = %204
store i32 0, i32* %28
br label %210
210: ; preds = %240, %209
%211 = load i32, i32* %28
%212 = load i32, i32* %20
%213 = add nsw i32 %212, 1
%214 = icmp sle i32 %211, %213
br i1 %214, label %215, label %243
215: ; preds = %210
store i32 0, i32* %29
br label %216
216: ; preds = %236, %215
%217 = load i32, i32* %29
%218 = sitofp i32 %217 to double
%219 = load i32, i32* %21
%220 = sitofp i32 %219 to double
%221 = fmul double %220, 5.000000e-01
%222 = fcmp ole double %218, %221
br i1 %222, label %223, label %239
223: ; preds = %216
%224 = load double***, double**** %22
%225 = load i32, i32* %27
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double**, double*** %224, i64 %226
%228 = load double**, double*** %227
%229 = load i32, i32* %28
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double*, double** %228, i64 %230
%232 = load double*, double** %231
%233 = load i32, i32* %29
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
store double 0.000000e+00, double* %235
br label %236
236: ; preds = %223
%237 = load i32, i32* %29
%238 = add nsw i32 %237, 1
store i32 %238, i32* %29
br label %216
239: ; preds = %216
br label %240
240: ; preds = %239
%241 = load i32, i32* %28
%242 = add nsw i32 %241, 1
store i32 %242, i32* %28
br label %210
243: ; preds = %210
br label %244
244: ; preds = %243
%245 = load i32, i32* %27
%246 = add nsw i32 %245, 1
store i32 %246, i32* %27
br label %204
247: ; preds = %204
br label %248
248: ; preds = %247, %199
%249 = load double***, double**** %25
%250 = load i32***, i32**** %18
%251 = load i32, i32* %19
%252 = load i32, i32* %20
%253 = load i32, i32* %21
%254 = call i32 @boundaryvalues_pressure(double*** %249, i32*** %250, i32 %251, i32 %252, i32 %253)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"step.pgm\00"
define void @init_uvwp(double %0, double %1, double %2, double %3, i32*** %4, i32 %5, i32 %6, i32 %7, double*** %8, double*** %9, double*** %10, double*** %11, i8* %12) {
%14 = add nsw i32 %5, 1
%15 = add nsw i32 %6, 1
%16 = add nsw i32 %7, 1
%17 = tail call i32 @init_matrix2(double*** %8, i32 0, i32 %14, i32 0, i32 %15, i32 0, i32 %16, double %0)
%18 = tail call i32 @init_matrix2(double*** %9, i32 0, i32 %14, i32 0, i32 %15, i32 0, i32 %16, double %1)
%19 = tail call i32 @init_matrix2(double*** %10, i32 0, i32 %14, i32 0, i32 %15, i32 0, i32 %16, double %2)
%20 = tail call i32 @init_matrix2(double*** %11, i32 0, i32 %14, i32 0, i32 %15, i32 0, i32 %16, double %3)
%21 = icmp slt i32 %5, 0
br i1 %21, label %89, label %22
22: ; preds = %13
%23 = icmp slt i32 %6, 0
%24 = icmp slt i32 %7, 0
%25 = add i32 %7, 2
%26 = add i32 %6, 2
%27 = add nuw i32 %5, 2
%28 = zext i32 %27 to i64
%29 = zext i32 %26 to i64
%30 = zext i32 %25 to i64
br label %31
31: ; preds = %22, %86
%32 = phi i64 [ 1, %22 ], [ %87, %86 ]
br i1 %23, label %86, label %33
33: ; preds = %31
%34 = getelementptr inbounds i32**, i32*** %4, i64 %32
%35 = getelementptr inbounds double**, double*** %8, i64 %32
%36 = add nsw i64 %32, -1
%37 = getelementptr inbounds double**, double*** %8, i64 %36
%38 = getelementptr inbounds double**, double*** %9, i64 %32
%39 = getelementptr inbounds double**, double*** %10, i64 %32
%40 = getelementptr inbounds double**, double*** %11, i64 %32
br label %41
41: ; preds = %33, %83
%42 = phi i64 [ 1, %33 ], [ %84, %83 ]
br i1 %24, label %83, label %43
43: ; preds = %41
%44 = add nsw i64 %42, -1
br label %45
45: ; preds = %43, %80
%46 = phi i64 [ 1, %43 ], [ %81, %80 ]
%47 = load i32**, i32*** %34
%48 = getelementptr inbounds i32*, i32** %47, i64 %42
%49 = load i32*, i32** %48
%50 = getelementptr inbounds i32, i32* %49, i64 %46
%51 = load i32, i32* %50
%52 = tail call i32 @isfluid(i32 %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %80
54: ; preds = %45
%55 = load double**, double*** %35
%56 = getelementptr inbounds double*, double** %55, i64 %42
%57 = load double*, double** %56
%58 = getelementptr inbounds double, double* %57, i64 %46
store double 0.000000e+00, double* %58
%59 = load double**, double*** %37
%60 = getelementptr inbounds double*, double** %59, i64 %42
%61 = load double*, double** %60
%62 = getelementptr inbounds double, double* %61, i64 %46
store double 0.000000e+00, double* %62
%63 = load double**, double*** %38
%64 = getelementptr inbounds double*, double** %63, i64 %42
%65 = load double*, double** %64
%66 = getelementptr inbounds double, double* %65, i64 %46
store double 0.000000e+00, double* %66
%67 = getelementptr inbounds double*, double** %63, i64 %44
%68 = load double*, double** %67
%69 = getelementptr inbounds double, double* %68, i64 %46
store double 0.000000e+00, double* %69
%70 = load double**, double*** %39
%71 = getelementptr inbounds double*, double** %70, i64 %42
%72 = load double*, double** %71
%73 = add nsw i64 %46, -1
%74 = getelementptr inbounds double, double* %72, i64 %73
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %75
%76 = load double**, double*** %40
%77 = getelementptr inbounds double*, double** %76, i64 %42
%78 = load double*, double** %77
%79 = getelementptr inbounds double, double* %78, i64 %46
store double 0.000000e+00, double* %79
br label %80
80: ; preds = %45, %54
%81 = add nuw nsw i64 %46, 1
%82 = icmp eq i64 %81, %30
br i1 %82, label %83, label %45
83: ; preds = %80, %41
%84 = add nuw nsw i64 %42, 1
%85 = icmp eq i64 %84, %29
br i1 %85, label %86, label %41
86: ; preds = %83, %31
%87 = add nuw nsw i64 %32, 1
%88 = icmp eq i64 %87, %28
br i1 %88, label %89, label %31
89: ; preds = %86, %13
%90 = tail call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%91 = icmp ne i64 %90, 0
%92 = icmp slt i32 %5, -1
%93 = or i1 %91, %92
br i1 %93, label %161, label %94
94: ; preds = %89
%95 = icmp slt i32 %6, -1
%96 = sitofp i32 %7 to double
%97 = fmul double %96, 5.000000e-01
%98 = fcmp ult double %97, 0.000000e+00
%99 = call i32 @llvm.smax.i32(i32 %15, i32 0)
%100 = add nuw i32 %99, 1
%101 = call i32 @llvm.smax.i32(i32 %14, i32 0)
%102 = add nuw i32 %101, 1
%103 = zext i32 %102 to i64
%104 = zext i32 %100 to i64
%105 = and i64 %104, 1
%106 = icmp slt i32 %6, 0
%107 = and i64 %104, 4294967294
%108 = icmp eq i64 %105, 0
br label %109
109: ; preds = %94, %158
%110 = phi i64 [ 0, %94 ], [ %159, %158 ]
br i1 %95, label %158, label %111
111: ; preds = %109
%112 = getelementptr inbounds double**, double*** %8, i64 %110
br i1 %106, label %144, label %113
113: ; preds = %111, %140
%114 = phi i64 [ %141, %140 ], [ 0, %111 ]
%115 = phi i64 [ %142, %140 ], [ 0, %111 ]
br i1 %98, label %140, label %116
116: ; preds = %113
%117 = load double**, double*** %112
%118 = getelementptr inbounds double*, double** %117, i64 %114
%119 = load double*, double** %118
br label %120
120: ; preds = %116, %120
%121 = phi i64 [ 0, %116 ], [ %123, %120 ]
%122 = getelementptr inbounds double, double* %119, i64 %121
store double 0.000000e+00, double* %122
%123 = add nuw i64 %121, 1
%124 = trunc i64 %123 to i32
%125 = sitofp i32 %124 to double
%126 = fcmp ult double %97, %125
br i1 %126, label %127, label %120
127: ; preds = %120
br i1 %98, label %140, label %128
128: ; preds = %127
%129 = or i64 %114, 1
%130 = load double**, double*** %112
%131 = getelementptr inbounds double*, double** %130, i64 %129
%132 = load double*, double** %131
br label %133
133: ; preds = %133, %128
%134 = phi i64 [ 0, %128 ], [ %136, %133 ]
%135 = getelementptr inbounds double, double* %132, i64 %134
store double 0.000000e+00, double* %135
%136 = add nuw i64 %134, 1
%137 = trunc i64 %136 to i32
%138 = sitofp i32 %137 to double
%139 = fcmp ult double %97, %138
br i1 %139, label %140, label %133
140: ; preds = %113, %133, %127
%141 = add nuw nsw i64 %114, 2
%142 = add i64 %115, 2
%143 = icmp eq i64 %142, %107
br i1 %143, label %144, label %113
144: ; preds = %140, %111
%145 = phi i64 [ 0, %111 ], [ %141, %140 ]
%146 = or i1 %108, %98
br i1 %146, label %158, label %147
147: ; preds = %144
%148 = load double**, double*** %112
%149 = getelementptr inbounds double*, double** %148, i64 %145
%150 = load double*, double** %149
br label %151
151: ; preds = %151, %147
%152 = phi i64 [ 0, %147 ], [ %154, %151 ]
%153 = getelementptr inbounds double, double* %150, i64 %152
store double 0.000000e+00, double* %153
%154 = add nuw i64 %152, 1
%155 = trunc i64 %154 to i32
%156 = sitofp i32 %155 to double
%157 = fcmp ult double %97, %156
br i1 %157, label %158, label %151
158: ; preds = %144, %151, %109
%159 = add nuw nsw i64 %110, 1
%160 = icmp eq i64 %159, %103
br i1 %160, label %161, label %109
161: ; preds = %158, %89
%162 = tail call i32 @boundaryvalues_pressure(double*** %11, i32*** %4, i32 %5, i32 %6, i32 %7)
ret void
}