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

/* Forward declarations */

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ clearerr(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ taka_tstring_one_tab_space(char *);
int taka_tvpp_create_simulation_template(const char *orig_file, const char cc,
                                         FILE *cerr) {
  FILE *of, *cf;
  char *name, *line, *p, *q;
  of = fopen(orig_file, "rt");
  if (!of) {
    if (cerr)
      fprintf(cerr, "Can't open the original file: %s.\n", orig_file);
    return (-32);
  }
  cf = fopen("simulation.vhd", "wt");
  if (!cf) {
    fclose(of);
    if (cerr)
      fprintf(cerr, "Can't open a converted file: %s.\n", "simulation.vhd");
    return (-33);
  }
  name = (char *)malloc(sizeof(char) * 4096);
  line = (char *)malloc(sizeof(char) * 4096);
  fprintf(cf, "library ieee, modelsim_lib;\n");
  fprintf(cf, "use ieee.std_logic_1164.all;\n");
  fprintf(cf, "use modelsim_lib.util.all;\n");
  fprintf(cf, "\n");
  fscanf(of, "%s %s\n", line, name);
  if (!strcmp(line, "entity") || !strcmp(line, "component"))
    fprintf(cf, "entity tb is\n");
  fscanf(of, "%s\n", line);
  if (!strcmp(line, "generic")) {
    fprintf(cf, "\tgeneric (\n");
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      if (!strcmp(p, "port"))
        break;
      fprintf(cf, "\t\t%s:\t\t\t", p);
      p = q + 1;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      fprintf(cf, "%s := ", p);
      p = q + 1;
      for (q = p; *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      fprintf(cf, "%s;\n", p);
    }
    fseek(cf, -2, SEEK_CUR);
    fprintf(cf, "\n\t);\n");
  }
  fprintf(cf, "end tb;\n");
  fprintf(cf, "\n");
  fprintf(cf, "architecture %s_simulation of tb is\n", name);
  fprintf(cf, "\n");
  fprintf(cf, "\t%c%c clock\n", cc, cc);
  fprintf(cf, "\tconstant CLOCK_PERIOD:\t\t\ttime := 4.000 ns;\n");
  fprintf(cf, "\n");
  fprintf(cf, "\t%c%c port\n", cc, cc);
  if (!strcmp(line, "port")) {
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      fprintf(cf, "\tsignal %s:\t\t\t", p);
      p = q + 1;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      p = q + 1;
      for (q = p; *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      fprintf(cf, "%s;\n", p);
    }
    fprintf(cf, "\n");
  }
  fprintf(cf, "\t%c%c signal spy\n", cc, cc);
  fprintf(cf, "\tsignal spy_xxxxx:\t\t\tstd_logic;\n");
  fprintf(cf, "\n");
  fprintf(cf, "begin\n");
  fprintf(cf, "\n");
  fprintf(cf, "\tINST: %s\n", name);
  clearerr(of);
  rewind(of);
  fscanf(of, "%s %s\n", line, name);
  fscanf(of, "%s\n", line);
  if (!strcmp(line, "generic")) {
    fprintf(cf, "\tgeneric map (\n");
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      if (!strcmp(p, "port"))
        break;
      fprintf(cf, "\t\t%s => %s,\n", p, p);
    }
    fseek(cf, -2, SEEK_CUR);
    fprintf(cf, "\n\t)\n");
  }
  if (!strcmp(line, "port")) {
    fprintf(cf, "\tport map (\n");
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      fprintf(cf, "\t\t%s => %s,\n", p, p);
    }
    fseek(cf, -2, SEEK_CUR);
    fprintf(cf, "\n\t);\n");
  }
  fprintf(cf, "\n");
  fprintf(cf, "process begin %c%c signal spy\n", cc, cc);
  fprintf(cf, "\tinit_signal_spy(\"/tb/INST/xxxxx\", \"/spy_xxxxx\", 0);\n");
  fprintf(cf, "\n");
  fprintf(cf, "\twait;\n");
  fprintf(cf, "end process;\n");
  fprintf(cf, "\n");
  fprintf(cf, "process begin\n");
  fprintf(cf, "\tclock <= transport '1';\n");
  fprintf(cf, "\twait for CLOCK_PERIOD / 2;\n");
  fprintf(cf, "\tclock <= transport '0';\n");
  fprintf(cf, "\twait for CLOCK_PERIOD / 2;\n");
  fprintf(cf, "end process;\n");
  fprintf(cf, "\n");
  fprintf(cf, "process begin\n");
  clearerr(of);
  rewind(of);
  fscanf(of, "%s %s\n", line, name);
  fscanf(of, "%s\n", line);
  if (!strcmp(line, "generic")) {
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      if (!strcmp(p, "port"))
        break;
    }
  }
  if (!strcmp(line, "port")) {
    while (fgets(line, 4096, of) != NULL) {
      taka_tstring_one_tab_space(line);
      p = line;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      strcpy(name, p);
      p = q + 1;
      for (q = p; *q != ' ' && *q != '\n' && *q != '\0'; q++)
        ;
      if (*q == '\0')
        continue;
      *q = '\0';
      if (!strcmp(p, "in") || !strcmp(p, "inout"))
        fprintf(cf, "\t%s <= transport ;\n", name);
    }
  }
  fprintf(cf, "\n");
  fprintf(cf, "\twait;\n");
  fprintf(cf, "\n");
  fprintf(cf, "end process;\n");
  fprintf(cf, "\n");
  rewind(of);
  fscanf(of, "%s %s\n", line, name);
  fprintf(cf, "end %s_simulation;\n", name);
  fprintf(cf, "\n");
  fprintf(cf, "configuration %s_cfg of tb is\n", name);
  fprintf(cf, "\tfor %s_simulation\n", name);
  fprintf(cf, "\tend for;\n");
  fprintf(cf, "end %s_cfg;\n", name);
  free(line);
  free(name);
  fclose(cf);
  fclose(of);
  return (0);
}


x86 assembly (clang, -O0):
<taka_tvpp_create_simulation_template>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0x1ef9(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1232 <taka_tvpp_create_simulation_template+0x62>
cmpq   $0x0,-0x20(%rbp)
je     1226 <taka_tvpp_create_simulation_template+0x56>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0x1de1(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0xffffffe0,-0x4(%rbp)
jmp    20ec <taka_tvpp_create_simulation_template+0xf1c>
lea    0x1dea(%rip),%rdi
lea    0x1df2(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    128d <taka_tvpp_create_simulation_template+0xbd>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
cmpq   $0x0,-0x20(%rbp)
je     1281 <taka_tvpp_create_simulation_template+0xb1>
mov    -0x20(%rbp),%rdi
lea    0x1dc2(%rip),%rsi
lea    0x1da9(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0xffffffdf,-0x4(%rbp)
jmp    20ec <taka_tvpp_create_simulation_template+0xf1c>
mov    $0x1000,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x1000,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
lea    0x1da3(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1dae(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1dba(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1dfc(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
lea    0x1daa(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0x1d9f(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
je     133d <taka_tvpp_create_simulation_template+0x16d>
mov    -0x40(%rbp),%rdi
lea    0x1d8d(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    134f <taka_tvpp_create_simulation_template+0x17f>
mov    -0x30(%rbp),%rdi
lea    0x1d7e(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0x1e67(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0x1d64(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    15da <taka_tvpp_create_simulation_template+0x40a>
mov    -0x30(%rbp),%rdi
lea    0x1d53(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     15b1 <taka_tvpp_create_simulation_template+0x3e1>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x51(%rbp)
je     13ff <taka_tvpp_create_simulation_template+0x22f>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x51(%rbp)
je     13ff <taka_tvpp_create_simulation_template+0x22f>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    140f <taka_tvpp_create_simulation_template+0x23f>
jmp    1425 <taka_tvpp_create_simulation_template+0x255>
jmp    1414 <taka_tvpp_create_simulation_template+0x244>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    13c5 <taka_tvpp_create_simulation_template+0x1f5>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    143a <taka_tvpp_create_simulation_template+0x26a>
jmp    1390 <taka_tvpp_create_simulation_template+0x1c0>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rdi
lea    0x1c9c(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    145f <taka_tvpp_create_simulation_template+0x28f>
jmp    15b1 <taka_tvpp_create_simulation_template+0x3e1>
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0x1c7f(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x52(%rbp)
je     14c3 <taka_tvpp_create_simulation_template+0x2f3>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x52(%rbp)
je     14c3 <taka_tvpp_create_simulation_template+0x2f3>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
test   $0x1,%al
jne    14d3 <taka_tvpp_create_simulation_template+0x303>
jmp    14e9 <taka_tvpp_create_simulation_template+0x319>
jmp    14d8 <taka_tvpp_create_simulation_template+0x308>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1489 <taka_tvpp_create_simulation_template+0x2b9>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    14fe <taka_tvpp_create_simulation_template+0x32e>
jmp    1390 <taka_tvpp_create_simulation_template+0x1c0>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0x1be2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x53(%rbp)
je     1554 <taka_tvpp_create_simulation_template+0x384>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x53(%rbp)
mov    -0x53(%rbp),%al
test   $0x1,%al
jne    1564 <taka_tvpp_create_simulation_template+0x394>
jmp    157a <taka_tvpp_create_simulation_template+0x3aa>
jmp    1569 <taka_tvpp_create_simulation_template+0x399>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    152f <taka_tvpp_create_simulation_template+0x35f>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    158f <taka_tvpp_create_simulation_template+0x3bf>
jmp    1390 <taka_tvpp_create_simulation_template+0x1c0>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0x1b58(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1390 <taka_tvpp_create_simulation_template+0x1c0>
mov    -0x30(%rbp),%rdi
mov    0x3a2c(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffe,%esi
call   10e0 <fseek@plt>
mov    -0x30(%rbp),%rdi
lea    0x1b2f(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1b23(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1aef(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x1b04(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1ac7(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
movsbl -0x11(%rbp),%edx
movsbl -0x11(%rbp),%ecx
lea    0x1afd(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1af8(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1a89(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
movsbl -0x11(%rbp),%edx
movsbl -0x11(%rbp),%ecx
lea    0x1af9(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
lea    0x1a5f(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    189b <taka_tvpp_create_simulation_template+0x6cb>
jmp    169c <taka_tvpp_create_simulation_template+0x4cc>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1889 <taka_tvpp_create_simulation_template+0x6b9>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x54(%rbp)
je     170b <taka_tvpp_create_simulation_template+0x53b>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x54(%rbp)
je     170b <taka_tvpp_create_simulation_template+0x53b>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x54(%rbp)
mov    -0x54(%rbp),%al
test   $0x1,%al
jne    171b <taka_tvpp_create_simulation_template+0x54b>
jmp    1731 <taka_tvpp_create_simulation_template+0x561>
jmp    1720 <taka_tvpp_create_simulation_template+0x550>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    16d1 <taka_tvpp_create_simulation_template+0x501>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1746 <taka_tvpp_create_simulation_template+0x576>
jmp    169c <taka_tvpp_create_simulation_template+0x4cc>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0x1a20(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x55(%rbp)
je     17b1 <taka_tvpp_create_simulation_template+0x5e1>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x55(%rbp)
je     17b1 <taka_tvpp_create_simulation_template+0x5e1>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    17c1 <taka_tvpp_create_simulation_template+0x5f1>
jmp    17d7 <taka_tvpp_create_simulation_template+0x607>
jmp    17c6 <taka_tvpp_create_simulation_template+0x5f6>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1777 <taka_tvpp_create_simulation_template+0x5a7>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    17ec <taka_tvpp_create_simulation_template+0x61c>
jmp    169c <taka_tvpp_create_simulation_template+0x4cc>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x56(%rbp)
je     182c <taka_tvpp_create_simulation_template+0x65c>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
test   $0x1,%al
jne    183c <taka_tvpp_create_simulation_template+0x66c>
jmp    1852 <taka_tvpp_create_simulation_template+0x682>
jmp    1841 <taka_tvpp_create_simulation_template+0x671>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1807 <taka_tvpp_create_simulation_template+0x637>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1867 <taka_tvpp_create_simulation_template+0x697>
jmp    169c <taka_tvpp_create_simulation_template+0x4cc>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0x1880(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    169c <taka_tvpp_create_simulation_template+0x4cc>
mov    -0x30(%rbp),%rdi
lea    0x1852(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
movsbl -0x11(%rbp),%edx
movsbl -0x11(%rbp),%ecx
lea    0x18dd(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x18dd(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1814(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1987(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x17f0(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x18b2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <clearerr@plt>
mov    -0x28(%rbp),%rdi
call   1060 <rewind@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
lea    0x1776(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0x1877(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0x1774(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1a97 <taka_tvpp_create_simulation_template+0x8c7>
mov    -0x30(%rbp),%rdi
lea    0x1850(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1a6e <taka_tvpp_create_simulation_template+0x89e>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x57(%rbp)
je     19ef <taka_tvpp_create_simulation_template+0x81f>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x57(%rbp)
je     19ef <taka_tvpp_create_simulation_template+0x81f>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x57(%rbp)
mov    -0x57(%rbp),%al
test   $0x1,%al
jne    19ff <taka_tvpp_create_simulation_template+0x82f>
jmp    1a15 <taka_tvpp_create_simulation_template+0x845>
jmp    1a04 <taka_tvpp_create_simulation_template+0x834>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    19b5 <taka_tvpp_create_simulation_template+0x7e5>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1a2a <taka_tvpp_create_simulation_template+0x85a>
jmp    1980 <taka_tvpp_create_simulation_template+0x7b0>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rdi
lea    0x16ac(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1a4f <taka_tvpp_create_simulation_template+0x87f>
jmp    1a6e <taka_tvpp_create_simulation_template+0x89e>
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x48(%rbp),%rcx
lea    0x1777(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1980 <taka_tvpp_create_simulation_template+0x7b0>
mov    -0x30(%rbp),%rdi
mov    0x356f(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffe,%esi
call   10e0 <fseek@plt>
mov    -0x30(%rbp),%rdi
lea    0x1756(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
lea    0x1646(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1bbb <taka_tvpp_create_simulation_template+0x9eb>
mov    -0x30(%rbp),%rdi
lea    0x1730(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1b92 <taka_tvpp_create_simulation_template+0x9c2>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x58(%rbp)
je     1b31 <taka_tvpp_create_simulation_template+0x961>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x58(%rbp)
je     1b31 <taka_tvpp_create_simulation_template+0x961>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x58(%rbp)
mov    -0x58(%rbp),%al
test   $0x1,%al
jne    1b41 <taka_tvpp_create_simulation_template+0x971>
jmp    1b57 <taka_tvpp_create_simulation_template+0x987>
jmp    1b46 <taka_tvpp_create_simulation_template+0x976>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1af7 <taka_tvpp_create_simulation_template+0x927>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1b6c <taka_tvpp_create_simulation_template+0x99c>
jmp    1ac2 <taka_tvpp_create_simulation_template+0x8f2>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x48(%rbp),%rcx
lea    0x1653(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1ac2 <taka_tvpp_create_simulation_template+0x8f2>
mov    -0x30(%rbp),%rdi
mov    0x344b(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffe,%esi
call   10e0 <fseek@plt>
mov    -0x30(%rbp),%rdi
lea    0x154e(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1520(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
movsbl -0x11(%rbp),%edx
movsbl -0x11(%rbp),%ecx
lea    0x1618(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1625(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x14e2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1637(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x162d(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x14ac(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1617(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1614(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x161c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1627(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x15f8(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x15af(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x142e(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1599(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <clearerr@plt>
mov    -0x28(%rbp),%rdi
call   1060 <rewind@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
lea    0x13b8(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0x14b9(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0x13b6(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1e0a <taka_tvpp_create_simulation_template+0xc3a>
jmp    1d31 <taka_tvpp_create_simulation_template+0xb61>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1e05 <taka_tvpp_create_simulation_template+0xc35>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x59(%rbp)
je     1da0 <taka_tvpp_create_simulation_template+0xbd0>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x59(%rbp)
je     1da0 <taka_tvpp_create_simulation_template+0xbd0>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    1db0 <taka_tvpp_create_simulation_template+0xbe0>
jmp    1dc6 <taka_tvpp_create_simulation_template+0xbf6>
jmp    1db5 <taka_tvpp_create_simulation_template+0xbe5>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1d66 <taka_tvpp_create_simulation_template+0xb96>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1ddb <taka_tvpp_create_simulation_template+0xc0b>
jmp    1d31 <taka_tvpp_create_simulation_template+0xb61>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rdi
lea    0x12fb(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1e00 <taka_tvpp_create_simulation_template+0xc30>
jmp    1e05 <taka_tvpp_create_simulation_template+0xc35>
jmp    1d31 <taka_tvpp_create_simulation_template+0xb61>
jmp    1e0a <taka_tvpp_create_simulation_template+0xc3a>
mov    -0x40(%rbp),%rdi
lea    0x12d3(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1fc8 <taka_tvpp_create_simulation_template+0xdf8>
jmp    1e28 <taka_tvpp_create_simulation_template+0xc58>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1000,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1fc3 <taka_tvpp_create_simulation_template+0xdf3>
mov    -0x40(%rbp),%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x5a(%rbp)
je     1e97 <taka_tvpp_create_simulation_template+0xcc7>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5a(%rbp)
je     1e97 <taka_tvpp_create_simulation_template+0xcc7>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x5a(%rbp)
mov    -0x5a(%rbp),%al
test   $0x1,%al
jne    1ea7 <taka_tvpp_create_simulation_template+0xcd7>
jmp    1ebd <taka_tvpp_create_simulation_template+0xced>
jmp    1eac <taka_tvpp_create_simulation_template+0xcdc>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1e5d <taka_tvpp_create_simulation_template+0xc8d>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1ed2 <taka_tvpp_create_simulation_template+0xd02>
jmp    1e28 <taka_tvpp_create_simulation_template+0xc58>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x5b(%rbp)
je     1f34 <taka_tvpp_create_simulation_template+0xd64>
mov    -0x50(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5b(%rbp)
je     1f34 <taka_tvpp_create_simulation_template+0xd64>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x5b(%rbp)
mov    -0x5b(%rbp),%al
test   $0x1,%al
jne    1f44 <taka_tvpp_create_simulation_template+0xd74>
jmp    1f5a <taka_tvpp_create_simulation_template+0xd8a>
jmp    1f49 <taka_tvpp_create_simulation_template+0xd79>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1efa <taka_tvpp_create_simulation_template+0xd2a>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1f6f <taka_tvpp_create_simulation_template+0xd9f>
jmp    1e28 <taka_tvpp_create_simulation_template+0xc58>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rdi
lea    0x1342(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
je     1fa8 <taka_tvpp_create_simulation_template+0xdd8>
mov    -0x48(%rbp),%rdi
lea    0x132c(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1fbe <taka_tvpp_create_simulation_template+0xdee>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x1315(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1e28 <taka_tvpp_create_simulation_template+0xc58>
jmp    1fc8 <taka_tvpp_create_simulation_template+0xdf8>
mov    -0x30(%rbp),%rdi
lea    0x1113(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1268(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x10ef(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x124c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x10cb(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1060 <rewind@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
lea    0x1070(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x128c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1080(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x1278(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x1281(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x1283(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x1278(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taka_tvpp_create_simulation_template>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%rbp
lea    0xedc(%rip),%rsi
call   1100 <fopen@plt>
test   %rax,%rax
je     146a <taka_tvpp_create_simulation_template+0x27a>
mov    %rax,%r14
lea    0xdfd(%rip),%rdi
lea    0xe05(%rip),%rsi
call   1100 <fopen@plt>
test   %rax,%rax
je     1488 <taka_tvpp_create_simulation_template+0x298>
mov    %rax,%r12
mov    $0x1000,%edi
call   10e0 <malloc@plt>
mov    %rax,%rbp
mov    $0x1000,%edi
call   10e0 <malloc@plt>
mov    %rax,%rbx
lea    0xdf8(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0xdfc(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0xe01(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0xdf7(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0xde7(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     12ed <taka_tvpp_create_simulation_template+0xfd>
lea    0xddb(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
jne    1306 <taka_tvpp_create_simulation_template+0x116>
lea    0xdd2(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0xeb8(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0xdb3(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
mov    %rbp,(%rsp)
jne    14f4 <taka_tvpp_create_simulation_template+0x304>
mov    %r15d,0x14(%rsp)
lea    0xd9b(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     14bc <taka_tvpp_create_simulation_template+0x2cc>
lea    0x1(%rbx),%rax
mov    %rax,0x8(%rsp)
lea    0x2(%rbx),%r15
jmp    13b0 <taka_tvpp_create_simulation_template+0x1c0>
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %r12,%rdi
lea    0xd70(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     14bc <taka_tvpp_create_simulation_template+0x2cc>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %r15,%r13
mov    0x8(%rsp),%rbp
movzbl -0x1(%rbp),%eax
test   %al,%al
je     1397 <taka_tvpp_create_simulation_template+0x1a7>
cmp    $0xa,%al
je     13e0 <taka_tvpp_create_simulation_template+0x1f0>
cmp    $0x20,%al
je     13e0 <taka_tvpp_create_simulation_template+0x1f0>
add    $0x1,%rbp
add    $0x1,%r13
jmp    13c0 <taka_tvpp_create_simulation_template+0x1d0>
nopw   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rbp)
mov    %rbx,%rdi
lea    0xcfa(%rip),%rsi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     14bc <taka_tvpp_create_simulation_template+0x2cc>
mov    %r12,%rdi
lea    0xce8(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
nop
movzbl -0x1(%r13),%eax
test   %al,%al
je     1397 <taka_tvpp_create_simulation_template+0x1a7>
cmp    $0xa,%al
je     1430 <taka_tvpp_create_simulation_template+0x240>
cmp    $0x20,%al
je     1430 <taka_tvpp_create_simulation_template+0x240>
add    $0x1,%r13
jmp    1410 <taka_tvpp_create_simulation_template+0x220>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%r13)
mov    %r12,%rdi
lea    0xcb7(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %r13,%rax
nopl   0x0(%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1397 <taka_tvpp_create_simulation_template+0x1a7>
cmp    $0xa,%cl
je     1380 <taka_tvpp_create_simulation_template+0x190>
add    $0x1,%rax
jmp    1450 <taka_tvpp_create_simulation_template+0x260>
mov    $0xffffffe0,%r15d
test   %rbx,%rbx
je     1bf7 <taka_tvpp_create_simulation_template+0xa07>
lea    0xb80(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
jmp    14b0 <taka_tvpp_create_simulation_template+0x2c0>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    $0xffffffdf,%r15d
test   %rbx,%rbx
je     1bf7 <taka_tvpp_create_simulation_template+0xa07>
lea    0xb8f(%rip),%rsi
lea    0xb76(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    1bf7 <taka_tvpp_create_simulation_template+0xa07>
mov    0x2b25(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0xfffffffe,%esi
call   10f0 <fseek@plt>
lea    0xc29(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    (%rsp),%rbp
mov    0x14(%rsp),%r15d
lea    0xc0d(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0xbf0(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
movsbl %r15b,%r13d
lea    0xbf0(%rip),%rsi
mov    %r12,%rdi
mov    %r13d,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0xbe6(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0xbed(%rip),%rsi
mov    %r12,%rdi
mov    %r13d,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0xb4e(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
jne    16b0 <taka_tvpp_create_simulation_template+0x4c0>
mov    %r13d,0x8(%rsp)
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     169a <taka_tvpp_create_simulation_template+0x4aa>
lea    0x1(%rbx),%r13
lea    0xba9(%rip),%rbp
jmp    1610 <taka_tvpp_create_simulation_template+0x420>
cs nopw 0x0(%rax,%rax,1)
nop
movb   $0x0,(%rax)
mov    %r12,%rdi
lea    0xb10(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     169a <taka_tvpp_create_simulation_template+0x4aa>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %r13,%r15
mov    %rbx,%rax
xchg   %ax,%ax
movzbl (%rax),%ecx
test   %cl,%cl
je     15f7 <taka_tvpp_create_simulation_template+0x407>
cmp    $0xa,%cl
je     1640 <taka_tvpp_create_simulation_template+0x450>
cmp    $0x20,%cl
je     1640 <taka_tvpp_create_simulation_template+0x450>
add    $0x1,%rax
add    $0x1,%r15
jmp    1620 <taka_tvpp_create_simulation_template+0x430>
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%r15),%eax
test   %al,%al
je     15f7 <taka_tvpp_create_simulation_template+0x407>
add    $0x1,%r15
cmp    $0x20,%al
je     1674 <taka_tvpp_create_simulation_template+0x484>
cmp    $0xa,%al
jne    1660 <taka_tvpp_create_simulation_template+0x470>
movb   $0x0,-0x1(%r15)
mov    %r15,%rax
nopl   0x0(%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     15f7 <taka_tvpp_create_simulation_template+0x407>
cmp    $0xa,%cl
je     15e0 <taka_tvpp_create_simulation_template+0x3f0>
add    $0x1,%rax
jmp    1680 <taka_tvpp_create_simulation_template+0x490>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
mov    (%rsp),%rbp
mov    0x8(%rsp),%r13d
lea    0xad4(%rip),%rsi
mov    %r12,%rdi
mov    %r13d,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0xacf(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0xb77(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0xaa4(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %r14,%rdi
call   10d0 <clearerr@plt>
mov    %r14,%rdi
call   1060 <rewind@plt>
lea    0x970(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0xa70(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0x96b(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
jne    1856 <taka_tvpp_create_simulation_template+0x666>
lea    0xa49(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1827 <taka_tvpp_create_simulation_template+0x637>
lea    0x936(%rip),%rbp
lea    0xa20(%rip),%r15
jmp    17fa <taka_tvpp_create_simulation_template+0x60a>
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     1827 <taka_tvpp_create_simulation_template+0x637>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1827 <taka_tvpp_create_simulation_template+0x637>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %rbx,%rax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax),%ecx
test   %cl,%cl
je     17e5 <taka_tvpp_create_simulation_template+0x5f5>
cmp    $0xa,%cl
je     17c0 <taka_tvpp_create_simulation_template+0x5d0>
cmp    $0x20,%cl
je     17c0 <taka_tvpp_create_simulation_template+0x5d0>
add    $0x1,%rax
jmp    1810 <taka_tvpp_create_simulation_template+0x620>
mov    0x27ba(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0xfffffffe,%esi
call   10f0 <fseek@plt>
lea    0x9a2(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x88b(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
jne    1936 <taka_tvpp_create_simulation_template+0x746>
lea    0x977(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1907 <taka_tvpp_create_simulation_template+0x717>
lea    0x937(%rip),%rbp
jmp    18db <taka_tvpp_create_simulation_template+0x6eb>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,(%rax)
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1907 <taka_tvpp_create_simulation_template+0x717>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %rbx,%rax
cs nopw 0x0(%rax,%rax,1)
movzbl (%rax),%ecx
test   %cl,%cl
je     18c6 <taka_tvpp_create_simulation_template+0x6d6>
cmp    $0xa,%cl
je     18b0 <taka_tvpp_create_simulation_template+0x6c0>
cmp    $0x20,%cl
je     18b0 <taka_tvpp_create_simulation_template+0x6c0>
add    $0x1,%rax
jmp    18f0 <taka_tvpp_create_simulation_template+0x700>
mov    0x26da(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0xfffffffe,%esi
call   10f0 <fseek@plt>
lea    0x7de(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x8ae(%rip),%rsi
mov    %r12,%rdi
mov    %r13d,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0x8b6(%rip),%rdi
mov    $0x35,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x8c6(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x8b5(%rip),%r15
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x89a(%rip),%r13
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x88d(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x88e(%rip),%rbp
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x88f(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    %r14,%rdi
call   10d0 <clearerr@plt>
mov    %r14,%rdi
call   1060 <rewind@plt>
lea    0x61f(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    (%rsp),%rcx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0x71e(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0x619(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     1c09 <taka_tvpp_create_simulation_template+0xa19>
lea    0x616(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     1c87 <taka_tvpp_create_simulation_template+0xa97>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x757(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x739(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
mov    %r14,%rdi
call   1060 <rewind@plt>
lea    0x564(%rip),%rsi
xor    %r15d,%r15d
mov    %r14,%rdi
mov    %rbx,%rdx
mov    (%rsp),%rbp
mov    %rbp,%rcx
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0x778(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
lea    0x76b(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0x776(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0x776(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1110 <fwrite@plt>
lea    0x768(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1acb <taka_tvpp_create_simulation_template+0x8db>
lea    0x4bf(%rip),%rbp
jmp    1c5f <taka_tvpp_create_simulation_template+0xa6f>
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     1acb <taka_tvpp_create_simulation_template+0x8db>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1acb <taka_tvpp_create_simulation_template+0x8db>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %rbx,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
test   %cl,%cl
je     1c46 <taka_tvpp_create_simulation_template+0xa56>
cmp    $0xa,%cl
je     1c30 <taka_tvpp_create_simulation_template+0xa40>
cmp    $0x20,%cl
je     1c30 <taka_tvpp_create_simulation_template+0xa40>
add    $0x1,%rax
jmp    1c70 <taka_tvpp_create_simulation_template+0xa80>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1ae2 <taka_tvpp_create_simulation_template+0x8f2>
mov    %rbx,%r13
add    $0x1,%r13
lea    0x615(%rip),%r15
jmp    1cde <taka_tvpp_create_simulation_template+0xaee>
mov    %r12,%rdi
lea    0x612(%rip),%rsi
mov    (%rsp),%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1ae2 <taka_tvpp_create_simulation_template+0x8f2>
mov    %rbx,%rdi
call   1070 <taka_tstring_one_tab_space@plt>
mov    %r13,%rbp
nopl   0x0(%rax)
movzbl -0x1(%rbp),%eax
test   %al,%al
je     1cc5 <taka_tvpp_create_simulation_template+0xad5>
cmp    $0xa,%al
je     1d10 <taka_tvpp_create_simulation_template+0xb20>
cmp    $0x20,%al
je     1d10 <taka_tvpp_create_simulation_template+0xb20>
add    $0x1,%rbp
jmp    1cf0 <taka_tvpp_create_simulation_template+0xb00>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rbp)
mov    (%rsp),%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1cc5 <taka_tvpp_create_simulation_template+0xad5>
cmp    $0xa,%cl
je     1d50 <taka_tvpp_create_simulation_template+0xb60>
cmp    $0x20,%cl
je     1d50 <taka_tvpp_create_simulation_template+0xb60>
add    $0x1,%rax
jmp    1d30 <taka_tvpp_create_simulation_template+0xb40>
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbp,%rdi
mov    %r15,%rsi
call   10b0 <strcmp@plt>
test   %eax,%eax
je     1cb0 <taka_tvpp_create_simulation_template+0xac0>
mov    %rbp,%rdi
lea    0x556(%rip),%rsi
call   10b0 <strcmp@plt>
test   %eax,%eax
jne    1cc5 <taka_tvpp_create_simulation_template+0xad5>
jmp    1cb0 <taka_tvpp_create_simulation_template+0xac0>

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@.str.1 = [35 x i8] c"Can't open the original file: %s.\0A\00"
@.str.2 = [15 x i8] c"simulation.vhd\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [34 x i8] c"Can't open a converted file: %s.\0A\00"
@.str.5 = [29 x i8] c"library ieee, modelsim_lib;\0A\00"
@.str.6 = [30 x i8] c"use ieee.std_logic_1164.all;\0A\00"
@.str.7 = [28 x i8] c"use modelsim_lib.util.all;\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [7 x i8] c"%s %s\0A\00"
@.str.10 = [7 x i8] c"entity\00"
@.str.11 = [10 x i8] c"component\00"
@.str.12 = [14 x i8] c"entity tb is\0A\00"
@.str.13 = [4 x i8] c"%s\0A\00"
@.str.14 = [8 x i8] c"generic\00"
@.str.15 = [12 x i8] c"\09generic (\0A\00"
@.str.16 = [5 x i8] c"port\00"
@.str.17 = [9 x i8] c"\09\09%s:\09\09\09\00"
@.str.18 = [7 x i8] c"%s := \00"
@.str.19 = [5 x i8] c"%s;\0A\00"
@SEEK_CUR = global i32 0
@.str.20 = [6 x i8] c"\0A\09);\0A\00"
@.str.21 = [9 x i8] c"end tb;\0A\00"
@.str.22 = [37 x i8] c"architecture %s_simulation of tb is\0A\00"
@.str.23 = [13 x i8] c"\09%c%c clock\0A\00"
@.str.24 = [45 x i8] c"\09constant CLOCK_PERIOD:\09\09\09time := 4.000 ns;\0A\00"
@.str.25 = [12 x i8] c"\09%c%c port\0A\00"
@.str.26 = [15 x i8] c"\09signal %s:\09\09\09\00"
@.str.27 = [18 x i8] c"\09%c%c signal spy\0A\00"
@.str.28 = [33 x i8] c"\09signal spy_xxxxx:\09\09\09std_logic;\0A\00"
@.str.29 = [7 x i8] c"begin\0A\00"
@.str.30 = [11 x i8] c"\09INST: %s\0A\00"
@.str.31 = [16 x i8] c"\09generic map (\0A\00"
@.str.32 = [13 x i8] c"\09\09%s => %s,\0A\00"
@.str.33 = [5 x i8] c"\0A\09)\0A\00"
@.str.34 = [13 x i8] c"\09port map (\0A\00"
@.str.35 = [31 x i8] c"process begin %c%c signal spy\0A\00"
@.str.36 = [54 x i8] c"\09init_signal_spy(\22/tb/INST/xxxxx\22, \22/spy_xxxxx\22, 0);\0A\00"
@.str.37 = [8 x i8] c"\09wait;\0A\00"
@.str.38 = [14 x i8] c"end process;\0A\00"
@.str.39 = [15 x i8] c"process begin\0A\00"
@.str.40 = [26 x i8] c"\09clock <= transport '1';\0A\00"
@.str.41 = [29 x i8] c"\09wait for CLOCK_PERIOD / 2;\0A\00"
@.str.42 = [26 x i8] c"\09clock <= transport '0';\0A\00"
@.str.43 = [3 x i8] c"in\00"
@.str.44 = [6 x i8] c"inout\00"
@.str.45 = [20 x i8] c"\09%s <= transport ;\0A\00"
@.str.46 = [20 x i8] c"end %s_simulation;\0A\00"
@.str.47 = [31 x i8] c"configuration %s_cfg of tb is\0A\00"
@.str.48 = [20 x i8] c"\09for %s_simulation\0A\00"
@.str.49 = [11 x i8] c"\09end for;\0A\00"
@.str.50 = [13 x i8] c"end %s_cfg;\0A\00"
define i32 @taka_tvpp_create_simulation_template(i8* %0, i8 signext %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store i8* %0, i8** %5
store i8 %1, i8* %6
store i32* %2, i32** %7
%14 = load i8*, i8** %5
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %15, i32** %8
%16 = load i32*, i32** %8
%17 = icmp ne i32* %16, null
br i1 %17, label %26, label %18
18: ; preds = %3
%19 = load i32*, i32** %7
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32*, i32** %7
%23 = load i8*, i8** %5
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %23)
br label %25
25: ; preds = %21, %18
store i32 -32, i32* %4
br label %704
26: ; preds = %3
%27 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %27, i32** %9
%28 = load i32*, i32** %9
%29 = icmp ne i32* %28, null
br i1 %29, label %39, label %30
30: ; preds = %26
%31 = load i32*, i32** %8
%32 = call i32 @fclose(i32* %31)
%33 = load i32*, i32** %7
%34 = icmp ne i32* %33, null
br i1 %34, label %35, label %38
35: ; preds = %30
%36 = load i32*, i32** %7
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %38
38: ; preds = %35, %30
store i32 -33, i32* %4
br label %704
39: ; preds = %26
%40 = call i64 @malloc(i32 4096)
%41 = inttoptr i64 %40 to i8*
store i8* %41, i8** %10
%42 = call i64 @malloc(i32 4096)
%43 = inttoptr i64 %42 to i8*
store i8* %43, i8** %11
%44 = load i32*, i32** %9
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%46 = load i32*, i32** %9
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%48 = load i32*, i32** %9
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%50 = load i32*, i32** %9
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%52 = load i32*, i32** %8
%53 = load i8*, i8** %11
%54 = load i8*, i8** %10
%55 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %53, i8* %54)
%56 = load i8*, i8** %11
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %39
%60 = load i8*, i8** %11
%61 = call i32 @strcmp(i8* %60, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%62 = icmp ne i32 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %59, %39
%64 = load i32*, i32** %9
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
br label %66
66: ; preds = %63, %59
%67 = load i32*, i32** %8
%68 = load i8*, i8** %11
%69 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %68)
%70 = load i8*, i8** %11
%71 = call i32 @strcmp(i8* %70, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%72 = icmp ne i32 %71, 0
br i1 %72, label %194, label %73
73: ; preds = %66
%74 = load i32*, i32** %9
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
br label %76
76: ; preds = %183, %182, %152, %112, %73
%77 = load i8*, i8** %11
%78 = load i32*, i32** %8
%79 = call i32* @fgets(i8* %77, i32 4096, i32* %78)
%80 = icmp ne i32* %79, null
br i1 %80, label %81, label %188
81: ; preds = %76
%82 = load i8*, i8** %11
%83 = call i32 @taka_tstring_one_tab_space(i8* %82)
%84 = load i8*, i8** %11
store i8* %84, i8** %12
%85 = load i8*, i8** %12
store i8* %85, i8** %13
br label %86
86: ; preds = %104, %81
%87 = load i8*, i8** %13
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp ne i32 %89, 32
br i1 %90, label %91, label %101
91: ; preds = %86
%92 = load i8*, i8** %13
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = icmp ne i32 %94, 10
br i1 %95, label %96, label %101
96: ; preds = %91
%97 = load i8*, i8** %13
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 0
br label %101
101: ; preds = %96, %91, %86
%102 = phi i1 [ false, %91 ], [ false, %86 ], [ %100, %96 ]
br i1 %102, label %103, label %107
103: ; preds = %101
br label %104
104: ; preds = %103
%105 = load i8*, i8** %13
%106 = getelementptr inbounds i8, i8* %105, i32 1
store i8* %106, i8** %13
br label %86
107: ; preds = %101
%108 = load i8*, i8** %13
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %113
112: ; preds = %107
br label %76
113: ; preds = %107
%114 = load i8*, i8** %13
store i8 0, i8* %114
%115 = load i8*, i8** %12
%116 = call i32 @strcmp(i8* %115, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%117 = icmp ne i32 %116, 0
br i1 %117, label %119, label %118
118: ; preds = %113
br label %188
119: ; preds = %113
%120 = load i32*, i32** %9
%121 = load i8*, i8** %12
%122 = call i32 (i32*, i8*, ...) @fprintf(i32* %120, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8* %121)
%123 = load i8*, i8** %13
%124 = getelementptr inbounds i8, i8* %123, i64 1
store i8* %124, i8** %12
%125 = load i8*, i8** %12
store i8* %125, i8** %13
br label %126
126: ; preds = %144, %119
%127 = load i8*, i8** %13
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp ne i32 %129, 32
br i1 %130, label %131, label %141
131: ; preds = %126
%132 = load i8*, i8** %13
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp ne i32 %134, 10
br i1 %135, label %136, label %141
136: ; preds = %131
%137 = load i8*, i8** %13
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp ne i32 %139, 0
br label %141
141: ; preds = %136, %131, %126
%142 = phi i1 [ false, %131 ], [ false, %126 ], [ %140, %136 ]
br i1 %142, label %143, label %147
143: ; preds = %141
br label %144
144: ; preds = %143
%145 = load i8*, i8** %13
%146 = getelementptr inbounds i8, i8* %145, i32 1
store i8* %146, i8** %13
br label %126
147: ; preds = %141
%148 = load i8*, i8** %13
%149 = load i8, i8* %148
%150 = sext i8 %149 to i32
%151 = icmp eq i32 %150, 0
br i1 %151, label %152, label %153
152: ; preds = %147
br label %76
153: ; preds = %147
%154 = load i8*, i8** %13
store i8 0, i8* %154
%155 = load i32*, i32** %9
%156 = load i8*, i8** %12
%157 = call i32 (i32*, i8*, ...) @fprintf(i32* %155, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i8* %156)
%158 = load i8*, i8** %13
%159 = getelementptr inbounds i8, i8* %158, i64 1
store i8* %159, i8** %12
%160 = load i8*, i8** %12
store i8* %160, i8** %13
br label %161
161: ; preds = %174, %153
%162 = load i8*, i8** %13
%163 = load i8, i8* %162
%164 = sext i8 %163 to i32
%165 = icmp ne i32 %164, 10
br i1 %165, label %166, label %171
166: ; preds = %161
%167 = load i8*, i8** %13
%168 = load i8, i8* %167
%169 = sext i8 %168 to i32
%170 = icmp ne i32 %169, 0
br label %171
171: ; preds = %166, %161
%172 = phi i1 [ false, %161 ], [ %170, %166 ]
br i1 %172, label %173, label %177
173: ; preds = %171
br label %174
174: ; preds = %173
%175 = load i8*, i8** %13
%176 = getelementptr inbounds i8, i8* %175, i32 1
store i8* %176, i8** %13
br label %161
177: ; preds = %171
%178 = load i8*, i8** %13
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = icmp eq i32 %180, 0
br i1 %181, label %182, label %183
182: ; preds = %177
br label %76
183: ; preds = %177
%184 = load i8*, i8** %13
store i8 0, i8* %184
%185 = load i32*, i32** %9
%186 = load i8*, i8** %12
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %185, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %186)
br label %76
188: ; preds = %118, %76
%189 = load i32*, i32** %9
%190 = load i32, i32* @SEEK_CUR
%191 = call i32 @fseek(i32* %189, i32 -2, i32 %190)
%192 = load i32*, i32** %9
%193 = call i32 (i32*, i8*, ...) @fprintf(i32* %192, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
br label %194
194: ; preds = %188, %66
%195 = load i32*, i32** %9
%196 = call i32 (i32*, i8*, ...) @fprintf(i32* %195, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%197 = load i32*, i32** %9
%198 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%199 = load i32*, i32** %9
%200 = load i8*, i8** %10
%201 = call i32 (i32*, i8*, ...) @fprintf(i32* %199, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.22, i64 0, i64 0), i8* %200)
%202 = load i32*, i32** %9
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %202, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%204 = load i32*, i32** %9
%205 = load i8, i8* %6
%206 = sext i8 %205 to i32
%207 = load i8, i8* %6
%208 = sext i8 %207 to i32
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %204, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 %206, i32 %208)
%210 = load i32*, i32** %9
%211 = call i32 (i32*, i8*, ...) @fprintf(i32* %210, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0))
%212 = load i32*, i32** %9
%213 = call i32 (i32*, i8*, ...) @fprintf(i32* %212, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%214 = load i32*, i32** %9
%215 = load i8, i8* %6
%216 = sext i8 %215 to i32
%217 = load i8, i8* %6
%218 = sext i8 %217 to i32
%219 = call i32 (i32*, i8*, ...) @fprintf(i32* %214, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.25, i64 0, i64 0), i32 %216, i32 %218)
%220 = load i8*, i8** %11
%221 = call i32 @strcmp(i8* %220, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%222 = icmp ne i32 %221, 0
br i1 %222, label %331, label %223
223: ; preds = %194
br label %224
224: ; preds = %323, %322, %295, %260, %223
%225 = load i8*, i8** %11
%226 = load i32*, i32** %8
%227 = call i32* @fgets(i8* %225, i32 4096, i32* %226)
%228 = icmp ne i32* %227, null
br i1 %228, label %229, label %328
229: ; preds = %224
%230 = load i8*, i8** %11
%231 = call i32 @taka_tstring_one_tab_space(i8* %230)
%232 = load i8*, i8** %11
store i8* %232, i8** %12
%233 = load i8*, i8** %12
store i8* %233, i8** %13
br label %234
234: ; preds = %252, %229
%235 = load i8*, i8** %13
%236 = load i8, i8* %235
%237 = sext i8 %236 to i32
%238 = icmp ne i32 %237, 32
br i1 %238, label %239, label %249
239: ; preds = %234
%240 = load i8*, i8** %13
%241 = load i8, i8* %240
%242 = sext i8 %241 to i32
%243 = icmp ne i32 %242, 10
br i1 %243, label %244, label %249
244: ; preds = %239
%245 = load i8*, i8** %13
%246 = load i8, i8* %245
%247 = sext i8 %246 to i32
%248 = icmp ne i32 %247, 0
br label %249
249: ; preds = %244, %239, %234
%250 = phi i1 [ false, %239 ], [ false, %234 ], [ %248, %244 ]
br i1 %250, label %251, label %255
251: ; preds = %249
br label %252
252: ; preds = %251
%253 = load i8*, i8** %13
%254 = getelementptr inbounds i8, i8* %253, i32 1
store i8* %254, i8** %13
br label %234
255: ; preds = %249
%256 = load i8*, i8** %13
%257 = load i8, i8* %256
%258 = sext i8 %257 to i32
%259 = icmp eq i32 %258, 0
br i1 %259, label %260, label %261
260: ; preds = %255
br label %224
261: ; preds = %255
%262 = load i8*, i8** %13
store i8 0, i8* %262
%263 = load i32*, i32** %9
%264 = load i8*, i8** %12
%265 = call i32 (i32*, i8*, ...) @fprintf(i32* %263, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8* %264)
%266 = load i8*, i8** %13
%267 = getelementptr inbounds i8, i8* %266, i64 1
store i8* %267, i8** %12
%268 = load i8*, i8** %12
store i8* %268, i8** %13
br label %269
269: ; preds = %287, %261
%270 = load i8*, i8** %13
%271 = load i8, i8* %270
%272 = sext i8 %271 to i32
%273 = icmp ne i32 %272, 32
br i1 %273, label %274, label %284
274: ; preds = %269
%275 = load i8*, i8** %13
%276 = load i8, i8* %275
%277 = sext i8 %276 to i32
%278 = icmp ne i32 %277, 10
br i1 %278, label %279, label %284
279: ; preds = %274
%280 = load i8*, i8** %13
%281 = load i8, i8* %280
%282 = sext i8 %281 to i32
%283 = icmp ne i32 %282, 0
br label %284
284: ; preds = %279, %274, %269
%285 = phi i1 [ false, %274 ], [ false, %269 ], [ %283, %279 ]
br i1 %285, label %286, label %290
286: ; preds = %284
br label %287
287: ; preds = %286
%288 = load i8*, i8** %13
%289 = getelementptr inbounds i8, i8* %288, i32 1
store i8* %289, i8** %13
br label %269
290: ; preds = %284
%291 = load i8*, i8** %13
%292 = load i8, i8* %291
%293 = sext i8 %292 to i32
%294 = icmp eq i32 %293, 0
br i1 %294, label %295, label %296
295: ; preds = %290
br label %224
296: ; preds = %290
%297 = load i8*, i8** %13
store i8 0, i8* %297
%298 = load i8*, i8** %13
%299 = getelementptr inbounds i8, i8* %298, i64 1
store i8* %299, i8** %12
%300 = load i8*, i8** %12
store i8* %300, i8** %13
br label %301
301: ; preds = %314, %296
%302 = load i8*, i8** %13
%303 = load i8, i8* %302
%304 = sext i8 %303 to i32
%305 = icmp ne i32 %304, 10
br i1 %305, label %306, label %311
306: ; preds = %301
%307 = load i8*, i8** %13
%308 = load i8, i8* %307
%309 = sext i8 %308 to i32
%310 = icmp ne i32 %309, 0
br label %311
311: ; preds = %306, %301
%312 = phi i1 [ false, %301 ], [ %310, %306 ]
br i1 %312, label %313, label %317
313: ; preds = %311
br label %314
314: ; preds = %313
%315 = load i8*, i8** %13
%316 = getelementptr inbounds i8, i8* %315, i32 1
store i8* %316, i8** %13
br label %301
317: ; preds = %311
%318 = load i8*, i8** %13
%319 = load i8, i8* %318
%320 = sext i8 %319 to i32
%321 = icmp eq i32 %320, 0
br i1 %321, label %322, label %323
322: ; preds = %317
br label %224
323: ; preds = %317
%324 = load i8*, i8** %13
store i8 0, i8* %324
%325 = load i32*, i32** %9
%326 = load i8*, i8** %12
%327 = call i32 (i32*, i8*, ...) @fprintf(i32* %325, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %326)
br label %224
328: ; preds = %224
%329 = load i32*, i32** %9
%330 = call i32 (i32*, i8*, ...) @fprintf(i32* %329, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %331
331: ; preds = %328, %194
%332 = load i32*, i32** %9
%333 = load i8, i8* %6
%334 = sext i8 %333 to i32
%335 = load i8, i8* %6
%336 = sext i8 %335 to i32
%337 = call i32 (i32*, i8*, ...) @fprintf(i32* %332, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), i32 %334, i32 %336)
%338 = load i32*, i32** %9
%339 = call i32 (i32*, i8*, ...) @fprintf(i32* %338, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.28, i64 0, i64 0))
%340 = load i32*, i32** %9
%341 = call i32 (i32*, i8*, ...) @fprintf(i32* %340, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%342 = load i32*, i32** %9
%343 = call i32 (i32*, i8*, ...) @fprintf(i32* %342, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.29, i64 0, i64 0))
%344 = load i32*, i32** %9
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %344, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%346 = load i32*, i32** %9
%347 = load i8*, i8** %10
%348 = call i32 (i32*, i8*, ...) @fprintf(i32* %346, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.30, i64 0, i64 0), i8* %347)
%349 = load i32*, i32** %8
%350 = call i32 @clearerr(i32* %349)
%351 = load i32*, i32** %8
%352 = call i32 @rewind(i32* %351)
%353 = load i32*, i32** %8
%354 = load i8*, i8** %11
%355 = load i8*, i8** %10
%356 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %353, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %354, i8* %355)
%357 = load i32*, i32** %8
%358 = load i8*, i8** %11
%359 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %357, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %358)
%360 = load i8*, i8** %11
%361 = call i32 @strcmp(i8* %360, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%362 = icmp ne i32 %361, 0
br i1 %362, label %420, label %363
363: ; preds = %331
%364 = load i32*, i32** %9
%365 = call i32 (i32*, i8*, ...) @fprintf(i32* %364, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.31, i64 0, i64 0))
br label %366
366: ; preds = %409, %402, %363
%367 = load i8*, i8** %11
%368 = load i32*, i32** %8
%369 = call i32* @fgets(i8* %367, i32 4096, i32* %368)
%370 = icmp ne i32* %369, null
br i1 %370, label %371, label %414
371: ; preds = %366
%372 = load i8*, i8** %11
%373 = call i32 @taka_tstring_one_tab_space(i8* %372)
%374 = load i8*, i8** %11
store i8* %374, i8** %12
%375 = load i8*, i8** %12
store i8* %375, i8** %13
br label %376
376: ; preds = %394, %371
%377 = load i8*, i8** %13
%378 = load i8, i8* %377
%379 = sext i8 %378 to i32
%380 = icmp ne i32 %379, 32
br i1 %380, label %381, label %391
381: ; preds = %376
%382 = load i8*, i8** %13
%383 = load i8, i8* %382
%384 = sext i8 %383 to i32
%385 = icmp ne i32 %384, 10
br i1 %385, label %386, label %391
386: ; preds = %381
%387 = load i8*, i8** %13
%388 = load i8, i8* %387
%389 = sext i8 %388 to i32
%390 = icmp ne i32 %389, 0
br label %391
391: ; preds = %386, %381, %376
%392 = phi i1 [ false, %381 ], [ false, %376 ], [ %390, %386 ]
br i1 %392, label %393, label %397
393: ; preds = %391
br label %394
394: ; preds = %393
%395 = load i8*, i8** %13
%396 = getelementptr inbounds i8, i8* %395, i32 1
store i8* %396, i8** %13
br label %376
397: ; preds = %391
%398 = load i8*, i8** %13
%399 = load i8, i8* %398
%400 = sext i8 %399 to i32
%401 = icmp eq i32 %400, 0
br i1 %401, label %402, label %403
402: ; preds = %397
br label %366
403: ; preds = %397
%404 = load i8*, i8** %13
store i8 0, i8* %404
%405 = load i8*, i8** %12
%406 = call i32 @strcmp(i8* %405, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%407 = icmp ne i32 %406, 0
br i1 %407, label %409, label %408
408: ; preds = %403
br label %414
409: ; preds = %403
%410 = load i32*, i32** %9
%411 = load i8*, i8** %12
%412 = load i8*, i8** %12
%413 = call i32 (i32*, i8*, ...) @fprintf(i32* %410, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.32, i64 0, i64 0), i8* %411, i8* %412)
br label %366
414: ; preds = %408, %366
%415 = load i32*, i32** %9
%416 = load i32, i32* @SEEK_CUR
%417 = call i32 @fseek(i32* %415, i32 -2, i32 %416)
%418 = load i32*, i32** %9
%419 = call i32 (i32*, i8*, ...) @fprintf(i32* %418, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.33, i64 0, i64 0))
br label %420
420: ; preds = %414, %331
%421 = load i8*, i8** %11
%422 = call i32 @strcmp(i8* %421, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%423 = icmp ne i32 %422, 0
br i1 %423, label %476, label %424
424: ; preds = %420
%425 = load i32*, i32** %9
%426 = call i32 (i32*, i8*, ...) @fprintf(i32* %425, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0))
br label %427
427: ; preds = %464, %463, %424
%428 = load i8*, i8** %11
%429 = load i32*, i32** %8
%430 = call i32* @fgets(i8* %428, i32 4096, i32* %429)
%431 = icmp ne i32* %430, null
br i1 %431, label %432, label %470
432: ; preds = %427
%433 = load i8*, i8** %11
%434 = call i32 @taka_tstring_one_tab_space(i8* %433)
%435 = load i8*, i8** %11
store i8* %435, i8** %12
%436 = load i8*, i8** %12
store i8* %436, i8** %13
br label %437
437: ; preds = %455, %432
%438 = load i8*, i8** %13
%439 = load i8, i8* %438
%440 = sext i8 %439 to i32
%441 = icmp ne i32 %440, 32
br i1 %441, label %442, label %452
442: ; preds = %437
%443 = load i8*, i8** %13
%444 = load i8, i8* %443
%445 = sext i8 %444 to i32
%446 = icmp ne i32 %445, 10
br i1 %446, label %447, label %452
447: ; preds = %442
%448 = load i8*, i8** %13
%449 = load i8, i8* %448
%450 = sext i8 %449 to i32
%451 = icmp ne i32 %450, 0
br label %452
452: ; preds = %447, %442, %437
%453 = phi i1 [ false, %442 ], [ false, %437 ], [ %451, %447 ]
br i1 %453, label %454, label %458
454: ; preds = %452
br label %455
455: ; preds = %454
%456 = load i8*, i8** %13
%457 = getelementptr inbounds i8, i8* %456, i32 1
store i8* %457, i8** %13
br label %437
458: ; preds = %452
%459 = load i8*, i8** %13
%460 = load i8, i8* %459
%461 = sext i8 %460 to i32
%462 = icmp eq i32 %461, 0
br i1 %462, label %463, label %464
463: ; preds = %458
br label %427
464: ; preds = %458
%465 = load i8*, i8** %13
store i8 0, i8* %465
%466 = load i32*, i32** %9
%467 = load i8*, i8** %12
%468 = load i8*, i8** %12
%469 = call i32 (i32*, i8*, ...) @fprintf(i32* %466, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.32, i64 0, i64 0), i8* %467, i8* %468)
br label %427
470: ; preds = %427
%471 = load i32*, i32** %9
%472 = load i32, i32* @SEEK_CUR
%473 = call i32 @fseek(i32* %471, i32 -2, i32 %472)
%474 = load i32*, i32** %9
%475 = call i32 (i32*, i8*, ...) @fprintf(i32* %474, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
br label %476
476: ; preds = %470, %420
%477 = load i32*, i32** %9
%478 = call i32 (i32*, i8*, ...) @fprintf(i32* %477, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%479 = load i32*, i32** %9
%480 = load i8, i8* %6
%481 = sext i8 %480 to i32
%482 = load i8, i8* %6
%483 = sext i8 %482 to i32
%484 = call i32 (i32*, i8*, ...) @fprintf(i32* %479, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.35, i64 0, i64 0), i32 %481, i32 %483)
%485 = load i32*, i32** %9
%486 = call i32 (i32*, i8*, ...) @fprintf(i32* %485, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.36, i64 0, i64 0))
%487 = load i32*, i32** %9
%488 = call i32 (i32*, i8*, ...) @fprintf(i32* %487, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%489 = load i32*, i32** %9
%490 = call i32 (i32*, i8*, ...) @fprintf(i32* %489, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i64 0, i64 0))
%491 = load i32*, i32** %9
%492 = call i32 (i32*, i8*, ...) @fprintf(i32* %491, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0))
%493 = load i32*, i32** %9
%494 = call i32 (i32*, i8*, ...) @fprintf(i32* %493, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%495 = load i32*, i32** %9
%496 = call i32 (i32*, i8*, ...) @fprintf(i32* %495, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0))
%497 = load i32*, i32** %9
%498 = call i32 (i32*, i8*, ...) @fprintf(i32* %497, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0))
%499 = load i32*, i32** %9
%500 = call i32 (i32*, i8*, ...) @fprintf(i32* %499, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.41, i64 0, i64 0))
%501 = load i32*, i32** %9
%502 = call i32 (i32*, i8*, ...) @fprintf(i32* %501, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.42, i64 0, i64 0))
%503 = load i32*, i32** %9
%504 = call i32 (i32*, i8*, ...) @fprintf(i32* %503, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.41, i64 0, i64 0))
%505 = load i32*, i32** %9
%506 = call i32 (i32*, i8*, ...) @fprintf(i32* %505, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0))
%507 = load i32*, i32** %9
%508 = call i32 (i32*, i8*, ...) @fprintf(i32* %507, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%509 = load i32*, i32** %9
%510 = call i32 (i32*, i8*, ...) @fprintf(i32* %509, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0))
%511 = load i32*, i32** %8
%512 = call i32 @clearerr(i32* %511)
%513 = load i32*, i32** %8
%514 = call i32 @rewind(i32* %513)
%515 = load i32*, i32** %8
%516 = load i8*, i8** %11
%517 = load i8*, i8** %10
%518 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %515, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %516, i8* %517)
%519 = load i32*, i32** %8
%520 = load i8*, i8** %11
%521 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %519, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %520)
%522 = load i8*, i8** %11
%523 = call i32 @strcmp(i8* %522, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%524 = icmp ne i32 %523, 0
br i1 %524, label %571, label %525
525: ; preds = %476
br label %526
526: ; preds = %569, %562, %525
%527 = load i8*, i8** %11
%528 = load i32*, i32** %8
%529 = call i32* @fgets(i8* %527, i32 4096, i32* %528)
%530 = icmp ne i32* %529, null
br i1 %530, label %531, label %570
531: ; preds = %526
%532 = load i8*, i8** %11
%533 = call i32 @taka_tstring_one_tab_space(i8* %532)
%534 = load i8*, i8** %11
store i8* %534, i8** %12
%535 = load i8*, i8** %12
store i8* %535, i8** %13
br label %536
536: ; preds = %554, %531
%537 = load i8*, i8** %13
%538 = load i8, i8* %537
%539 = sext i8 %538 to i32
%540 = icmp ne i32 %539, 32
br i1 %540, label %541, label %551
541: ; preds = %536
%542 = load i8*, i8** %13
%543 = load i8, i8* %542
%544 = sext i8 %543 to i32
%545 = icmp ne i32 %544, 10
br i1 %545, label %546, label %551
546: ; preds = %541
%547 = load i8*, i8** %13
%548 = load i8, i8* %547
%549 = sext i8 %548 to i32
%550 = icmp ne i32 %549, 0
br label %551
551: ; preds = %546, %541, %536
%552 = phi i1 [ false, %541 ], [ false, %536 ], [ %550, %546 ]
br i1 %552, label %553, label %557
553: ; preds = %551
br label %554
554: ; preds = %553
%555 = load i8*, i8** %13
%556 = getelementptr inbounds i8, i8* %555, i32 1
store i8* %556, i8** %13
br label %536
557: ; preds = %551
%558 = load i8*, i8** %13
%559 = load i8, i8* %558
%560 = sext i8 %559 to i32
%561 = icmp eq i32 %560, 0
br i1 %561, label %562, label %563
562: ; preds = %557
br label %526
563: ; preds = %557
%564 = load i8*, i8** %13
store i8 0, i8* %564
%565 = load i8*, i8** %12
%566 = call i32 @strcmp(i8* %565, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%567 = icmp ne i32 %566, 0
br i1 %567, label %569, label %568
568: ; preds = %563
br label %570
569: ; preds = %563
br label %526
570: ; preds = %568, %526
br label %571
571: ; preds = %570, %476
%572 = load i8*, i8** %11
%573 = call i32 @strcmp(i8* %572, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%574 = icmp ne i32 %573, 0
br i1 %574, label %663, label %575
575: ; preds = %571
br label %576
576: ; preds = %661, %647, %612, %575
%577 = load i8*, i8** %11
%578 = load i32*, i32** %8
%579 = call i32* @fgets(i8* %577, i32 4096, i32* %578)
%580 = icmp ne i32* %579, null
br i1 %580, label %581, label %662
581: ; preds = %576
%582 = load i8*, i8** %11
%583 = call i32 @taka_tstring_one_tab_space(i8* %582)
%584 = load i8*, i8** %11
store i8* %584, i8** %12
%585 = load i8*, i8** %12
store i8* %585, i8** %13
br label %586
586: ; preds = %604, %581
%587 = load i8*, i8** %13
%588 = load i8, i8* %587
%589 = sext i8 %588 to i32
%590 = icmp ne i32 %589, 32
br i1 %590, label %591, label %601
591: ; preds = %586
%592 = load i8*, i8** %13
%593 = load i8, i8* %592
%594 = sext i8 %593 to i32
%595 = icmp ne i32 %594, 10
br i1 %595, label %596, label %601
596: ; preds = %591
%597 = load i8*, i8** %13
%598 = load i8, i8* %597
%599 = sext i8 %598 to i32
%600 = icmp ne i32 %599, 0
br label %601
601: ; preds = %596, %591, %586
%602 = phi i1 [ false, %591 ], [ false, %586 ], [ %600, %596 ]
br i1 %602, label %603, label %607
603: ; preds = %601
br label %604
604: ; preds = %603
%605 = load i8*, i8** %13
%606 = getelementptr inbounds i8, i8* %605, i32 1
store i8* %606, i8** %13
br label %586
607: ; preds = %601
%608 = load i8*, i8** %13
%609 = load i8, i8* %608
%610 = sext i8 %609 to i32
%611 = icmp eq i32 %610, 0
br i1 %611, label %612, label %613
612: ; preds = %607
br label %576
613: ; preds = %607
%614 = load i8*, i8** %13
store i8 0, i8* %614
%615 = load i8*, i8** %10
%616 = load i8*, i8** %12
%617 = call i32 @strcpy(i8* %615, i8* %616)
%618 = load i8*, i8** %13
%619 = getelementptr inbounds i8, i8* %618, i64 1
store i8* %619, i8** %12
%620 = load i8*, i8** %12
store i8* %620, i8** %13
br label %621
621: ; preds = %639, %613
%622 = load i8*, i8** %13
%623 = load i8, i8* %622
%624 = sext i8 %623 to i32
%625 = icmp ne i32 %624, 32
br i1 %625, label %626, label %636
626: ; preds = %621
%627 = load i8*, i8** %13
%628 = load i8, i8* %627
%629 = sext i8 %628 to i32
%630 = icmp ne i32 %629, 10
br i1 %630, label %631, label %636
631: ; preds = %626
%632 = load i8*, i8** %13
%633 = load i8, i8* %632
%634 = sext i8 %633 to i32
%635 = icmp ne i32 %634, 0
br label %636
636: ; preds = %631, %626, %621
%637 = phi i1 [ false, %626 ], [ false, %621 ], [ %635, %631 ]
br i1 %637, label %638, label %642
638: ; preds = %636
br label %639
639: ; preds = %638
%640 = load i8*, i8** %13
%641 = getelementptr inbounds i8, i8* %640, i32 1
store i8* %641, i8** %13
br label %621
642: ; preds = %636
%643 = load i8*, i8** %13
%644 = load i8, i8* %643
%645 = sext i8 %644 to i32
%646 = icmp eq i32 %645, 0
br i1 %646, label %647, label %648
647: ; preds = %642
br label %576
648: ; preds = %642
%649 = load i8*, i8** %13
store i8 0, i8* %649
%650 = load i8*, i8** %12
%651 = call i32 @strcmp(i8* %650, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.43, i64 0, i64 0))
%652 = icmp ne i32 %651, 0
br i1 %652, label %653, label %657
653: ; preds = %648
%654 = load i8*, i8** %12
%655 = call i32 @strcmp(i8* %654, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.44, i64 0, i64 0))
%656 = icmp ne i32 %655, 0
br i1 %656, label %661, label %657
657: ; preds = %653, %648
%658 = load i32*, i32** %9
%659 = load i8*, i8** %10
%660 = call i32 (i32*, i8*, ...) @fprintf(i32* %658, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.45, i64 0, i64 0), i8* %659)
br label %661
661: ; preds = %657, %653
br label %576
662: ; preds = %576
br label %663
663: ; preds = %662, %571
%664 = load i32*, i32** %9
%665 = call i32 (i32*, i8*, ...) @fprintf(i32* %664, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%666 = load i32*, i32** %9
%667 = call i32 (i32*, i8*, ...) @fprintf(i32* %666, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i64 0, i64 0))
%668 = load i32*, i32** %9
%669 = call i32 (i32*, i8*, ...) @fprintf(i32* %668, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%670 = load i32*, i32** %9
%671 = call i32 (i32*, i8*, ...) @fprintf(i32* %670, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0))
%672 = load i32*, i32** %9
%673 = call i32 (i32*, i8*, ...) @fprintf(i32* %672, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%674 = load i32*, i32** %8
%675 = call i32 @rewind(i32* %674)
%676 = load i32*, i32** %8
%677 = load i8*, i8** %11
%678 = load i8*, i8** %10
%679 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %676, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %677, i8* %678)
%680 = load i32*, i32** %9
%681 = load i8*, i8** %10
%682 = call i32 (i32*, i8*, ...) @fprintf(i32* %680, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.46, i64 0, i64 0), i8* %681)
%683 = load i32*, i32** %9
%684 = call i32 (i32*, i8*, ...) @fprintf(i32* %683, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%685 = load i32*, i32** %9
%686 = load i8*, i8** %10
%687 = call i32 (i32*, i8*, ...) @fprintf(i32* %685, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.47, i64 0, i64 0), i8* %686)
%688 = load i32*, i32** %9
%689 = load i8*, i8** %10
%690 = call i32 (i32*, i8*, ...) @fprintf(i32* %688, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.48, i64 0, i64 0), i8* %689)
%691 = load i32*, i32** %9
%692 = call i32 (i32*, i8*, ...) @fprintf(i32* %691, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.49, i64 0, i64 0))
%693 = load i32*, i32** %9
%694 = load i8*, i8** %10
%695 = call i32 (i32*, i8*, ...) @fprintf(i32* %693, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.50, i64 0, i64 0), i8* %694)
%696 = load i8*, i8** %11
%697 = call i32 @free(i8* %696)
%698 = load i8*, i8** %10
%699 = call i32 @free(i8* %698)
%700 = load i32*, i32** %9
%701 = call i32 @fclose(i32* %700)
%702 = load i32*, i32** %8
%703 = call i32 @fclose(i32* %702)
store i32 0, i32* %4
br label %704
704: ; preds = %663, %38, %25
%705 = load i32, i32* %4
ret i32 %705
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@.str.1 = [35 x i8] c"Can't open the original file: %s.\0A\00"
@.str.2 = [15 x i8] c"simulation.vhd\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [34 x i8] c"Can't open a converted file: %s.\0A\00"
@.str.5 = [29 x i8] c"library ieee, modelsim_lib;\0A\00"
@.str.6 = [30 x i8] c"use ieee.std_logic_1164.all;\0A\00"
@.str.7 = [28 x i8] c"use modelsim_lib.util.all;\0A\00"
@.str.9 = [7 x i8] c"%s %s\0A\00"
@.str.10 = [7 x i8] c"entity\00"
@.str.11 = [10 x i8] c"component\00"
@.str.12 = [14 x i8] c"entity tb is\0A\00"
@.str.13 = [4 x i8] c"%s\0A\00"
@.str.14 = [8 x i8] c"generic\00"
@.str.15 = [12 x i8] c"\09generic (\0A\00"
@.str.16 = [5 x i8] c"port\00"
@.str.17 = [9 x i8] c"\09\09%s:\09\09\09\00"
@.str.18 = [7 x i8] c"%s := \00"
@.str.19 = [5 x i8] c"%s;\0A\00"
@SEEK_CUR = global i32 0
@.str.20 = [6 x i8] c"\0A\09);\0A\00"
@.str.21 = [9 x i8] c"end tb;\0A\00"
@.str.22 = [37 x i8] c"architecture %s_simulation of tb is\0A\00"
@.str.23 = [13 x i8] c"\09%c%c clock\0A\00"
@.str.24 = [45 x i8] c"\09constant CLOCK_PERIOD:\09\09\09time := 4.000 ns;\0A\00"
@.str.25 = [12 x i8] c"\09%c%c port\0A\00"
@.str.26 = [15 x i8] c"\09signal %s:\09\09\09\00"
@.str.27 = [18 x i8] c"\09%c%c signal spy\0A\00"
@.str.28 = [33 x i8] c"\09signal spy_xxxxx:\09\09\09std_logic;\0A\00"
@.str.29 = [7 x i8] c"begin\0A\00"
@.str.30 = [11 x i8] c"\09INST: %s\0A\00"
@.str.31 = [16 x i8] c"\09generic map (\0A\00"
@.str.32 = [13 x i8] c"\09\09%s => %s,\0A\00"
@.str.33 = [5 x i8] c"\0A\09)\0A\00"
@.str.34 = [13 x i8] c"\09port map (\0A\00"
@.str.35 = [31 x i8] c"process begin %c%c signal spy\0A\00"
@.str.36 = [54 x i8] c"\09init_signal_spy(\22/tb/INST/xxxxx\22, \22/spy_xxxxx\22, 0);\0A\00"
@.str.37 = [8 x i8] c"\09wait;\0A\00"
@.str.38 = [14 x i8] c"end process;\0A\00"
@.str.39 = [15 x i8] c"process begin\0A\00"
@.str.40 = [26 x i8] c"\09clock <= transport '1';\0A\00"
@.str.41 = [29 x i8] c"\09wait for CLOCK_PERIOD / 2;\0A\00"
@.str.42 = [26 x i8] c"\09clock <= transport '0';\0A\00"
@.str.43 = [3 x i8] c"in\00"
@.str.44 = [6 x i8] c"inout\00"
@.str.45 = [20 x i8] c"\09%s <= transport ;\0A\00"
@.str.46 = [20 x i8] c"end %s_simulation;\0A\00"
@.str.47 = [31 x i8] c"configuration %s_cfg of tb is\0A\00"
@.str.48 = [20 x i8] c"\09for %s_simulation\0A\00"
@.str.49 = [11 x i8] c"\09end for;\0A\00"
@.str.50 = [13 x i8] c"end %s_cfg;\0A\00"
define i32 @taka_tvpp_create_simulation_template(i8* %0, i8 signext %1, i32* %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = icmp eq i32* %2, null
br i1 %7, label %267, label %8
8: ; preds = %6
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %267
10: ; preds = %3
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = tail call i32 @fclose(i32* %4)
%15 = icmp eq i32* %2, null
br i1 %15, label %267, label %16
16: ; preds = %13
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %267
18: ; preds = %10
%19 = tail call i64 @malloc(i32 4096)
%20 = inttoptr i64 %19 to i8*
%21 = tail call i64 @malloc(i32 4096)
%22 = inttoptr i64 %21 to i8*
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i64 28, i64 1, i32* %11)
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i64 29, i64 1, i32* %11)
%25 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i64 27, i64 1, i32* %11)
%26 = tail call i32 @fputc(i32 10, i32* %11)
%27 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %22, i8* %20)
%28 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%29 = icmp eq i32 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %18
%31 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30, %18
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i64 13, i64 1, i32* %11)
br label %35
35: ; preds = %33, %30
%36 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %22)
%37 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %78
39: ; preds = %35
%40 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i64 11, i64 1, i32* %11)
%41 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%42 = icmp eq i32* %41, null
br i1 %42, label %74, label %43
43: ; preds = %39, %71
%44 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %45
45: ; preds = %48, %43
%46 = phi i8* [ %22, %43 ], [ %49, %48 ]
%47 = load i8, i8* %46
switch i8 %47, label %48 [
i8 0, label %71
i8 10, label %50
i8 32, label %50
]
48: ; preds = %45
%49 = getelementptr inbounds i8, i8* %46, i64 1
br label %45
50: ; preds = %45, %45
store i8 0, i8* %46
%51 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%52 = icmp eq i32 %51, 0
br i1 %52, label %74, label %53
53: ; preds = %50
%54 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i8* %22)
%55 = getelementptr inbounds i8, i8* %46, i64 1
br label %56
56: ; preds = %59, %53
%57 = phi i8* [ %55, %53 ], [ %60, %59 ]
%58 = load i8, i8* %57
switch i8 %58, label %59 [
i8 0, label %71
i8 10, label %61
i8 32, label %61
]
59: ; preds = %56
%60 = getelementptr inbounds i8, i8* %57, i64 1
br label %56
61: ; preds = %56, %56
store i8 0, i8* %57
%62 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i8* %55)
%63 = getelementptr inbounds i8, i8* %57, i64 1
br label %64
64: ; preds = %67, %61
%65 = phi i8* [ %63, %61 ], [ %68, %67 ]
%66 = load i8, i8* %65
switch i8 %66, label %67 [
i8 0, label %71
i8 10, label %69
]
67: ; preds = %64
%68 = getelementptr inbounds i8, i8* %65, i64 1
br label %64
69: ; preds = %64
store i8 0, i8* %65
%70 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %63)
br label %71
71: ; preds = %45, %56, %64, %69
%72 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%73 = icmp eq i32* %72, null
br i1 %73, label %74, label %43
74: ; preds = %71, %50, %39
%75 = load i32, i32* @SEEK_CUR
%76 = tail call i32 @fseek(i32* %11, i32 -2, i32 %75)
%77 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i64 5, i64 1, i32* %11)
br label %78
78: ; preds = %74, %35
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), i64 8, i64 1, i32* %11)
%80 = tail call i32 @fputc(i32 10, i32* %11)
%81 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.22, i64 0, i64 0), i8* %20)
%82 = tail call i32 @fputc(i32 10, i32* %11)
%83 = sext i8 %1 to i32
%84 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 %83, i32 %83)
%85 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0), i64 44, i64 1, i32* %11)
%86 = tail call i32 @fputc(i32 10, i32* %11)
%87 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.25, i64 0, i64 0), i32 %83, i32 %83)
%88 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %120
90: ; preds = %78
%91 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%92 = icmp eq i32* %91, null
br i1 %92, label %118, label %93
93: ; preds = %90, %115
%94 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %95
95: ; preds = %98, %93
%96 = phi i8* [ %22, %93 ], [ %99, %98 ]
%97 = load i8, i8* %96
switch i8 %97, label %98 [
i8 0, label %115
i8 10, label %100
i8 32, label %100
]
98: ; preds = %95
%99 = getelementptr inbounds i8, i8* %96, i64 1
br label %95
100: ; preds = %95, %95
store i8 0, i8* %96
%101 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8* %22)
br label %102
102: ; preds = %102, %100
%103 = phi i8* [ %96, %100 ], [ %104, %102 ]
%104 = getelementptr inbounds i8, i8* %103, i64 1
%105 = load i8, i8* %104
switch i8 %105, label %102 [
i8 0, label %115
i8 10, label %106
i8 32, label %106
]
106: ; preds = %102, %102
store i8 0, i8* %104
%107 = getelementptr inbounds i8, i8* %103, i64 2
br label %108
108: ; preds = %111, %106
%109 = phi i8* [ %107, %106 ], [ %112, %111 ]
%110 = load i8, i8* %109
switch i8 %110, label %111 [
i8 0, label %115
i8 10, label %113
]
111: ; preds = %108
%112 = getelementptr inbounds i8, i8* %109, i64 1
br label %108
113: ; preds = %108
store i8 0, i8* %109
%114 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %107)
br label %115
115: ; preds = %95, %102, %108, %113
%116 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%117 = icmp eq i32* %116, null
br i1 %117, label %118, label %93
118: ; preds = %115, %90
%119 = tail call i32 @fputc(i32 10, i32* %11)
br label %120
120: ; preds = %118, %78
%121 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), i32 %83, i32 %83)
%122 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.28, i64 0, i64 0), i64 32, i64 1, i32* %11)
%123 = tail call i32 @fputc(i32 10, i32* %11)
%124 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.29, i64 0, i64 0), i64 6, i64 1, i32* %11)
%125 = tail call i32 @fputc(i32 10, i32* %11)
%126 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.30, i64 0, i64 0), i8* %20)
%127 = tail call i32 @clearerr(i32* %4)
%128 = tail call i32 @rewind(i32* %4)
%129 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %22, i8* %20)
%130 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %22)
%131 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %156
133: ; preds = %120
%134 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.31, i64 0, i64 0), i64 15, i64 1, i32* %11)
%135 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%136 = icmp eq i32* %135, null
br i1 %136, label %152, label %137
137: ; preds = %133, %149
%138 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %139
139: ; preds = %142, %137
%140 = phi i8* [ %22, %137 ], [ %143, %142 ]
%141 = load i8, i8* %140
switch i8 %141, label %142 [
i8 0, label %149
i8 10, label %144
i8 32, label %144
]
142: ; preds = %139
%143 = getelementptr inbounds i8, i8* %140, i64 1
br label %139
144: ; preds = %139, %139
store i8 0, i8* %140
%145 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%146 = icmp eq i32 %145, 0
br i1 %146, label %152, label %147
147: ; preds = %144
%148 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.32, i64 0, i64 0), i8* %22, i8* %22)
br label %149
149: ; preds = %139, %147
%150 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%151 = icmp eq i32* %150, null
br i1 %151, label %152, label %137
152: ; preds = %149, %144, %133
%153 = load i32, i32* @SEEK_CUR
%154 = tail call i32 @fseek(i32* %11, i32 -2, i32 %153)
%155 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.33, i64 0, i64 0), i64 4, i64 1, i32* %11)
br label %156
156: ; preds = %152, %120
%157 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%158 = icmp eq i32 %157, 0
br i1 %158, label %159, label %179
159: ; preds = %156
%160 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0), i64 12, i64 1, i32* %11)
%161 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%162 = icmp eq i32* %161, null
br i1 %162, label %175, label %163
163: ; preds = %159, %172
%164 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %165
165: ; preds = %168, %163
%166 = phi i8* [ %22, %163 ], [ %169, %168 ]
%167 = load i8, i8* %166
switch i8 %167, label %168 [
i8 0, label %172
i8 10, label %170
i8 32, label %170
]
168: ; preds = %165
%169 = getelementptr inbounds i8, i8* %166, i64 1
br label %165
170: ; preds = %165, %165
store i8 0, i8* %166
%171 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.32, i64 0, i64 0), i8* %22, i8* %22)
br label %172
172: ; preds = %165, %170
%173 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%174 = icmp eq i32* %173, null
br i1 %174, label %175, label %163
175: ; preds = %172, %159
%176 = load i32, i32* @SEEK_CUR
%177 = tail call i32 @fseek(i32* %11, i32 -2, i32 %176)
%178 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i64 5, i64 1, i32* %11)
br label %179
179: ; preds = %175, %156
%180 = tail call i32 @fputc(i32 10, i32* %11)
%181 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.35, i64 0, i64 0), i32 %83, i32 %83)
%182 = tail call i64 @fwrite(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.36, i64 0, i64 0), i64 53, i64 1, i32* %11)
%183 = tail call i32 @fputc(i32 10, i32* %11)
%184 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i64 0, i64 0), i64 7, i64 1, i32* %11)
%185 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0), i64 13, i64 1, i32* %11)
%186 = tail call i32 @fputc(i32 10, i32* %11)
%187 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0), i64 14, i64 1, i32* %11)
%188 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0), i64 25, i64 1, i32* %11)
%189 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.41, i64 0, i64 0), i64 28, i64 1, i32* %11)
%190 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.42, i64 0, i64 0), i64 25, i64 1, i32* %11)
%191 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.41, i64 0, i64 0), i64 28, i64 1, i32* %11)
%192 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0), i64 13, i64 1, i32* %11)
%193 = tail call i32 @fputc(i32 10, i32* %11)
%194 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.39, i64 0, i64 0), i64 14, i64 1, i32* %11)
%195 = tail call i32 @clearerr(i32* %4)
%196 = tail call i32 @rewind(i32* %4)
%197 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %22, i8* %20)
%198 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %22)
%199 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %217
201: ; preds = %179
%202 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%203 = icmp eq i32* %202, null
br i1 %203, label %217, label %204
204: ; preds = %201, %214
%205 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %206
206: ; preds = %209, %204
%207 = phi i8* [ %22, %204 ], [ %210, %209 ]
%208 = load i8, i8* %207
switch i8 %208, label %209 [
i8 0, label %214
i8 10, label %211
i8 32, label %211
]
209: ; preds = %206
%210 = getelementptr inbounds i8, i8* %207, i64 1
br label %206
211: ; preds = %206, %206
store i8 0, i8* %207
%212 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%213 = icmp eq i32 %212, 0
br i1 %213, label %217, label %214
214: ; preds = %206, %211
%215 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%216 = icmp eq i32* %215, null
br i1 %216, label %217, label %204
217: ; preds = %211, %214, %201, %179
%218 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%219 = icmp eq i32 %218, 0
br i1 %219, label %220, label %249
220: ; preds = %217
%221 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%222 = icmp eq i32* %221, null
br i1 %222, label %249, label %223
223: ; preds = %220, %246
%224 = tail call i32 @taka_tstring_one_tab_space(i8* %22)
br label %225
225: ; preds = %228, %223
%226 = phi i8* [ %22, %223 ], [ %229, %228 ]
%227 = load i8, i8* %226
switch i8 %227, label %228 [
i8 0, label %246
i8 10, label %230
i8 32, label %230
]
228: ; preds = %225
%229 = getelementptr inbounds i8, i8* %226, i64 1
br label %225
230: ; preds = %225, %225
store i8 0, i8* %226
%231 = tail call i32 @strcpy(i8* %20, i8* %22)
%232 = getelementptr inbounds i8, i8* %226, i64 1
br label %233
233: ; preds = %236, %230
%234 = phi i8* [ %232, %230 ], [ %237, %236 ]
%235 = load i8, i8* %234
switch i8 %235, label %236 [
i8 0, label %246
i8 10, label %238
i8 32, label %238
]
236: ; preds = %233
%237 = getelementptr inbounds i8, i8* %234, i64 1
br label %233
238: ; preds = %233, %233
store i8 0, i8* %234
%239 = tail call i32 @strcmp(i8* %232, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.43, i64 0, i64 0))
%240 = icmp eq i32 %239, 0
br i1 %240, label %244, label %241
241: ; preds = %238
%242 = tail call i32 @strcmp(i8* %232, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.44, i64 0, i64 0))
%243 = icmp eq i32 %242, 0
br i1 %243, label %244, label %246
244: ; preds = %241, %238
%245 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.45, i64 0, i64 0), i8* %20)
br label %246
246: ; preds = %225, %233, %241, %244
%247 = tail call i32* @fgets(i8* %22, i32 4096, i32* %4)
%248 = icmp eq i32* %247, null
br i1 %248, label %249, label %223
249: ; preds = %246, %220, %217
%250 = tail call i32 @fputc(i32 10, i32* %11)
%251 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i64 0, i64 0), i64 7, i64 1, i32* %11)
%252 = tail call i32 @fputc(i32 10, i32* %11)
%253 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.38, i64 0, i64 0), i64 13, i64 1, i32* %11)
%254 = tail call i32 @fputc(i32 10, i32* %11)
%255 = tail call i32 @rewind(i32* %4)
%256 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %22, i8* %20)
%257 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.46, i64 0, i64 0), i8* %20)
%258 = tail call i32 @fputc(i32 10, i32* %11)
%259 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.47, i64 0, i64 0), i8* %20)
%260 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.48, i64 0, i64 0), i8* %20)
%261 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.49, i64 0, i64 0), i64 10, i64 1, i32* %11)
%262 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.50, i64 0, i64 0), i8* %20)
%263 = tail call i32 @free(i8* %22)
%264 = tail call i32 @free(i8* %20)
%265 = tail call i32 @fclose(i32* %11)
%266 = tail call i32 @fclose(i32* %4)
br label %267
267: ; preds = %13, %16, %6, %8, %249
%268 = phi i32 [ 0, %249 ], [ -32, %8 ], [ -32, %6 ], [ -33, %16 ], [ -33, %13 ]
ret i32 %268
}