#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strrchr(char *, char);
void writeVis(char *fname, double *u, double dx, double dy, int nvar, int nx,
              int ny) {
  int i, j, nv, argInd;
  FILE *vis;
  char outName[53], *ext;
  char name[30];
  strncpy(outName, fname, 50);
  outName[49] = '\0';
  if (!(ext = strrchr(outName, '.')))
    ext = strchr(outName, '\0');
  sprintf(ext, ".vts");
  vis = fopen(outName, "w");
  if (vis == NULL) {
    fprintf(stderr, "Could not open file %s\n", outName);
    return;
  }
  fprintf(vis, "<?xml version=\"1.0\"?>\n");
  fprintf(vis, "<VTKFile type=\"StructuredGrid\">\n");
  fprintf(vis, "<StructuredGrid WholeExtent=\"%ld %ld %ld %ld %ld %ld\">\n",
          (long)0, (long)nx, (long)0, (long)ny, (long)0, (long)0);
  fprintf(vis, "<Piece Extent=\"%ld %ld %ld %ld %ld %ld\">\n", (long)0, nx,
          (long)0, ny, (long)0, (long)0);
  fprintf(vis, "<PointData></PointData>\n");
  fprintf(vis, "<CellData Scalars=\"");
  for (nv = 0; nv < nvar; nv++) {
    switch (nv) {
    case 0:
      fprintf(vis, " Density");
      break;
    case 1:
      fprintf(vis, " MomX");
      break;
    case 2:
      fprintf(vis, " MomY");
      break;
    case 3:
      fprintf(vis, " ENE");
      break;
    default:
      fprintf(vis, " var%d", nv);
      break;
    }
  }
  fprintf(vis, "\">\n");
  name[0] = 0;
  for (nv = 0; nv < nvar; nv++) {
    switch (nv) {
    case 0:
      sprintf(name, " Density");
      break;
    case 1:
      sprintf(name, " MomX");
      break;
    case 2:
      sprintf(name, " MomY");
      break;
    case 3:
      sprintf(name, " ENE");
      break;
    default:
      sprintf(name, " var%d", nv);
      break;
    }
    fprintf(vis, "<DataArray type=\"Float32\" Name=\"%s\" format=\"ascii\">\n",
            name);
    for (j = 0; j < ny; j++) {
      for (i = 0; i < nx; i++) {
        fprintf(vis, "%lf ", u[(nv * ny + j) * nx + i]);
      }
      fprintf(vis, "\n");
    }
    fprintf(vis, "</DataArray>\n");
  }
  fprintf(vis, "</CellData>\n");
  fprintf(vis, "<Points>\n");
  fprintf(vis, "<DataArray type=\"Float32\" format=\"ascii\" "
               "NumberOfComponents=\"3\">\n");
  for (j = 0; j <= ny; j++) {
    for (i = 0; i <= nx; i++) {
      fprintf(vis, "%f %f %f\n", i * dx, j * dy, 0.0);
    }
  }
  fprintf(vis, "</DataArray>\n");
  fprintf(vis, "</Points>\n");
  fprintf(vis, "</Piece>\n");
  fprintf(vis, "</StructuredGrid>\n");
  fprintf(vis, "</VTKFile>\n");
  fclose(vis);
}


x86 assembly (clang, -O0):
<writeVis>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x32,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x4f(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x2e,%esi
call   1060 <strrchr@plt>
mov    %rax,-0x88(%rbp)
cmp    $0x0,%rax
jne    11de <writeVis+0x6e>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
call   1050 <strchr@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
lea    0xe34(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x80(%rbp),%rdi
lea    0xe27(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1233 <writeVis+0xc3>
mov    0x2dc7(%rip),%rax
movslq (%rax),%rdi
lea    -0x80(%rbp),%rdx
lea    0xe00(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    163e <writeVis+0x4ce>
mov    -0x48(%rbp),%rdi
lea    0xe01(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xe06(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
movslq -0x28(%rbp),%rcx
movslq -0x2c(%rbp),%r9
lea    0xe0d(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r9d
lea    0xe13(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13a2 <writeVis+0x232>
mov    -0x38(%rbp),%eax
mov    %rax,-0xb8(%rbp)
sub    $0x3,%rax
ja     137a <writeVis+0x20a>
mov    -0xb8(%rbp),%rax
lea    0xcfb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x48(%rbp),%rdi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    138f <writeVis+0x21f>
mov    -0x48(%rbp),%rdi
lea    0xdcf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    138f <writeVis+0x21f>
mov    -0x48(%rbp),%rdi
lea    0xdbe(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    138f <writeVis+0x21f>
mov    -0x48(%rbp),%rdi
lea    0xdad(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    138f <writeVis+0x21f>
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xd98(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1394 <writeVis+0x224>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12e7 <writeVis+0x177>
mov    -0x48(%rbp),%rdi
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movb   $0x0,-0xb0(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1535 <writeVis+0x3c5>
mov    -0x38(%rbp),%eax
mov    %rax,-0xc0(%rbp)
sub    $0x3,%rax
ja     1461 <writeVis+0x2f1>
mov    -0xc0(%rbp),%rax
lea    0xc10(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0xb0(%rbp),%rdi
lea    0xcff(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
jmp    1479 <writeVis+0x309>
lea    -0xb0(%rbp),%rdi
lea    0xcee(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
jmp    1479 <writeVis+0x309>
lea    -0xb0(%rbp),%rdi
lea    0xcda(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
jmp    1479 <writeVis+0x309>
lea    -0xb0(%rbp),%rdi
lea    0xcc6(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
jmp    1479 <writeVis+0x309>
lea    -0xb0(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xcae(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x48(%rbp),%rdi
lea    -0xb0(%rbp),%rdx
lea    0xc9c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1515 <writeVis+0x3a5>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    14f5 <writeVis+0x385>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x34(%rbp),%ecx
imul   -0x28(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc7c(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    14ac <writeVis+0x33c>
mov    -0x48(%rbp),%rdi
lea    0xcc6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1499 <writeVis+0x329>
mov    -0x48(%rbp),%rdi
lea    0xc41(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13c2 <writeVis+0x252>
mov    -0x48(%rbp),%rdi
lea    0xc2f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xc2a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xc22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     15db <writeVis+0x46b>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     15c8 <writeVis+0x458>
mov    -0x48(%rbp),%rdi
cvtsi2sdl -0x30(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
lea    0xc18(%rip),%rsi
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1585 <writeVis+0x415>
jmp    15cd <writeVis+0x45d>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1572 <writeVis+0x402>
mov    -0x48(%rbp),%rdi
lea    0xb7b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xbda(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xbd3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xbcb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
lea    0xbcc(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeVis>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8d,0x1c(%rsp)
mov    %rcx,0x20(%rsp)
mov    %edx,%r13d
movsd  %xmm1,0x78(%rsp)
movsd  %xmm0,0x60(%rsp)
mov    %rsi,0x58(%rsp)
mov    %rdi,%rsi
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x32,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xc1(%rsp)
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1060 <strrchr@plt>
test   %rax,%rax
jne    1207 <writeVis+0x77>
lea    0x90(%rsp),%rdi
call   1050 <strlen@plt>
add    %rsp,%rax
add    $0x90,%rax
movb   $0x0,0x4(%rax)
movl   $0x7374762e,(%rax)
lea    0xe1d(%rip),%rsi
lea    0x90(%rsp),%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     157f <writeVis+0x3ef>
mov    %rax,%rbx
lea    0xe17(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10b0 <fwrite@plt>
lea    0xe15(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
movslq 0x20(%rsp),%rbp
movslq 0x1c(%rsp),%r14
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rsp)
lea    0xe0a(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
mov    %rbp,%rcx
xor    %r8d,%r8d
mov    %r14,%r9
xor    %eax,%eax
call   1080 <fprintf@plt>
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rsp)
lea    0xe1d(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
mov    %rbp,%r12
mov    %ebp,%ecx
xor    %r8d,%r8d
mov    %r14,%rbp
mov    %r14d,%r9d
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xe26(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xe26(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
test   %r13d,%r13d
jle    15a4 <writeVis+0x414>
lea    0xd12(%rip),%r15
xor    %r14d,%r14d
jmp    1336 <writeVis+0x1a6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x8,%esi
mov    $0x1,%edx
lea    0xdf5(%rip),%rdi
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
add    $0x1,%r14d
cmp    %r14d,%r13d
je     13b6 <writeVis+0x226>
cmp    $0x3,%r14d
ja     1360 <writeVis+0x1d0>
mov    %r14d,%eax
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xdc6(%rip),%rdi
jmp    1321 <writeVis+0x191>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xdc6(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1329 <writeVis+0x199>
cs nopw 0x0(%rax,%rax,1)
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xd94(%rip),%rdi
jmp    1321 <writeVis+0x191>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x4,%esi
mov    $0x1,%edx
lea    0xd7a(%rip),%rdi
jmp    1321 <writeVis+0x191>
lea    0xe17(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
movb   $0x0,0x30(%rsp)
test   %r13d,%r13d
jle    15c2 <writeVis+0x432>
mov    %r13d,%eax
mov    %rax,0x68(%rsp)
mov    %ebp,%eax
mov    %rax,0x88(%rsp)
mov    %r12,%rax
mov    %eax,%r12d
imul   %rax,%rbp
shl    $0x3,%rbp
mov    %rbp,0x70(%rsp)
shl    $0x3,%rax
mov    %rax,0x28(%rsp)
lea    0xd5a(%rip),%r13
xor    %edx,%edx
jmp    145a <writeVis+0x2ca>
cs nopw 0x0(%rax,%rax,1)
mov    $0xd,%esi
mov    $0x1,%edx
lea    0xd40(%rip),%rdi
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
mov    0x80(%rsp),%rdx
add    $0x1,%rdx
mov    0x70(%rsp),%rax
add    %rax,0x58(%rsp)
cmp    0x68(%rsp),%rdx
je     15c2 <writeVis+0x432>
cmp    $0x3,%edx
mov    %rdx,0x80(%rsp)
ja     1490 <writeVis+0x300>
mov    %edx,%eax
lea    0xbb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movabs $0x797469736e654420,%rax
69 74 79
mov    %rax,0x30(%rsp)
movb   $0x0,0x38(%rsp)
jmp    1500 <writeVis+0x370>
nop
lea    0x30(%rsp),%rdi
lea    0xc94(%rip),%rsi
xor    %eax,%eax
call   10a0 <sprintf@plt>
jmp    1500 <writeVis+0x370>
cs nopw 0x0(%rax,%rax,1)
nop
movw   $0x58,0x34(%rsp)
movl   $0x6d6f4d20,0x30(%rsp)
6d
jmp    1500 <writeVis+0x370>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movw   $0x59,0x34(%rsp)
movl   $0x6d6f4d20,0x30(%rsp)
6d
jmp    1500 <writeVis+0x370>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movb   $0x0,0x34(%rsp)
movl   $0x454e4520,0x30(%rsp)
45
nopl   (%rax)
mov    %rbx,%rdi
lea    0xc2d(%rip),%rsi
lea    0x30(%rsp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
cmpl   $0x0,0x1c(%rsp)
jle    1420 <writeVis+0x290>
mov    0x58(%rsp),%rbp
xor    %r14d,%r14d
jmp    1554 <writeVis+0x3c4>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
add    $0x1,%r14
add    0x28(%rsp),%rbp
cmp    0x88(%rsp),%r14
je     1420 <writeVis+0x290>
cmpl   $0x0,0x20(%rsp)
jle    1530 <writeVis+0x3a0>
xor    %r15d,%r15d
xchg   %ax,%ax
movsd  0x0(%rbp,%r15,8),%xmm0
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
add    $0x1,%r15
cmp    %r15,%r12
jne    1560 <writeVis+0x3d0>
jmp    1530 <writeVis+0x3a0>
mov    0x2a5a(%rip),%rax
movslq (%rax),%rdi
lea    0xaa7(%rip),%rsi
lea    0x90(%rsp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1716 <writeVis+0x586>
lea    0xc29(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
movb   $0x0,0x30(%rsp)
lea    0xbb6(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xbaa(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xb9b(%rip),%rdi
mov    $0x41,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
mov    0x1c(%rsp),%r13d
test   %r13d,%r13d
js     1691 <writeVis+0x501>
mov    0x20(%rsp),%rax
lea    0x1(%rax),%r12d
xor    %r15d,%r15d
lea    0xbae(%rip),%r14
jmp    163c <writeVis+0x4ac>
nopl   0x0(%rax)
lea    0x1(%r15),%eax
cmp    %r13d,%r15d
mov    %eax,%r15d
je     1691 <writeVis+0x501>
cmpl   $0x0,0x20(%rsp)
movsd  0x60(%rsp),%xmm1
js     1630 <writeVis+0x4a0>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0x78(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %ebp,%ebp
nop
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  %xmm1,%xmm0
xorps  %xmm2,%xmm2
mov    %rbx,%rdi
mov    %r14,%rsi
movsd  0x28(%rsp),%xmm1
mov    $0x3,%al
call   1080 <fprintf@plt>
movsd  0x60(%rsp),%xmm1
add    $0x1,%ebp
cmp    %ebp,%r12d
jne    1660 <writeVis+0x4d0>
jmp    1630 <writeVis+0x4a0>
lea    0xad9(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xb31(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xb23(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xb14(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xb0e(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c".vts\00"
@.str.1 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.2 = [24 x i8] c"Could not open file %s\0A\00"
@.str.3 = [23 x i8] c"<?xml version=\221.0\22?>\0A\00"
@.str.4 = [33 x i8] c"<VTKFile type=\22StructuredGrid\22>\0A\00"
@.str.5 = [56 x i8] c"<StructuredGrid WholeExtent=\22%ld %ld %ld %ld %ld %ld\22>\0A\00"
@.str.6 = [42 x i8] c"<Piece Extent=\22%ld %ld %ld %ld %ld %ld\22>\0A\00"
@.str.7 = [25 x i8] c"<PointData></PointData>\0A\00"
@.str.8 = [20 x i8] c"<CellData Scalars=\22\00"
@.str.9 = [9 x i8] c" Density\00"
@.str.10 = [6 x i8] c" MomX\00"
@.str.11 = [6 x i8] c" MomY\00"
@.str.12 = [5 x i8] c" ENE\00"
@.str.13 = [7 x i8] c" var%d\00"
@.str.14 = [4 x i8] c"\22>\0A\00"
@.str.15 = [53 x i8] c"<DataArray type=\22Float32\22 Name=\22%s\22 format=\22ascii\22>\0A\00"
@.str.16 = [5 x i8] c"%lf \00"
@.str.17 = [2 x i8] c"\0A\00"
@.str.18 = [14 x i8] c"</DataArray>\0A\00"
@.str.19 = [13 x i8] c"</CellData>\0A\00"
@.str.20 = [10 x i8] c"<Points>\0A\00"
@.str.21 = [66 x i8] c"<DataArray type=\22Float32\22 format=\22ascii\22 NumberOfComponents=\223\22>\0A\00"
@.str.22 = [10 x i8] c"%f %f %f\0A\00"
@.str.23 = [11 x i8] c"</Points>\0A\00"
@.str.24 = [10 x i8] c"</Piece>\0A\00"
@.str.25 = [19 x i8] c"</StructuredGrid>\0A\00"
@.str.26 = [12 x i8] c"</VTKFile>\0A\00"
define void @writeVis(i8* %0, double* %1, double %2, double %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32*
%20 = alloca [53 x i8]
%21 = alloca i8*
%22 = alloca [30 x i8]
store i8* %0, i8** %8
store double* %1, double** %9
store double %2, double* %10
store double %3, double* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%23 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 0
%24 = load i8*, i8** %8
%25 = call i32 @strncpy(i8* %23, i8* %24, i32 50)
%26 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 49
store i8 0, i8* %26
%27 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 0
%28 = call i8* @strrchr(i8* %27, i8 signext 46)
store i8* %28, i8** %21
%29 = icmp ne i8* %28, null
br i1 %29, label %33, label %30
30: ; preds = %7
%31 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 0
%32 = call i8* @strchr(i8* %31, i8 signext 0)
store i8* %32, i8** %21
br label %33
33: ; preds = %30, %7
%34 = load i8*, i8** %21
%35 = call i32 (i8*, i8*, ...) @sprintf(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%36 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 0
%37 = call i32* @fopen(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %37, i32** %19
%38 = load i32*, i32** %19
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %46
40: ; preds = %33
%41 = load i32, i32* @stderr
%42 = sext i32 %41 to i64
%43 = inttoptr i64 %42 to i32*
%44 = getelementptr inbounds [53 x i8], [53 x i8]* %20, i64 0, i64 0
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %44)
br label %208
46: ; preds = %33
%47 = load i32*, i32** %19
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%49 = load i32*, i32** %19
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%51 = load i32*, i32** %19
%52 = load i32, i32* %13
%53 = sext i32 %52 to i64
%54 = load i32, i32* %14
%55 = sext i32 %54 to i64
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i64 0, i64 %53, i64 0, i64 %55, i64 0, i64 0)
%57 = load i32*, i32** %19
%58 = load i32, i32* %13
%59 = load i32, i32* %14
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i64 0, i32 %58, i64 0, i32 %59, i64 0, i64 0)
%61 = load i32*, i32** %19
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%63 = load i32*, i32** %19
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %17
br label %65
65: ; preds = %88, %46
%66 = load i32, i32* %17
%67 = load i32, i32* %12
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %91
69: ; preds = %65
%70 = load i32, i32* %17
switch i32 %70, label %83 [
i32 0, label %71
i32 1, label %74
i32 2, label %77
i32 3, label %80
]
71: ; preds = %69
%72 = load i32*, i32** %19
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %87
74: ; preds = %69
%75 = load i32*, i32** %19
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %87
77: ; preds = %69
%78 = load i32*, i32** %19
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %87
80: ; preds = %69
%81 = load i32*, i32** %19
%82 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
br label %87
83: ; preds = %69
%84 = load i32*, i32** %19
%85 = load i32, i32* %17
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %85)
br label %87
87: ; preds = %83, %80, %77, %74, %71
br label %88
88: ; preds = %87
%89 = load i32, i32* %17
%90 = add nsw i32 %89, 1
store i32 %90, i32* %17
br label %65
91: ; preds = %65
%92 = load i32*, i32** %19
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%94 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
store i8 0, i8* %94
store i32 0, i32* %17
br label %95
95: ; preds = %158, %91
%96 = load i32, i32* %17
%97 = load i32, i32* %12
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %161
99: ; preds = %95
%100 = load i32, i32* %17
switch i32 %100, label %113 [
i32 0, label %101
i32 1, label %104
i32 2, label %107
i32 3, label %110
]
101: ; preds = %99
%102 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%103 = call i32 (i8*, i8*, ...) @sprintf(i8* %102, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %117
104: ; preds = %99
%105 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%106 = call i32 (i8*, i8*, ...) @sprintf(i8* %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %117
107: ; preds = %99
%108 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%109 = call i32 (i8*, i8*, ...) @sprintf(i8* %108, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %117
110: ; preds = %99
%111 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%112 = call i32 (i8*, i8*, ...) @sprintf(i8* %111, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
br label %117
113: ; preds = %99
%114 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%115 = load i32, i32* %17
%116 = call i32 (i8*, i8*, ...) @sprintf(i8* %114, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %115)
br label %117
117: ; preds = %113, %110, %107, %104, %101
%118 = load i32*, i32** %19
%119 = getelementptr inbounds [30 x i8], [30 x i8]* %22, i64 0, i64 0
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0), i8* %119)
store i32 0, i32* %16
br label %121
121: ; preds = %152, %117
%122 = load i32, i32* %16
%123 = load i32, i32* %14
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %155
125: ; preds = %121
store i32 0, i32* %15
br label %126
126: ; preds = %146, %125
%127 = load i32, i32* %15
%128 = load i32, i32* %13
%129 = icmp slt i32 %127, %128
br i1 %129, label %130, label %149
130: ; preds = %126
%131 = load i32*, i32** %19
%132 = load double*, double** %9
%133 = load i32, i32* %17
%134 = load i32, i32* %14
%135 = mul nsw i32 %133, %134
%136 = load i32, i32* %16
%137 = add nsw i32 %135, %136
%138 = load i32, i32* %13
%139 = mul nsw i32 %137, %138
%140 = load i32, i32* %15
%141 = add nsw i32 %139, %140
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %132, i64 %142
%144 = load double, double* %143
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), double %144)
br label %146
146: ; preds = %130
%147 = load i32, i32* %15
%148 = add nsw i32 %147, 1
store i32 %148, i32* %15
br label %126
149: ; preds = %126
%150 = load i32*, i32** %19
%151 = call i32 (i32*, i8*, ...) @fprintf(i32* %150, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %152
152: ; preds = %149
%153 = load i32, i32* %16
%154 = add nsw i32 %153, 1
store i32 %154, i32* %16
br label %121
155: ; preds = %121
%156 = load i32*, i32** %19
%157 = call i32 (i32*, i8*, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0))
br label %158
158: ; preds = %155
%159 = load i32, i32* %17
%160 = add nsw i32 %159, 1
store i32 %160, i32* %17
br label %95
161: ; preds = %95
%162 = load i32*, i32** %19
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%164 = load i32*, i32** %19
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%166 = load i32*, i32** %19
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %16
br label %168
168: ; preds = %192, %161
%169 = load i32, i32* %16
%170 = load i32, i32* %14
%171 = icmp sle i32 %169, %170
br i1 %171, label %172, label %195
172: ; preds = %168
store i32 0, i32* %15
br label %173
173: ; preds = %188, %172
%174 = load i32, i32* %15
%175 = load i32, i32* %13
%176 = icmp sle i32 %174, %175
br i1 %176, label %177, label %191
177: ; preds = %173
%178 = load i32*, i32** %19
%179 = load i32, i32* %15
%180 = sitofp i32 %179 to double
%181 = load double, double* %10
%182 = fmul double %180, %181
%183 = load i32, i32* %16
%184 = sitofp i32 %183 to double
%185 = load double, double* %11
%186 = fmul double %184, %185
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), double %182, double %186, double 0.000000e+00)
br label %188
188: ; preds = %177
%189 = load i32, i32* %15
%190 = add nsw i32 %189, 1
store i32 %190, i32* %15
br label %173
191: ; preds = %173
br label %192
192: ; preds = %191
%193 = load i32, i32* %16
%194 = add nsw i32 %193, 1
store i32 %194, i32* %16
br label %168
195: ; preds = %168
%196 = load i32*, i32** %19
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %196, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0))
%198 = load i32*, i32** %19
%199 = call i32 (i32*, i8*, ...) @fprintf(i32* %198, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.23, i64 0, i64 0))
%200 = load i32*, i32** %19
%201 = call i32 (i32*, i8*, ...) @fprintf(i32* %200, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0))
%202 = load i32*, i32** %19
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %202, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0))
%204 = load i32*, i32** %19
%205 = call i32 (i32*, i8*, ...) @fprintf(i32* %204, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0))
%206 = load i32*, i32** %19
%207 = call i32 @fclose(i32* %206)
br label %208
208: ; preds = %195, %40
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".vts\00"
@.str.1 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.2 = [24 x i8] c"Could not open file %s\0A\00"
@.str.3 = [23 x i8] c"<?xml version=\221.0\22?>\0A\00"
@.str.4 = [33 x i8] c"<VTKFile type=\22StructuredGrid\22>\0A\00"
@.str.5 = [56 x i8] c"<StructuredGrid WholeExtent=\22%ld %ld %ld %ld %ld %ld\22>\0A\00"
@.str.6 = [42 x i8] c"<Piece Extent=\22%ld %ld %ld %ld %ld %ld\22>\0A\00"
@.str.7 = [25 x i8] c"<PointData></PointData>\0A\00"
@.str.8 = [20 x i8] c"<CellData Scalars=\22\00"
@.str.9 = [9 x i8] c" Density\00"
@.str.10 = [6 x i8] c" MomX\00"
@.str.11 = [6 x i8] c" MomY\00"
@.str.12 = [5 x i8] c" ENE\00"
@.str.13 = [7 x i8] c" var%d\00"
@.str.14 = [4 x i8] c"\22>\0A\00"
@.str.15 = [53 x i8] c"<DataArray type=\22Float32\22 Name=\22%s\22 format=\22ascii\22>\0A\00"
@.str.16 = [5 x i8] c"%lf \00"
@.str.18 = [14 x i8] c"</DataArray>\0A\00"
@.str.19 = [13 x i8] c"</CellData>\0A\00"
@.str.20 = [10 x i8] c"<Points>\0A\00"
@.str.21 = [66 x i8] c"<DataArray type=\22Float32\22 format=\22ascii\22 NumberOfComponents=\223\22>\0A\00"
@.str.22 = [10 x i8] c"%f %f %f\0A\00"
@.str.23 = [11 x i8] c"</Points>\0A\00"
@.str.24 = [10 x i8] c"</Piece>\0A\00"
@.str.25 = [19 x i8] c"</StructuredGrid>\0A\00"
@.str.26 = [12 x i8] c"</VTKFile>\0A\00"
define void @writeVis(i8* %0, double* nocapture %1, double %2, double %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca [53 x i8]
%9 = alloca [30 x i8]
%10 = getelementptr inbounds [53 x i8], [53 x i8]* %8, i64 0, i64 0
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %9, i64 0, i64 0
%12 = call i32 @strncpy(i8* %10, i8* %0, i32 50)
%13 = getelementptr inbounds [53 x i8], [53 x i8]* %8, i64 0, i64 49
store i8 0, i8* %13
%14 = call i8* @strrchr(i8* %10, i8 signext 46)
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %7
%17 = call i64 @strlen(i8* %10)
%18 = getelementptr [53 x i8], [53 x i8]* %8, i64 0, i64 %17
br label %19
19: ; preds = %16, %7
%20 = phi i8* [ %14, %7 ], [ %18, %16 ]
%21 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i32, i32* @stderr
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %10)
br label %126
28: ; preds = %19
%29 = call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i64 22, i64 1, i32* %21)
%30 = call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i64 32, i64 1, i32* %21)
%31 = sext i32 %5 to i64
%32 = sext i32 %6 to i64
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i64 0, i64 %31, i64 0, i64 %32, i64 0, i64 0)
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i64 0, i32 %5, i64 0, i32 %6, i64 0, i64 0)
%35 = call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i64 24, i64 1, i32* %21)
%36 = call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i64 19, i64 1, i32* %21)
%37 = icmp sgt i32 %4, 0
br i1 %37, label %40, label %38
38: ; preds = %28
%39 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %21)
store i8 0, i8* %11
br label %97
40: ; preds = %28, %52
%41 = phi i32 [ %53, %52 ], [ 0, %28 ]
switch i32 %41, label %50 [
i32 0, label %42
i32 1, label %44
i32 2, label %46
i32 3, label %48
]
42: ; preds = %40
%43 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i64 8, i64 1, i32* %21)
br label %52
44: ; preds = %40
%45 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i64 5, i64 1, i32* %21)
br label %52
46: ; preds = %40
%47 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i64 5, i64 1, i32* %21)
br label %52
48: ; preds = %40
%49 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i64 4, i64 1, i32* %21)
br label %52
50: ; preds = %40
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %41)
br label %52
52: ; preds = %42, %44, %46, %48, %50
%53 = add nuw nsw i32 %41, 1
%54 = icmp eq i32 %53, %4
br i1 %54, label %55, label %40
55: ; preds = %52
%56 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %21)
store i8 0, i8* %11
br i1 %37, label %57, label %97
57: ; preds = %55
%58 = icmp sgt i32 %6, 0
%59 = icmp sgt i32 %5, 0
%60 = zext i32 %4 to i64
%61 = zext i32 %6 to i64
%62 = zext i32 %5 to i64
br label %63
63: ; preds = %57, %93
%64 = phi i64 [ 0, %57 ], [ %95, %93 ]
%65 = trunc i64 %64 to i32
switch i32 %65, label %70 [
i32 0, label %66
i32 1, label %67
i32 2, label %68
i32 3, label %69
]
66: ; preds = %63
br label %72
67: ; preds = %63
br label %72
68: ; preds = %63
br label %72
69: ; preds = %63
br label %72
70: ; preds = %63
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %65)
br label %72
72: ; preds = %70, %69, %68, %67, %66
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0), i8* %11)
br i1 %58, label %74, label %93
74: ; preds = %72
%75 = mul nsw i64 %64, %32
br label %76
76: ; preds = %74, %89
%77 = phi i64 [ 0, %74 ], [ %91, %89 ]
br i1 %59, label %78, label %89
78: ; preds = %76
%79 = add nsw i64 %77, %75
%80 = mul nsw i64 %79, %31
br label %81
81: ; preds = %78, %81
%82 = phi i64 [ 0, %78 ], [ %87, %81 ]
%83 = add nsw i64 %82, %80
%84 = getelementptr inbounds double, double* %1, i64 %83
%85 = load double, double* %84
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), double %85)
%87 = add nuw nsw i64 %82, 1
%88 = icmp eq i64 %87, %62
br i1 %88, label %89, label %81
89: ; preds = %81, %76
%90 = call i32 @fputc(i32 10, i32* %21)
%91 = add nuw nsw i64 %77, 1
%92 = icmp eq i64 %91, %61
br i1 %92, label %93, label %76
93: ; preds = %89, %72
%94 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), i64 13, i64 1, i32* %21)
%95 = add nuw nsw i64 %64, 1
%96 = icmp eq i64 %95, %60
br i1 %96, label %97, label %63
97: ; preds = %93, %38, %55
%98 = call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i64 12, i64 1, i32* %21)
%99 = call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0), i64 9, i64 1, i32* %21)
%100 = call i64 @fwrite(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.21, i64 0, i64 0), i64 65, i64 1, i32* %21)
%101 = icmp slt i32 %6, 0
br i1 %101, label %119, label %102
102: ; preds = %97
%103 = icmp slt i32 %5, 0
br label %104
104: ; preds = %102, %116
%105 = phi i32 [ 0, %102 ], [ %117, %116 ]
br i1 %103, label %116, label %106
106: ; preds = %104
%107 = sitofp i32 %105 to double
%108 = fmul double %107, %3
br label %109
109: ; preds = %106, %109
%110 = phi i32 [ 0, %106 ], [ %114, %109 ]
%111 = sitofp i32 %110 to double
%112 = fmul double %111, %2
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), double %112, double %108, double 0.000000e+00)
%114 = add nuw i32 %110, 1
%115 = icmp eq i32 %110, %5
br i1 %115, label %116, label %109
116: ; preds = %109, %104
%117 = add nuw i32 %105, 1
%118 = icmp eq i32 %105, %6
br i1 %118, label %119, label %104
119: ; preds = %116, %97
%120 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0), i64 13, i64 1, i32* %21)
%121 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.23, i64 0, i64 0), i64 10, i64 1, i32* %21)
%122 = call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i64 9, i64 1, i32* %21)
%123 = call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i64 18, i64 1, i32* %21)
%124 = call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0), i64 11, i64 1, i32* %21)
%125 = call i32 @fclose(i32* %21)
br label %126
126: ; preds = %119, %23
ret void
}