#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ errhandler(int, char *, char *);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
double getValidValue(double);
int getcelltype(int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, ...);
int /*<<< orphan*/ write_vtkHeader_debug(int /*<<< orphan*/ *, int, int, int,
                                         double, double, double);
int /*<<< orphan*/ write_vtkPointCoordinates_debug(int /*<<< orphan*/ *, int,
                                                   int, int, double, double,
                                                   double);
void write_vtkFile_debug(const char *szProblem, int timeStepNumber,
                         double xlength, double ylength, double zlength,
                         int imax, int jmax, int kmax, double dx, double dy,
                         double dz, double ***U, double ***V, double ***W,
                         double ***P, int ***Flag) {
  int i, j, k;
  double uVel, vVel, wVel;
  char szFileName[80];
  FILE *fp = NULL;
  sprintf(
      szFileName,
      "/media/norbert/940CB6150CB5F27A/Documents/simulation/%s.%i_debug.vtk",
      szProblem, timeStepNumber);
  fp = fopen(szFileName, "w");
  if (fp == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Failed to open %s", szFileName);
    errhandler(89,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/"
               "master/Backup/FinalProject/visual.c",
               szBuff);
    return;
  }
  write_vtkHeader_debug(fp, imax, jmax, kmax, dx, dy, dz);
  write_vtkPointCoordinates_debug(fp, imax, jmax, kmax, dx, dy, dz);
  fprintf(fp, "POINT_DATA %i \n", (imax + 3) * (jmax + 3) * (kmax + 3));
  fprintf(fp, "\n");
  fprintf(fp, "VECTORS velocity float\n");
  for (k = -1; k < kmax + 2; k++) {
    for (j = -1; j < jmax + 2; j++) {
      for (i = -1; i < imax + 2; i++) {
        if (i >= 0 && j >= 0 && k >= 0 && i < imax + 1 && j < jmax + 1 &&
            k < kmax + 1) {
          uVel = getValidValue((U[i][j][k] + U[i][j + 1][k] + U[i][j][k + 1] +
                                U[i][j + 1][k + 1]) *
                               0.25);
          vVel = getValidValue((V[i][j][k] + V[i + 1][j][k] + V[i][j][k + 1] +
                                V[i + 1][j][k + 1]) *
                               0.25);
          wVel = getValidValue((W[i][j][k] + W[i + 1][j][k] + W[i][j + 1][k] +
                                W[i + 1][j + 1][k]) *
                               0.25);
          fprintf(fp, "%f %f %f\n", uVel, vVel, wVel);
        } else {
          fprintf(fp, "0 0 0\n");
        }
      }
    }
  }
  fprintf(fp, "\n");
  fprintf(fp, "CELL_DATA %i \n", ((imax + 2) * (jmax + 2) * (kmax + 2)));
  fprintf(fp, "SCALARS pressure float 1 \n");
  fprintf(fp, "LOOKUP_TABLE default \n");
  for (k = 0; k < kmax + 2; k++) {
    for (j = 0; j < jmax + 2; j++) {
      for (i = 0; i < imax + 2; i++) {
        fprintf(fp, "%f\n", getValidValue(P[i][j][k]));
      }
    }
  }
  fprintf(fp, "\n");
  fprintf(fp, "SCALARS flag short 1 \n");
  fprintf(fp, "LOOKUP_TABLE default \n");
  for (k = 0; k < kmax + 2; k++) {
    for (j = 0; j < jmax + 2; j++) {
      for (i = 0; i < imax + 2; i++) {
        fprintf(fp, "%d\n", getcelltype(Flag[i][j][k]));
      }
    }
  }
  if (fclose(fp)) {
    char szBuff[80];
    sprintf(szBuff, "Failed to close %s", szFileName);
    errhandler(146,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/"
               "master/Backup/FinalProject/visual.c",
               szBuff);
  }
}


x86 assembly (clang, -O0):
<write_vtkFile_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
mov    %r8d,-0x34(%rbp)
movsd  %xmm3,-0x40(%rbp)
movsd  %xmm4,-0x48(%rbp)
movsd  %xmm5,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movq   $0x0,-0xd8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xe0a(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
lea    0xe3a(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0xd8(%rbp)
cmpq   $0x0,-0xd8(%rbp)
jne    1266 <write_vtkFile_debug+0xd6>
lea    -0x130(%rbp),%rdi
lea    -0xd0(%rbp),%rdx
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0x130(%rbp),%rdx
mov    $0x59,%edi
lea    0xe05(%rip),%rsi
call   1030 <errhandler@plt>
jmp    1866 <write_vtkFile_debug+0x6d6>
mov    -0xd8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
call   1050 <write_vtkHeader_debug@plt>
mov    -0xd8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
call   1060 <write_vtkPointCoordinates_debug@plt>
mov    -0xd8(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x3,%edx
mov    -0x30(%rbp),%eax
add    $0x3,%eax
imul   %eax,%edx
mov    -0x34(%rbp),%eax
add    $0x3,%eax
imul   %eax,%edx
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xe70(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xe0a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0xffffffff,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    15ef <write_vtkFile_debug+0x45f>
movl   $0xffffffff,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    15dc <write_vtkFile_debug+0x44c>
movl   $0xffffffff,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    15c9 <write_vtkFile_debug+0x439>
cmpl   $0x0,-0x5c(%rbp)
jl     15a1 <write_vtkFile_debug+0x411>
cmpl   $0x0,-0x60(%rbp)
jl     15a1 <write_vtkFile_debug+0x411>
cmpl   $0x0,-0x64(%rbp)
jl     15a1 <write_vtkFile_debug+0x411>
mov    -0x5c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    15a1 <write_vtkFile_debug+0x411>
mov    -0x60(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    15a1 <write_vtkFile_debug+0x411>
mov    -0x64(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    15a1 <write_vtkFile_debug+0x411>
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xbd2(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1090 <getValidValue@plt>
movsd  %xmm0,-0x70(%rbp)
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xb34(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1090 <getValidValue@plt>
movsd  %xmm0,-0x78(%rbp)
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x60(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xa96(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1090 <getValidValue@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0xd8(%rbp),%rdi
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
lea    0xb8b(%rip),%rsi
mov    $0x3,%al
call   1070 <fprintf@plt>
jmp    15b6 <write_vtkFile_debug+0x426>
mov    -0xd8(%rbp),%rdi
lea    0xb7b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    15bb <write_vtkFile_debug+0x42b>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    133c <write_vtkFile_debug+0x1ac>
jmp    15ce <write_vtkFile_debug+0x43e>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1324 <write_vtkFile_debug+0x194>
jmp    15e1 <write_vtkFile_debug+0x451>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    130c <write_vtkFile_debug+0x17c>
mov    -0xd8(%rbp),%rdi
lea    0xb5c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    $0x2,%edx
mov    -0x30(%rbp),%eax
add    $0x2,%eax
imul   %eax,%edx
mov    -0x34(%rbp),%eax
add    $0x2,%eax
imul   %eax,%edx
lea    0xb07(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xb01(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xb07(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    171c <write_vtkFile_debug+0x58c>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1709 <write_vtkFile_debug+0x579>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    16f6 <write_vtkFile_debug+0x566>
mov    -0xd8(%rbp),%rax
mov    %rax,-0x188(%rbp)
mov    0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1090 <getValidValue@plt>
mov    -0x188(%rbp),%rdi
lea    0xa45(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1692 <write_vtkFile_debug+0x502>
jmp    16fb <write_vtkFile_debug+0x56b>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    167a <write_vtkFile_debug+0x4ea>
jmp    170e <write_vtkFile_debug+0x57e>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1662 <write_vtkFile_debug+0x4d2>
mov    -0xd8(%rbp),%rdi
lea    0xa2f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xa33(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    0xa07(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    181c <write_vtkFile_debug+0x68c>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1809 <write_vtkFile_debug+0x679>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    17f6 <write_vtkFile_debug+0x666>
mov    -0xd8(%rbp),%rax
mov    %rax,-0x190(%rbp)
mov    0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   10b0 <getcelltype@plt>
mov    -0x190(%rbp),%rdi
mov    %eax,%edx
lea    0x9a8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1792 <write_vtkFile_debug+0x602>
jmp    17fb <write_vtkFile_debug+0x66b>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    177a <write_vtkFile_debug+0x5ea>
jmp    180e <write_vtkFile_debug+0x67e>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1762 <write_vtkFile_debug+0x5d2>
mov    -0xd8(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     1866 <write_vtkFile_debug+0x6d6>
lea    -0x180(%rbp),%rdi
lea    -0xd0(%rbp),%rdx
lea    0x946(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0x180(%rbp),%rdx
mov    $0x92,%edi
lea    0x800(%rip),%rsi
call   1030 <errhandler@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_vtkFile_debug>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %r9,0x70(%rsp)
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x38(%rsp)
mov    %r8d,%r15d
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xe1c(%rip),%rsi
lea    0x80(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
lea    0xe48(%rip),%rsi
mov    %rbp,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     14e5 <write_vtkFile_debug+0x335>
mov    %rax,%r13
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
movsd  0x38(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1050 <write_vtkHeader_debug@plt>
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
movsd  0x38(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1070 <write_vtkPointCoordinates_debug@plt>
lea    0x3(%rbx),%eax
lea    0x3(%r14),%ecx
imul   %eax,%ecx
lea    0x3(%r15),%edx
imul   %ecx,%edx
lea    0xe83(%rip),%rsi
xor    %ebp,%ebp
mov    %r13,%rdi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
lea    0xe73(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10c0 <fwrite@plt>
lea    0x2(%r15),%ecx
cmp    $0xfffffffd,%r15d
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r15,0x50(%rsp)
mov    %ecx,0x2c(%rsp)
jle    1517 <write_vtkFile_debug+0x367>
movslq %ebx,%r12
lea    0x2(%rbx),%eax
mov    %rax,0x10(%rsp)
movslq %r14d,%rax
mov    %rax,0x38(%rsp)
lea    0x2(%r14),%eax
movslq %r15d,%rdx
mov    %rdx,0x78(%rsp)
test   %ecx,%ecx
cmovg  %ecx,%ebp
mov    %rbp,0x58(%rsp)
mov    $0xffffffffffffffff,%rbp
mov    %rax,0x18(%rsp)
jmp    1312 <write_vtkFile_debug+0x162>
nop
add    $0x1,%rbp
mov    %rbp,%rcx
cmp    0x58(%rsp),%rcx
je     14d6 <write_vtkFile_debug+0x326>
cmp    $0xfffffffd,%r14d
jle    1300 <write_vtkFile_debug+0x150>
lea    0x1(%rbp),%rcx
mov    $0xffffffffffffffff,%r14
mov    %rcx,0x60(%rsp)
jmp    1340 <write_vtkFile_debug+0x190>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
mov    %r14,%rdx
cmp    %rax,%rdx
je     14c3 <write_vtkFile_debug+0x313>
cmp    $0xfffffffd,%ebx
jle    1330 <write_vtkFile_debug+0x180>
lea    0x1(%r14),%rax
mov    %rax,0x68(%rsp)
mov    $0xffffffffffffffff,%r15
mov    0x10(%rsp),%rbx
jmp    1386 <write_vtkFile_debug+0x1d6>
nopl   0x0(%rax)
mov    $0x6,%esi
mov    $0x1,%edx
lea    0xdb9(%rip),%rdi
mov    %r13,%rcx
call   10c0 <fwrite@plt>
add    $0x1,%r15
cmp    %rbx,%r15
je     14a3 <write_vtkFile_debug+0x2f3>
test   %r15,%r15
js     1360 <write_vtkFile_debug+0x1b0>
test   %r14,%r14
js     1360 <write_vtkFile_debug+0x1b0>
test   %rbp,%rbp
js     1360 <write_vtkFile_debug+0x1b0>
cmp    %r12,%r15
jg     1360 <write_vtkFile_debug+0x1b0>
cmp    0x38(%rsp),%r14
jg     1360 <write_vtkFile_debug+0x1b0>
cmp    0x78(%rsp),%rbp
jg     1360 <write_vtkFile_debug+0x1b0>
mov    0x70(%rsp),%rax
mov    (%rax,%r15,8),%rax
mov    (%rax,%r14,8),%rcx
mov    0x8(%rax,%r14,8),%rax
movsd  (%rcx,%rbp,8),%xmm0
addsd  (%rax,%rbp,8),%xmm0
addsd  0x8(%rcx,%rbp,8),%xmm0
addsd  0x8(%rax,%rbp,8),%xmm0
movsd  0xc28(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   10a0 <getValidValue@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x160(%rsp),%rcx
mov    (%rcx,%r15,8),%rax
mov    0x8(%rcx,%r15,8),%rcx
mov    (%rax,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    (%rcx,%r14,8),%rcx
addsd  (%rcx,%rbp,8),%xmm0
addsd  0x8(%rax,%rbp,8),%xmm0
lea    0x1(%r15),%rbx
addsd  0x8(%rcx,%rbp,8),%xmm0
mulsd  0xbde(%rip),%xmm0
call   10a0 <getValidValue@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x168(%rsp),%rcx
mov    (%rcx,%r15,8),%rax
mov    0x8(%rcx,%r15,8),%rcx
mov    (%rax,%r14,8),%rdx
mov    0x8(%rax,%r14,8),%rax
movsd  (%rdx,%rbp,8),%xmm0
mov    (%rcx,%r14,8),%rdx
addsd  (%rdx,%rbp,8),%xmm0
addsd  (%rax,%rbp,8),%xmm0
mov    0x8(%rcx,%r14,8),%rax
addsd  (%rax,%rbp,8),%xmm0
mulsd  0xb94(%rip),%xmm0
call   10a0 <getValidValue@plt>
movapd %xmm0,%xmm2
mov    %r13,%rdi
lea    0xca1(%rip),%rsi
movsd  0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    $0x3,%al
call   1080 <fprintf@plt>
mov    %rbx,%r15
mov    0x10(%rsp),%rbx
cmp    %rbx,%r15
jne    1386 <write_vtkFile_debug+0x1d6>
mov    0x68(%rsp),%rdx
mov    %rdx,%r14
mov    0x48(%rsp),%rbx
mov    0x18(%rsp),%rax
mov    0x60(%rsp),%rcx
cmp    %rax,%rdx
jne    1340 <write_vtkFile_debug+0x190>
mov    %rcx,%rbp
mov    0x40(%rsp),%r14
cmp    0x58(%rsp),%rcx
jne    1312 <write_vtkFile_debug+0x162>
mov    %rax,%rbp
mov    0x50(%rsp),%r15
mov    0x10(%rsp),%r12
jmp    151f <write_vtkFile_debug+0x36f>
lea    0xb63(%rip),%rsi
lea    0xd0(%rsp),%rbx
lea    0x80(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
lea    0xb54(%rip),%rsi
mov    $0x59,%edi
jmp    17dc <write_vtkFile_debug+0x62c>
lea    0x2(%rbx),%r12d
lea    0x2(%r14),%ebp
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
mov    %rbp,0x18(%rsp)
mov    %ebp,%edx
mov    %r12,%rbp
imul   %r12d,%edx
mov    0x2c(%rsp),%r12d
imul   %r12d,%edx
lea    0xbe7(%rip),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xbe5(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10c0 <fwrite@plt>
lea    0xbe7(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10c0 <fwrite@plt>
cmp    $0xffffffff,%r15d
mov    %r13,0x30(%rsp)
jl     1655 <write_vtkFile_debug+0x4a5>
mov    0x170(%rsp),%rax
cmp    $0x2,%ebp
mov    $0x1,%ecx
mov    $0x1,%ebx
mov    %rbp,0x10(%rsp)
cmovge %ebp,%ebx
mov    0x18(%rsp),%rsi
cmp    $0x2,%esi
mov    $0x1,%edx
cmovge %esi,%edx
mov    %rdx,0x8(%rsp)
cmp    $0x2,%r12d
cmovge %r12d,%ecx
mov    %rcx,0x20(%rsp)
xor    %r14d,%r14d
mov    0x30(%rsp),%r12
jmp    15ef <write_vtkFile_debug+0x43f>
xchg   %ax,%ax
add    $0x1,%r14
cmp    0x20(%rsp),%r14
je     1699 <write_vtkFile_debug+0x4e9>
cmpl   $0xffffffff,0x40(%rsp)
jl     15e0 <write_vtkFile_debug+0x430>
xor    %r15d,%r15d
jmp    160b <write_vtkFile_debug+0x45b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    0x8(%rsp),%r15
je     15e0 <write_vtkFile_debug+0x430>
cmpl   $0xffffffff,0x48(%rsp)
jl     1600 <write_vtkFile_debug+0x450>
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rbp
mov    (%rax,%r13,8),%rax
mov    (%rax,%r15,8),%rax
movsd  (%rax,%r14,8),%xmm0
call   10a0 <getValidValue@plt>
mov    %r12,%rdi
lea    0xae6(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rax
add    $0x1,%r13
cmp    %r13,%rbx
jne    1620 <write_vtkFile_debug+0x470>
jmp    1600 <write_vtkFile_debug+0x450>
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
lea    0xb09(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10c0 <fwrite@plt>
lea    0xad9(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10c0 <fwrite@plt>
jmp    17a0 <write_vtkFile_debug+0x5f0>
mov    $0xa,%edi
mov    0x30(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <fputc@plt>
lea    0xac0(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
lea    0xa90(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
cmpl   $0xffffffff,0x50(%rsp)
jl     17a0 <write_vtkFile_debug+0x5f0>
mov    0x10(%rsp),%rax
cmp    $0x2,%eax
mov    $0x1,%ecx
cmovl  %ecx,%eax
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rax
cmp    $0x2,%eax
cmovl  %ecx,%eax
mov    %rax,0x18(%rsp)
mov    0x2c(%rsp),%eax
cmp    $0x2,%eax
cmovge %eax,%ecx
mov    %rcx,0x8(%rsp)
xor    %r15d,%r15d
mov    0x10(%rsp),%r14
mov    0x30(%rsp),%r12
jmp    173b <write_vtkFile_debug+0x58b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    0x8(%rsp),%r15
je     17a0 <write_vtkFile_debug+0x5f0>
cmpl   $0xffffffff,0x40(%rsp)
jl     1730 <write_vtkFile_debug+0x580>
xor    %ebp,%ebp
jmp    175b <write_vtkFile_debug+0x5ab>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    0x18(%rsp),%rbp
je     1730 <write_vtkFile_debug+0x580>
cmpl   $0xffffffff,0x48(%rsp)
mov    0x178(%rsp),%r13
jl     1750 <write_vtkFile_debug+0x5a0>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x0(%r13,%rbx,8),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%r15,4),%edi
call   10d0 <getcelltype@plt>
mov    %r12,%rdi
lea    0x9fd(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1770 <write_vtkFile_debug+0x5c0>
jmp    1750 <write_vtkFile_debug+0x5a0>
mov    0x30(%rsp),%rdi
call   1040 <fclose@plt>
test   %rax,%rax
je     17e4 <write_vtkFile_debug+0x634>
lea    0x9d7(%rip),%rsi
lea    0xd0(%rsp),%rbx
lea    0x80(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
lea    0x88a(%rip),%rsi
mov    $0x92,%edi
mov    %rbx,%rdx
call   1030 <errhandler@plt>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [69 x i8] c"/media/norbert/940CB6150CB5F27A/Documents/simulation/%s.%i_debug.vtk\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [18 x i8] c"Failed to open %s\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/visual.c\00"
@.str.4 = [16 x i8] c"POINT_DATA %i \0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [24 x i8] c"VECTORS velocity float\0A\00"
@.str.7 = [10 x i8] c"%f %f %f\0A\00"
@.str.8 = [7 x i8] c"0 0 0\0A\00"
@.str.9 = [15 x i8] c"CELL_DATA %i \0A\00"
@.str.10 = [27 x i8] c"SCALARS pressure float 1 \0A\00"
@.str.11 = [23 x i8] c"LOOKUP_TABLE default \0A\00"
@.str.12 = [4 x i8] c"%f\0A\00"
@.str.13 = [23 x i8] c"SCALARS flag short 1 \0A\00"
@.str.14 = [4 x i8] c"%d\0A\00"
@.str.15 = [19 x i8] c"Failed to close %s\00"
define void @write_vtkFile_debug(i8* %0, i32 %1, double %2, double %3, double %4, i32 %5, i32 %6, i32 %7, double %8, double %9, double %10, double*** %11, double*** %12, double*** %13, double*** %14, i32*** %15) {
%17 = alloca i8*
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double***
%29 = alloca double***
%30 = alloca double***
%31 = alloca double***
%32 = alloca i32***
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca [80 x i8]
%40 = alloca i32*
%41 = alloca [80 x i8]
%42 = alloca [80 x i8]
store i8* %0, i8** %17
store i32 %1, i32* %18
store double %2, double* %19
store double %3, double* %20
store double %4, double* %21
store i32 %5, i32* %22
store i32 %6, i32* %23
store i32 %7, i32* %24
store double %8, double* %25
store double %9, double* %26
store double %10, double* %27
store double*** %11, double**** %28
store double*** %12, double**** %29
store double*** %13, double**** %30
store double*** %14, double**** %31
store i32*** %15, i32**** %32
store i32* null, i32** %40
%43 = getelementptr inbounds [80 x i8], [80 x i8]* %39, i64 0, i64 0
%44 = load i8*, i8** %17
%45 = load i32, i32* %18
%46 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %43, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %44, i32 %45)
%47 = getelementptr inbounds [80 x i8], [80 x i8]* %39, i64 0, i64 0
%48 = call i32* @fopen(i8* %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %48, i32** %40
%49 = load i32*, i32** %40
%50 = icmp eq i32* %49, null
br i1 %50, label %51, label %57
51: ; preds = %16
%52 = getelementptr inbounds [80 x i8], [80 x i8]* %41, i64 0, i64 0
%53 = getelementptr inbounds [80 x i8], [80 x i8]* %39, i64 0, i64 0
%54 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %52, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %53)
%55 = getelementptr inbounds [80 x i8], [80 x i8]* %41, i64 0, i64 0
%56 = call i32 @errhandler(i32 89, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %55)
br label %457
57: ; preds = %16
%58 = load i32*, i32** %40
%59 = load i32, i32* %22
%60 = load i32, i32* %23
%61 = load i32, i32* %24
%62 = load double, double* %25
%63 = load double, double* %26
%64 = load double, double* %27
%65 = call i32 @write_vtkHeader_debug(i32* %58, i32 %59, i32 %60, i32 %61, double %62, double %63, double %64)
%66 = load i32*, i32** %40
%67 = load i32, i32* %22
%68 = load i32, i32* %23
%69 = load i32, i32* %24
%70 = load double, double* %25
%71 = load double, double* %26
%72 = load double, double* %27
%73 = call i32 @write_vtkPointCoordinates_debug(i32* %66, i32 %67, i32 %68, i32 %69, double %70, double %71, double %72)
%74 = load i32*, i32** %40
%75 = load i32, i32* %22
%76 = add nsw i32 %75, 3
%77 = load i32, i32* %23
%78 = add nsw i32 %77, 3
%79 = mul nsw i32 %76, %78
%80 = load i32, i32* %24
%81 = add nsw i32 %80, 3
%82 = mul nsw i32 %79, %81
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %82)
%84 = load i32*, i32** %40
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%86 = load i32*, i32** %40
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %35
br label %88
88: ; preds = %330, %57
%89 = load i32, i32* %35
%90 = load i32, i32* %24
%91 = add nsw i32 %90, 2
%92 = icmp slt i32 %89, %91
br i1 %92, label %93, label %333
93: ; preds = %88
store i32 -1, i32* %34
br label %94
94: ; preds = %326, %93
%95 = load i32, i32* %34
%96 = load i32, i32* %23
%97 = add nsw i32 %96, 2
%98 = icmp slt i32 %95, %97
br i1 %98, label %99, label %329
99: ; preds = %94
store i32 -1, i32* %33
br label %100
100: ; preds = %322, %99
%101 = load i32, i32* %33
%102 = load i32, i32* %22
%103 = add nsw i32 %102, 2
%104 = icmp slt i32 %101, %103
br i1 %104, label %105, label %325
105: ; preds = %100
%106 = load i32, i32* %33
%107 = icmp sge i32 %106, 0
br i1 %107, label %108, label %318
108: ; preds = %105
%109 = load i32, i32* %34
%110 = icmp sge i32 %109, 0
br i1 %110, label %111, label %318
111: ; preds = %108
%112 = load i32, i32* %35
%113 = icmp sge i32 %112, 0
br i1 %113, label %114, label %318
114: ; preds = %111
%115 = load i32, i32* %33
%116 = load i32, i32* %22
%117 = add nsw i32 %116, 1
%118 = icmp slt i32 %115, %117
br i1 %118, label %119, label %318
119: ; preds = %114
%120 = load i32, i32* %34
%121 = load i32, i32* %23
%122 = add nsw i32 %121, 1
%123 = icmp slt i32 %120, %122
br i1 %123, label %124, label %318
124: ; preds = %119
%125 = load i32, i32* %35
%126 = load i32, i32* %24
%127 = add nsw i32 %126, 1
%128 = icmp slt i32 %125, %127
br i1 %128, label %129, label %318
129: ; preds = %124
%130 = load double***, double**** %28
%131 = load i32, i32* %33
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double**, double*** %130, i64 %132
%134 = load double**, double*** %133
%135 = load i32, i32* %34
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double*, double** %134, i64 %136
%138 = load double*, double** %137
%139 = load i32, i32* %35
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %138, i64 %140
%142 = load double, double* %141
%143 = load double***, double**** %28
%144 = load i32, i32* %33
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double**, double*** %143, i64 %145
%147 = load double**, double*** %146
%148 = load i32, i32* %34
%149 = add nsw i32 %148, 1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double*, double** %147, i64 %150
%152 = load double*, double** %151
%153 = load i32, i32* %35
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
%156 = load double, double* %155
%157 = fadd double %142, %156
%158 = load double***, double**** %28
%159 = load i32, i32* %33
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double**, double*** %158, i64 %160
%162 = load double**, double*** %161
%163 = load i32, i32* %34
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double*, double** %162, i64 %164
%166 = load double*, double** %165
%167 = load i32, i32* %35
%168 = add nsw i32 %167, 1
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %166, i64 %169
%171 = load double, double* %170
%172 = fadd double %157, %171
%173 = load double***, double**** %28
%174 = load i32, i32* %33
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double**, double*** %173, i64 %175
%177 = load double**, double*** %176
%178 = load i32, i32* %34
%179 = add nsw i32 %178, 1
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double*, double** %177, i64 %180
%182 = load double*, double** %181
%183 = load i32, i32* %35
%184 = add nsw i32 %183, 1
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %182, i64 %185
%187 = load double, double* %186
%188 = fadd double %172, %187
%189 = fmul double %188, 2.500000e-01
%190 = call double @getValidValue(double %189)
store double %190, double* %36
%191 = load double***, double**** %29
%192 = load i32, i32* %33
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds double**, double*** %191, i64 %193
%195 = load double**, double*** %194
%196 = load i32, i32* %34
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double*, double** %195, i64 %197
%199 = load double*, double** %198
%200 = load i32, i32* %35
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = load double***, double**** %29
%205 = load i32, i32* %33
%206 = add nsw i32 %205, 1
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds double**, double*** %204, i64 %207
%209 = load double**, double*** %208
%210 = load i32, i32* %34
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double*, double** %209, i64 %211
%213 = load double*, double** %212
%214 = load i32, i32* %35
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds double, double* %213, i64 %215
%217 = load double, double* %216
%218 = fadd double %203, %217
%219 = load double***, double**** %29
%220 = load i32, i32* %33
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double**, double*** %219, i64 %221
%223 = load double**, double*** %222
%224 = load i32, i32* %34
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double*, double** %223, i64 %225
%227 = load double*, double** %226
%228 = load i32, i32* %35
%229 = add nsw i32 %228, 1
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double, double* %227, i64 %230
%232 = load double, double* %231
%233 = fadd double %218, %232
%234 = load double***, double**** %29
%235 = load i32, i32* %33
%236 = add nsw i32 %235, 1
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds double**, double*** %234, i64 %237
%239 = load double**, double*** %238
%240 = load i32, i32* %34
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double*, double** %239, i64 %241
%243 = load double*, double** %242
%244 = load i32, i32* %35
%245 = add nsw i32 %244, 1
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %243, i64 %246
%248 = load double, double* %247
%249 = fadd double %233, %248
%250 = fmul double %249, 2.500000e-01
%251 = call double @getValidValue(double %250)
store double %251, double* %37
%252 = load double***, double**** %30
%253 = load i32, i32* %33
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double**, double*** %252, i64 %254
%256 = load double**, double*** %255
%257 = load i32, i32* %34
%258 = sext i32 %257 to i64
%259 = getelementptr inbounds double*, double** %256, i64 %258
%260 = load double*, double** %259
%261 = load i32, i32* %35
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds double, double* %260, i64 %262
%264 = load double, double* %263
%265 = load double***, double**** %30
%266 = load i32, i32* %33
%267 = add nsw i32 %266, 1
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds double**, double*** %265, i64 %268
%270 = load double**, double*** %269
%271 = load i32, i32* %34
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds double*, double** %270, i64 %272
%274 = load double*, double** %273
%275 = load i32, i32* %35
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds double, double* %274, i64 %276
%278 = load double, double* %277
%279 = fadd double %264, %278
%280 = load double***, double**** %30
%281 = load i32, i32* %33
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds double**, double*** %280, i64 %282
%284 = load double**, double*** %283
%285 = load i32, i32* %34
%286 = add nsw i32 %285, 1
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds double*, double** %284, i64 %287
%289 = load double*, double** %288
%290 = load i32, i32* %35
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds double, double* %289, i64 %291
%293 = load double, double* %292
%294 = fadd double %279, %293
%295 = load double***, double**** %30
%296 = load i32, i32* %33
%297 = add nsw i32 %296, 1
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds double**, double*** %295, i64 %298
%300 = load double**, double*** %299
%301 = load i32, i32* %34
%302 = add nsw i32 %301, 1
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds double*, double** %300, i64 %303
%305 = load double*, double** %304
%306 = load i32, i32* %35
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds double, double* %305, i64 %307
%309 = load double, double* %308
%310 = fadd double %294, %309
%311 = fmul double %310, 2.500000e-01
%312 = call double @getValidValue(double %311)
store double %312, double* %38
%313 = load i32*, i32** %40
%314 = load double, double* %36
%315 = load double, double* %37
%316 = load double, double* %38
%317 = call i32 (i32*, i8*, ...) @fprintf(i32* %313, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), double %314, double %315, double %316)
br label %321
318: ; preds = %124, %119, %114, %111, %108, %105
%319 = load i32*, i32** %40
%320 = call i32 (i32*, i8*, ...) @fprintf(i32* %319, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %321
321: ; preds = %318, %129
br label %322
322: ; preds = %321
%323 = load i32, i32* %33
%324 = add nsw i32 %323, 1
store i32 %324, i32* %33
br label %100
325: ; preds = %100
br label %326
326: ; preds = %325
%327 = load i32, i32* %34
%328 = add nsw i32 %327, 1
store i32 %328, i32* %34
br label %94
329: ; preds = %94
br label %330
330: ; preds = %329
%331 = load i32, i32* %35
%332 = add nsw i32 %331, 1
store i32 %332, i32* %35
br label %88
333: ; preds = %88
%334 = load i32*, i32** %40
%335 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%336 = load i32*, i32** %40
%337 = load i32, i32* %22
%338 = add nsw i32 %337, 2
%339 = load i32, i32* %23
%340 = add nsw i32 %339, 2
%341 = mul nsw i32 %338, %340
%342 = load i32, i32* %24
%343 = add nsw i32 %342, 2
%344 = mul nsw i32 %341, %343
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %336, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %344)
%346 = load i32*, i32** %40
%347 = call i32 (i32*, i8*, ...) @fprintf(i32* %346, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%348 = load i32*, i32** %40
%349 = call i32 (i32*, i8*, ...) @fprintf(i32* %348, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %35
br label %350
350: ; preds = %392, %333
%351 = load i32, i32* %35
%352 = load i32, i32* %24
%353 = add nsw i32 %352, 2
%354 = icmp slt i32 %351, %353
br i1 %354, label %355, label %395
355: ; preds = %350
store i32 0, i32* %34
br label %356
356: ; preds = %388, %355
%357 = load i32, i32* %34
%358 = load i32, i32* %23
%359 = add nsw i32 %358, 2
%360 = icmp slt i32 %357, %359
br i1 %360, label %361, label %391
361: ; preds = %356
store i32 0, i32* %33
br label %362
362: ; preds = %384, %361
%363 = load i32, i32* %33
%364 = load i32, i32* %22
%365 = add nsw i32 %364, 2
%366 = icmp slt i32 %363, %365
br i1 %366, label %367, label %387
367: ; preds = %362
%368 = load i32*, i32** %40
%369 = load double***, double**** %31
%370 = load i32, i32* %33
%371 = sext i32 %370 to i64
%372 = getelementptr inbounds double**, double*** %369, i64 %371
%373 = load double**, double*** %372
%374 = load i32, i32* %34
%375 = sext i32 %374 to i64
%376 = getelementptr inbounds double*, double** %373, i64 %375
%377 = load double*, double** %376
%378 = load i32, i32* %35
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds double, double* %377, i64 %379
%381 = load double, double* %380
%382 = call double @getValidValue(double %381)
%383 = call i32 (i32*, i8*, ...) @fprintf(i32* %368, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %382)
br label %384
384: ; preds = %367
%385 = load i32, i32* %33
%386 = add nsw i32 %385, 1
store i32 %386, i32* %33
br label %362
387: ; preds = %362
br label %388
388: ; preds = %387
%389 = load i32, i32* %34
%390 = add nsw i32 %389, 1
store i32 %390, i32* %34
br label %356
391: ; preds = %356
br label %392
392: ; preds = %391
%393 = load i32, i32* %35
%394 = add nsw i32 %393, 1
store i32 %394, i32* %35
br label %350
395: ; preds = %350
%396 = load i32*, i32** %40
%397 = call i32 (i32*, i8*, ...) @fprintf(i32* %396, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%398 = load i32*, i32** %40
%399 = call i32 (i32*, i8*, ...) @fprintf(i32* %398, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%400 = load i32*, i32** %40
%401 = call i32 (i32*, i8*, ...) @fprintf(i32* %400, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %35
br label %402
402: ; preds = %444, %395
%403 = load i32, i32* %35
%404 = load i32, i32* %24
%405 = add nsw i32 %404, 2
%406 = icmp slt i32 %403, %405
br i1 %406, label %407, label %447
407: ; preds = %402
store i32 0, i32* %34
br label %408
408: ; preds = %440, %407
%409 = load i32, i32* %34
%410 = load i32, i32* %23
%411 = add nsw i32 %410, 2
%412 = icmp slt i32 %409, %411
br i1 %412, label %413, label %443
413: ; preds = %408
store i32 0, i32* %33
br label %414
414: ; preds = %436, %413
%415 = load i32, i32* %33
%416 = load i32, i32* %22
%417 = add nsw i32 %416, 2
%418 = icmp slt i32 %415, %417
br i1 %418, label %419, label %439
419: ; preds = %414
%420 = load i32*, i32** %40
%421 = load i32***, i32**** %32
%422 = load i32, i32* %33
%423 = sext i32 %422 to i64
%424 = getelementptr inbounds i32**, i32*** %421, i64 %423
%425 = load i32**, i32*** %424
%426 = load i32, i32* %34
%427 = sext i32 %426 to i64
%428 = getelementptr inbounds i32*, i32** %425, i64 %427
%429 = load i32*, i32** %428
%430 = load i32, i32* %35
%431 = sext i32 %430 to i64
%432 = getelementptr inbounds i32, i32* %429, i64 %431
%433 = load i32, i32* %432
%434 = call i32 @getcelltype(i32 %433)
%435 = call i32 (i32*, i8*, ...) @fprintf(i32* %420, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %434)
br label %436
436: ; preds = %419
%437 = load i32, i32* %33
%438 = add nsw i32 %437, 1
store i32 %438, i32* %33
br label %414
439: ; preds = %414
br label %440
440: ; preds = %439
%441 = load i32, i32* %34
%442 = add nsw i32 %441, 1
store i32 %442, i32* %34
br label %408
443: ; preds = %408
br label %444
444: ; preds = %443
%445 = load i32, i32* %35
%446 = add nsw i32 %445, 1
store i32 %446, i32* %35
br label %402
447: ; preds = %402
%448 = load i32*, i32** %40
%449 = call i64 @fclose(i32* %448)
%450 = icmp ne i64 %449, 0
br i1 %450, label %451, label %457
451: ; preds = %447
%452 = getelementptr inbounds [80 x i8], [80 x i8]* %42, i64 0, i64 0
%453 = getelementptr inbounds [80 x i8], [80 x i8]* %39, i64 0, i64 0
%454 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %452, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i8* %453)
%455 = getelementptr inbounds [80 x i8], [80 x i8]* %42, i64 0, i64 0
%456 = call i32 @errhandler(i32 146, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %455)
br label %457
457: ; preds = %51, %451, %447
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"/media/norbert/940CB6150CB5F27A/Documents/simulation/%s.%i_debug.vtk\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [18 x i8] c"Failed to open %s\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/visual.c\00"
@.str.4 = [16 x i8] c"POINT_DATA %i \0A\00"
@.str.6 = [24 x i8] c"VECTORS velocity float\0A\00"
@.str.7 = [10 x i8] c"%f %f %f\0A\00"
@.str.8 = [7 x i8] c"0 0 0\0A\00"
@.str.9 = [15 x i8] c"CELL_DATA %i \0A\00"
@.str.10 = [27 x i8] c"SCALARS pressure float 1 \0A\00"
@.str.11 = [23 x i8] c"LOOKUP_TABLE default \0A\00"
@.str.12 = [4 x i8] c"%f\0A\00"
@.str.13 = [23 x i8] c"SCALARS flag short 1 \0A\00"
@.str.14 = [4 x i8] c"%d\0A\00"
@.str.15 = [19 x i8] c"Failed to close %s\00"
define void @write_vtkFile_debug(i8* %0, i32 %1, double %2, double %3, double %4, i32 %5, i32 %6, i32 %7, double %8, double %9, double %10, double*** nocapture %11, double*** nocapture %12, double*** nocapture %13, double*** nocapture %14, i32*** nocapture %15) {
%17 = alloca [80 x i8]
%18 = alloca [80 x i8]
%19 = alloca [80 x i8]
%20 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%21 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%22 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %28
24: ; preds = %16
%25 = getelementptr inbounds [80 x i8], [80 x i8]* %18, i64 0, i64 0
%26 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%27 = call i32 @errhandler(i32 89, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %25)
br label %248
28: ; preds = %16
%29 = tail call i32 @write_vtkHeader_debug(i32* %22, i32 %5, i32 %6, i32 %7, double %8, double %9, double %10)
%30 = tail call i32 @write_vtkPointCoordinates_debug(i32* %22, i32 %5, i32 %6, i32 %7, double %8, double %9, double %10)
%31 = add nsw i32 %5, 3
%32 = add nsw i32 %6, 3
%33 = mul nsw i32 %32, %31
%34 = add nsw i32 %7, 3
%35 = mul nsw i32 %33, %34
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %35)
%37 = tail call i32 @fputc(i32 10, i32* %22)
%38 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i64 23, i64 1, i32* %22)
%39 = add i32 %7, 2
%40 = icmp sgt i32 %7, -3
br i1 %40, label %44, label %41
41: ; preds = %28
%42 = add nsw i32 %5, 2
%43 = add nsw i32 %6, 2
br label %161
44: ; preds = %28
%45 = icmp sgt i32 %6, -3
%46 = icmp sgt i32 %5, -3
%47 = sext i32 %5 to i64
%48 = add i32 %5, 2
%49 = sext i32 %6 to i64
%50 = add i32 %6, 2
%51 = sext i32 %7 to i64
%52 = call i32 @llvm.smax.i32(i32 %39, i32 0)
%53 = zext i32 %52 to i64
%54 = zext i32 %50 to i64
%55 = zext i32 %48 to i64
br label %56
56: ; preds = %44, %158
%57 = phi i64 [ -1, %44 ], [ %159, %158 ]
br i1 %45, label %60, label %58
58: ; preds = %56
%59 = add nsw i64 %57, 1
br label %158
60: ; preds = %56
%61 = icmp slt i64 %57, 0
%62 = icmp sgt i64 %57, %51
%63 = add nsw i64 %57, 1
br label %64
64: ; preds = %60, %155
%65 = phi i64 [ -1, %60 ], [ %156, %155 ]
br i1 %46, label %68, label %66
66: ; preds = %64
%67 = add nsw i64 %65, 1
br label %155
68: ; preds = %64
%69 = icmp slt i64 %65, 0
%70 = icmp sgt i64 %65, %49
%71 = add nsw i64 %65, 1
br label %72
72: ; preds = %68, %152
%73 = phi i64 [ -1, %68 ], [ %153, %152 ]
%74 = icmp slt i64 %73, 0
%75 = select i1 %74, i1 true, i1 %69
%76 = select i1 %75, i1 true, i1 %61
%77 = icmp sgt i64 %73, %47
%78 = select i1 %76, i1 true, i1 %77
%79 = select i1 %78, i1 true, i1 %70
%80 = select i1 %79, i1 true, i1 %62
br i1 %80, label %149, label %81
81: ; preds = %72
%82 = getelementptr inbounds double**, double*** %11, i64 %73
%83 = load double**, double*** %82
%84 = getelementptr inbounds double*, double** %83, i64 %65
%85 = load double*, double** %84
%86 = getelementptr inbounds double, double* %85, i64 %57
%87 = load double, double* %86
%88 = getelementptr inbounds double*, double** %83, i64 %71
%89 = load double*, double** %88
%90 = getelementptr inbounds double, double* %89, i64 %57
%91 = load double, double* %90
%92 = fadd double %87, %91
%93 = getelementptr inbounds double, double* %85, i64 %63
%94 = load double, double* %93
%95 = fadd double %92, %94
%96 = getelementptr inbounds double, double* %89, i64 %63
%97 = load double, double* %96
%98 = fadd double %95, %97
%99 = fmul double %98, 2.500000e-01
%100 = tail call double @getValidValue(double %99)
%101 = getelementptr inbounds double**, double*** %12, i64 %73
%102 = load double**, double*** %101
%103 = getelementptr inbounds double*, double** %102, i64 %65
%104 = load double*, double** %103
%105 = getelementptr inbounds double, double* %104, i64 %57
%106 = load double, double* %105
%107 = add nuw nsw i64 %73, 1
%108 = getelementptr inbounds double**, double*** %12, i64 %107
%109 = load double**, double*** %108
%110 = getelementptr inbounds double*, double** %109, i64 %65
%111 = load double*, double** %110
%112 = getelementptr inbounds double, double* %111, i64 %57
%113 = load double, double* %112
%114 = fadd double %106, %113
%115 = getelementptr inbounds double, double* %104, i64 %63
%116 = load double, double* %115
%117 = fadd double %114, %116
%118 = getelementptr inbounds double, double* %111, i64 %63
%119 = load double, double* %118
%120 = fadd double %117, %119
%121 = fmul double %120, 2.500000e-01
%122 = tail call double @getValidValue(double %121)
%123 = getelementptr inbounds double**, double*** %13, i64 %73
%124 = load double**, double*** %123
%125 = getelementptr inbounds double*, double** %124, i64 %65
%126 = load double*, double** %125
%127 = getelementptr inbounds double, double* %126, i64 %57
%128 = load double, double* %127
%129 = getelementptr inbounds double**, double*** %13, i64 %107
%130 = load double**, double*** %129
%131 = getelementptr inbounds double*, double** %130, i64 %65
%132 = load double*, double** %131
%133 = getelementptr inbounds double, double* %132, i64 %57
%134 = load double, double* %133
%135 = fadd double %128, %134
%136 = getelementptr inbounds double*, double** %124, i64 %71
%137 = load double*, double** %136
%138 = getelementptr inbounds double, double* %137, i64 %57
%139 = load double, double* %138
%140 = fadd double %135, %139
%141 = getelementptr inbounds double*, double** %130, i64 %71
%142 = load double*, double** %141
%143 = getelementptr inbounds double, double* %142, i64 %57
%144 = load double, double* %143
%145 = fadd double %140, %144
%146 = fmul double %145, 2.500000e-01
%147 = tail call double @getValidValue(double %146)
%148 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), double %100, double %122, double %147)
br label %152
149: ; preds = %72
%150 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 6, i64 1, i32* %22)
%151 = add nsw i64 %73, 1
br label %152
152: ; preds = %81, %149
%153 = phi i64 [ %107, %81 ], [ %151, %149 ]
%154 = icmp eq i64 %153, %55
br i1 %154, label %155, label %72
155: ; preds = %152, %66
%156 = phi i64 [ %67, %66 ], [ %71, %152 ]
%157 = icmp eq i64 %156, %54
br i1 %157, label %158, label %64
158: ; preds = %155, %58
%159 = phi i64 [ %59, %58 ], [ %63, %155 ]
%160 = icmp eq i64 %159, %53
br i1 %160, label %161, label %56
161: ; preds = %158, %41
%162 = phi i32 [ %43, %41 ], [ %50, %158 ]
%163 = phi i32 [ %42, %41 ], [ %48, %158 ]
%164 = tail call i32 @fputc(i32 10, i32* %22)
%165 = mul nsw i32 %162, %163
%166 = mul nsw i32 %165, %39
%167 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %166)
%168 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i64 26, i64 1, i32* %22)
%169 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i64 22, i64 1, i32* %22)
%170 = icmp sgt i32 %7, -2
br i1 %170, label %171, label %237
171: ; preds = %161
%172 = icmp sgt i32 %6, -2
%173 = icmp sgt i32 %5, -2
%174 = call i32 @llvm.smax.i32(i32 %163, i32 1)
%175 = call i32 @llvm.smax.i32(i32 %162, i32 1)
%176 = call i32 @llvm.smax.i32(i32 %39, i32 1)
%177 = zext i32 %176 to i64
%178 = zext i32 %175 to i64
%179 = zext i32 %174 to i64
br label %180
180: ; preds = %171, %199
%181 = phi i64 [ 0, %171 ], [ %200, %199 ]
br i1 %172, label %182, label %199
182: ; preds = %180, %196
%183 = phi i64 [ %197, %196 ], [ 0, %180 ]
br i1 %173, label %184, label %196
184: ; preds = %182, %184
%185 = phi i64 [ %194, %184 ], [ 0, %182 ]
%186 = getelementptr inbounds double**, double*** %14, i64 %185
%187 = load double**, double*** %186
%188 = getelementptr inbounds double*, double** %187, i64 %183
%189 = load double*, double** %188
%190 = getelementptr inbounds double, double* %189, i64 %181
%191 = load double, double* %190
%192 = tail call double @getValidValue(double %191)
%193 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %192)
%194 = add nuw nsw i64 %185, 1
%195 = icmp eq i64 %194, %179
br i1 %195, label %196, label %184
196: ; preds = %184, %182
%197 = add nuw nsw i64 %183, 1
%198 = icmp eq i64 %197, %178
br i1 %198, label %199, label %182
199: ; preds = %196, %180
%200 = add nuw nsw i64 %181, 1
%201 = icmp eq i64 %200, %177
br i1 %201, label %202, label %180
202: ; preds = %199
%203 = tail call i32 @fputc(i32 10, i32* %22)
%204 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i64 22, i64 1, i32* %22)
%205 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i64 22, i64 1, i32* %22)
br i1 %170, label %206, label %241
206: ; preds = %202
%207 = icmp sgt i32 %6, -2
%208 = icmp sgt i32 %5, -2
%209 = call i32 @llvm.smax.i32(i32 %163, i32 1)
%210 = call i32 @llvm.smax.i32(i32 %162, i32 1)
%211 = call i32 @llvm.smax.i32(i32 %39, i32 1)
%212 = zext i32 %211 to i64
%213 = zext i32 %210 to i64
%214 = zext i32 %209 to i64
br label %215
215: ; preds = %206, %234
%216 = phi i64 [ 0, %206 ], [ %235, %234 ]
br i1 %207, label %217, label %234
217: ; preds = %215, %231
%218 = phi i64 [ %232, %231 ], [ 0, %215 ]
br i1 %208, label %219, label %231
219: ; preds = %217, %219
%220 = phi i64 [ %229, %219 ], [ 0, %217 ]
%221 = getelementptr inbounds i32**, i32*** %15, i64 %220
%222 = load i32**, i32*** %221
%223 = getelementptr inbounds i32*, i32** %222, i64 %218
%224 = load i32*, i32** %223
%225 = getelementptr inbounds i32, i32* %224, i64 %216
%226 = load i32, i32* %225
%227 = tail call i32 @getcelltype(i32 %226)
%228 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %227)
%229 = add nuw nsw i64 %220, 1
%230 = icmp eq i64 %229, %214
br i1 %230, label %231, label %219
231: ; preds = %219, %217
%232 = add nuw nsw i64 %218, 1
%233 = icmp eq i64 %232, %213
br i1 %233, label %234, label %217
234: ; preds = %231, %215
%235 = add nuw nsw i64 %216, 1
%236 = icmp eq i64 %235, %212
br i1 %236, label %241, label %215
237: ; preds = %161
%238 = tail call i32 @fputc(i32 10, i32* %22)
%239 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i64 22, i64 1, i32* %22)
%240 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i64 22, i64 1, i32* %22)
br label %241
241: ; preds = %234, %237, %202
%242 = tail call i64 @fclose(i32* %22)
%243 = icmp eq i64 %242, 0
br i1 %243, label %248, label %244
244: ; preds = %241
%245 = getelementptr inbounds [80 x i8], [80 x i8]* %19, i64 0, i64 0
%246 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %245, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i8* %20)
%247 = call i32 @errhandler(i32 146, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %245)
br label %248
248: ; preds = %241, %244, %24
ret void
}