#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 || strcmp(problem, "surface.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
je     1402 <init_uvwp+0x2c2>
mov    0x20(%rbp),%rdi
lea    0xc1e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    14b2 <init_uvwp+0x372>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     14ad <init_uvwp+0x36d>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     149a <init_uvwp+0x35a>
movl   $0x0,-0x54(%rbp)
cvtsi2sdl -0x54(%rbp),%xmm1
cvtsi2sdl -0x34(%rbp),%xmm0
movsd  0xbb5(%rip),%xmm2
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1487 <init_uvwp+0x347>
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    1439 <init_uvwp+0x2f9>
jmp    148c <init_uvwp+0x34c>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1421 <init_uvwp+0x2e1>
jmp    149f <init_uvwp+0x35f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1409 <init_uvwp+0x2c9>
jmp    14b2 <init_uvwp+0x372>
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,0x10(%rsp)
mov    %rdi,%rbx
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    0xb0(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    0xa8(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0xa0(%rsp),%rax
mov    %rax,0x48(%rsp)
lea    0x1(%rsi),%r12d
lea    0x1(%r14),%r15d
mov    %rcx,0x18(%rsp)
lea    0x1(%rcx),%ebp
mov    %ebp,(%rsp)
mov    %r8,0x20(%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  0x8(%rsp),%xmm0
call   1060 <init_matrix2@plt>
mov    %ebp,(%rsp)
mov    0x48(%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,0x8(%rsp)
mov    %r12d,%edx
xor    %ecx,%ecx
mov    %r15,0x40(%rsp)
mov    %r15d,%r8d
xor    %r9d,%r9d
movsd  0x30(%rsp),%xmm0
call   1060 <init_matrix2@plt>
cmpl   $0x0,0x10(%rsp)
js     1359 <init_uvwp+0x219>
mov    0x18(%rsp),%rax
add    $0x2,%eax
lea    0x2(%r14),%ecx
mov    %rcx,0x30(%rsp)
mov    0x10(%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,0x18(%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    0x20(%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    0x50(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     139c <init_uvwp+0x25c>
lea    0xcb0(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
mov    0x10(%rsp),%rdx
mov    0x8(%rsp),%r8
mov    0x40(%rsp),%r9
jne    13b0 <init_uvwp+0x270>
cmp    $0xffffffff,%edx
jge    13d3 <init_uvwp+0x293>
jmp    13b0 <init_uvwp+0x270>
mov    0x10(%rsp),%rdx
cmp    $0xffffffff,%edx
mov    0x8(%rsp),%r8
mov    0x40(%rsp),%r9
jge    13d3 <init_uvwp+0x293>
mov    0x38(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14d,%ecx
mov    0x18(%rsp),%r8
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <boundaryvalues_pressure@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x18(%rsp),%xmm0
mulsd  0xc1c(%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    1419 <init_uvwp+0x2d9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    %r8,%rax
je     13b0 <init_uvwp+0x270>
cmp    $0xffffffff,%r14d
jl     1410 <init_uvwp+0x2d0>
xor    %ebp,%ebp
test   %r14d,%r14d
jns    1479 <init_uvwp+0x339>
test   $0x1,%r9b
je     1410 <init_uvwp+0x2d0>
ucomisd %xmm1,%xmm0
jb     1410 <init_uvwp+0x2d0>
mov    0x20(%rsp),%rsi
mov    (%rsi,%rax,8),%rsi
mov    (%rsi,%rbp,8),%rdi
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   $0x0,(%rdi,%rsi,8)
add    $0x1,%rsi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
ucomisd %xmm2,%xmm0
jae    1450 <init_uvwp+0x310>
jmp    1410 <init_uvwp+0x2d0>
nopl   0x0(%rax,%rax,1)
add    $0x2,%rbp
cmp    %rcx,%rbp
je     1426 <init_uvwp+0x2e6>
ucomisd %xmm1,%xmm0
jb     1470 <init_uvwp+0x330>
mov    0x20(%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    1490 <init_uvwp+0x350>
ucomisd %xmm1,%xmm0
jb     1470 <init_uvwp+0x330>
lea    0x0(,%rbp,8),%rsi
mov    0x20(%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    14d0 <init_uvwp+0x390>
jmp    1470 <init_uvwp+0x330>

LLVM IR (-O0):
@.str = [9 x i8] c"step.pgm\00"
@.str.1 = [12 x i8] c"surface.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 %207, label %203
203: ; preds = %199
%204 = load i8*, i8** %26
%205 = call i64 @strcmp(i8* %204, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%206 = icmp eq i64 %205, 0
br i1 %206, label %207, label %252
207: ; preds = %203, %199
store i32 0, i32* %27
br label %208
208: ; preds = %248, %207
%209 = load i32, i32* %27
%210 = load i32, i32* %19
%211 = add nsw i32 %210, 1
%212 = icmp sle i32 %209, %211
br i1 %212, label %213, label %251
213: ; preds = %208
store i32 0, i32* %28
br label %214
214: ; preds = %244, %213
%215 = load i32, i32* %28
%216 = load i32, i32* %20
%217 = add nsw i32 %216, 1
%218 = icmp sle i32 %215, %217
br i1 %218, label %219, label %247
219: ; preds = %214
store i32 0, i32* %29
br label %220
220: ; preds = %240, %219
%221 = load i32, i32* %29
%222 = sitofp i32 %221 to double
%223 = load i32, i32* %21
%224 = sitofp i32 %223 to double
%225 = fmul double %224, 5.000000e-01
%226 = fcmp ole double %222, %225
br i1 %226, label %227, label %243
227: ; preds = %220
%228 = load double***, double**** %22
%229 = load i32, i32* %27
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double**, double*** %228, i64 %230
%232 = load double**, double*** %231
%233 = load i32, i32* %28
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double*, double** %232, i64 %234
%236 = load double*, double** %235
%237 = load i32, i32* %29
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds double, double* %236, i64 %238
store double 0.000000e+00, double* %239
br label %240
240: ; preds = %227
%241 = load i32, i32* %29
%242 = add nsw i32 %241, 1
store i32 %242, i32* %29
br label %220
243: ; preds = %220
br label %244
244: ; preds = %243
%245 = load i32, i32* %28
%246 = add nsw i32 %245, 1
store i32 %246, i32* %28
br label %214
247: ; preds = %214
br label %248
248: ; preds = %247
%249 = load i32, i32* %27
%250 = add nsw i32 %249, 1
store i32 %250, i32* %27
br label %208
251: ; preds = %208
br label %252
252: ; preds = %251, %203
%253 = load double***, double**** %25
%254 = load i32***, i32**** %18
%255 = load i32, i32* %19
%256 = load i32, i32* %20
%257 = load i32, i32* %21
%258 = call i32 @boundaryvalues_pressure(double*** %253, i32*** %254, i32 %255, i32 %256, i32 %257)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"step.pgm\00"
@.str.1 = [12 x i8] c"surface.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 eq i64 %90, 0
br i1 %91, label %97, label %92
92: ; preds = %89
%93 = tail call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%94 = icmp ne i64 %93, 0
%95 = icmp slt i32 %5, -1
%96 = or i1 %94, %95
br i1 %96, label %166, label %99
97: ; preds = %89
%98 = icmp slt i32 %5, -1
br i1 %98, label %166, label %99
99: ; preds = %92, %97
%100 = icmp slt i32 %6, -1
%101 = sitofp i32 %7 to double
%102 = fmul double %101, 5.000000e-01
%103 = fcmp ult double %102, 0.000000e+00
%104 = call i32 @llvm.smax.i32(i32 %15, i32 0)
%105 = add nuw i32 %104, 1
%106 = call i32 @llvm.smax.i32(i32 %14, i32 0)
%107 = add nuw i32 %106, 1
%108 = zext i32 %107 to i64
%109 = zext i32 %105 to i64
%110 = and i64 %109, 1
%111 = icmp slt i32 %6, 0
%112 = and i64 %109, 4294967294
%113 = icmp eq i64 %110, 0
br label %114
114: ; preds = %99, %163
%115 = phi i64 [ 0, %99 ], [ %164, %163 ]
br i1 %100, label %163, label %116
116: ; preds = %114
%117 = getelementptr inbounds double**, double*** %8, i64 %115
br i1 %111, label %149, label %118
118: ; preds = %116, %145
%119 = phi i64 [ %146, %145 ], [ 0, %116 ]
%120 = phi i64 [ %147, %145 ], [ 0, %116 ]
br i1 %103, label %145, label %121
121: ; preds = %118
%122 = load double**, double*** %117
%123 = getelementptr inbounds double*, double** %122, i64 %119
%124 = load double*, double** %123
br label %125
125: ; preds = %121, %125
%126 = phi i64 [ 0, %121 ], [ %128, %125 ]
%127 = getelementptr inbounds double, double* %124, i64 %126
store double 0.000000e+00, double* %127
%128 = add nuw i64 %126, 1
%129 = trunc i64 %128 to i32
%130 = sitofp i32 %129 to double
%131 = fcmp ult double %102, %130
br i1 %131, label %132, label %125
132: ; preds = %125
br i1 %103, label %145, label %133
133: ; preds = %132
%134 = or i64 %119, 1
%135 = load double**, double*** %117
%136 = getelementptr inbounds double*, double** %135, i64 %134
%137 = load double*, double** %136
br label %138
138: ; preds = %138, %133
%139 = phi i64 [ 0, %133 ], [ %141, %138 ]
%140 = getelementptr inbounds double, double* %137, i64 %139
store double 0.000000e+00, double* %140
%141 = add nuw i64 %139, 1
%142 = trunc i64 %141 to i32
%143 = sitofp i32 %142 to double
%144 = fcmp ult double %102, %143
br i1 %144, label %145, label %138
145: ; preds = %118, %138, %132
%146 = add nuw nsw i64 %119, 2
%147 = add i64 %120, 2
%148 = icmp eq i64 %147, %112
br i1 %148, label %149, label %118
149: ; preds = %145, %116
%150 = phi i64 [ 0, %116 ], [ %146, %145 ]
%151 = or i1 %113, %103
br i1 %151, label %163, label %152
152: ; preds = %149
%153 = load double**, double*** %117
%154 = getelementptr inbounds double*, double** %153, i64 %150
%155 = load double*, double** %154
br label %156
156: ; preds = %156, %152
%157 = phi i64 [ 0, %152 ], [ %159, %156 ]
%158 = getelementptr inbounds double, double* %155, i64 %157
store double 0.000000e+00, double* %158
%159 = add nuw i64 %157, 1
%160 = trunc i64 %159 to i32
%161 = sitofp i32 %160 to double
%162 = fcmp ult double %102, %161
br i1 %162, label %163, label %156
163: ; preds = %149, %156, %114
%164 = add nuw nsw i64 %115, 1
%165 = icmp eq i64 %164, %108
br i1 %165, label %166, label %114
166: ; preds = %163, %97, %92
%167 = tail call i32 @boundaryvalues_pressure(double*** %11, i32*** %4, i32 %5, i32 %6, i32 %7)
ret void
}