#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*/ clean_empty_space(int ***, double ***, double ***,
                                     double ***, double ***, int, int, int);
int /*<<< orphan*/ compute_surface_pressure(double ***, double ***, double ***,
                                            double ***, int ***, int, int, int,
                                            int, int, int, double, double,
                                            double, double, double, double,
                                            double, double);
int /*<<< orphan*/ compute_surface_values_1(double ***, double ***, double ***,
                                            double ***, int ***, int, int, int,
                                            int, int, int, double, double,
                                            double, double, double, double,
                                            double, double);
int /*<<< orphan*/ compute_surface_values_2(double ***, double ***, double ***,
                                            double ***, int ***, int, int, int,
                                            int, int, int, double, double,
                                            double, double, double, double,
                                            double, double);
int /*<<< orphan*/ compute_surface_values_3(double ***, double ***, double ***,
                                            double ***, int ***, int, int, int,
                                            int, int, int, double, double,
                                            double, double, double, double,
                                            double, double);
scalar_t__ issurface(int);
int /*<<< orphan*/ printf(char *);
void set_uvwp_surface(double ***U, double ***V, double ***W, double ***P,
                      int ***Flag, double dx, double dy, double dz, int imax,
                      int jmax, int kmax, double GX, double GY, double GZ,
                      double dt, double Re) {
  printf("clean_empty_space\n");
  clean_empty_space(Flag, U, V, W, P, imax, jmax, kmax);
  int i, j, k;
  printf("compute_surface_values_1 (free surface cells)\n");
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (issurface(Flag[i][j][k])) {
          compute_surface_values_1(U, V, W, P, Flag, i, j, k, imax, jmax, kmax,
                                   dx, dy, dz, dt, GX, GY, GZ, Re);
        }
      }
    }
  }
  printf("compute_surface_values_2 (cells next to free surface, planes )\n");
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (issurface(Flag[i][j][k])) {
          compute_surface_values_2(U, V, W, P, Flag, i, j, k, imax, jmax, kmax,
                                   dx, dy, dz, dt, GX, GY, GZ, Re);
        }
      }
    }
  }
  printf("compute_surface_values_3 (cells next to free surface, edges and "
         "corners )\n");
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (issurface(Flag[i][j][k])) {
          compute_surface_values_3(U, V, W, P, Flag, i, j, k, imax, jmax, kmax,
                                   dx, dy, dz, dt, GX, GY, GZ, Re);
        }
      }
    }
  }
  printf("compute_surface_pressure\n");
#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 (issurface(Flag[i][j][k])) {
          compute_surface_pressure(U, V, W, P, Flag, i, j, k, imax, jmax, kmax,
                                   dx, dy, dz, dt, GX, GY, GZ, Re);
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<set_uvwp_surface>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xb0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x48(%rbp)
movsd  %xmm2,-0x50(%rbp)
mov    %r9d,-0x54(%rbp)
movsd  %xmm3,-0x60(%rbp)
movsd  %xmm4,-0x68(%rbp)
movsd  %xmm5,-0x70(%rbp)
movsd  %xmm6,-0x78(%rbp)
movsd  %xmm7,-0x80(%rbp)
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x54(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <clean_empty_space@plt>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x54(%rbp),%eax
jg     1347 <set_uvwp_surface+0x1d7>
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     132e <set_uvwp_surface+0x1be>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     1315 <set_uvwp_surface+0x1a5>
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <issurface@plt>
cmp    $0x0,%rax
je     12fc <set_uvwp_surface+0x18c>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x84(%rbp),%r9d
mov    -0x88(%rbp),%r14d
mov    -0x8c(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm6
movsd  -0x80(%rbp),%xmm7
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1060 <compute_surface_values_1@plt>
jmp    1301 <set_uvwp_surface+0x191>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1244 <set_uvwp_surface+0xd4>
jmp    131a <set_uvwp_surface+0x1aa>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    122b <set_uvwp_surface+0xbb>
jmp    1333 <set_uvwp_surface+0x1c3>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1212 <set_uvwp_surface+0xa2>
lea    0xcf4(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x54(%rbp),%eax
jg     1492 <set_uvwp_surface+0x322>
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1479 <set_uvwp_surface+0x309>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     1460 <set_uvwp_surface+0x2f0>
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <issurface@plt>
cmp    $0x0,%rax
je     1447 <set_uvwp_surface+0x2d7>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x84(%rbp),%r9d
mov    -0x88(%rbp),%r14d
mov    -0x8c(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm6
movsd  -0x80(%rbp),%xmm7
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1080 <compute_surface_values_2@plt>
jmp    144c <set_uvwp_surface+0x2dc>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    138f <set_uvwp_surface+0x21f>
jmp    1465 <set_uvwp_surface+0x2f5>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1376 <set_uvwp_surface+0x206>
jmp    147e <set_uvwp_surface+0x30e>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    135d <set_uvwp_surface+0x1ed>
lea    0xbe9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x54(%rbp),%eax
jg     15dd <set_uvwp_surface+0x46d>
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     15c4 <set_uvwp_surface+0x454>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     15ab <set_uvwp_surface+0x43b>
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <issurface@plt>
cmp    $0x0,%rax
je     1592 <set_uvwp_surface+0x422>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x84(%rbp),%r9d
mov    -0x88(%rbp),%r14d
mov    -0x8c(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm6
movsd  -0x80(%rbp),%xmm7
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1050 <compute_surface_values_3@plt>
jmp    1597 <set_uvwp_surface+0x427>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14da <set_uvwp_surface+0x36a>
jmp    15b0 <set_uvwp_surface+0x440>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    14c1 <set_uvwp_surface+0x351>
jmp    15c9 <set_uvwp_surface+0x459>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    14a8 <set_uvwp_surface+0x338>
lea    0xae9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x54(%rbp),%eax
jg     1728 <set_uvwp_surface+0x5b8>
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     170f <set_uvwp_surface+0x59f>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     16f6 <set_uvwp_surface+0x586>
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <issurface@plt>
cmp    $0x0,%rax
je     16dd <set_uvwp_surface+0x56d>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x84(%rbp),%r9d
mov    -0x88(%rbp),%r14d
mov    -0x8c(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm6
movsd  -0x80(%rbp),%xmm7
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1090 <compute_surface_pressure@plt>
jmp    16e2 <set_uvwp_surface+0x572>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1625 <set_uvwp_surface+0x4b5>
jmp    16fb <set_uvwp_surface+0x58b>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    160c <set_uvwp_surface+0x49c>
jmp    1714 <set_uvwp_surface+0x5a4>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    15f3 <set_uvwp_surface+0x483>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_uvwp_surface>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movsd  %xmm7,0x78(%rsp)
movsd  %xmm6,0x70(%rsp)
movsd  %xmm5,0x68(%rsp)
movsd  %xmm4,0x60(%rsp)
movsd  %xmm3,0x58(%rsp)
mov    %r9d,%r14d
movsd  %xmm2,0x50(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm0,0x40(%rsp)
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    0xc8(%rsp),%eax
mov    %rax,(%rsp)
mov    0xc0(%rsp),%eax
mov    %rax,0x80(%rsp)
lea    0xe1c(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,0x20(%rsp)
mov    %rbx,%rsi
mov    (%rsp),%rbx
mov    %rbp,0x28(%rsp)
mov    %rbp,%rdx
mov    %r13,0x30(%rsp)
mov    %r13,%rcx
mov    %r12,0x38(%rsp)
mov    %r12,%r8
mov    0x80(%rsp),%r12
mov    %r14d,%r9d
push   %rbx
push   %r12
call   1070 <clean_empty_space@plt>
add    $0x10,%rsp
lea    0xde4(%rip),%rdi
call   1030 <puts@plt>
test   %r14d,%r14d
jle    1519 <set_uvwp_surface+0x3a9>
lea    0x1(%rbx),%r13d
lea    0x1(%r12),%eax
mov    %rax,0x18(%rsp)
mov    %r14,0x8(%rsp)
lea    0x1(%r14),%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%r14d
jmp    1277 <set_uvwp_surface+0x107>
add    $0x1,%r14
cmp    0x10(%rsp),%r14
mov    0x80(%rsp),%r12
je     133c <set_uvwp_surface+0x1cc>
test   %r12d,%r12d
jle    1260 <set_uvwp_surface+0xf0>
mov    $0x1,%ebp
jmp    129e <set_uvwp_surface+0x12e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
cmp    0x18(%rsp),%rbp
mov    %r12,%rbx
je     1260 <set_uvwp_surface+0xf0>
mov    %rbx,%r12
test   %ebx,%ebx
jle    1290 <set_uvwp_surface+0x120>
mov    $0x1,%ebx
jmp    12b9 <set_uvwp_surface+0x149>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r13
je     1290 <set_uvwp_surface+0x120>
mov    (%r15,%r14,8),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%rbx,4),%edi
call   1040 <issurface@plt>
test   %rax,%rax
je     12b0 <set_uvwp_surface+0x140>
sub    $0x8,%rsp
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %r15,%r8
mov    %r14d,%r9d
movsd  0x48(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
movsd  0x78(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
movsd  0x80(%rsp),%xmm7
push   %r12
push   0x90(%rsp)
push   0x20(%rsp)
push   %rbx
push   %rbp
call   1060 <compute_surface_values_1@plt>
add    $0x30,%rsp
jmp    12b0 <set_uvwp_surface+0x140>
lea    0xcfd(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    1525 <set_uvwp_surface+0x3b5>
mov    $0x1,%r14d
jmp    136f <set_uvwp_surface+0x1ff>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    0x10(%rsp),%r14
je     1429 <set_uvwp_surface+0x2b9>
test   %r12d,%r12d
jle    1360 <set_uvwp_surface+0x1f0>
mov    $0x1,%ebx
jmp    138b <set_uvwp_surface+0x21b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    0x18(%rsp),%rbx
je     1360 <set_uvwp_surface+0x1f0>
cmpl   $0x0,(%rsp)
jle    1380 <set_uvwp_surface+0x210>
mov    $0x1,%ebp
jmp    13a9 <set_uvwp_surface+0x239>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     1380 <set_uvwp_surface+0x210>
mov    (%r15,%r14,8),%rax
mov    (%rax,%rbx,8),%rax
mov    (%rax,%rbp,4),%edi
call   1040 <issurface@plt>
test   %rax,%rax
je     13a0 <set_uvwp_surface+0x230>
sub    $0x8,%rsp
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %r15,%r8
mov    %r14d,%r9d
movsd  0x48(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
movsd  0x78(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
movsd  0x80(%rsp),%xmm7
push   0x8(%rsp)
push   %r12
push   0x20(%rsp)
push   %rbp
push   %rbx
call   1080 <compute_surface_values_2@plt>
add    $0x30,%rsp
jmp    13a0 <set_uvwp_surface+0x230>
lea    0xc4f(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    1531 <set_uvwp_surface+0x3c1>
mov    $0x1,%r14d
jmp    145f <set_uvwp_surface+0x2ef>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    0x10(%rsp),%r14
je     154e <set_uvwp_surface+0x3de>
test   %r12d,%r12d
jle    1450 <set_uvwp_surface+0x2e0>
mov    $0x1,%ebx
jmp    147b <set_uvwp_surface+0x30b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    0x18(%rsp),%rbx
je     1450 <set_uvwp_surface+0x2e0>
cmpl   $0x0,(%rsp)
jle    1470 <set_uvwp_surface+0x300>
mov    $0x1,%ebp
jmp    1499 <set_uvwp_surface+0x329>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     1470 <set_uvwp_surface+0x300>
mov    (%r15,%r14,8),%rax
mov    (%rax,%rbx,8),%rax
mov    (%rax,%rbp,4),%edi
call   1040 <issurface@plt>
test   %rax,%rax
je     1490 <set_uvwp_surface+0x320>
sub    $0x8,%rsp
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %r15,%r8
mov    %r14d,%r9d
movsd  0x48(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
movsd  0x78(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
movsd  0x80(%rsp),%xmm7
push   0x8(%rsp)
push   %r12
push   0x20(%rsp)
push   %rbp
push   %rbx
call   1050 <compute_surface_values_3@plt>
add    $0x30,%rsp
jmp    1490 <set_uvwp_surface+0x320>
lea    0xb20(%rip),%rdi
call   1030 <puts@plt>
lea    0xb53(%rip),%rdi
call   1030 <puts@plt>
lea    0xb91(%rip),%rdi
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
lea    0xb74(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    1639 <set_uvwp_surface+0x4c9>
mov    $0x1,%r14d
jmp    157f <set_uvwp_surface+0x40f>
nopl   (%rax)
add    $0x1,%r14
cmp    0x10(%rsp),%r14
je     1639 <set_uvwp_surface+0x4c9>
test   %r12d,%r12d
jle    1570 <set_uvwp_surface+0x400>
mov    $0x1,%ebx
jmp    159b <set_uvwp_surface+0x42b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    0x18(%rsp),%rbx
je     1570 <set_uvwp_surface+0x400>
cmpl   $0x0,(%rsp)
jle    1590 <set_uvwp_surface+0x420>
mov    $0x1,%ebp
jmp    15b9 <set_uvwp_surface+0x449>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     1590 <set_uvwp_surface+0x420>
mov    (%r15,%r14,8),%rax
mov    (%rax,%rbx,8),%rax
mov    (%rax,%rbp,4),%edi
call   1040 <issurface@plt>
test   %rax,%rax
je     15b0 <set_uvwp_surface+0x440>
sub    $0x8,%rsp
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %r15,%r8
mov    %r14d,%r9d
movsd  0x48(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
movsd  0x78(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
movsd  0x80(%rsp),%xmm7
push   0x8(%rsp)
push   %r12
push   0x20(%rsp)
push   %rbp
push   %rbx
call   1090 <compute_surface_pressure@plt>
add    $0x30,%rsp
jmp    15b0 <set_uvwp_surface+0x440>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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