#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*/ 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*/ strcmp(char *, char *);
int /*<<< orphan*/ taka_tstring_one_tab_space(char *);
int taka_tvpp_create_module_template(const char *orig_file, 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("module.vhd", "wt");
  if (!cf) {
    fclose(of);
    if (cerr)
      fprintf(cerr, "Can't open a converted file: %s.\n", "module.vhd");
    return (-33);
  }
  name = (char *)malloc(sizeof(char) * 4096);
  line = (char *)malloc(sizeof(char) * 4096);
  fprintf(cf, "library ieee;\n");
  fprintf(cf, "use ieee.std_logic_1164.all;\n");
  fprintf(cf, "\n");
  fscanf(of, "%s %s\n", line, name);
  if (!strcmp(line, "entity") || !strcmp(line, "component"))
    fprintf(cf, "entity %s is\n", name);
  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");
  }
  if (!strcmp(line, "port")) {
    fprintf(cf, "\tport (\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:\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 entity %s;\n", name);
  fprintf(cf, "\n");
  fprintf(cf, "architecture rtl of %s is\n", name);
  fprintf(cf, "\n");
  fprintf(cf, "begin\n");
  fprintf(cf, "\n");
  fprintf(cf, "process(clock, reset)\n");
  fprintf(cf, "begin\n");
  fprintf(cf, "if (reset = '1') then\n");
  fprintf(cf, "\n");
  fprintf(cf, "elsif (rising_edge(clock)) then\n");
  fprintf(cf, "\n");
  fprintf(cf, "end if;\n");
  fprintf(cf, "end process;\n");
  fprintf(cf, "\n");
  fprintf(cf, "end rtl;\n");
  free(line);
  free(name);
  fclose(cf);
  fclose(of);
  return (0);
}


x86 assembly (clang, -O0):
<taka_tvpp_create_module_template>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xf01(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11fc <taka_tvpp_create_module_template+0x5c>
cmpq   $0x0,-0x18(%rbp)
je     11f0 <taka_tvpp_create_module_template+0x50>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0xffffffe0,-0x4(%rbp)
jmp    1940 <taka_tvpp_create_module_template+0x7a0>
lea    0xe20(%rip),%rdi
lea    0xe24(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1257 <taka_tvpp_create_module_template+0xb7>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
cmpq   $0x0,-0x18(%rbp)
je     124b <taka_tvpp_create_module_template+0xab>
mov    -0x18(%rbp),%rdi
lea    0xdf4(%rip),%rsi
lea    0xddf(%rip),%rdx
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0xffffffdf,-0x4(%rbp)
jmp    1940 <taka_tvpp_create_module_template+0x7a0>
mov    $0x1000,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1000,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdd2(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe16(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xdc4(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xdb9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     12f5 <taka_tvpp_create_module_template+0x155>
mov    -0x38(%rbp),%rdi
lea    0xda7(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    130b <taka_tvpp_create_module_template+0x16b>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x38(%rbp),%rdi
lea    0xd7a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1596 <taka_tvpp_create_module_template+0x3f6>
mov    -0x28(%rbp),%rdi
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x1000,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     156d <taka_tvpp_create_module_template+0x3cd>
mov    -0x38(%rbp),%rdi
call   1050 <taka_tstring_one_tab_space@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x49(%rbp)
je     13bb <taka_tvpp_create_module_template+0x21b>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x49(%rbp)
je     13bb <taka_tvpp_create_module_template+0x21b>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    13cb <taka_tvpp_create_module_template+0x22b>
jmp    13e1 <taka_tvpp_create_module_template+0x241>
jmp    13d0 <taka_tvpp_create_module_template+0x230>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1381 <taka_tvpp_create_module_template+0x1e1>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    13f6 <taka_tvpp_create_module_template+0x256>
jmp    134c <taka_tvpp_create_module_template+0x1ac>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x40(%rbp),%rdi
lea    0xcb2(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    141b <taka_tvpp_create_module_template+0x27b>
jmp    156d <taka_tvpp_create_module_template+0x3cd>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0xc95(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x4a(%rbp)
je     147f <taka_tvpp_create_module_template+0x2df>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x4a(%rbp)
je     147f <taka_tvpp_create_module_template+0x2df>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4a(%rbp)
mov    -0x4a(%rbp),%al
test   $0x1,%al
jne    148f <taka_tvpp_create_module_template+0x2ef>
jmp    14a5 <taka_tvpp_create_module_template+0x305>
jmp    1494 <taka_tvpp_create_module_template+0x2f4>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1445 <taka_tvpp_create_module_template+0x2a5>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    14ba <taka_tvpp_create_module_template+0x31a>
jmp    134c <taka_tvpp_create_module_template+0x1ac>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0xbf8(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x4b(%rbp)
je     1510 <taka_tvpp_create_module_template+0x370>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4b(%rbp)
mov    -0x4b(%rbp),%al
test   $0x1,%al
jne    1520 <taka_tvpp_create_module_template+0x380>
jmp    1536 <taka_tvpp_create_module_template+0x396>
jmp    1525 <taka_tvpp_create_module_template+0x385>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    14eb <taka_tvpp_create_module_template+0x34b>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    154b <taka_tvpp_create_module_template+0x3ab>
jmp    134c <taka_tvpp_create_module_template+0x1ac>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0xb8c(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    134c <taka_tvpp_create_module_template+0x1ac>
mov    -0x28(%rbp),%rdi
mov    0x2a70(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffe,%esi
call   10b0 <fseek@plt>
mov    -0x28(%rbp),%rdi
lea    0xb40(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xb19(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    17ed <taka_tvpp_create_module_template+0x64d>
mov    -0x28(%rbp),%rdi
lea    0xb1b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x1000,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     17c4 <taka_tvpp_create_module_template+0x624>
mov    -0x38(%rbp),%rdi
call   1050 <taka_tstring_one_tab_space@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x4c(%rbp)
je     1630 <taka_tvpp_create_module_template+0x490>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x4c(%rbp)
je     1630 <taka_tvpp_create_module_template+0x490>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4c(%rbp)
mov    -0x4c(%rbp),%al
test   $0x1,%al
jne    1640 <taka_tvpp_create_module_template+0x4a0>
jmp    1656 <taka_tvpp_create_module_template+0x4b6>
jmp    1645 <taka_tvpp_create_module_template+0x4a5>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    15f6 <taka_tvpp_create_module_template+0x456>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    166b <taka_tvpp_create_module_template+0x4cb>
jmp    15c1 <taka_tvpp_create_module_template+0x421>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0xa3e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x4d(%rbp)
je     16d6 <taka_tvpp_create_module_template+0x536>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x4d(%rbp)
je     16d6 <taka_tvpp_create_module_template+0x536>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
test   $0x1,%al
jne    16e6 <taka_tvpp_create_module_template+0x546>
jmp    16fc <taka_tvpp_create_module_template+0x55c>
jmp    16eb <taka_tvpp_create_module_template+0x54b>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    169c <taka_tvpp_create_module_template+0x4fc>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1711 <taka_tvpp_create_module_template+0x571>
jmp    15c1 <taka_tvpp_create_module_template+0x421>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0x9b7(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x4e(%rbp)
je     1767 <taka_tvpp_create_module_template+0x5c7>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4e(%rbp)
mov    -0x4e(%rbp),%al
test   $0x1,%al
jne    1777 <taka_tvpp_create_module_template+0x5d7>
jmp    178d <taka_tvpp_create_module_template+0x5ed>
jmp    177c <taka_tvpp_create_module_template+0x5dc>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1742 <taka_tvpp_create_module_template+0x5a2>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    17a2 <taka_tvpp_create_module_template+0x602>
jmp    15c1 <taka_tvpp_create_module_template+0x421>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0x935(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    15c1 <taka_tvpp_create_module_template+0x421>
mov    -0x28(%rbp),%rdi
mov    0x2819(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffe,%esi
call   10b0 <fseek@plt>
mov    -0x28(%rbp),%rdi
lea    0x8e9(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0x8e6(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x8aa(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0x8ce(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x882(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x8c5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x85e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x8a8(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x88f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x89b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x816(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x88e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x7f2(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x88b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x882(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x7bc(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0x86c(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taka_tvpp_create_module_template>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xee1(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     141a <taka_tvpp_create_module_template+0x25a>
mov    %rax,%r14
lea    0xe30(%rip),%rdi
lea    0xe34(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1438 <taka_tvpp_create_module_template+0x278>
mov    %rax,%r12
mov    $0x1000,%edi
call   10b0 <malloc@plt>
mov    %rax,%r13
mov    $0x1000,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbx
lea    0xe27(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
lea    0xe1d(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xe15(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1060 <fscanf@plt>
lea    0xe05(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     12a1 <taka_tvpp_create_module_template+0xe1>
lea    0xdf9(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    12b5 <taka_tvpp_create_module_template+0xf5>
lea    0xdf0(%rip),%rsi
mov    %r12,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
lea    0xdc7(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
lea    0xdd6(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    14a0 <taka_tvpp_create_module_template+0x2e0>
mov    %r13,0x10(%rsp)
lea    0xdc2(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     146c <taka_tvpp_create_module_template+0x2ac>
lea    0x1(%rbx),%rax
mov    %rax,0x8(%rsp)
lea    0x2(%rbx),%rbp
jmp    1360 <taka_tvpp_create_module_template+0x1a0>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %r12,%rdi
lea    0xdb0(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     146c <taka_tvpp_create_module_template+0x2ac>
mov    %rbx,%rdi
call   1050 <taka_tstring_one_tab_space@plt>
mov    %rbp,%r15
mov    0x8(%rsp),%r13
movzbl -0x1(%r13),%eax
test   %al,%al
je     1347 <taka_tvpp_create_module_template+0x187>
cmp    $0xa,%al
je     1390 <taka_tvpp_create_module_template+0x1d0>
cmp    $0x20,%al
je     1390 <taka_tvpp_create_module_template+0x1d0>
add    $0x1,%r13
add    $0x1,%r15
jmp    1370 <taka_tvpp_create_module_template+0x1b0>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%r13)
mov    %rbx,%rdi
lea    0xd1b(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     146c <taka_tvpp_create_module_template+0x2ac>
mov    %r12,%rdi
lea    0xd09(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
movzbl -0x1(%r15),%eax
test   %al,%al
je     1347 <taka_tvpp_create_module_template+0x187>
cmp    $0xa,%al
je     13e0 <taka_tvpp_create_module_template+0x220>
cmp    $0x20,%al
je     13e0 <taka_tvpp_create_module_template+0x220>
add    $0x1,%r15
jmp    13c0 <taka_tvpp_create_module_template+0x200>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%r15)
mov    %r12,%rdi
lea    0xcd9(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %r15,%rax
nopl   0x0(%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1347 <taka_tvpp_create_module_template+0x187>
cmp    $0xa,%cl
je     1330 <taka_tvpp_create_module_template+0x170>
add    $0x1,%rax
jmp    1400 <taka_tvpp_create_module_template+0x240>
mov    $0xffffffe0,%r15d
test   %rbx,%rbx
je     1773 <taka_tvpp_create_module_template+0x5b3>
lea    0xbd0(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
jmp    1460 <taka_tvpp_create_module_template+0x2a0>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    $0xffffffdf,%r15d
test   %rbx,%rbx
je     1773 <taka_tvpp_create_module_template+0x5b3>
lea    0xbdb(%rip),%rsi
lea    0xbc6(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    1773 <taka_tvpp_create_module_template+0x5b3>
mov    0x2b75(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0xfffffffe,%esi
call   10c0 <fseek@plt>
lea    0xc46(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    0x10(%rsp),%r13
lea    0xc13(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1613 <taka_tvpp_create_module_template+0x453>
mov    %r13,0x10(%rsp)
lea    0xc12(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r14,0x8(%rsp)
mov    %r14,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     15da <taka_tvpp_create_module_template+0x41a>
lea    0x1(%rbx),%r15
mov    %rbx,%r14
add    $0x2,%r14
jmp    1532 <taka_tvpp_create_module_template+0x372>
movb   $0x0,(%rax)
mov    %r12,%rdi
lea    0xbe0(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    0x8(%rsp),%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     15da <taka_tvpp_create_module_template+0x41a>
mov    %rbx,%rdi
call   1050 <taka_tstring_one_tab_space@plt>
mov    %r14,%rbp
mov    %r15,%r13
movzbl -0x1(%r13),%eax
test   %al,%al
je     1517 <taka_tvpp_create_module_template+0x357>
cmp    $0xa,%al
je     1560 <taka_tvpp_create_module_template+0x3a0>
cmp    $0x20,%al
je     1560 <taka_tvpp_create_module_template+0x3a0>
add    $0x1,%r13
add    $0x1,%rbp
jmp    1540 <taka_tvpp_create_module_template+0x380>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%r13)
mov    %r12,%rdi
lea    0xb50(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
nopl   0x0(%rax)
movzbl -0x1(%rbp),%eax
test   %al,%al
je     1517 <taka_tvpp_create_module_template+0x357>
cmp    $0xa,%al
je     15a0 <taka_tvpp_create_module_template+0x3e0>
cmp    $0x20,%al
je     15a0 <taka_tvpp_create_module_template+0x3e0>
add    $0x1,%rbp
jmp    1580 <taka_tvpp_create_module_template+0x3c0>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rbp)
mov    %r12,%rdi
lea    0xb30(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %rbp,%rax
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
test   %cl,%cl
je     1517 <taka_tvpp_create_module_template+0x357>
cmp    $0xa,%cl
je     1500 <taka_tvpp_create_module_template+0x340>
add    $0x1,%rax
jmp    15c0 <taka_tvpp_create_module_template+0x400>
mov    0x2a07(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0xfffffffe,%esi
call   10c0 <fseek@plt>
lea    0xad8(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    0x8(%rsp),%r14
mov    0x10(%rsp),%r13
lea    0xac8(%rip),%rsi
xor    %r15d,%r15d
mov    %r12,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xab4(%rip),%rsi
mov    %r12,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xaae(%rip),%rbp
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xa8c(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r12,%rcx
call   10e0 <fwrite@plt>
lea    0xa75(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xa66(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xa61(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
lea    0xa51(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
lea    0xa39(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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 = [11 x i8] c"module.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 = [15 x i8] c"library ieee;\0A\00"
@.str.6 = [30 x i8] c"use ieee.std_logic_1164.all;\0A\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [7 x i8] c"%s %s\0A\00"
@.str.9 = [7 x i8] c"entity\00"
@.str.10 = [10 x i8] c"component\00"
@.str.11 = [14 x i8] c"entity %s is\0A\00"
@.str.12 = [4 x i8] c"%s\0A\00"
@.str.13 = [8 x i8] c"generic\00"
@.str.14 = [12 x i8] c"\09generic (\0A\00"
@.str.15 = [5 x i8] c"port\00"
@.str.16 = [9 x i8] c"\09\09%s:\09\09\09\00"
@.str.17 = [7 x i8] c"%s := \00"
@.str.18 = [5 x i8] c"%s;\0A\00"
@SEEK_CUR = global i32 0
@.str.19 = [6 x i8] c"\0A\09);\0A\00"
@.str.20 = [9 x i8] c"\09port (\0A\00"
@.str.21 = [4 x i8] c"%s \00"
@.str.22 = [16 x i8] c"end entity %s;\0A\00"
@.str.23 = [27 x i8] c"architecture rtl of %s is\0A\00"
@.str.24 = [7 x i8] c"begin\0A\00"
@.str.25 = [23 x i8] c"process(clock, reset)\0A\00"
@.str.26 = [23 x i8] c"if (reset = '1') then\0A\00"
@.str.27 = [33 x i8] c"elsif (rising_edge(clock)) then\0A\00"
@.str.28 = [9 x i8] c"end if;\0A\00"
@.str.29 = [14 x i8] c"end process;\0A\00"
@.str.30 = [10 x i8] c"end rtl;\0A\00"
define i32 @taka_tvpp_create_module_template(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
%12 = load i8*, i8** %4
%13 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %13, i32** %6
%14 = load i32*, i32** %6
%15 = icmp ne i32* %14, null
br i1 %15, label %24, label %16
16: ; preds = %2
%17 = load i32*, i32** %5
%18 = icmp ne i32* %17, null
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i32*, i32** %5
%21 = load i8*, i8** %4
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %19, %16
store i32 -32, i32* %3
br label %354
24: ; preds = %2
%25 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 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* %25, i32** %7
%26 = load i32*, i32** %7
%27 = icmp ne i32* %26, null
br i1 %27, label %37, label %28
28: ; preds = %24
%29 = load i32*, i32** %6
%30 = call i32 @fclose(i32* %29)
%31 = load i32*, i32** %5
%32 = icmp ne i32* %31, null
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = load i32*, i32** %5
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %33, %28
store i32 -33, i32* %3
br label %354
37: ; preds = %24
%38 = call i64 @malloc(i32 4096)
%39 = inttoptr i64 %38 to i8*
store i8* %39, i8** %8
%40 = call i64 @malloc(i32 4096)
%41 = inttoptr i64 %40 to i8*
store i8* %41, i8** %9
%42 = load i32*, i32** %7
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%44 = load i32*, i32** %7
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%46 = load i32*, i32** %7
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%48 = load i32*, i32** %6
%49 = load i8*, i8** %9
%50 = load i8*, i8** %8
%51 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %49, i8* %50)
%52 = load i8*, i8** %9
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %59
55: ; preds = %37
%56 = load i8*, i8** %9
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %63, label %59
59: ; preds = %55, %37
%60 = load i32*, i32** %7
%61 = load i8*, i8** %8
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %61)
br label %63
63: ; preds = %59, %55
%64 = load i32*, i32** %6
%65 = load i8*, i8** %9
%66 = call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %65)
%67 = load i8*, i8** %9
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %191, label %70
70: ; preds = %63
%71 = load i32*, i32** %7
%72 = call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
br label %73
73: ; preds = %180, %179, %149, %109, %70
%74 = load i8*, i8** %9
%75 = load i32*, i32** %6
%76 = call i32* @fgets(i8* %74, i32 4096, i32* %75)
%77 = icmp ne i32* %76, null
br i1 %77, label %78, label %185
78: ; preds = %73
%79 = load i8*, i8** %9
%80 = call i32 @taka_tstring_one_tab_space(i8* %79)
%81 = load i8*, i8** %9
store i8* %81, i8** %10
%82 = load i8*, i8** %10
store i8* %82, i8** %11
br label %83
83: ; preds = %101, %78
%84 = load i8*, i8** %11
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = icmp ne i32 %86, 32
br i1 %87, label %88, label %98
88: ; preds = %83
%89 = load i8*, i8** %11
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 10
br i1 %92, label %93, label %98
93: ; preds = %88
%94 = load i8*, i8** %11
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 0
br label %98
98: ; preds = %93, %88, %83
%99 = phi i1 [ false, %88 ], [ false, %83 ], [ %97, %93 ]
br i1 %99, label %100, label %104
100: ; preds = %98
br label %101
101: ; preds = %100
%102 = load i8*, i8** %11
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %11
br label %83
104: ; preds = %98
%105 = load i8*, i8** %11
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %110
109: ; preds = %104
br label %73
110: ; preds = %104
%111 = load i8*, i8** %11
store i8 0, i8* %111
%112 = load i8*, i8** %10
%113 = call i32 @strcmp(i8* %112, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%114 = icmp ne i32 %113, 0
br i1 %114, label %116, label %115
115: ; preds = %110
br label %185
116: ; preds = %110
%117 = load i32*, i32** %7
%118 = load i8*, i8** %10
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %117, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %118)
%120 = load i8*, i8** %11
%121 = getelementptr inbounds i8, i8* %120, i64 1
store i8* %121, i8** %10
%122 = load i8*, i8** %10
store i8* %122, i8** %11
br label %123
123: ; preds = %141, %116
%124 = load i8*, i8** %11
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp ne i32 %126, 32
br i1 %127, label %128, label %138
128: ; preds = %123
%129 = load i8*, i8** %11
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp ne i32 %131, 10
br i1 %132, label %133, label %138
133: ; preds = %128
%134 = load i8*, i8** %11
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp ne i32 %136, 0
br label %138
138: ; preds = %133, %128, %123
%139 = phi i1 [ false, %128 ], [ false, %123 ], [ %137, %133 ]
br i1 %139, label %140, label %144
140: ; preds = %138
br label %141
141: ; preds = %140
%142 = load i8*, i8** %11
%143 = getelementptr inbounds i8, i8* %142, i32 1
store i8* %143, i8** %11
br label %123
144: ; preds = %138
%145 = load i8*, i8** %11
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %150
149: ; preds = %144
br label %73
150: ; preds = %144
%151 = load i8*, i8** %11
store i8 0, i8* %151
%152 = load i32*, i32** %7
%153 = load i8*, i8** %10
%154 = call i32 (i32*, i8*, ...) @fprintf(i32* %152, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %153)
%155 = load i8*, i8** %11
%156 = getelementptr inbounds i8, i8* %155, i64 1
store i8* %156, i8** %10
%157 = load i8*, i8** %10
store i8* %157, i8** %11
br label %158
158: ; preds = %171, %150
%159 = load i8*, i8** %11
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = icmp ne i32 %161, 10
br i1 %162, label %163, label %168
163: ; preds = %158
%164 = load i8*, i8** %11
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = icmp ne i32 %166, 0
br label %168
168: ; preds = %163, %158
%169 = phi i1 [ false, %158 ], [ %167, %163 ]
br i1 %169, label %170, label %174
170: ; preds = %168
br label %171
171: ; preds = %170
%172 = load i8*, i8** %11
%173 = getelementptr inbounds i8, i8* %172, i32 1
store i8* %173, i8** %11
br label %158
174: ; preds = %168
%175 = load i8*, i8** %11
%176 = load i8, i8* %175
%177 = sext i8 %176 to i32
%178 = icmp eq i32 %177, 0
br i1 %178, label %179, label %180
179: ; preds = %174
br label %73
180: ; preds = %174
%181 = load i8*, i8** %11
store i8 0, i8* %181
%182 = load i32*, i32** %7
%183 = load i8*, i8** %10
%184 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %183)
br label %73
185: ; preds = %115, %73
%186 = load i32*, i32** %7
%187 = load i32, i32* @SEEK_CUR
%188 = call i32 @fseek(i32* %186, i32 -2, i32 %187)
%189 = load i32*, i32** %7
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
br label %191
191: ; preds = %185, %63
%192 = load i8*, i8** %9
%193 = call i32 @strcmp(i8* %192, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%194 = icmp ne i32 %193, 0
br i1 %194, label %311, label %195
195: ; preds = %191
%196 = load i32*, i32** %7
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %196, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
br label %198
198: ; preds = %300, %299, %269, %234, %195
%199 = load i8*, i8** %9
%200 = load i32*, i32** %6
%201 = call i32* @fgets(i8* %199, i32 4096, i32* %200)
%202 = icmp ne i32* %201, null
br i1 %202, label %203, label %305
203: ; preds = %198
%204 = load i8*, i8** %9
%205 = call i32 @taka_tstring_one_tab_space(i8* %204)
%206 = load i8*, i8** %9
store i8* %206, i8** %10
%207 = load i8*, i8** %10
store i8* %207, i8** %11
br label %208
208: ; preds = %226, %203
%209 = load i8*, i8** %11
%210 = load i8, i8* %209
%211 = sext i8 %210 to i32
%212 = icmp ne i32 %211, 32
br i1 %212, label %213, label %223
213: ; preds = %208
%214 = load i8*, i8** %11
%215 = load i8, i8* %214
%216 = sext i8 %215 to i32
%217 = icmp ne i32 %216, 10
br i1 %217, label %218, label %223
218: ; preds = %213
%219 = load i8*, i8** %11
%220 = load i8, i8* %219
%221 = sext i8 %220 to i32
%222 = icmp ne i32 %221, 0
br label %223
223: ; preds = %218, %213, %208
%224 = phi i1 [ false, %213 ], [ false, %208 ], [ %222, %218 ]
br i1 %224, label %225, label %229
225: ; preds = %223
br label %226
226: ; preds = %225
%227 = load i8*, i8** %11
%228 = getelementptr inbounds i8, i8* %227, i32 1
store i8* %228, i8** %11
br label %208
229: ; preds = %223
%230 = load i8*, i8** %11
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = icmp eq i32 %232, 0
br i1 %233, label %234, label %235
234: ; preds = %229
br label %198
235: ; preds = %229
%236 = load i8*, i8** %11
store i8 0, i8* %236
%237 = load i32*, i32** %7
%238 = load i8*, i8** %10
%239 = call i32 (i32*, i8*, ...) @fprintf(i32* %237, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %238)
%240 = load i8*, i8** %11
%241 = getelementptr inbounds i8, i8* %240, i64 1
store i8* %241, i8** %10
%242 = load i8*, i8** %10
store i8* %242, i8** %11
br label %243
243: ; preds = %261, %235
%244 = load i8*, i8** %11
%245 = load i8, i8* %244
%246 = sext i8 %245 to i32
%247 = icmp ne i32 %246, 32
br i1 %247, label %248, label %258
248: ; preds = %243
%249 = load i8*, i8** %11
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
%252 = icmp ne i32 %251, 10
br i1 %252, label %253, label %258
253: ; preds = %248
%254 = load i8*, i8** %11
%255 = load i8, i8* %254
%256 = sext i8 %255 to i32
%257 = icmp ne i32 %256, 0
br label %258
258: ; preds = %253, %248, %243
%259 = phi i1 [ false, %248 ], [ false, %243 ], [ %257, %253 ]
br i1 %259, label %260, label %264
260: ; preds = %258
br label %261
261: ; preds = %260
%262 = load i8*, i8** %11
%263 = getelementptr inbounds i8, i8* %262, i32 1
store i8* %263, i8** %11
br label %243
264: ; preds = %258
%265 = load i8*, i8** %11
%266 = load i8, i8* %265
%267 = sext i8 %266 to i32
%268 = icmp eq i32 %267, 0
br i1 %268, label %269, label %270
269: ; preds = %264
br label %198
270: ; preds = %264
%271 = load i8*, i8** %11
store i8 0, i8* %271
%272 = load i32*, i32** %7
%273 = load i8*, i8** %10
%274 = call i32 (i32*, i8*, ...) @fprintf(i32* %272, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8* %273)
%275 = load i8*, i8** %11
%276 = getelementptr inbounds i8, i8* %275, i64 1
store i8* %276, i8** %10
%277 = load i8*, i8** %10
store i8* %277, i8** %11
br label %278
278: ; preds = %291, %270
%279 = load i8*, i8** %11
%280 = load i8, i8* %279
%281 = sext i8 %280 to i32
%282 = icmp ne i32 %281, 10
br i1 %282, label %283, label %288
283: ; preds = %278
%284 = load i8*, i8** %11
%285 = load i8, i8* %284
%286 = sext i8 %285 to i32
%287 = icmp ne i32 %286, 0
br label %288
288: ; preds = %283, %278
%289 = phi i1 [ false, %278 ], [ %287, %283 ]
br i1 %289, label %290, label %294
290: ; preds = %288
br label %291
291: ; preds = %290
%292 = load i8*, i8** %11
%293 = getelementptr inbounds i8, i8* %292, i32 1
store i8* %293, i8** %11
br label %278
294: ; preds = %288
%295 = load i8*, i8** %11
%296 = load i8, i8* %295
%297 = sext i8 %296 to i32
%298 = icmp eq i32 %297, 0
br i1 %298, label %299, label %300
299: ; preds = %294
br label %198
300: ; preds = %294
%301 = load i8*, i8** %11
store i8 0, i8* %301
%302 = load i32*, i32** %7
%303 = load i8*, i8** %10
%304 = call i32 (i32*, i8*, ...) @fprintf(i32* %302, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %303)
br label %198
305: ; preds = %198
%306 = load i32*, i32** %7
%307 = load i32, i32* @SEEK_CUR
%308 = call i32 @fseek(i32* %306, i32 -2, i32 %307)
%309 = load i32*, i32** %7
%310 = call i32 (i32*, i8*, ...) @fprintf(i32* %309, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
br label %311
311: ; preds = %305, %191
%312 = load i32*, i32** %7
%313 = load i8*, i8** %8
%314 = call i32 (i32*, i8*, ...) @fprintf(i32* %312, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0), i8* %313)
%315 = load i32*, i32** %7
%316 = call i32 (i32*, i8*, ...) @fprintf(i32* %315, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%317 = load i32*, i32** %7
%318 = load i8*, i8** %8
%319 = call i32 (i32*, i8*, ...) @fprintf(i32* %317, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), i8* %318)
%320 = load i32*, i32** %7
%321 = call i32 (i32*, i8*, ...) @fprintf(i32* %320, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%322 = load i32*, i32** %7
%323 = call i32 (i32*, i8*, ...) @fprintf(i32* %322, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0))
%324 = load i32*, i32** %7
%325 = call i32 (i32*, i8*, ...) @fprintf(i32* %324, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%326 = load i32*, i32** %7
%327 = call i32 (i32*, i8*, ...) @fprintf(i32* %326, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0))
%328 = load i32*, i32** %7
%329 = call i32 (i32*, i8*, ...) @fprintf(i32* %328, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0))
%330 = load i32*, i32** %7
%331 = call i32 (i32*, i8*, ...) @fprintf(i32* %330, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
%332 = load i32*, i32** %7
%333 = call i32 (i32*, i8*, ...) @fprintf(i32* %332, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%334 = load i32*, i32** %7
%335 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0))
%336 = load i32*, i32** %7
%337 = call i32 (i32*, i8*, ...) @fprintf(i32* %336, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%338 = load i32*, i32** %7
%339 = call i32 (i32*, i8*, ...) @fprintf(i32* %338, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.28, i64 0, i64 0))
%340 = load i32*, i32** %7
%341 = call i32 (i32*, i8*, ...) @fprintf(i32* %340, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.29, i64 0, i64 0))
%342 = load i32*, i32** %7
%343 = call i32 (i32*, i8*, ...) @fprintf(i32* %342, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%344 = load i32*, i32** %7
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %344, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0))
%346 = load i8*, i8** %9
%347 = call i32 @free(i8* %346)
%348 = load i8*, i8** %8
%349 = call i32 @free(i8* %348)
%350 = load i32*, i32** %7
%351 = call i32 @fclose(i32* %350)
%352 = load i32*, i32** %6
%353 = call i32 @fclose(i32* %352)
store i32 0, i32* %3
br label %354
354: ; preds = %311, %36, %23
%355 = load i32, i32* %3
ret i32 %355
}

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 = [11 x i8] c"module.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 = [15 x i8] c"library ieee;\0A\00"
@.str.6 = [30 x i8] c"use ieee.std_logic_1164.all;\0A\00"
@.str.8 = [7 x i8] c"%s %s\0A\00"
@.str.9 = [7 x i8] c"entity\00"
@.str.10 = [10 x i8] c"component\00"
@.str.11 = [14 x i8] c"entity %s is\0A\00"
@.str.12 = [4 x i8] c"%s\0A\00"
@.str.13 = [8 x i8] c"generic\00"
@.str.14 = [12 x i8] c"\09generic (\0A\00"
@.str.15 = [5 x i8] c"port\00"
@.str.16 = [9 x i8] c"\09\09%s:\09\09\09\00"
@.str.17 = [7 x i8] c"%s := \00"
@.str.18 = [5 x i8] c"%s;\0A\00"
@SEEK_CUR = global i32 0
@.str.19 = [6 x i8] c"\0A\09);\0A\00"
@.str.20 = [9 x i8] c"\09port (\0A\00"
@.str.21 = [4 x i8] c"%s \00"
@.str.22 = [16 x i8] c"end entity %s;\0A\00"
@.str.23 = [27 x i8] c"architecture rtl of %s is\0A\00"
@.str.24 = [7 x i8] c"begin\0A\00"
@.str.25 = [23 x i8] c"process(clock, reset)\0A\00"
@.str.26 = [23 x i8] c"if (reset = '1') then\0A\00"
@.str.27 = [33 x i8] c"elsif (rising_edge(clock)) then\0A\00"
@.str.28 = [9 x i8] c"end if;\0A\00"
@.str.29 = [14 x i8] c"end process;\0A\00"
@.str.30 = [10 x i8] c"end rtl;\0A\00"
define i32 @taka_tvpp_create_module_template(i8* %0, i32* %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = icmp eq i32* %1, null
br i1 %6, label %136, label %7
7: ; preds = %5
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %136
9: ; preds = %2
%10 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = tail call i32 @fclose(i32* %3)
%14 = icmp eq i32* %1, null
br i1 %14, label %136, label %15
15: ; preds = %12
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %136
17: ; preds = %9
%18 = tail call i64 @malloc(i32 4096)
%19 = inttoptr i64 %18 to i8*
%20 = tail call i64 @malloc(i32 4096)
%21 = inttoptr i64 %20 to i8*
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i64 14, i64 1, i32* %10)
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i64 29, i64 1, i32* %10)
%24 = tail call i32 @fputc(i32 10, i32* %10)
%25 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %21, i8* %19)
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %31, label %28
28: ; preds = %17
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28, %17
%32 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %19)
br label %33
33: ; preds = %31, %28
%34 = tail call i32 (i32*, i8*, i8*, ...) @fscanf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %21)
%35 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %76
37: ; preds = %33
%38 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i64 11, i64 1, i32* %10)
%39 = tail call i32* @fgets(i8* %21, i32 4096, i32* %3)
%40 = icmp eq i32* %39, null
br i1 %40, label %72, label %41
41: ; preds = %37, %69
%42 = tail call i32 @taka_tstring_one_tab_space(i8* %21)
br label %43
43: ; preds = %46, %41
%44 = phi i8* [ %21, %41 ], [ %47, %46 ]
%45 = load i8, i8* %44
switch i8 %45, label %46 [
i8 0, label %69
i8 10, label %48
i8 32, label %48
]
46: ; preds = %43
%47 = getelementptr inbounds i8, i8* %44, i64 1
br label %43
48: ; preds = %43, %43
store i8 0, i8* %44
%49 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%50 = icmp eq i32 %49, 0
br i1 %50, label %72, label %51
51: ; preds = %48
%52 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %21)
%53 = getelementptr inbounds i8, i8* %44, i64 1
br label %54
54: ; preds = %57, %51
%55 = phi i8* [ %53, %51 ], [ %58, %57 ]
%56 = load i8, i8* %55
switch i8 %56, label %57 [
i8 0, label %69
i8 10, label %59
i8 32, label %59
]
57: ; preds = %54
%58 = getelementptr inbounds i8, i8* %55, i64 1
br label %54
59: ; preds = %54, %54
store i8 0, i8* %55
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %53)
%61 = getelementptr inbounds i8, i8* %55, i64 1
br label %62
62: ; preds = %65, %59
%63 = phi i8* [ %61, %59 ], [ %66, %65 ]
%64 = load i8, i8* %63
switch i8 %64, label %65 [
i8 0, label %69
i8 10, label %67
]
65: ; preds = %62
%66 = getelementptr inbounds i8, i8* %63, i64 1
br label %62
67: ; preds = %62
store i8 0, i8* %63
%68 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %61)
br label %69
69: ; preds = %43, %54, %62, %67
%70 = tail call i32* @fgets(i8* %21, i32 4096, i32* %3)
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %41
72: ; preds = %69, %48, %37
%73 = load i32, i32* @SEEK_CUR
%74 = tail call i32 @fseek(i32* %10, i32 -2, i32 %73)
%75 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64 5, i64 1, i32* %10)
br label %76
76: ; preds = %72, %33
%77 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %115
79: ; preds = %76
%80 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i64 8, i64 1, i32* %10)
%81 = tail call i32* @fgets(i8* %21, i32 4096, i32* %3)
%82 = icmp eq i32* %81, null
br i1 %82, label %111, label %83
83: ; preds = %79, %108
%84 = tail call i32 @taka_tstring_one_tab_space(i8* %21)
br label %85
85: ; preds = %88, %83
%86 = phi i8* [ %21, %83 ], [ %89, %88 ]
%87 = load i8, i8* %86
switch i8 %87, label %88 [
i8 0, label %108
i8 10, label %90
i8 32, label %90
]
88: ; preds = %85
%89 = getelementptr inbounds i8, i8* %86, i64 1
br label %85
90: ; preds = %85, %85
store i8 0, i8* %86
%91 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %21)
%92 = getelementptr inbounds i8, i8* %86, i64 1
br label %93
93: ; preds = %96, %90
%94 = phi i8* [ %92, %90 ], [ %97, %96 ]
%95 = load i8, i8* %94
switch i8 %95, label %96 [
i8 0, label %108
i8 10, label %98
i8 32, label %98
]
96: ; preds = %93
%97 = getelementptr inbounds i8, i8* %94, i64 1
br label %93
98: ; preds = %93, %93
store i8 0, i8* %94
%99 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8* %92)
%100 = getelementptr inbounds i8, i8* %94, i64 1
br label %101
101: ; preds = %104, %98
%102 = phi i8* [ %100, %98 ], [ %105, %104 ]
%103 = load i8, i8* %102
switch i8 %103, label %104 [
i8 0, label %108
i8 10, label %106
]
104: ; preds = %101
%105 = getelementptr inbounds i8, i8* %102, i64 1
br label %101
106: ; preds = %101
store i8 0, i8* %102
%107 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %100)
br label %108
108: ; preds = %85, %93, %101, %106
%109 = tail call i32* @fgets(i8* %21, i32 4096, i32* %3)
%110 = icmp eq i32* %109, null
br i1 %110, label %111, label %83
111: ; preds = %108, %79
%112 = load i32, i32* @SEEK_CUR
%113 = tail call i32 @fseek(i32* %10, i32 -2, i32 %112)
%114 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64 5, i64 1, i32* %10)
br label %115
115: ; preds = %111, %76
%116 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0), i8* %19)
%117 = tail call i32 @fputc(i32 10, i32* %10)
%118 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), i8* %19)
%119 = tail call i32 @fputc(i32 10, i32* %10)
%120 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i64 6, i64 1, i32* %10)
%121 = tail call i32 @fputc(i32 10, i32* %10)
%122 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0), i64 22, i64 1, i32* %10)
%123 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i64 6, i64 1, i32* %10)
%124 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0), i64 22, i64 1, i32* %10)
%125 = tail call i32 @fputc(i32 10, i32* %10)
%126 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0), i64 32, i64 1, i32* %10)
%127 = tail call i32 @fputc(i32 10, i32* %10)
%128 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.28, i64 0, i64 0), i64 8, i64 1, i32* %10)
%129 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.29, i64 0, i64 0), i64 13, i64 1, i32* %10)
%130 = tail call i32 @fputc(i32 10, i32* %10)
%131 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0), i64 9, i64 1, i32* %10)
%132 = tail call i32 @free(i8* %21)
%133 = tail call i32 @free(i8* %19)
%134 = tail call i32 @fclose(i32* %10)
%135 = tail call i32 @fclose(i32* %3)
br label %136
136: ; preds = %12, %15, %5, %7, %115
%137 = phi i32 [ 0, %115 ], [ -32, %7 ], [ -32, %5 ], [ -33, %15 ], [ -33, %12 ]
ret i32 %137
}