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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ end_line();
int /*<<< orphan*/ new_section();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ write_float(float);
int /*<<< orphan*/ write_string(char *);
void write_variables(int nvars, int *vardim, int *centering,
                     const char *const *varname, float **vars, int npts,
                     int ncells) {
  char str[1024];
  int i, j, first_scalar, first_vector;
  int num_scalars, num_vectors;
  int num_field = 0;
  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 float\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 float\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_float(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 float\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_float(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) {
        int num_to_write = 0;
        if (vardim[i] == 3) {
          if (first_vector == 0) {
            first_vector = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 3 %d float\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_float(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 float\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 float\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_float(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 float\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_float(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) {
        int num_to_write = 0;
        if (vardim[i] == 3) {
          if (first_vector == 0) {
            first_vector = 1;
          } else {
            should_write = 1;
            sprintf(str, "%s 3 %d float\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_float(vars[i][j]);
        }
        end_line();
      }
    }
  }
}


x86 assembly (clang, -O0):
<write_variables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%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)
movl   $0x0,-0x44c(%rbp)
mov    $0x0,%al
call   1030 <new_section@plt>
lea    -0x430(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
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,-0x450(%rbp)
movl   $0x0,-0x454(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12af <write_variables+0x14f>
cmpl   $0x0,-0x43c(%rbp)
jne    129b <write_variables+0x13b>
movl   $0x1,-0x454(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xda1(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
lea    0xd99(%rip),%rdi
call   1040 <write_string@plt>
movl   $0x1,-0x43c(%rbp)
jmp    12aa <write_variables+0x14a>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
jmp    1363 <write_variables+0x203>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    132e <write_variables+0x1ce>
cmpl   $0x0,-0x440(%rbp)
jne    131a <write_variables+0x1ba>
movl   $0x1,-0x454(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd3e(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x1,-0x440(%rbp)
jmp    1329 <write_variables+0x1c9>
mov    -0x448(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x448(%rbp)
jmp    135e <write_variables+0x1fe>
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13e9 <write_variables+0x289>
jmp    1363 <write_variables+0x203>
cmpl   $0x0,-0x454(%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,-0x450(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x450(%rbp),%eax
jge    13d8 <write_variables+0x278>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1392 <write_variables+0x232>
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    11ec <write_variables+0x8c>
movl   $0x0,-0x43c(%rbp)
cmpl   $0x0,-0x444(%rbp)
jle    1585 <write_variables+0x425>
lea    -0x430(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0xc68(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1580 <write_variables+0x420>
movl   $0x0,-0x458(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    14eb <write_variables+0x38b>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    14e6 <write_variables+0x386>
cmpl   $0x0,-0x43c(%rbp)
jne    14a4 <write_variables+0x344>
movl   $0x1,-0x43c(%rbp)
jmp    14e1 <write_variables+0x381>
movl   $0x1,-0x458(%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
call   1040 <write_string@plt>
jmp    14e6 <write_variables+0x386>
jmp    14eb <write_variables+0x38b>
cmpl   $0x0,-0x458(%rbp)
je     1567 <write_variables+0x407>
mov    0x10(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x45c(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x45c(%rbp),%eax
jge    1560 <write_variables+0x400>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    151a <write_variables+0x3ba>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    156c <write_variables+0x40c>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1445 <write_variables+0x2e5>
jmp    1585 <write_variables+0x425>
movl   $0x0,-0x440(%rbp)
cmpl   $0x0,-0x448(%rbp)
jle    1717 <write_variables+0x5b7>
lea    -0x430(%rbp),%rdi
mov    -0x448(%rbp),%edx
lea    0xae0(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1712 <write_variables+0x5b2>
movl   $0x0,-0x460(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    167d <write_variables+0x51d>
movl   $0x0,-0x464(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    1678 <write_variables+0x518>
cmpl   $0x0,-0x440(%rbp)
jne    1636 <write_variables+0x4d6>
movl   $0x1,-0x440(%rbp)
jmp    1673 <write_variables+0x513>
movl   $0x1,-0x460(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    0x10(%rbp),%ecx
lea    0xa53(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
jmp    1678 <write_variables+0x518>
jmp    167d <write_variables+0x51d>
cmpl   $0x0,-0x460(%rbp)
je     16f9 <write_variables+0x599>
mov    0x10(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x468(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x468(%rbp),%eax
jge    16f2 <write_variables+0x592>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@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    16fe <write_variables+0x59e>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    15cd <write_variables+0x46d>
jmp    1717 <write_variables+0x5b7>
mov    $0x0,%al
call   1030 <new_section@plt>
lea    -0x430(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0x993(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
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    1985 <write_variables+0x825>
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     196c <write_variables+0x80c>
movl   $0x0,-0x46c(%rbp)
movl   $0x0,-0x470(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1837 <write_variables+0x6d7>
cmpl   $0x0,-0x43c(%rbp)
jne    1823 <write_variables+0x6c3>
movl   $0x1,-0x470(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0x819(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
lea    0x811(%rip),%rdi
call   1040 <write_string@plt>
movl   $0x1,-0x43c(%rbp)
jmp    1832 <write_variables+0x6d2>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
jmp    18eb <write_variables+0x78b>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    18b6 <write_variables+0x756>
cmpl   $0x0,-0x440(%rbp)
jne    18a2 <write_variables+0x742>
movl   $0x1,-0x470(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0x7b6(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x1,-0x440(%rbp)
jmp    18b1 <write_variables+0x751>
mov    -0x448(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x448(%rbp)
jmp    18e6 <write_variables+0x786>
lea    0x78b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0x79f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1971 <write_variables+0x811>
jmp    18eb <write_variables+0x78b>
cmpl   $0x0,-0x470(%rbp)
je     1967 <write_variables+0x807>
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x46c(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x46c(%rbp),%eax
jge    1960 <write_variables+0x800>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    191a <write_variables+0x7ba>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    196c <write_variables+0x80c>
jmp    1971 <write_variables+0x811>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1774 <write_variables+0x614>
movl   $0x0,-0x43c(%rbp)
cmpl   $0x0,-0x444(%rbp)
jle    1b0d <write_variables+0x9ad>
lea    -0x430(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0x6e0(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1b08 <write_variables+0x9a8>
movl   $0x0,-0x474(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1a73 <write_variables+0x913>
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1a6e <write_variables+0x90e>
cmpl   $0x0,-0x43c(%rbp)
jne    1a2c <write_variables+0x8cc>
movl   $0x1,-0x43c(%rbp)
jmp    1a69 <write_variables+0x909>
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    0x64e(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
jmp    1a6e <write_variables+0x90e>
jmp    1a73 <write_variables+0x913>
cmpl   $0x0,-0x474(%rbp)
je     1aef <write_variables+0x98f>
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    1ae8 <write_variables+0x988>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1aa2 <write_variables+0x942>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1af4 <write_variables+0x994>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    19cd <write_variables+0x86d>
jmp    1b0d <write_variables+0x9ad>
movl   $0x0,-0x440(%rbp)
cmpl   $0x0,-0x448(%rbp)
jle    1c9f <write_variables+0xb3f>
lea    -0x430(%rbp),%rdi
mov    -0x448(%rbp),%edx
lea    0x558(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1c9a <write_variables+0xb3a>
movl   $0x0,-0x47c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1c05 <write_variables+0xaa5>
movl   $0x0,-0x480(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x434(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    1c00 <write_variables+0xaa0>
cmpl   $0x0,-0x440(%rbp)
jne    1bbe <write_variables+0xa5e>
movl   $0x1,-0x440(%rbp)
jmp    1bfb <write_variables+0xa9b>
movl   $0x1,-0x47c(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x2c(%rbp),%ecx
lea    0x4cb(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1040 <write_string@plt>
jmp    1c00 <write_variables+0xaa0>
jmp    1c05 <write_variables+0xaa5>
cmpl   $0x0,-0x47c(%rbp)
je     1c81 <write_variables+0xb21>
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x434(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
mov    %eax,-0x484(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x484(%rbp),%eax
jge    1c7a <write_variables+0xb1a>
mov    -0x28(%rbp),%rax
movslq -0x434(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x438(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <write_float@plt>
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1c34 <write_variables+0xad4>
mov    $0x0,%al
call   1060 <end_line@plt>
jmp    1c86 <write_variables+0xb26>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1b55 <write_variables+0x9f5>
jmp    1c9f <write_variables+0xb3f>
add    $0x490,%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
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    152d <write_variables+0x3bd>
mov    %ebp,0x18(%rsp)
mov    %ebp,%r15d
xor    %ebp,%ebp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %r14d,%r14d
xor    %r12d,%r12d
mov    %rbx,0x28(%rsp)
jmp    122d <write_variables+0xbd>
lea    0xea3(%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)
add    $0x1,%rbp
cmp    %r15,%rbp
je     1341 <write_variables+0x1d1>
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    11f6 <write_variables+0x86>
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     12b4 <write_variables+0x144>
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
call   1050 <write_string@plt>
lea    0xd7b(%rip),%rdi
call   1050 <write_string@plt>
movl   $0x1,0xc(%rsp)
jmp    12eb <write_variables+0x17b>
mov    %r12d,0x4(%rsp)
mov    %r14d,%r12d
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd62(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
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    1328 <write_variables+0x1b8>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13,%rbp,8),%rax
movss  (%rax,%rbx,4),%xmm0
call   1080 <write_float@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    143e <write_variables+0x2ce>
lea    0xd0e(%rip),%rsi
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    143e <write_variables+0x2ce>
xor    %ebp,%ebp
xor    %eax,%eax
mov    %r12d,0x4(%rsp)
jmp    13a3 <write_variables+0x233>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%r14d
add    $0x1,%rbp
mov    %r14d,%eax
cmp    %r15,%rbp
je     143e <write_variables+0x2ce>
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    0xc9d(%rip),%rsi
mov    0x470(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r12,%rdi
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    1428 <write_variables+0x2b8>
mov    %eax,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%r13,%rbp,8),%rax
movss  (%rax,%rbx,4),%xmm0
call   1080 <write_float@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    155b <write_variables+0x3eb>
lea    0xc0d(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r14,%rdi
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    152d <write_variables+0x3bd>
xor    %r14d,%r14d
xor    %eax,%eax
jmp    1493 <write_variables+0x323>
nopl   0x0(%rax,%rax,1)
mov    %eax,%r12d
add    $0x1,%r14
mov    %r12d,%eax
cmp    %r15,%r14
je     155b <write_variables+0x3eb>
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    0xbba(%rip),%rsi
mov    0x470(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    1518 <write_variables+0x3a8>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13,%r14,8),%rax
movss  (%rax,%rbp,4),%xmm0
call   1080 <write_float@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    0xb56(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    0x1c(%rsp),%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <write_string@plt>
jmp    18a9 <write_variables+0x739>
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
call   1050 <write_string@plt>
test   %ebp,%ebp
jle    18a9 <write_variables+0x739>
xor    %r14d,%r14d
movl   $0x0,0x8(%rsp)
xor    %ebp,%ebp
xor    %r12d,%r12d
movl   $0x0,0x4(%rsp)
jmp    15e0 <write_variables+0x470>
cs nopw 0x0(%rax,%rax,1)
lea    0xae9(%rip),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rsi
lea    0xa7c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r14
cmp    %r15,%r14
je     16dd <write_variables+0x56d>
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>
cmpl   $0x0,0x8(%rsp)
je     1620 <write_variables+0x4b0>
add    $0x1,%r12d
movl   $0x1,0x8(%rsp)
jmp    15d3 <write_variables+0x463>
nop
test   %ebp,%ebp
je     1661 <write_variables+0x4f1>
addl   $0x1,0x4(%rsp)
mov    $0x1,%ebp
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    0x9d2(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <write_string@plt>
lea    0x9ce(%rip),%rdi
call   1050 <write_string@plt>
movl   $0x1,0x8(%rsp)
jmp    1690 <write_variables+0x520>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
lea    0x9bd(%rip),%rsi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <write_string@plt>
movl   $0x1,0xc(%rsp)
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   0x1c(%rsp),%eax
test   %eax,%eax
jle    16c8 <write_variables+0x558>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rax
movss  (%rax,%rbp,4),%xmm0
call   1080 <write_float@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    16b0 <write_variables+0x540>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
mov    0xc(%rsp),%ebp
jmp    15d3 <write_variables+0x463>
test   %r12d,%r12d
jle    17b9 <write_variables+0x649>
lea    0x972(%rip),%rsi
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    17b9 <write_variables+0x649>
xor    %ebp,%ebp
xor    %eax,%eax
jmp    1733 <write_variables+0x5c3>
nopl   0x0(%rax,%rax,1)
mov    %eax,%r14d
add    $0x1,%rbp
mov    %r14d,%eax
cmp    %r15,%rbp
je     17b9 <write_variables+0x649>
cmpl   $0x0,(%rbx,%rbp,4)
je     1720 <write_variables+0x5b0>
mov    0x10(%rsp),%rcx
cmpl   $0x1,(%rcx,%rbp,4)
jne    1720 <write_variables+0x5b0>
mov    $0x1,%r14d
test   %eax,%eax
je     1723 <write_variables+0x5b3>
mov    0x20(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
lea    0x30(%rsp),%r12
mov    %r12,%rdi
lea    0x90d(%rip),%rsi
mov    0x1c(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r12,%rdi
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%rbp,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    17a8 <write_variables+0x638>
mov    %eax,%r12d
xor    %ebx,%ebx
nop
mov    0x0(%r13,%rbp,8),%rax
movss  (%rax,%rbx,4),%xmm0
call   1080 <write_float@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1790 <write_variables+0x620>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
jmp    1723 <write_variables+0x5b3>
mov    0x4(%rsp),%edx
test   %edx,%edx
jle    18a9 <write_variables+0x739>
lea    0x893(%rip),%rsi
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <write_string@plt>
cmpl   $0x0,0x18(%rsp)
jle    18a9 <write_variables+0x739>
xor    %r14d,%r14d
xor    %eax,%eax
jmp    1813 <write_variables+0x6a3>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%r12d
add    $0x1,%r14
mov    %r12d,%eax
cmp    %r15,%r14
je     18a9 <write_variables+0x739>
cmpl   $0x0,(%rbx,%r14,4)
je     1800 <write_variables+0x690>
mov    0x10(%rsp),%rcx
cmpl   $0x3,(%rcx,%r14,4)
jne    1800 <write_variables+0x690>
mov    $0x1,%r12d
test   %eax,%eax
je     1803 <write_variables+0x693>
mov    0x20(%rsp),%rax
mov    (%rax,%r14,8),%rdx
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
lea    0x83a(%rip),%rsi
mov    0x1c(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <write_string@plt>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,4),%eax
imul   %ebx,%eax
test   %eax,%eax
jle    1898 <write_variables+0x728>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rax
movss  (%rax,%rbp,4),%xmm0
call   1080 <write_float@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1880 <write_variables+0x710>
xor    %eax,%eax
call   1070 <end_line@plt>
mov    0x28(%rsp),%rbx
jmp    1803 <write_variables+0x693>
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 = [18 x i8] c"SCALARS %s float\0A\00"
@.str.2 = [22 x i8] c"LOOKUP_TABLE default\0A\00"
@.str.3 = [18 x i8] c"VECTORS %s float\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 = [15 x i8] c"%s 1 %d float\0A\00"
@.str.8 = [15 x i8] c"%s 3 %d float\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, float** %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca float**
%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
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
store i32 %0, i32* %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i8** %3, i8*** %11
store float** %4, float*** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 0, i32* %22
%37 = call i32 (...) @new_section()
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%39 = load i32, i32* %14
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %38, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%42 = call i32 @write_string(i8* %41)
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 %43
43: ; preds = %145, %7
%44 = load i32, i32* %16
%45 = load i32, i32* %8
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %148
47: ; preds = %43
%48 = load i32*, i32** %10
%49 = load i32, i32* %16
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %144
54: ; preds = %47
store i32 0, i32* %23
store i32 0, i32* %24
%55 = load i32*, i32** %9
%56 = load i32, i32* %16
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = icmp eq i32 %59, 1
br i1 %60, label %61, label %79
61: ; preds = %54
%62 = load i32, i32* %18
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %75
64: ; preds = %61
store i32 1, i32* %24
%65 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%66 = load i8**, i8*** %11
%67 = load i32, i32* %16
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %65, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %70)
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%73 = call i32 @write_string(i8* %72)
%74 = call i32 @write_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %18
br label %78
75: ; preds = %61
%76 = load i32, i32* %20
%77 = add nsw i32 %76, 1
store i32 %77, i32* %20
br label %78
78: ; preds = %75, %64
br label %112
79: ; preds = %54
%80 = load i32*, i32** %9
%81 = load i32, i32* %16
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %80, i64 %82
%84 = load i32, i32* %83
%85 = icmp eq i32 %84, 3
br i1 %85, label %86, label %103
86: ; preds = %79
%87 = load i32, i32* %19
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %99
89: ; preds = %86
store i32 1, i32* %24
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%91 = load i8**, i8*** %11
%92 = load i32, i32* %16
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8*, i8** %91, i64 %93
%95 = load i8*, i8** %94
%96 = call i32 (i8*, i8*, ...) @sprintf(i8* %90, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %95)
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%98 = call i32 @write_string(i8* %97)
store i32 1, i32* %19
br label %102
99: ; preds = %86
%100 = load i32, i32* %21
%101 = add nsw i32 %100, 1
store i32 %101, i32* %21
br label %102
102: ; preds = %99, %89
br label %111
103: ; preds = %79
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%105 = load i8**, i8*** %11
%106 = load i32, i32* %16
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8*, i8** %105, i64 %107
%109 = load i8*, i8** %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %109)
br label %145
111: ; preds = %102
br label %112
112: ; preds = %111, %78
%113 = load i32, i32* %24
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %143
115: ; preds = %112
%116 = load i32, i32* %14
%117 = load i32*, i32** %9
%118 = load i32, i32* %16
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i32, i32* %117, i64 %119
%121 = load i32, i32* %120
%122 = mul nsw i32 %116, %121
store i32 %122, i32* %23
store i32 0, i32* %17
br label %123
123: ; preds = %138, %115
%124 = load i32, i32* %17
%125 = load i32, i32* %23
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %141
127: ; preds = %123
%128 = load float**, float*** %12
%129 = load i32, i32* %16
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds float*, float** %128, i64 %130
%132 = load float*, float** %131
%133 = load i32, i32* %17
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds float, float* %132, i64 %134
%136 = load float, float* %135
%137 = call i32 @write_float(float %136)
br label %138
138: ; preds = %127
%139 = load i32, i32* %17
%140 = add nsw i32 %139, 1
store i32 %140, i32* %17
br label %123
141: ; preds = %123
%142 = call i32 (...) @end_line()
br label %143
143: ; preds = %141, %112
br label %144
144: ; preds = %143, %47
br label %145
145: ; preds = %144, %103
%146 = load i32, i32* %16
%147 = add nsw i32 %146, 1
store i32 %147, i32* %16
br label %43
148: ; preds = %43
store i32 0, i32* %18
%149 = load i32, i32* %20
%150 = icmp sgt i32 %149, 0
br i1 %150, label %151, label %228
151: ; preds = %148
%152 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%153 = load i32, i32* %20
%154 = call i32 (i8*, i8*, ...) @sprintf(i8* %152, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %153)
%155 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%156 = call i32 @write_string(i8* %155)
store i32 0, i32* %16
br label %157
157: ; preds = %224, %151
%158 = load i32, i32* %16
%159 = load i32, i32* %8
%160 = icmp slt i32 %158, %159
br i1 %160, label %161, label %227
161: ; preds = %157
store i32 0, i32* %25
%162 = load i32*, i32** %10
%163 = load i32, i32* %16
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i32, i32* %162, i64 %164
%166 = load i32, i32* %165
%167 = icmp eq i32 %166, 0
br i1 %167, label %168, label %192
168: ; preds = %161
%169 = load i32*, i32** %9
%170 = load i32, i32* %16
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i32, i32* %169, i64 %171
%173 = load i32, i32* %172
%174 = icmp eq i32 %173, 1
br i1 %174, label %175, label %191
175: ; preds = %168
%176 = load i32, i32* %18
%177 = icmp eq i32 %176, 0
br i1 %177, label %178, label %179
178: ; preds = %175
store i32 1, i32* %18
br label %190
179: ; preds = %175
store i32 1, i32* %25
%180 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%181 = load i8**, i8*** %11
%182 = load i32, i32* %16
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds i8*, i8** %181, i64 %183
%185 = load i8*, i8** %184
%186 = load i32, i32* %14
%187 = call i32 (i8*, i8*, ...) @sprintf(i8* %180, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %185, i32 %186)
%188 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%189 = call i32 @write_string(i8* %188)
br label %190
190: ; preds = %179, %178
br label %191
191: ; preds = %190, %168
br label %192
192: ; preds = %191, %161
%193 = load i32, i32* %25
%194 = icmp ne i32 %193, 0
br i1 %194, label %195, label %223
195: ; preds = %192
%196 = load i32, i32* %14
%197 = load i32*, i32** %9
%198 = load i32, i32* %16
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds i32, i32* %197, i64 %199
%201 = load i32, i32* %200
%202 = mul nsw i32 %196, %201
store i32 %202, i32* %26
store i32 0, i32* %17
br label %203
203: ; preds = %218, %195
%204 = load i32, i32* %17
%205 = load i32, i32* %26
%206 = icmp slt i32 %204, %205
br i1 %206, label %207, label %221
207: ; preds = %203
%208 = load float**, float*** %12
%209 = load i32, i32* %16
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds float*, float** %208, i64 %210
%212 = load float*, float** %211
%213 = load i32, i32* %17
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds float, float* %212, i64 %214
%216 = load float, float* %215
%217 = call i32 @write_float(float %216)
br label %218
218: ; preds = %207
%219 = load i32, i32* %17
%220 = add nsw i32 %219, 1
store i32 %220, i32* %17
br label %203
221: ; preds = %203
%222 = call i32 (...) @end_line()
br label %223
223: ; preds = %221, %192
br label %224
224: ; preds = %223
%225 = load i32, i32* %16
%226 = add nsw i32 %225, 1
store i32 %226, i32* %16
br label %157
227: ; preds = %157
br label %228
228: ; preds = %227, %148
store i32 0, i32* %19
%229 = load i32, i32* %21
%230 = icmp sgt i32 %229, 0
br i1 %230, label %231, label %308
231: ; preds = %228
%232 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%233 = load i32, i32* %21
%234 = call i32 (i8*, i8*, ...) @sprintf(i8* %232, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %233)
%235 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%236 = call i32 @write_string(i8* %235)
store i32 0, i32* %16
br label %237
237: ; preds = %304, %231
%238 = load i32, i32* %16
%239 = load i32, i32* %8
%240 = icmp slt i32 %238, %239
br i1 %240, label %241, label %307
241: ; preds = %237
store i32 0, i32* %27
%242 = load i32*, i32** %10
%243 = load i32, i32* %16
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i32, i32* %242, i64 %244
%246 = load i32, i32* %245
%247 = icmp eq i32 %246, 0
br i1 %247, label %248, label %272
248: ; preds = %241
store i32 0, i32* %28
%249 = load i32*, i32** %9
%250 = load i32, i32* %16
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds i32, i32* %249, i64 %251
%253 = load i32, i32* %252
%254 = icmp eq i32 %253, 3
br i1 %254, label %255, label %271
255: ; preds = %248
%256 = load i32, i32* %19
%257 = icmp eq i32 %256, 0
br i1 %257, label %258, label %259
258: ; preds = %255
store i32 1, i32* %19
br label %270
259: ; preds = %255
store i32 1, i32* %27
%260 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%261 = load i8**, i8*** %11
%262 = load i32, i32* %16
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds i8*, i8** %261, i64 %263
%265 = load i8*, i8** %264
%266 = load i32, i32* %14
%267 = call i32 (i8*, i8*, ...) @sprintf(i8* %260, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* %265, i32 %266)
%268 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%269 = call i32 @write_string(i8* %268)
br label %270
270: ; preds = %259, %258
br label %271
271: ; preds = %270, %248
br label %272
272: ; preds = %271, %241
%273 = load i32, i32* %27
%274 = icmp ne i32 %273, 0
br i1 %274, label %275, label %303
275: ; preds = %272
%276 = load i32, i32* %14
%277 = load i32*, i32** %9
%278 = load i32, i32* %16
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds i32, i32* %277, i64 %279
%281 = load i32, i32* %280
%282 = mul nsw i32 %276, %281
store i32 %282, i32* %29
store i32 0, i32* %17
br label %283
283: ; preds = %298, %275
%284 = load i32, i32* %17
%285 = load i32, i32* %29
%286 = icmp slt i32 %284, %285
br i1 %286, label %287, label %301
287: ; preds = %283
%288 = load float**, float*** %12
%289 = load i32, i32* %16
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds float*, float** %288, i64 %290
%292 = load float*, float** %291
%293 = load i32, i32* %17
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds float, float* %292, i64 %294
%296 = load float, float* %295
%297 = call i32 @write_float(float %296)
br label %298
298: ; preds = %287
%299 = load i32, i32* %17
%300 = add nsw i32 %299, 1
store i32 %300, i32* %17
br label %283
301: ; preds = %283
%302 = call i32 (...) @end_line()
br label %303
303: ; preds = %301, %272
br label %304
304: ; preds = %303
%305 = load i32, i32* %16
%306 = add nsw i32 %305, 1
store i32 %306, i32* %16
br label %237
307: ; preds = %237
br label %308
308: ; preds = %307, %228
%309 = call i32 (...) @new_section()
%310 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%311 = load i32, i32* %13
%312 = call i32 (i8*, i8*, ...) @sprintf(i8* %310, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %311)
%313 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%314 = call i32 @write_string(i8* %313)
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 %315
315: ; preds = %417, %308
%316 = load i32, i32* %16
%317 = load i32, i32* %8
%318 = icmp slt i32 %316, %317
br i1 %318, label %319, label %420
319: ; preds = %315
%320 = load i32*, i32** %10
%321 = load i32, i32* %16
%322 = sext i32 %321 to i64
%323 = getelementptr inbounds i32, i32* %320, i64 %322
%324 = load i32, i32* %323
%325 = icmp ne i32 %324, 0
br i1 %325, label %326, label %416
326: ; preds = %319
store i32 0, i32* %30
store i32 0, i32* %31
%327 = load i32*, i32** %9
%328 = load i32, i32* %16
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds i32, i32* %327, i64 %329
%331 = load i32, i32* %330
%332 = icmp eq i32 %331, 1
br i1 %332, label %333, label %351
333: ; preds = %326
%334 = load i32, i32* %18
%335 = icmp eq i32 %334, 0
br i1 %335, label %336, label %347
336: ; preds = %333
store i32 1, i32* %31
%337 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%338 = load i8**, i8*** %11
%339 = load i32, i32* %16
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds i8*, i8** %338, i64 %340
%342 = load i8*, i8** %341
%343 = call i32 (i8*, i8*, ...) @sprintf(i8* %337, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %342)
%344 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%345 = call i32 @write_string(i8* %344)
%346 = call i32 @write_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %18
br label %350
347: ; preds = %333
%348 = load i32, i32* %20
%349 = add nsw i32 %348, 1
store i32 %349, i32* %20
br label %350
350: ; preds = %347, %336
br label %384
351: ; preds = %326
%352 = load i32*, i32** %9
%353 = load i32, i32* %16
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds i32, i32* %352, i64 %354
%356 = load i32, i32* %355
%357 = icmp eq i32 %356, 3
br i1 %357, label %358, label %375
358: ; preds = %351
%359 = load i32, i32* %19
%360 = icmp eq i32 %359, 0
br i1 %360, label %361, label %371
361: ; preds = %358
store i32 1, i32* %31
%362 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%363 = load i8**, i8*** %11
%364 = load i32, i32* %16
%365 = sext i32 %364 to i64
%366 = getelementptr inbounds i8*, i8** %363, i64 %365
%367 = load i8*, i8** %366
%368 = call i32 (i8*, i8*, ...) @sprintf(i8* %362, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %367)
%369 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%370 = call i32 @write_string(i8* %369)
store i32 1, i32* %19
br label %374
371: ; preds = %358
%372 = load i32, i32* %21
%373 = add nsw i32 %372, 1
store i32 %373, i32* %21
br label %374
374: ; preds = %371, %361
br label %383
375: ; preds = %351
%376 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%377 = load i8**, i8*** %11
%378 = load i32, i32* %16
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds i8*, i8** %377, i64 %379
%381 = load i8*, i8** %380
%382 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %381)
br label %417
383: ; preds = %374
br label %384
384: ; preds = %383, %350
%385 = load i32, i32* %31
%386 = icmp ne i32 %385, 0
br i1 %386, label %387, label %415
387: ; preds = %384
%388 = load i32, i32* %13
%389 = load i32*, i32** %9
%390 = load i32, i32* %16
%391 = sext i32 %390 to i64
%392 = getelementptr inbounds i32, i32* %389, i64 %391
%393 = load i32, i32* %392
%394 = mul nsw i32 %388, %393
store i32 %394, i32* %30
store i32 0, i32* %17
br label %395
395: ; preds = %410, %387
%396 = load i32, i32* %17
%397 = load i32, i32* %30
%398 = icmp slt i32 %396, %397
br i1 %398, label %399, label %413
399: ; preds = %395
%400 = load float**, float*** %12
%401 = load i32, i32* %16
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds float*, float** %400, i64 %402
%404 = load float*, float** %403
%405 = load i32, i32* %17
%406 = sext i32 %405 to i64
%407 = getelementptr inbounds float, float* %404, i64 %406
%408 = load float, float* %407
%409 = call i32 @write_float(float %408)
br label %410
410: ; preds = %399
%411 = load i32, i32* %17
%412 = add nsw i32 %411, 1
store i32 %412, i32* %17
br label %395
413: ; preds = %395
%414 = call i32 (...) @end_line()
br label %415
415: ; preds = %413, %384
br label %416
416: ; preds = %415, %319
br label %417
417: ; preds = %416, %375
%418 = load i32, i32* %16
%419 = add nsw i32 %418, 1
store i32 %419, i32* %16
br label %315
420: ; preds = %315
store i32 0, i32* %18
%421 = load i32, i32* %20
%422 = icmp sgt i32 %421, 0
br i1 %422, label %423, label %500
423: ; preds = %420
%424 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%425 = load i32, i32* %20
%426 = call i32 (i8*, i8*, ...) @sprintf(i8* %424, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %425)
%427 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%428 = call i32 @write_string(i8* %427)
store i32 0, i32* %16
br label %429
429: ; preds = %496, %423
%430 = load i32, i32* %16
%431 = load i32, i32* %8
%432 = icmp slt i32 %430, %431
br i1 %432, label %433, label %499
433: ; preds = %429
store i32 0, i32* %32
%434 = load i32*, i32** %10
%435 = load i32, i32* %16
%436 = sext i32 %435 to i64
%437 = getelementptr inbounds i32, i32* %434, i64 %436
%438 = load i32, i32* %437
%439 = icmp ne i32 %438, 0
br i1 %439, label %440, label %464
440: ; preds = %433
%441 = load i32*, i32** %9
%442 = load i32, i32* %16
%443 = sext i32 %442 to i64
%444 = getelementptr inbounds i32, i32* %441, i64 %443
%445 = load i32, i32* %444
%446 = icmp eq i32 %445, 1
br i1 %446, label %447, label %463
447: ; preds = %440
%448 = load i32, i32* %18
%449 = icmp eq i32 %448, 0
br i1 %449, label %450, label %451
450: ; preds = %447
store i32 1, i32* %18
br label %462
451: ; preds = %447
store i32 1, i32* %32
%452 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%453 = load i8**, i8*** %11
%454 = load i32, i32* %16
%455 = sext i32 %454 to i64
%456 = getelementptr inbounds i8*, i8** %453, i64 %455
%457 = load i8*, i8** %456
%458 = load i32, i32* %13
%459 = call i32 (i8*, i8*, ...) @sprintf(i8* %452, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %457, i32 %458)
%460 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%461 = call i32 @write_string(i8* %460)
br label %462
462: ; preds = %451, %450
br label %463
463: ; preds = %462, %440
br label %464
464: ; preds = %463, %433
%465 = load i32, i32* %32
%466 = icmp ne i32 %465, 0
br i1 %466, label %467, label %495
467: ; preds = %464
%468 = load i32, i32* %13
%469 = load i32*, i32** %9
%470 = load i32, i32* %16
%471 = sext i32 %470 to i64
%472 = getelementptr inbounds i32, i32* %469, i64 %471
%473 = load i32, i32* %472
%474 = mul nsw i32 %468, %473
store i32 %474, i32* %33
store i32 0, i32* %17
br label %475
475: ; preds = %490, %467
%476 = load i32, i32* %17
%477 = load i32, i32* %33
%478 = icmp slt i32 %476, %477
br i1 %478, label %479, label %493
479: ; preds = %475
%480 = load float**, float*** %12
%481 = load i32, i32* %16
%482 = sext i32 %481 to i64
%483 = getelementptr inbounds float*, float** %480, i64 %482
%484 = load float*, float** %483
%485 = load i32, i32* %17
%486 = sext i32 %485 to i64
%487 = getelementptr inbounds float, float* %484, i64 %486
%488 = load float, float* %487
%489 = call i32 @write_float(float %488)
br label %490
490: ; preds = %479
%491 = load i32, i32* %17
%492 = add nsw i32 %491, 1
store i32 %492, i32* %17
br label %475
493: ; preds = %475
%494 = call i32 (...) @end_line()
br label %495
495: ; preds = %493, %464
br label %496
496: ; preds = %495
%497 = load i32, i32* %16
%498 = add nsw i32 %497, 1
store i32 %498, i32* %16
br label %429
499: ; preds = %429
br label %500
500: ; preds = %499, %420
store i32 0, i32* %19
%501 = load i32, i32* %21
%502 = icmp sgt i32 %501, 0
br i1 %502, label %503, label %580
503: ; preds = %500
%504 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%505 = load i32, i32* %21
%506 = call i32 (i8*, i8*, ...) @sprintf(i8* %504, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %505)
%507 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%508 = call i32 @write_string(i8* %507)
store i32 0, i32* %16
br label %509
509: ; preds = %576, %503
%510 = load i32, i32* %16
%511 = load i32, i32* %8
%512 = icmp slt i32 %510, %511
br i1 %512, label %513, label %579
513: ; preds = %509
store i32 0, i32* %34
%514 = load i32*, i32** %10
%515 = load i32, i32* %16
%516 = sext i32 %515 to i64
%517 = getelementptr inbounds i32, i32* %514, i64 %516
%518 = load i32, i32* %517
%519 = icmp ne i32 %518, 0
br i1 %519, label %520, label %544
520: ; preds = %513
store i32 0, i32* %35
%521 = load i32*, i32** %9
%522 = load i32, i32* %16
%523 = sext i32 %522 to i64
%524 = getelementptr inbounds i32, i32* %521, i64 %523
%525 = load i32, i32* %524
%526 = icmp eq i32 %525, 3
br i1 %526, label %527, label %543
527: ; preds = %520
%528 = load i32, i32* %19
%529 = icmp eq i32 %528, 0
br i1 %529, label %530, label %531
530: ; preds = %527
store i32 1, i32* %19
br label %542
531: ; preds = %527
store i32 1, i32* %34
%532 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%533 = load i8**, i8*** %11
%534 = load i32, i32* %16
%535 = sext i32 %534 to i64
%536 = getelementptr inbounds i8*, i8** %533, i64 %535
%537 = load i8*, i8** %536
%538 = load i32, i32* %13
%539 = call i32 (i8*, i8*, ...) @sprintf(i8* %532, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* %537, i32 %538)
%540 = getelementptr inbounds [1024 x i8], [1024 x i8]* %15, i64 0, i64 0
%541 = call i32 @write_string(i8* %540)
br label %542
542: ; preds = %531, %530
br label %543
543: ; preds = %542, %520
br label %544
544: ; preds = %543, %513
%545 = load i32, i32* %34
%546 = icmp ne i32 %545, 0
br i1 %546, label %547, label %575
547: ; preds = %544
%548 = load i32, i32* %13
%549 = load i32*, i32** %9
%550 = load i32, i32* %16
%551 = sext i32 %550 to i64
%552 = getelementptr inbounds i32, i32* %549, i64 %551
%553 = load i32, i32* %552
%554 = mul nsw i32 %548, %553
store i32 %554, i32* %36
store i32 0, i32* %17
br label %555
555: ; preds = %570, %547
%556 = load i32, i32* %17
%557 = load i32, i32* %36
%558 = icmp slt i32 %556, %557
br i1 %558, label %559, label %573
559: ; preds = %555
%560 = load float**, float*** %12
%561 = load i32, i32* %16
%562 = sext i32 %561 to i64
%563 = getelementptr inbounds float*, float** %560, i64 %562
%564 = load float*, float** %563
%565 = load i32, i32* %17
%566 = sext i32 %565 to i64
%567 = getelementptr inbounds float, float* %564, i64 %566
%568 = load float, float* %567
%569 = call i32 @write_float(float %568)
br label %570
570: ; preds = %559
%571 = load i32, i32* %17
%572 = add nsw i32 %571, 1
store i32 %572, i32* %17
br label %555
573: ; preds = %555
%574 = call i32 (...) @end_line()
br label %575
575: ; preds = %573, %544
br label %576
576: ; preds = %575
%577 = load i32, i32* %16
%578 = add nsw i32 %577, 1
store i32 %578, i32* %16
br label %509
579: ; preds = %509
br label %580
580: ; preds = %579, %500
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"CELL_DATA %d\0A\00"
@.str.1 = [18 x i8] c"SCALARS %s float\0A\00"
@.str.2 = [22 x i8] c"LOOKUP_TABLE default\0A\00"
@.str.3 = [18 x i8] c"VECTORS %s float\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 = [15 x i8] c"%s 1 %d float\0A\00"
@.str.8 = [15 x i8] c"%s 3 %d float\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, float** 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 @write_string(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 ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = call i32 @write_string(i8* %9)
%35 = call i32 @write_string(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 %20, 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 ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %42)
%44 = call i32 @write_string(i8* %9)
br label %52
45: ; preds = %38
%46 = add nsw i32 %21, 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 [ 1, %40 ], [ %19, %30 ]
%54 = phi i32 [ %18, %40 ], [ 1, %30 ]
%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 float*, float** %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 float*, float** %59
%64 = getelementptr inbounds float, float* %63, i64 %62
%65 = load float, float* %64
%66 = call i32 @write_float(float %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 = %36, %45, %47, %69, %16
%72 = phi i32 [ %21, %16 ], [ %21, %47 ], [ %21, %69 ], [ %21, %36 ], [ %46, %45 ]
%73 = phi i32 [ %20, %16 ], [ %20, %47 ], [ %20, %69 ], [ %37, %36 ], [ %20, %45 ]
%74 = phi i32 [ %19, %16 ], [ %19, %47 ], [ %53, %69 ], [ %19, %36 ], [ 1, %45 ]
%75 = phi i32 [ %18, %16 ], [ %18, %47 ], [ %54, %69 ], [ 1, %36 ], [ %18, %45 ]
%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 %73, 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 %73)
%82 = call i32 @write_string(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 ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %99, i32 %6)
%101 = call i32 @write_string(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 float*, float** %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 float*, float** %106
%111 = getelementptr inbounds float, float* %110, i64 %109
%112 = load float, float* %111
%113 = call i32 @write_float(float %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 %72, 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 %72)
%126 = call i32 @write_string(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 ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* %143, i32 %6)
%145 = call i32 @write_string(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 float*, float** %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 float*, float** %150
%155 = getelementptr inbounds float, float* %154, i64 %153
%156 = load float, float* %155
%157 = call i32 @write_float(float %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, %135, %129, %160
%163 = phi i32 [ 1, %160 ], [ 1, %139 ], [ %131, %135 ], [ %131, %129 ]
%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 @write_string(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 ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %188)
%190 = call i32 @write_string(i8* %9)
%191 = call i32 @write_string(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 %176, 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 ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %198)
%200 = call i32 @write_string(i8* %9)
br label %208
201: ; preds = %194
%202 = add nsw i32 %177, 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 float*, float** %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 float*, float** %215
%220 = getelementptr inbounds float, float* %219, i64 %218
%221 = load float, float* %220
%222 = call i32 @write_float(float %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 ], [ %202, %201 ], [ %177, %192 ]
%229 = phi i32 [ %176, %172 ], [ %176, %203 ], [ %176, %225 ], [ %176, %201 ], [ %193, %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 %229, 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 %229)
%238 = call i32 @write_string(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 ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %255, i32 %5)
%257 = call i32 @write_string(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 float*, float** %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 float*, float** %262
%267 = getelementptr inbounds float, float* %266, i64 %265
%268 = load float, float* %267
%269 = call i32 @write_float(float %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 %228, 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 %228)
%282 = call i32 @write_string(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 ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* %299, i32 %5)
%301 = call i32 @write_string(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 float*, float** %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 float*, float** %306
%311 = getelementptr inbounds float, float* %310, i64 %309
%312 = load float, float* %311
%313 = call i32 @write_float(float %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, %291, %285, %316
%319 = phi i32 [ 1, %316 ], [ 1, %295 ], [ %287, %291 ], [ %287, %285 ]
%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 @write_string(i8* %9)
br label %326
326: ; preds = %318, %322, %166, %280, %278
ret void
}