void write_variables(int nvars, int *vardim, int *centering,
                     const char *const *varname, double **vars, int npts,
                     int ncells) {
  char str[1024];
  int i, j, first_scalar, first_vector;
  int num_scalars, num_vectors;
  new_section();
  sprintf(str, "CELL_DATA %d\n", ncells);
  write_string(str);
  first_scalar = 0;
  first_vector = 0;
  num_scalars = 0;
  num_vectors = 0;
  for (i = 0; i < nvars; i++) {
    if (centering[i] == 0) {
      int num_to_write = 0;
      int should_write = 0;
      if (vardim[i] == 1) {
        if (first_scalar == 0) {
          should_write = 1;
          sprintf(str, "SCALARS %s double\n", varname[i]);
          write_string(str);
          write_string("LOOKUP_TABLE default\n");
          first_scalar = 1;
        } else
          num_scalars++;
      } else if (vardim[i] == 3) {
        if (first_vector == 0) {
          should_write = 1;
          sprintf(str, "VECTORS %s double\n", varname[i]);
          write_string(str);
          first_vector = 1;
        } else
          num_vectors++;
      } else {
        printf("Only supported variable dimensions are 1 and 3.\n");
        printf("Ignoring variable %s.\n", varname[i]);
        continue;
      }
      if (should_write) {
        num_to_write = ncells * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
  first_scalar = 0;
  if (num_scalars > 0) {
    sprintf(str, "FIELD FieldData %d\n", num_scalars);
    write_string(str);
    for (i = 0; i < nvars; i++) {
      int should_write = 0;
      if (centering[i] == 0) {
        if (vardim[i] == 1) {
          if (first_scalar == 0) {
            first_scalar = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 1 %d double\n", varname[i], ncells);
            write_string(str);
          }
        }
      }
      if (should_write) {
        int num_to_write = ncells * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
  first_vector = 0;
  if (num_vectors > 0) {
    sprintf(str, "FIELD FieldData %d\n", num_vectors);
    write_string(str);
    for (i = 0; i < nvars; i++) {
      int should_write = 0;
      if (centering[i] == 0) {
        if (vardim[i] == 3) {
          if (first_vector == 0) {
            first_vector = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 3 %d double\n", varname[i], ncells);
            write_string(str);
          }
        }
      }
      if (should_write) {
        int num_to_write = ncells * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
  new_section();
  sprintf(str, "POINT_DATA %d\n", npts);
  write_string(str);
  first_scalar = 0;
  first_vector = 0;
  num_scalars = 0;
  num_vectors = 0;
  for (i = 0; i < nvars; i++) {
    if (centering[i] != 0) {
      int num_to_write = 0;
      int should_write = 0;
      if (vardim[i] == 1) {
        if (first_scalar == 0) {
          should_write = 1;
          sprintf(str, "SCALARS %s double\n", varname[i]);
          write_string(str);
          write_string("LOOKUP_TABLE default\n");
          first_scalar = 1;
        } else
          num_scalars++;
      } else if (vardim[i] == 3) {
        if (first_vector == 0) {
          should_write = 1;
          sprintf(str, "VECTORS %s double\n", varname[i]);
          write_string(str);
          first_vector = 1;
        } else
          num_vectors++;
      } else {
        printf("Only supported variable dimensions are 1 and 3.\n");
        printf("Ignoring variable %s.\n", varname[i]);
        continue;
      }
      if (should_write) {
        num_to_write = npts * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
  first_scalar = 0;
  if (num_scalars > 0) {
    sprintf(str, "FIELD FieldData %d\n", num_scalars);
    write_string(str);
    for (i = 0; i < nvars; i++) {
      int should_write = 0;
      if (centering[i] != 0) {
        if (vardim[i] == 1) {
          if (first_scalar == 0) {
            first_scalar = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 1 %d double\n", varname[i], npts);
            write_string(str);
          }
        }
      }
      if (should_write) {
        int num_to_write = npts * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
  first_vector = 0;
  if (num_vectors > 0) {
    sprintf(str, "FIELD FieldData %d\n", num_vectors);
    write_string(str);
    for (i = 0; i < nvars; i++) {
      int should_write = 0;
      if (centering[i] != 0) {
        if (vardim[i] == 3) {
          if (first_vector == 0) {
            first_vector = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 3 %d double\n", varname[i], npts);
            write_string(str);
          }
        }
      }
      if (should_write) {
        int num_to_write = npts * vardim[i];
        for (j = 0; j < num_to_write; j++) {
          write_double(vars[i][j]);
        }
        end_line();
      }
    }
  }
}


x86 assembly (clang, -O0):
<write_variables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    $0x0,%al
call   1030 <new_section@plt>
lea    -0x430(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x43c(%rbp)
movl   $0x0,-0x440(%rbp)
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x448(%rbp)
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13fd <write_variables+0x29d>
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    13e4 <write_variables+0x284>
movl   $0x0,-0x44c(%rbp)
movl   $0x0,-0x450(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12ab <write_variables+0x14b>
cmpl   $0x0,-0x43c(%rbp)
jne    1297 <write_variables+0x137>
movl   $0x1,-0x450(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xda9(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
lea    0xda0(%rip),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x1,-0x43c(%rbp)
jmp    12a6 <write_variables+0x146>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
jmp    1361 <write_variables+0x201>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    132c <write_variables+0x1cc>
cmpl   $0x0,-0x440(%rbp)
jne    1318 <write_variables+0x1b8>
movl   $0x1,-0x450(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd43(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x1,-0x440(%rbp)
jmp    1327 <write_variables+0x1c7>
mov    -0x448(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x448(%rbp)
jmp    135c <write_variables+0x1fc>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13e9 <write_variables+0x289>
jmp    1361 <write_variables+0x201>
cmpl   $0x0,-0x450(%rbp)
je     13df <write_variables+0x27f>
mov    0x10(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x44c(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x44c(%rbp),%eax
jge    13d8 <write_variables+0x278>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1390 <write_variables+0x230>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    13e4 <write_variables+0x284>
jmp    13e9 <write_variables+0x289>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    11e4 <write_variables+0x84>
movl   $0x0,-0x43c(%rbp)
cmpl   $0x0,-0x444(%rbp)
jle    158b <write_variables+0x42b>
lea    -0x430(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0xc6a(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1586 <write_variables+0x426>
movl   $0x0,-0x454(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    14ef <write_variables+0x38f>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    14ea <write_variables+0x38a>
cmpl   $0x0,-0x43c(%rbp)
jne    14a6 <write_variables+0x346>
movl   $0x1,-0x43c(%rbp)
jmp    14e5 <write_variables+0x385>
movl   $0x1,-0x454(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    0x10(%rbp),%ecx
lea    0xbd6(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
jmp    14ea <write_variables+0x38a>
jmp    14ef <write_variables+0x38f>
cmpl   $0x0,-0x454(%rbp)
je     156d <write_variables+0x40d>
mov    0x10(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x458(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x458(%rbp),%eax
jge    1566 <write_variables+0x406>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    151e <write_variables+0x3be>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1572 <write_variables+0x412>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1447 <write_variables+0x2e7>
jmp    158b <write_variables+0x42b>
movl   $0x0,-0x440(%rbp)
cmpl   $0x0,-0x448(%rbp)
jle    1719 <write_variables+0x5b9>
lea    -0x430(%rbp),%rdi
mov    -0x448(%rbp),%edx
lea    0xadc(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1714 <write_variables+0x5b4>
movl   $0x0,-0x45c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    167d <write_variables+0x51d>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    1678 <write_variables+0x518>
cmpl   $0x0,-0x440(%rbp)
jne    1634 <write_variables+0x4d4>
movl   $0x1,-0x440(%rbp)
jmp    1673 <write_variables+0x513>
movl   $0x1,-0x45c(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    0x10(%rbp),%ecx
lea    0xa58(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
jmp    1678 <write_variables+0x518>
jmp    167d <write_variables+0x51d>
cmpl   $0x0,-0x45c(%rbp)
je     16fb <write_variables+0x59b>
mov    0x10(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x460(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x460(%rbp),%eax
jge    16f4 <write_variables+0x594>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    16ac <write_variables+0x54c>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1700 <write_variables+0x5a0>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    15d5 <write_variables+0x475>
jmp    1719 <write_variables+0x5b9>
mov    $0x0,%al
call   1030 <new_section@plt>
lea    -0x430(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0x995(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x43c(%rbp)
movl   $0x0,-0x440(%rbp)
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x448(%rbp)
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1991 <write_variables+0x831>
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1978 <write_variables+0x818>
movl   $0x0,-0x464(%rbp)
movl   $0x0,-0x468(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    183f <write_variables+0x6df>
cmpl   $0x0,-0x43c(%rbp)
jne    182b <write_variables+0x6cb>
movl   $0x1,-0x468(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0x815(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
lea    0x80c(%rip),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x1,-0x43c(%rbp)
jmp    183a <write_variables+0x6da>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
jmp    18f5 <write_variables+0x795>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    18c0 <write_variables+0x760>
cmpl   $0x0,-0x440(%rbp)
jne    18ac <write_variables+0x74c>
movl   $0x1,-0x468(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0x7af(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x1,-0x440(%rbp)
jmp    18bb <write_variables+0x75b>
mov    -0x448(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x448(%rbp)
jmp    18f0 <write_variables+0x790>
lea    0x783(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0x797(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    197d <write_variables+0x81d>
jmp    18f5 <write_variables+0x795>
cmpl   $0x0,-0x468(%rbp)
je     1973 <write_variables+0x813>
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x464(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x464(%rbp),%eax
jge    196c <write_variables+0x80c>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1924 <write_variables+0x7c4>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1978 <write_variables+0x818>
jmp    197d <write_variables+0x81d>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1778 <write_variables+0x618>
movl   $0x0,-0x43c(%rbp)
cmpl   $0x0,-0x444(%rbp)
jle    1b1f <write_variables+0x9bf>
lea    -0x430(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0x6d6(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1b1a <write_variables+0x9ba>
movl   $0x0,-0x46c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1a83 <write_variables+0x923>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1a7e <write_variables+0x91e>
cmpl   $0x0,-0x43c(%rbp)
jne    1a3a <write_variables+0x8da>
movl   $0x1,-0x43c(%rbp)
jmp    1a79 <write_variables+0x919>
movl   $0x1,-0x46c(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x2c(%rbp),%ecx
lea    0x642(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
jmp    1a7e <write_variables+0x91e>
jmp    1a83 <write_variables+0x923>
cmpl   $0x0,-0x46c(%rbp)
je     1b01 <write_variables+0x9a1>
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x470(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x470(%rbp),%eax
jge    1afa <write_variables+0x99a>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1ab2 <write_variables+0x952>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1b06 <write_variables+0x9a6>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    19db <write_variables+0x87b>
jmp    1b1f <write_variables+0x9bf>
movl   $0x0,-0x440(%rbp)
cmpl   $0x0,-0x448(%rbp)
jle    1cad <write_variables+0xb4d>
lea    -0x430(%rbp),%rdi
mov    -0x448(%rbp),%edx
lea    0x548(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1ca8 <write_variables+0xb48>
movl   $0x0,-0x474(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1c11 <write_variables+0xab1>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    1c0c <write_variables+0xaac>
cmpl   $0x0,-0x440(%rbp)
jne    1bc8 <write_variables+0xa68>
movl   $0x1,-0x440(%rbp)
jmp    1c07 <write_variables+0xaa7>
movl   $0x1,-0x474(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x2c(%rbp),%ecx
lea    0x4c4(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
mov    $0x0,%al
call   1040 <write_string@plt>
jmp    1c0c <write_variables+0xaac>
jmp    1c11 <write_variables+0xab1>
cmpl   $0x0,-0x474(%rbp)
je     1c8f <write_variables+0xb2f>
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x478(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x478(%rbp),%eax
jge    1c88 <write_variables+0xb28>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1070 <write_double@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1c40 <write_variables+0xae0>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1c94 <write_variables+0xb34>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1b69 <write_variables+0xa09>
jmp    1cad <write_variables+0xb4d>
add    $0x480,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_variables>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
mov    %r9d,0x1c(%rsp)
mov    %r8,%r13
mov    %rcx,0x20(%rsp)
mov    %rdx,%rbx
mov    %rsi,0x10(%rsp)
mov    %edi,%ebp
mov    0x470(%rsp),%r15d
xor    %eax,%eax
call   1040 <new_section@plt>
lea    0xe52(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    152f <write_variables+0x3bf>
mov    %ebp,0x18(%rsp)
mov    %ebp,%r15d
xor    %ebp,%ebp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %r12d,%r12d
xor    %r14d,%r14d
mov    %rbx,0x28(%rsp)
jmp    122d <write_variables+0xbd>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rsi
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %r15,%rbp
je     1343 <write_variables+0x1d3>
cmpl   $0x0,(%rbx,%rbp,4)
jne    1220 <write_variables+0xb0>
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
cmp    $0x3,%eax
je     125a <write_variables+0xea>
cmp    $0x1,%eax
jne    11f8 <write_variables+0x88>
cmpl   $0x0,0xc(%rsp)
je     126f <write_variables+0xff>
add    $0x1,%r14d
movl   $0x1,0xc(%rsp)
jmp    1220 <write_variables+0xb0>
cmpl   $0x0,0x8(%rsp)
je     12b8 <write_variables+0x148>
add    $0x1,%r12d
movl   $0x1,0x8(%rsp)
jmp    1220 <write_variables+0xb0>
mov    %r12d,0x4(%rsp)
mov    %r14d,%r12d
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd7f(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
lea    0xd7a(%rip),%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
movl   $0x1,0xc(%rsp)
jmp    12f1 <write_variables+0x181>
mov    %r12d,0x4(%rsp)
mov    %r14d,%r12d
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd5f(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
movl   $0x1,0x8(%rsp)
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
imul   0x470(%rsp),%eax
test   %eax,%eax
jle    132a <write_variables+0x1ba>
mov    %eax,%r14d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1310 <write_variables+0x1a0>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
mov    %r12d,%r14d
mov    0x4(%rsp),%r12d
jmp    1220 <write_variables+0xb0>
test   %r14d,%r14d
jle    1440 <write_variables+0x2d0>
lea    0xd0e(%rip),%rsi
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    1440 <write_variables+0x2d0>
xor    %ebp,%ebp
xor    %eax,%eax
mov    %r12d,0x4(%rsp)
jmp    13a3 <write_variables+0x233>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%r14d
add    $0x1,%rbp
mov    %r14d,%eax
cmp    %r15,%rbp
je     1440 <write_variables+0x2d0>
cmpl   $0x0,(%rbx,%rbp,4)
jne    1390 <write_variables+0x220>
mov    0x10(%rsp),%rcx
cmpl   $0x1,(%rcx,%rbp,4)
jne    1390 <write_variables+0x220>
mov    $0x1,%r14d
test   %eax,%eax
je     1393 <write_variables+0x223>
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%r12
mov    %r12,%rdi
lea    0xc9f(%rip),%rsi
mov    0x470(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    142a <write_variables+0x2ba>
mov    %eax,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13,%rbp,8),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1410 <write_variables+0x2a0>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
mov    0x4(%rsp),%r12d
jmp    1393 <write_variables+0x223>
test   %r12d,%r12d
mov    0x18(%rsp),%ebp
jle    155f <write_variables+0x3ef>
lea    0xc0d(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    152f <write_variables+0x3bf>
xor    %r14d,%r14d
xor    %eax,%eax
jmp    1493 <write_variables+0x323>
nop
mov    %eax,%r12d
add    $0x1,%r14
mov    %r12d,%eax
cmp    %r15,%r14
je     155f <write_variables+0x3ef>
cmpl   $0x0,(%rbx,%r14,4)
jne    1480 <write_variables+0x310>
mov    0x10(%rsp),%rcx
cmpl   $0x3,(%rcx,%r14,4)
jne    1480 <write_variables+0x310>
mov    $0x1,%r12d
test   %eax,%eax
je     1483 <write_variables+0x313>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
lea    0xbbd(%rip),%rsi
mov    0x470(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    151a <write_variables+0x3aa>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1500 <write_variables+0x390>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
mov    0x18(%rsp),%ebp
jmp    1483 <write_variables+0x313>
xor    %eax,%eax
call   1040 <new_section@plt>
lea    0xb58(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    0x1c(%rsp),%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
jmp    18cb <write_variables+0x75b>
xor    %eax,%eax
call   1040 <new_section@plt>
lea    0xb28(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    0x1c(%rsp),%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    18cb <write_variables+0x75b>
xor    %r14d,%r14d
xor    %r12d,%r12d
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %ebp,%ebp
jmp    15e0 <write_variables+0x470>
nopl   0x0(%rax)
lea    0xaed(%rip),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rsi
lea    0xa7e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r14
cmp    %r15,%r14
je     16ef <write_variables+0x57f>
cmpl   $0x0,(%rbx,%r14,4)
je     15d3 <write_variables+0x463>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
cmp    $0x3,%eax
je     1610 <write_variables+0x4a0>
cmp    $0x1,%eax
jne    15b0 <write_variables+0x440>
test   %r12d,%r12d
je     1626 <write_variables+0x4b6>
add    $0x1,%ebp
mov    $0x1,%r12d
jmp    15d3 <write_variables+0x463>
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x8(%rsp)
je     1669 <write_variables+0x4f9>
addl   $0x1,0x4(%rsp)
movl   $0x1,0x8(%rsp)
jmp    15d3 <write_variables+0x463>
mov    %ebp,0xc(%rsp)
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0x9cc(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
lea    0x9c7(%rip),%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
mov    $0x1,%r12d
jmp    169e <write_variables+0x52e>
mov    %ebp,0xc(%rsp)
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0x9b2(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
movl   $0x1,0x8(%rsp)
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   0x1c(%rsp),%eax
test   %eax,%eax
jle    16da <write_variables+0x56a>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    16c0 <write_variables+0x550>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
mov    0xc(%rsp),%ebp
jmp    15d3 <write_variables+0x463>
test   %ebp,%ebp
jle    17db <write_variables+0x66b>
lea    0x963(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    17db <write_variables+0x66b>
xor    %ebp,%ebp
xor    %eax,%eax
jmp    1743 <write_variables+0x5d3>
nopw   0x0(%rax,%rax,1)
mov    %eax,%r14d
add    $0x1,%rbp
mov    %r14d,%eax
cmp    %r15,%rbp
je     17db <write_variables+0x66b>
cmpl   $0x0,(%rbx,%rbp,4)
je     1730 <write_variables+0x5c0>
mov    0x10(%rsp),%rcx
cmpl   $0x1,(%rcx,%rbp,4)
jne    1730 <write_variables+0x5c0>
mov    $0x1,%r14d
test   %eax,%eax
je     1733 <write_variables+0x5c3>
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%r12
mov    %r12,%rdi
lea    0x8ff(%rip),%rsi
mov    0x1c(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    17ca <write_variables+0x65a>
mov    %eax,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    17b0 <write_variables+0x640>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
jmp    1733 <write_variables+0x5c3>
mov    0x4(%rsp),%edx
test   %edx,%edx
jle    18cb <write_variables+0x75b>
lea    0x873(%rip),%rsi
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    18cb <write_variables+0x75b>
xor    %r14d,%r14d
xor    %eax,%eax
jmp    1833 <write_variables+0x6c3>
nopl   0x0(%rax)
mov    %eax,%r12d
add    $0x1,%r14
mov    %r12d,%eax
cmp    %r15,%r14
je     18cb <write_variables+0x75b>
cmpl   $0x0,(%rbx,%r14,4)
je     1820 <write_variables+0x6b0>
mov    0x10(%rsp),%rcx
cmpl   $0x3,(%rcx,%r14,4)
jne    1820 <write_variables+0x6b0>
mov    $0x1,%r12d
test   %eax,%eax
je     1823 <write_variables+0x6b3>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
lea    0x81d(%rip),%rsi
mov    0x1c(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    18ba <write_variables+0x74a>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    $0x1,%al
call   1080 <write_double@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    18a0 <write_variables+0x730>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
jmp    1823 <write_variables+0x6b3>
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"CELL_DATA %d\0A\00"
@.str.1 = [19 x i8] c"SCALARS %s double\0A\00"
@.str.2 = [22 x i8] c"LOOKUP_TABLE default\0A\00"
@.str.3 = [19 x i8] c"VECTORS %s double\0A\00"
@.str.4 = [49 x i8] c"Only supported variable dimensions are 1 and 3.\0A\00"
@.str.5 = [23 x i8] c"Ignoring variable %s.\0A\00"
@.str.6 = [20 x i8] c"FIELD FieldData %d\0A\00"
@.str.7 = [16 x i8] c"%s 1 %d double\0A\00"
@.str.8 = [16 x i8] c"%s 3 %d double\0A\00"
@.str.9 = [15 x i8] c"POINT_DATA %d\0A\00"
define void @write_variables(i32 %0, i32* %1, i32* %2, i8** %3, double** %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca double**
%13 = alloca i32
%14 = alloca i32
%15 = alloca [1024 x i8]
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
store i32 %0, i32* %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i8** %3, i8*** %11
store double** %4, double*** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%34 = call i32 (...) @new_section()
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%36 = load i32, i32* %14
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %35, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %38)
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %16
br label %40
40: ; preds = %142, %7
%41 = load i32, i32* %16
%42 = load i32, i32* %8
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %145
44: ; preds = %40
%45 = load i32*, i32** %10
%46 = load i32, i32* %16
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %45, i64 %47
%49 = load i32, i32* %48
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %141
51: ; preds = %44
store i32 0, i32* %22
store i32 0, i32* %23
%52 = load i32*, i32** %9
%53 = load i32, i32* %16
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %52, i64 %54
%56 = load i32, i32* %55
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %76
58: ; preds = %51
%59 = load i32, i32* %18
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %72
61: ; preds = %58
store i32 1, i32* %23
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%63 = load i8**, i8*** %11
%64 = load i32, i32* %16
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %63, i64 %65
%67 = load i8*, i8** %66
%68 = call i32 (i8*, i8*, ...) @sprintf(i8* %62, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %67)
%69 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%70 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %69)
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %18
br label %75
72: ; preds = %58
%73 = load i32, i32* %20
%74 = add nsw i32 %73, 1
store i32 %74, i32* %20
br label %75
75: ; preds = %72, %61
br label %109
76: ; preds = %51
%77 = load i32*, i32** %9
%78 = load i32, i32* %16
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i32, i32* %77, i64 %79
%81 = load i32, i32* %80
%82 = icmp eq i32 %81, 3
br i1 %82, label %83, label %100
83: ; preds = %76
%84 = load i32, i32* %19
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %96
86: ; preds = %83
store i32 1, i32* %23
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%88 = load i8**, i8*** %11
%89 = load i32, i32* %16
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8*, i8** %88, i64 %90
%92 = load i8*, i8** %91
%93 = call i32 (i8*, i8*, ...) @sprintf(i8* %87, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %92)
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%95 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %94)
store i32 1, i32* %19
br label %99
96: ; preds = %83
%97 = load i32, i32* %21
%98 = add nsw i32 %97, 1
store i32 %98, i32* %21
br label %99
99: ; preds = %96, %86
br label %108
100: ; preds = %76
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%102 = load i8**, i8*** %11
%103 = load i32, i32* %16
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %102, i64 %104
%106 = load i8*, i8** %105
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %106)
br label %142
108: ; preds = %99
br label %109
109: ; preds = %108, %75
%110 = load i32, i32* %23
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %140
112: ; preds = %109
%113 = load i32, i32* %14
%114 = load i32*, i32** %9
%115 = load i32, i32* %16
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i32, i32* %114, i64 %116
%118 = load i32, i32* %117
%119 = mul nsw i32 %113, %118
store i32 %119, i32* %22
store i32 0, i32* %17
br label %120
120: ; preds = %135, %112
%121 = load i32, i32* %17
%122 = load i32, i32* %22
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %138
124: ; preds = %120
%125 = load double**, double*** %12
%126 = load i32, i32* %16
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double*, double** %125, i64 %127
%129 = load double*, double** %128
%130 = load i32, i32* %17
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %129, i64 %131
%133 = load double, double* %132
%134 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %133)
br label %135
135: ; preds = %124
%136 = load i32, i32* %17
%137 = add nsw i32 %136, 1
store i32 %137, i32* %17
br label %120
138: ; preds = %120
%139 = call i32 (...) @end_line()
br label %140
140: ; preds = %138, %109
br label %141
141: ; preds = %140, %44
br label %142
142: ; preds = %141, %100
%143 = load i32, i32* %16
%144 = add nsw i32 %143, 1
store i32 %144, i32* %16
br label %40
145: ; preds = %40
store i32 0, i32* %18
%146 = load i32, i32* %20
%147 = icmp sgt i32 %146, 0
br i1 %147, label %148, label %225
148: ; preds = %145
%149 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%150 = load i32, i32* %20
%151 = call i32 (i8*, i8*, ...) @sprintf(i8* %149, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %150)
%152 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%153 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %152)
store i32 0, i32* %16
br label %154
154: ; preds = %221, %148
%155 = load i32, i32* %16
%156 = load i32, i32* %8
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %224
158: ; preds = %154
store i32 0, i32* %24
%159 = load i32*, i32** %10
%160 = load i32, i32* %16
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %159, i64 %161
%163 = load i32, i32* %162
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %189
165: ; preds = %158
%166 = load i32*, i32** %9
%167 = load i32, i32* %16
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds i32, i32* %166, i64 %168
%170 = load i32, i32* %169
%171 = icmp eq i32 %170, 1
br i1 %171, label %172, label %188
172: ; preds = %165
%173 = load i32, i32* %18
%174 = icmp eq i32 %173, 0
br i1 %174, label %175, label %176
175: ; preds = %172
store i32 1, i32* %18
br label %187
176: ; preds = %172
store i32 1, i32* %24
%177 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%178 = load i8**, i8*** %11
%179 = load i32, i32* %16
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i8*, i8** %178, i64 %180
%182 = load i8*, i8** %181
%183 = load i32, i32* %14
%184 = call i32 (i8*, i8*, ...) @sprintf(i8* %177, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %182, i32 %183)
%185 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%186 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %185)
br label %187
187: ; preds = %176, %175
br label %188
188: ; preds = %187, %165
br label %189
189: ; preds = %188, %158
%190 = load i32, i32* %24
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %220
192: ; preds = %189
%193 = load i32, i32* %14
%194 = load i32*, i32** %9
%195 = load i32, i32* %16
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i32, i32* %194, i64 %196
%198 = load i32, i32* %197
%199 = mul nsw i32 %193, %198
store i32 %199, i32* %25
store i32 0, i32* %17
br label %200
200: ; preds = %215, %192
%201 = load i32, i32* %17
%202 = load i32, i32* %25
%203 = icmp slt i32 %201, %202
br i1 %203, label %204, label %218
204: ; preds = %200
%205 = load double**, double*** %12
%206 = load i32, i32* %16
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds double*, double** %205, i64 %207
%209 = load double*, double** %208
%210 = load i32, i32* %17
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
%213 = load double, double* %212
%214 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %213)
br label %215
215: ; preds = %204
%216 = load i32, i32* %17
%217 = add nsw i32 %216, 1
store i32 %217, i32* %17
br label %200
218: ; preds = %200
%219 = call i32 (...) @end_line()
br label %220
220: ; preds = %218, %189
br label %221
221: ; preds = %220
%222 = load i32, i32* %16
%223 = add nsw i32 %222, 1
store i32 %223, i32* %16
br label %154
224: ; preds = %154
br label %225
225: ; preds = %224, %145
store i32 0, i32* %19
%226 = load i32, i32* %21
%227 = icmp sgt i32 %226, 0
br i1 %227, label %228, label %305
228: ; preds = %225
%229 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%230 = load i32, i32* %21
%231 = call i32 (i8*, i8*, ...) @sprintf(i8* %229, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %230)
%232 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%233 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %232)
store i32 0, i32* %16
br label %234
234: ; preds = %301, %228
%235 = load i32, i32* %16
%236 = load i32, i32* %8
%237 = icmp slt i32 %235, %236
br i1 %237, label %238, label %304
238: ; preds = %234
store i32 0, i32* %26
%239 = load i32*, i32** %10
%240 = load i32, i32* %16
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds i32, i32* %239, i64 %241
%243 = load i32, i32* %242
%244 = icmp eq i32 %243, 0
br i1 %244, label %245, label %269
245: ; preds = %238
%246 = load i32*, i32** %9
%247 = load i32, i32* %16
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i32, i32* %246, i64 %248
%250 = load i32, i32* %249
%251 = icmp eq i32 %250, 3
br i1 %251, label %252, label %268
252: ; preds = %245
%253 = load i32, i32* %19
%254 = icmp eq i32 %253, 0
br i1 %254, label %255, label %256
255: ; preds = %252
store i32 1, i32* %19
br label %267
256: ; preds = %252
store i32 1, i32* %26
%257 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%258 = load i8**, i8*** %11
%259 = load i32, i32* %16
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds i8*, i8** %258, i64 %260
%262 = load i8*, i8** %261
%263 = load i32, i32* %14
%264 = call i32 (i8*, i8*, ...) @sprintf(i8* %257, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %262, i32 %263)
%265 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%266 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %265)
br label %267
267: ; preds = %256, %255
br label %268
268: ; preds = %267, %245
br label %269
269: ; preds = %268, %238
%270 = load i32, i32* %26
%271 = icmp ne i32 %270, 0
br i1 %271, label %272, label %300
272: ; preds = %269
%273 = load i32, i32* %14
%274 = load i32*, i32** %9
%275 = load i32, i32* %16
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds i32, i32* %274, i64 %276
%278 = load i32, i32* %277
%279 = mul nsw i32 %273, %278
store i32 %279, i32* %27
store i32 0, i32* %17
br label %280
280: ; preds = %295, %272
%281 = load i32, i32* %17
%282 = load i32, i32* %27
%283 = icmp slt i32 %281, %282
br i1 %283, label %284, label %298
284: ; preds = %280
%285 = load double**, double*** %12
%286 = load i32, i32* %16
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds double*, double** %285, i64 %287
%289 = load double*, double** %288
%290 = load i32, i32* %17
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds double, double* %289, i64 %291
%293 = load double, double* %292
%294 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %293)
br label %295
295: ; preds = %284
%296 = load i32, i32* %17
%297 = add nsw i32 %296, 1
store i32 %297, i32* %17
br label %280
298: ; preds = %280
%299 = call i32 (...) @end_line()
br label %300
300: ; preds = %298, %269
br label %301
301: ; preds = %300
%302 = load i32, i32* %16
%303 = add nsw i32 %302, 1
store i32 %303, i32* %16
br label %234
304: ; preds = %234
br label %305
305: ; preds = %304, %225
%306 = call i32 (...) @new_section()
%307 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%308 = load i32, i32* %13
%309 = call i32 (i8*, i8*, ...) @sprintf(i8* %307, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %308)
%310 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%311 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %310)
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %16
br label %312
312: ; preds = %414, %305
%313 = load i32, i32* %16
%314 = load i32, i32* %8
%315 = icmp slt i32 %313, %314
br i1 %315, label %316, label %417
316: ; preds = %312
%317 = load i32*, i32** %10
%318 = load i32, i32* %16
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds i32, i32* %317, i64 %319
%321 = load i32, i32* %320
%322 = icmp ne i32 %321, 0
br i1 %322, label %323, label %413
323: ; preds = %316
store i32 0, i32* %28
store i32 0, i32* %29
%324 = load i32*, i32** %9
%325 = load i32, i32* %16
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i32, i32* %324, i64 %326
%328 = load i32, i32* %327
%329 = icmp eq i32 %328, 1
br i1 %329, label %330, label %348
330: ; preds = %323
%331 = load i32, i32* %18
%332 = icmp eq i32 %331, 0
br i1 %332, label %333, label %344
333: ; preds = %330
store i32 1, i32* %29
%334 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%335 = load i8**, i8*** %11
%336 = load i32, i32* %16
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds i8*, i8** %335, i64 %337
%339 = load i8*, i8** %338
%340 = call i32 (i8*, i8*, ...) @sprintf(i8* %334, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %339)
%341 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%342 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %341)
%343 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %18
br label %347
344: ; preds = %330
%345 = load i32, i32* %20
%346 = add nsw i32 %345, 1
store i32 %346, i32* %20
br label %347
347: ; preds = %344, %333
br label %381
348: ; preds = %323
%349 = load i32*, i32** %9
%350 = load i32, i32* %16
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds i32, i32* %349, i64 %351
%353 = load i32, i32* %352
%354 = icmp eq i32 %353, 3
br i1 %354, label %355, label %372
355: ; preds = %348
%356 = load i32, i32* %19
%357 = icmp eq i32 %356, 0
br i1 %357, label %358, label %368
358: ; preds = %355
store i32 1, i32* %29
%359 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%360 = load i8**, i8*** %11
%361 = load i32, i32* %16
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds i8*, i8** %360, i64 %362
%364 = load i8*, i8** %363
%365 = call i32 (i8*, i8*, ...) @sprintf(i8* %359, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %364)
%366 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%367 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %366)
store i32 1, i32* %19
br label %371
368: ; preds = %355
%369 = load i32, i32* %21
%370 = add nsw i32 %369, 1
store i32 %370, i32* %21
br label %371
371: ; preds = %368, %358
br label %380
372: ; preds = %348
%373 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%374 = load i8**, i8*** %11
%375 = load i32, i32* %16
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds i8*, i8** %374, i64 %376
%378 = load i8*, i8** %377
%379 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %378)
br label %414
380: ; preds = %371
br label %381
381: ; preds = %380, %347
%382 = load i32, i32* %29
%383 = icmp ne i32 %382, 0
br i1 %383, label %384, label %412
384: ; preds = %381
%385 = load i32, i32* %13
%386 = load i32*, i32** %9
%387 = load i32, i32* %16
%388 = sext i32 %387 to i64
%389 = getelementptr inbounds i32, i32* %386, i64 %388
%390 = load i32, i32* %389
%391 = mul nsw i32 %385, %390
store i32 %391, i32* %28
store i32 0, i32* %17
br label %392
392: ; preds = %407, %384
%393 = load i32, i32* %17
%394 = load i32, i32* %28
%395 = icmp slt i32 %393, %394
br i1 %395, label %396, label %410
396: ; preds = %392
%397 = load double**, double*** %12
%398 = load i32, i32* %16
%399 = sext i32 %398 to i64
%400 = getelementptr inbounds double*, double** %397, i64 %399
%401 = load double*, double** %400
%402 = load i32, i32* %17
%403 = sext i32 %402 to i64
%404 = getelementptr inbounds double, double* %401, i64 %403
%405 = load double, double* %404
%406 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %405)
br label %407
407: ; preds = %396
%408 = load i32, i32* %17
%409 = add nsw i32 %408, 1
store i32 %409, i32* %17
br label %392
410: ; preds = %392
%411 = call i32 (...) @end_line()
br label %412
412: ; preds = %410, %381
br label %413
413: ; preds = %412, %316
br label %414
414: ; preds = %413, %372
%415 = load i32, i32* %16
%416 = add nsw i32 %415, 1
store i32 %416, i32* %16
br label %312
417: ; preds = %312
store i32 0, i32* %18
%418 = load i32, i32* %20
%419 = icmp sgt i32 %418, 0
br i1 %419, label %420, label %497
420: ; preds = %417
%421 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%422 = load i32, i32* %20
%423 = call i32 (i8*, i8*, ...) @sprintf(i8* %421, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %422)
%424 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%425 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %424)
store i32 0, i32* %16
br label %426
426: ; preds = %493, %420
%427 = load i32, i32* %16
%428 = load i32, i32* %8
%429 = icmp slt i32 %427, %428
br i1 %429, label %430, label %496
430: ; preds = %426
store i32 0, i32* %30
%431 = load i32*, i32** %10
%432 = load i32, i32* %16
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds i32, i32* %431, i64 %433
%435 = load i32, i32* %434
%436 = icmp ne i32 %435, 0
br i1 %436, label %437, label %461
437: ; preds = %430
%438 = load i32*, i32** %9
%439 = load i32, i32* %16
%440 = sext i32 %439 to i64
%441 = getelementptr inbounds i32, i32* %438, i64 %440
%442 = load i32, i32* %441
%443 = icmp eq i32 %442, 1
br i1 %443, label %444, label %460
444: ; preds = %437
%445 = load i32, i32* %18
%446 = icmp eq i32 %445, 0
br i1 %446, label %447, label %448
447: ; preds = %444
store i32 1, i32* %18
br label %459
448: ; preds = %444
store i32 1, i32* %30
%449 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%450 = load i8**, i8*** %11
%451 = load i32, i32* %16
%452 = sext i32 %451 to i64
%453 = getelementptr inbounds i8*, i8** %450, i64 %452
%454 = load i8*, i8** %453
%455 = load i32, i32* %13
%456 = call i32 (i8*, i8*, ...) @sprintf(i8* %449, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %454, i32 %455)
%457 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%458 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %457)
br label %459
459: ; preds = %448, %447
br label %460
460: ; preds = %459, %437
br label %461
461: ; preds = %460, %430
%462 = load i32, i32* %30
%463 = icmp ne i32 %462, 0
br i1 %463, label %464, label %492
464: ; preds = %461
%465 = load i32, i32* %13
%466 = load i32*, i32** %9
%467 = load i32, i32* %16
%468 = sext i32 %467 to i64
%469 = getelementptr inbounds i32, i32* %466, i64 %468
%470 = load i32, i32* %469
%471 = mul nsw i32 %465, %470
store i32 %471, i32* %31
store i32 0, i32* %17
br label %472
472: ; preds = %487, %464
%473 = load i32, i32* %17
%474 = load i32, i32* %31
%475 = icmp slt i32 %473, %474
br i1 %475, label %476, label %490
476: ; preds = %472
%477 = load double**, double*** %12
%478 = load i32, i32* %16
%479 = sext i32 %478 to i64
%480 = getelementptr inbounds double*, double** %477, i64 %479
%481 = load double*, double** %480
%482 = load i32, i32* %17
%483 = sext i32 %482 to i64
%484 = getelementptr inbounds double, double* %481, i64 %483
%485 = load double, double* %484
%486 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %485)
br label %487
487: ; preds = %476
%488 = load i32, i32* %17
%489 = add nsw i32 %488, 1
store i32 %489, i32* %17
br label %472
490: ; preds = %472
%491 = call i32 (...) @end_line()
br label %492
492: ; preds = %490, %461
br label %493
493: ; preds = %492
%494 = load i32, i32* %16
%495 = add nsw i32 %494, 1
store i32 %495, i32* %16
br label %426
496: ; preds = %426
br label %497
497: ; preds = %496, %417
store i32 0, i32* %19
%498 = load i32, i32* %21
%499 = icmp sgt i32 %498, 0
br i1 %499, label %500, label %577
500: ; preds = %497
%501 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%502 = load i32, i32* %21
%503 = call i32 (i8*, i8*, ...) @sprintf(i8* %501, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %502)
%504 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%505 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %504)
store i32 0, i32* %16
br label %506
506: ; preds = %573, %500
%507 = load i32, i32* %16
%508 = load i32, i32* %8
%509 = icmp slt i32 %507, %508
br i1 %509, label %510, label %576
510: ; preds = %506
store i32 0, i32* %32
%511 = load i32*, i32** %10
%512 = load i32, i32* %16
%513 = sext i32 %512 to i64
%514 = getelementptr inbounds i32, i32* %511, i64 %513
%515 = load i32, i32* %514
%516 = icmp ne i32 %515, 0
br i1 %516, label %517, label %541
517: ; preds = %510
%518 = load i32*, i32** %9
%519 = load i32, i32* %16
%520 = sext i32 %519 to i64
%521 = getelementptr inbounds i32, i32* %518, i64 %520
%522 = load i32, i32* %521
%523 = icmp eq i32 %522, 3
br i1 %523, label %524, label %540
524: ; preds = %517
%525 = load i32, i32* %19
%526 = icmp eq i32 %525, 0
br i1 %526, label %527, label %528
527: ; preds = %524
store i32 1, i32* %19
br label %539
528: ; preds = %524
store i32 1, i32* %32
%529 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%530 = load i8**, i8*** %11
%531 = load i32, i32* %16
%532 = sext i32 %531 to i64
%533 = getelementptr inbounds i8*, i8** %530, i64 %532
%534 = load i8*, i8** %533
%535 = load i32, i32* %13
%536 = call i32 (i8*, i8*, ...) @sprintf(i8* %529, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %534, i32 %535)
%537 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%538 = call i32 (i8*, ...) bitcast (i32 (...)* @write_string to i32 (i8*, ...)*)(i8* %537)
br label %539
539: ; preds = %528, %527
br label %540
540: ; preds = %539, %517
br label %541
541: ; preds = %540, %510
%542 = load i32, i32* %32
%543 = icmp ne i32 %542, 0
br i1 %543, label %544, label %572
544: ; preds = %541
%545 = load i32, i32* %13
%546 = load i32*, i32** %9
%547 = load i32, i32* %16
%548 = sext i32 %547 to i64
%549 = getelementptr inbounds i32, i32* %546, i64 %548
%550 = load i32, i32* %549
%551 = mul nsw i32 %545, %550
store i32 %551, i32* %33
store i32 0, i32* %17
br label %552
552: ; preds = %567, %544
%553 = load i32, i32* %17
%554 = load i32, i32* %33
%555 = icmp slt i32 %553, %554
br i1 %555, label %556, label %570
556: ; preds = %552
%557 = load double**, double*** %12
%558 = load i32, i32* %16
%559 = sext i32 %558 to i64
%560 = getelementptr inbounds double*, double** %557, i64 %559
%561 = load double*, double** %560
%562 = load i32, i32* %17
%563 = sext i32 %562 to i64
%564 = getelementptr inbounds double, double* %561, i64 %563
%565 = load double, double* %564
%566 = call i32 (double, ...) bitcast (i32 (...)* @write_double to i32 (double, ...)*)(double %565)
br label %567
567: ; preds = %556
%568 = load i32, i32* %17
%569 = add nsw i32 %568, 1
store i32 %569, i32* %17
br label %552
570: ; preds = %552
%571 = call i32 (...) @end_line()
br label %572
572: ; preds = %570, %541
br label %573
573: ; preds = %572
%574 = load i32, i32* %16
%575 = add nsw i32 %574, 1
store i32 %575, i32* %16
br label %506
576: ; preds = %506
br label %577
577: ; preds = %576, %497
ret void
}

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