#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*/ isempty(int);
int /*<<< orphan*/ isfluid(int);
void clean_empty_space(int ***Flag, double ***U, double ***V, double ***W,
                       double ***P, int imax, int jmax, int kmax) {
  int i, j, k;
#pragma omp parallel for private(j, k)
  for (i = 0; i <= imax - 1; i++) {
    for (j = 0; j <= jmax; j++) {
      for (k = 0; k <= kmax; k++) {
        if (!isfluid(Flag[i][j][k]) && !isfluid(Flag[i + 1][j][k])) {
          U[i][j][k] = 0;
        }
      }
    }
  }
#pragma omp parallel for private(j, k)
  for (i = 0; i <= imax - 1; i++) {
    for (j = 0; j <= jmax - 1; j++) {
      for (k = 0; k <= kmax; k++) {
        if (!isfluid(Flag[i][j][k]) && !isfluid(Flag[i][j + 1][k])) {
          V[i][j][k] = 0;
        }
      }
    }
  }
#pragma omp parallel for private(j, k)
  for (i = 0; i <= imax; i++) {
    for (j = 0; j <= jmax; j++) {
      for (k = 0; k <= kmax - 1; k++) {
        if (!isfluid(Flag[i][j][k]) && !isfluid(Flag[i][j][k + 1])) {
          W[i][j][k] = 0;
        }
      }
    }
  }
#pragma omp parallel for private(j, k)
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (!isempty(Flag[i][j][k])) {
          P[i][j][k] = 0;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<clean_empty_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
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)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1234 <clean_empty_space+0x114>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1221 <clean_empty_space+0x101>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     120e <clean_empty_space+0xee>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    11fb <clean_empty_space+0xdb>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    11fb <clean_empty_space+0xdb>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1200 <clean_empty_space+0xe0>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1178 <clean_empty_space+0x58>
jmp    1213 <clean_empty_space+0xf3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1165 <clean_empty_space+0x45>
jmp    1226 <clean_empty_space+0x106>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    114d <clean_empty_space+0x2d>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1327 <clean_empty_space+0x207>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1314 <clean_empty_space+0x1f4>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     1301 <clean_empty_space+0x1e1>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    12ee <clean_empty_space+0x1ce>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    12ee <clean_empty_space+0x1ce>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12f3 <clean_empty_space+0x1d3>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    126b <clean_empty_space+0x14b>
jmp    1306 <clean_empty_space+0x1e6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1253 <clean_empty_space+0x133>
jmp    1319 <clean_empty_space+0x1f9>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    123b <clean_empty_space+0x11b>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1415 <clean_empty_space+0x2f5>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1402 <clean_empty_space+0x2e2>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13ef <clean_empty_space+0x2cf>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    13dc <clean_empty_space+0x2bc>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    13dc <clean_empty_space+0x2bc>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13e1 <clean_empty_space+0x2c1>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1354 <clean_empty_space+0x234>
jmp    13f4 <clean_empty_space+0x2d4>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1341 <clean_empty_space+0x221>
jmp    1407 <clean_empty_space+0x2e7>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    132e <clean_empty_space+0x20e>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     14d0 <clean_empty_space+0x3b0>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     14bd <clean_empty_space+0x39d>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     14aa <clean_empty_space+0x38a>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <isempty@plt>
cmp    $0x0,%eax
jne    1497 <clean_empty_space+0x377>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    149c <clean_empty_space+0x37c>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1442 <clean_empty_space+0x322>
jmp    14af <clean_empty_space+0x38f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    142f <clean_empty_space+0x30f>
jmp    14c2 <clean_empty_space+0x3a2>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    141c <clean_empty_space+0x2fc>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_empty_space>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8,0x28(%rsp)
mov    %rcx,0x20(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rdi,%rbx
mov    %r9,0x18(%rsp)
test   %r9d,%r9d
jle    12d8 <clean_empty_space+0x1b8>
mov    %rsi,%rbp
mov    0x78(%rsp),%eax
lea    0x1(%rax),%r15d
mov    0x70(%rsp),%eax
add    $0x1,%eax
mov    %rax,(%rsp)
mov    0x18(%rsp),%eax
mov    %rax,0x8(%rsp)
xor    %r13d,%r13d
jmp    1193 <clean_empty_space+0x73>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x30(%rsp),%rax
mov    %rax,%r13
cmp    0x8(%rsp),%rax
je     122c <clean_empty_space+0x10c>
mov    0x70(%rsp),%eax
test   %eax,%eax
js     1220 <clean_empty_space+0x100>
lea    0x1(%r13),%rax
mov    %rax,0x30(%rsp)
xor    %r12d,%r12d
jmp    11ba <clean_empty_space+0x9a>
nopl   (%rax)
add    $0x1,%r12
cmp    (%rsp),%r12
je     1180 <clean_empty_space+0x60>
mov    0x78(%rsp),%eax
test   %eax,%eax
js     11b0 <clean_empty_space+0x90>
xor    %r14d,%r14d
jmp    11d9 <clean_empty_space+0xb9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r14,%r15
je     11b0 <clean_empty_space+0x90>
mov    (%rbx,%r13,8),%rax
mov    (%rax,%r12,8),%rax
mov    (%rax,%r14,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    11d0 <clean_empty_space+0xb0>
mov    0x8(%rbx,%r13,8),%rax
mov    (%rax,%r12,8),%rax
mov    (%rax,%r14,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    11d0 <clean_empty_space+0xb0>
mov    0x0(%rbp,%r13,8),%rax
mov    (%rax,%r12,8),%rax
movq   $0x0,(%rax,%r14,8)
jmp    11d0 <clean_empty_space+0xb0>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13
mov    %r13,%rax
jmp    1188 <clean_empty_space+0x68>
cmpl   $0x0,0x18(%rsp)
jle    12d8 <clean_empty_space+0x1b8>
mov    0x70(%rsp),%eax
mov    %eax,%eax
mov    %rax,(%rsp)
xor    %r12d,%r12d
jmp    125b <clean_empty_space+0x13b>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r12
cmp    0x8(%rsp),%r12
je     12d8 <clean_empty_space+0x1b8>
mov    0x70(%rsp),%eax
test   %eax,%eax
jle    1250 <clean_empty_space+0x130>
xor    %r14d,%r14d
jmp    1279 <clean_empty_space+0x159>
nopl   0x0(%rax,%rax,1)
mov    %r13,%r14
cmp    (%rsp),%r13
je     1250 <clean_empty_space+0x130>
lea    0x1(%r14),%r13
mov    0x78(%rsp),%eax
test   %eax,%eax
js     1270 <clean_empty_space+0x150>
xor    %ebp,%ebp
jmp    1299 <clean_empty_space+0x179>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%r15
je     1270 <clean_empty_space+0x150>
mov    (%rbx,%r12,8),%rax
mov    (%rax,%r14,8),%rax
mov    (%rax,%rbp,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    1290 <clean_empty_space+0x170>
mov    (%rbx,%r12,8),%rax
mov    (%rax,%r13,8),%rax
mov    (%rax,%rbp,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    1290 <clean_empty_space+0x170>
mov    0x10(%rsp),%rax
mov    (%rax,%r12,8),%rax
mov    (%rax,%r14,8),%rax
movq   $0x0,(%rax,%rbp,8)
jmp    1290 <clean_empty_space+0x170>
mov    %rbx,0x10(%rsp)
mov    0x18(%rsp),%rcx
test   %ecx,%ecx
js     1454 <clean_empty_space+0x334>
mov    0x70(%rsp),%eax
add    $0x1,%eax
mov    %rax,(%rsp)
lea    0x1(%rcx),%eax
mov    %rax,0x8(%rsp)
mov    0x78(%rsp),%eax
mov    %eax,%r14d
xor    %r15d,%r15d
mov    0x10(%rsp),%rbx
mov    0x20(%rsp),%r12
jmp    132f <clean_empty_space+0x20f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15
cmp    0x8(%rsp),%r15
je     13b3 <clean_empty_space+0x293>
mov    0x70(%rsp),%eax
test   %eax,%eax
js     1320 <clean_empty_space+0x200>
xor    %r13d,%r13d
jmp    134a <clean_empty_space+0x22a>
nopl   0x0(%rax)
add    $0x1,%r13
cmp    (%rsp),%r13
je     1320 <clean_empty_space+0x200>
mov    0x78(%rsp),%eax
test   %eax,%eax
jle    1340 <clean_empty_space+0x220>
xor    %ebp,%ebp
jmp    1374 <clean_empty_space+0x254>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    %rbp,%rbx
mov    %rbx,%rbp
cmp    %r14,%rbx
mov    0x10(%rsp),%rbx
je     1340 <clean_empty_space+0x220>
mov    (%rbx,%r15,8),%rax
mov    (%rax,%r13,8),%rax
mov    (%rax,%rbp,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    1360 <clean_empty_space+0x240>
mov    (%rbx,%r15,8),%rax
mov    (%rax,%r13,8),%rax
lea    0x1(%rbp),%rbx
mov    0x4(%rax,%rbp,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    1367 <clean_empty_space+0x247>
mov    (%r12,%r15,8),%rax
mov    (%rax,%r13,8),%rax
movq   $0x0,(%rax,%rbp,8)
jmp    1367 <clean_empty_space+0x247>
cmpl   $0x0,0x18(%rsp)
mov    0x28(%rsp),%r14
jle    1454 <clean_empty_space+0x334>
mov    0x78(%rsp),%eax
lea    0x1(%rax),%r15d
mov    $0x1,%r12d
jmp    13eb <clean_empty_space+0x2cb>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12
cmp    0x8(%rsp),%r12
je     1454 <clean_empty_space+0x334>
mov    0x70(%rsp),%eax
test   %eax,%eax
jle    13e0 <clean_empty_space+0x2c0>
mov    $0x1,%ebp
jmp    140a <clean_empty_space+0x2ea>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    (%rsp),%rbp
je     13e0 <clean_empty_space+0x2c0>
mov    0x78(%rsp),%eax
test   %eax,%eax
jle    1400 <clean_empty_space+0x2e0>
mov    $0x1,%ebx
jmp    1429 <clean_empty_space+0x309>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1400 <clean_empty_space+0x2e0>
mov    0x10(%rsp),%rax
mov    (%rax,%r12,8),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%rbx,4),%edi
call   1040 <isempty@plt>
test   %eax,%eax
jne    1420 <clean_empty_space+0x300>
mov    (%r14,%r12,8),%rax
mov    (%rax,%rbp,8),%rax
movq   $0x0,(%rax,%rbx,8)
jmp    1420 <clean_empty_space+0x300>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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