#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*/ symbol;
struct vink_tree {
  int dummy;
};
typedef int /*<<< orphan*/ section_stack;
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ EX_DATAERR;
int /*<<< orphan*/ EX_OSERR;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ err(int /*<<< orphan*/, char *, char const *, ...);
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, char const *, int, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ is_symbol_char(char);
scalar_t__ isprint(char);
scalar_t__ isspace(char);
int lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
char *malloc(int);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ read_all(int, char *, int, char const *);
struct vink_tree *vink_tree_create(char const *);
int /*<<< orphan*/ vink_tree_create_node(struct vink_tree *, char *, char *);
struct vink_tree *vink_tree_load_cfg(const char *path) {
  struct vink_tree *result;
  char *data;
  off_t size;
  int fd;
  char symbol[4096];
  size_t symbol_len = 0;
  size_t section_stack[32];
  size_t section_stackp = 0;
  int expecting_symbol = 1;
  char *c;
  int lineno = 1;
  result = vink_tree_create(path);
  if (-1 == (fd = open(path, O_RDONLY)))
    return result;
  if (-1 == (size = lseek(fd, 0, SEEK_END)))
    err(EX_OSERR, "%s: failed to seek to end of file", path);
  if (-1 == lseek(fd, 0, SEEK_SET))
    err(EX_OSERR, "%s: failed to seek to start of file", path);
  if (0 == (data = malloc(size + 1)))
    err(EX_OSERR, "%s: failed to allocate %zu bytes for parsing", path,
        (size_t)(size + 1));
  read_all(fd, data, size, path);
  data[size] = 0;
  close(fd);
  c = data;
  while (*c) {
    while (isspace(*c)) {
      if (*c++ == '\n')
        ++lineno;
    }
    if (!*c)
      break;
    if (*c == '#') {
      while (*c && *c != '\n')
        ++c;
      ++lineno;
      continue;
    }
    if (*c == '}') {
      if (!section_stackp)
        errx(EX_DATAERR, "%s:%d: unexpected '}'", path, lineno);
      if (!--section_stackp)
        symbol_len = 0;
      else
        symbol_len = section_stack[section_stackp - 1];
      ++c;
      continue;
    }
    if (expecting_symbol) {
      if (!is_symbol_char(*c)) {
        if (isprint(*c))
          errx(EX_DATAERR, "%s:%d: unexpected '%c' while looking for symbol",
               path, lineno, *c);
        else
          errx(EX_DATAERR, "%s:%d: unexpected 0x%02x while looking for symbol",
               path, lineno, *c);
      }
      if (symbol_len) {
        if (symbol_len + 1 == (sizeof(symbol) / sizeof(symbol[0])))
          errx(EX_DATAERR, "%s:%d: symbol stack overflow", path, lineno);
        symbol[symbol_len++] = '.';
      }
      while (is_symbol_char(*c)) {
        if (symbol_len + 1 == (sizeof(symbol) / sizeof(symbol[0])))
          errx(EX_DATAERR, "%s:%d: symbol stack overflow", path, lineno);
        symbol[symbol_len++] = *c++;
      }
      if (isspace(*c)) {
        *c++ = 0;
        while (isspace(*c))
          ++c;
      }
      switch (*c) {
      case 0:
        errx(EX_DATAERR, "%s:%d: unexpected end-of-file after symbol", path,
             lineno);
      case '.':
        expecting_symbol = 1;
        *c++ = 0;
        break;
      case '{':
        if (section_stackp ==
            (sizeof(section_stack) / sizeof(section_stack[0])))
          errx(EX_DATAERR, "%s:%d: too many nested sections", path, lineno);
        section_stack[section_stackp++] = symbol_len;
        expecting_symbol = 1;
        *c++ = 0;
        break;
      case '}':
        errx(EX_DATAERR, "%s:%d: unexpected '%c' after symbol", path, lineno,
             *c);
      default:
        expecting_symbol = 0;
      }
    } else {
      char *value = c;
      if (*c == '"') {
        char *o;
        o = value = ++c;
        for (;;) {
          if (!*c) {
            errx(EX_DATAERR,
                 "%s:%d: unexpected end-of-file in "
                 "string",
                 path, lineno);
          }
          if (*c == '\\') {
            if (!*(c + 1))
              errx(EX_DATAERR,
                   "%s:%d: unexpected end-of-file in "
                   "string",
                   path, lineno);
            ++c;
            *o++ = *c++;
          } else if (*c == '"')
            break;
          else
            *o++ = *c++;
        }
        *c++ = 0;
      } else {
        while (*c && !isspace(*c))
          ++c;
        if (*c)
          *c++ = 0;
      }
      symbol[symbol_len] = 0;
      vink_tree_create_node(result, symbol, value);
      if (section_stackp)
        symbol_len = section_stack[section_stackp - 1];
      else
        symbol_len = 0;
      expecting_symbol = 1;
    }
  }
  free(data);
  return result;
}


x86 assembly (clang, -O0):
<vink_tree_load_cfg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1180,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x1038(%rbp)
movq   $0x0,-0x1148(%rbp)
movl   $0x1,-0x114c(%rbp)
movl   $0x1,-0x115c(%rbp)
mov    -0x10(%rbp),%rdi
call   10e0 <vink_tree_create@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,%ecx
mov    %ecx,-0x28(%rbp)
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1247 <vink_tree_load_cfg+0x77>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1a9f <vink_tree_load_cfg+0x8cf>
mov    -0x28(%rbp),%edi
mov    0x2d97(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,%ecx
mov    %ecx,-0x24(%rbp)
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1287 <vink_tree_load_cfg+0xb7>
mov    0x2d4d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xd80(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x28(%rbp),%edi
mov    0x2d37(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    12c4 <vink_tree_load_cfg+0xf4>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xd65(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x24(%rbp),%edi
add    $0x1,%edi
call   10a0 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1305 <vink_tree_load_cfg+0x135>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x24(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0xd48(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x28(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   10f0 <read_all@plt>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%edi
call   1070 <close@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x1158(%rbp)
mov    -0x1158(%rbp),%rax
cmpb   $0x0,(%rax)
je     1a8e <vink_tree_load_cfg+0x8be>
jmp    134c <vink_tree_load_cfg+0x17c>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isspace@plt>
cmp    $0x0,%rax
je     139a <vink_tree_load_cfg+0x1ca>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1395 <vink_tree_load_cfg+0x1c5>
mov    -0x115c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x115c(%rbp)
jmp    134c <vink_tree_load_cfg+0x17c>
mov    -0x1158(%rbp),%rax
cmpb   $0x0,(%rax)
jne    13af <vink_tree_load_cfg+0x1df>
jmp    1a8e <vink_tree_load_cfg+0x8be>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1436 <vink_tree_load_cfg+0x266>
jmp    13c7 <vink_tree_load_cfg+0x1f7>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1171(%rbp)
je     13f8 <vink_tree_load_cfg+0x228>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x1171(%rbp)
mov    -0x1171(%rbp),%al
test   $0x1,%al
jne    140b <vink_tree_load_cfg+0x23b>
jmp    1422 <vink_tree_load_cfg+0x252>
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
jmp    13c7 <vink_tree_load_cfg+0x1f7>
mov    -0x115c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x115c(%rbp)
jmp    1337 <vink_tree_load_cfg+0x167>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7d,%eax
jne    14d5 <vink_tree_load_cfg+0x305>
cmpq   $0x0,-0x1148(%rbp)
jne    1478 <vink_tree_load_cfg+0x2a8>
mov    0x2b7a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0xc02(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1148(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x1148(%rbp)
cmp    $0x0,%rax
jne    14a4 <vink_tree_load_cfg+0x2d4>
movq   $0x0,-0x1038(%rbp)
jmp    14be <vink_tree_load_cfg+0x2ee>
mov    -0x1148(%rbp),%rax
sub    $0x1,%rax
mov    -0x1140(%rbp,%rax,8),%rax
ff
mov    %rax,-0x1038(%rbp)
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
jmp    1337 <vink_tree_load_cfg+0x167>
cmpl   $0x0,-0x114c(%rbp)
je     1823 <vink_tree_load_cfg+0x653>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   10d0 <is_symbol_char@plt>
cmp    $0x0,%rax
jne    1576 <vink_tree_load_cfg+0x3a6>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isprint@plt>
cmp    $0x0,%rax
je     1545 <vink_tree_load_cfg+0x375>
mov    0x2abd(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
mov    -0x1158(%rbp),%rax
movsbl (%rax),%r8d
lea    0xb50(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
jmp    1571 <vink_tree_load_cfg+0x3a1>
mov    0x2a8c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
mov    -0x1158(%rbp),%rax
movsbl (%rax),%r8d
lea    0xb4f(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
jmp    1576 <vink_tree_load_cfg+0x3a6>
cmpq   $0x0,-0x1038(%rbp)
je     15d9 <vink_tree_load_cfg+0x409>
mov    -0x1038(%rbp),%rax
add    $0x1,%rax
cmp    $0x1000,%rax
jne    15bc <vink_tree_load_cfg+0x3ec>
mov    0x2a36(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0xb36(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1038(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1038(%rbp)
movb   $0x2e,-0x1030(%rbp,%rax,1)
2e
jmp    15de <vink_tree_load_cfg+0x40e>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   10d0 <is_symbol_char@plt>
cmp    $0x0,%rax
je     1667 <vink_tree_load_cfg+0x497>
mov    -0x1038(%rbp),%rax
add    $0x1,%rax
cmp    $0x1000,%rax
jne    162f <vink_tree_load_cfg+0x45f>
mov    0x29c3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0xac3(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
mov    (%rax),%cl
mov    -0x1038(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x1038(%rbp)
mov    %cl,-0x1030(%rbp,%rax,1)
jmp    15de <vink_tree_load_cfg+0x40e>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isspace@plt>
cmp    $0x0,%rax
je     16cd <vink_tree_load_cfg+0x4fd>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movb   $0x0,(%rax)
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isspace@plt>
cmp    $0x0,%rax
je     16c8 <vink_tree_load_cfg+0x4f8>
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
jmp    1698 <vink_tree_load_cfg+0x4c8>
jmp    16cd <vink_tree_load_cfg+0x4fd>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x1178(%rbp)
test   %eax,%eax
je     1726 <vink_tree_load_cfg+0x556>
jmp    16ea <vink_tree_load_cfg+0x51a>
mov    -0x1178(%rbp),%eax
sub    $0x2e,%eax
je     1747 <vink_tree_load_cfg+0x577>
jmp    16fe <vink_tree_load_cfg+0x52e>
mov    -0x1178(%rbp),%eax
sub    $0x7b,%eax
je     176e <vink_tree_load_cfg+0x59e>
jmp    1712 <vink_tree_load_cfg+0x542>
mov    -0x1178(%rbp),%eax
sub    $0x7d,%eax
je     17e8 <vink_tree_load_cfg+0x618>
jmp    1814 <vink_tree_load_cfg+0x644>
mov    0x28ab(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0x9c8(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
movl   $0x1,-0x114c(%rbp)
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movb   $0x0,(%rax)
jmp    181e <vink_tree_load_cfg+0x64e>
cmpq   $0x20,-0x1148(%rbp)
20
jne    179d <vink_tree_load_cfg+0x5cd>
mov    0x2855(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0x99d(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1038(%rbp),%rcx
mov    -0x1148(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x1148(%rbp)
mov    %rcx,-0x1140(%rbp,%rax,8)
ff
movl   $0x1,-0x114c(%rbp)
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movb   $0x0,(%rax)
jmp    181e <vink_tree_load_cfg+0x64e>
mov    0x27e9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
mov    -0x1158(%rbp),%rax
movsbl (%rax),%r8d
lea    0x946(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
movl   $0x0,-0x114c(%rbp)
jmp    1a89 <vink_tree_load_cfg+0x8b9>
mov    -0x1158(%rbp),%rax
mov    %rax,-0x1168(%rbp)
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    198c <vink_tree_load_cfg+0x7bc>
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
mov    %rax,-0x1168(%rbp)
mov    %rax,-0x1170(%rbp)
mov    -0x1158(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1895 <vink_tree_load_cfg+0x6c5>
mov    0x275d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0x8e9(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    191f <vink_tree_load_cfg+0x74f>
mov    -0x1158(%rbp),%rax
cmpb   $0x0,0x1(%rax)
jne    18da <vink_tree_load_cfg+0x70a>
mov    0x2718(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x115c(%rbp),%ecx
lea    0x8a4(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
mov    (%rax),%cl
mov    -0x1170(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x1170(%rbp)
mov    %cl,(%rax)
jmp    196a <vink_tree_load_cfg+0x79a>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1937 <vink_tree_load_cfg+0x767>
jmp    196f <vink_tree_load_cfg+0x79f>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
mov    (%rax),%cl
mov    -0x1170(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x1170(%rbp)
mov    %cl,(%rax)
jmp    196a <vink_tree_load_cfg+0x79a>
jmp    1864 <vink_tree_load_cfg+0x694>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movb   $0x0,(%rax)
jmp    1a21 <vink_tree_load_cfg+0x851>
jmp    1991 <vink_tree_load_cfg+0x7c1>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1179(%rbp)
je     19ca <vink_tree_load_cfg+0x7fa>
mov    -0x1158(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isspace@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x1179(%rbp)
mov    -0x1179(%rbp),%al
test   $0x1,%al
jne    19dd <vink_tree_load_cfg+0x80d>
jmp    19f4 <vink_tree_load_cfg+0x824>
mov    -0x1158(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1158(%rbp)
jmp    1991 <vink_tree_load_cfg+0x7c1>
mov    -0x1158(%rbp),%rax
cmpb   $0x0,(%rax)
je     1a1c <vink_tree_load_cfg+0x84c>
mov    -0x1158(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x1158(%rbp)
movb   $0x0,(%rax)
jmp    1a21 <vink_tree_load_cfg+0x851>
mov    -0x1038(%rbp),%rax
movb   $0x0,-0x1030(%rbp,%rax,1)
mov    -0x18(%rbp),%rdi
lea    -0x1030(%rbp),%rsi
mov    -0x1168(%rbp),%rdx
call   1040 <vink_tree_create_node@plt>
cmpq   $0x0,-0x1148(%rbp)
je     1a74 <vink_tree_load_cfg+0x8a4>
mov    -0x1148(%rbp),%rax
sub    $0x1,%rax
mov    -0x1140(%rbp,%rax,8),%rax
ff
mov    %rax,-0x1038(%rbp)
jmp    1a7f <vink_tree_load_cfg+0x8af>
movq   $0x0,-0x1038(%rbp)
movl   $0x1,-0x114c(%rbp)
jmp    1337 <vink_tree_load_cfg+0x167>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vink_tree_load_cfg>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1128,%rsp
mov    %rdi,%r12
call   10e0 <vink_tree_create@plt>
mov    %rax,%r14
mov    0x2ded(%rip),%rax
mov    (%rax),%esi
mov    %r12,%rdi
call   10c0 <open@plt>
cmp    $0xffffffff,%eax
je     1777 <vink_tree_load_cfg+0x5a7>
mov    %eax,%r15d
mov    0x2dd8(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
jne    123e <vink_tree_load_cfg+0x6e>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
lea    0xdcc(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <err@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
cmp    $0xffffffff,%eax
jne    1270 <vink_tree_load_cfg+0xa0>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
lea    0xdbc(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <err@plt>
lea    0x1(%r13),%ebx
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    12a0 <vink_tree_load_cfg+0xd0>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
movslq %ebx,%rcx
lea    0xdb0(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <err@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %r12,%rcx
call   10f0 <read_all@plt>
movslq %r13d,%rax
movb   $0x0,0x0(%rbp,%rax,1)
mov    %r15d,%edi
call   1070 <close@plt>
mov    %rbp,0x10(%rsp)
mov    0x0(%rbp),%al
test   %al,%al
je     176d <vink_tree_load_cfg+0x59d>
mov    $0x1,%ebp
mov    0x10(%rsp),%r15
movl   $0x1,(%rsp)
xor    %ecx,%ecx
mov    %rcx,0x8(%rsp)
xor    %ebx,%ebx
mov    %r15,%r13
mov    %rbx,%r15
mov    %r13,%rbx
jmp    130b <vink_tree_load_cfg+0x13b>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
test   %al,%al
je     176d <vink_tree_load_cfg+0x59d>
movsbl %al,%edi
call   1080 <isspace@plt>
test   %rax,%rax
je     1350 <vink_tree_load_cfg+0x180>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
cmpb   $0xa,(%rbx)
lea    0x1(%rbx),%r13
sete   %al
add    %eax,%ebp
movsbl 0x1(%rbx),%edi
call   1080 <isspace@plt>
mov    %r13,%rbx
test   %rax,%rax
jne    1320 <vink_tree_load_cfg+0x150>
jmp    1353 <vink_tree_load_cfg+0x183>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%r13
mov    0x0(%r13),%al
cmp    $0x23,%al
jne    1390 <vink_tree_load_cfg+0x1c0>
mov    %r13,%rbx
test   %al,%al
je     1300 <vink_tree_load_cfg+0x130>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0xa,%al
je     1300 <vink_tree_load_cfg+0x130>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1370 <vink_tree_load_cfg+0x1a0>
jmp    1300 <vink_tree_load_cfg+0x130>
cs nopw 0x0(%rax,%rax,1)
nop
test   %al,%al
je     176d <vink_tree_load_cfg+0x59d>
cmp    $0x7d,%al
jne    13ff <vink_tree_load_cfg+0x22f>
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
jne    13cb <vink_tree_load_cfg+0x1fb>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
lea    0xcbd(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
mov    $0xffffffffffffffff,%rax
jmp    13d4 <vink_tree_load_cfg+0x204>
mov    %rbx,%rax
add    $0xffffffffffffffff,%rax
je     13f3 <vink_tree_load_cfg+0x223>
mov    0x10(%rsp,%rbx,8),%r15
mov    %rax,0x8(%rsp)
mov    0x1(%r13),%al
add    $0x1,%r13
test   %al,%al
jne    12f1 <vink_tree_load_cfg+0x121>
jmp    176d <vink_tree_load_cfg+0x59d>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r15d,%r15d
jmp    13de <vink_tree_load_cfg+0x20e>
cmpl   $0x0,(%rsp)
je     1456 <vink_tree_load_cfg+0x286>
movsbl %al,%edi
call   10d0 <is_symbol_char@plt>
test   %rax,%rax
je     14a3 <vink_tree_load_cfg+0x2d3>
test   %r15,%r15
je     14e5 <vink_tree_load_cfg+0x315>
lea    0x1(%r15),%rbx
cmp    $0x1000,%rbx
jne    1448 <vink_tree_load_cfg+0x278>
mov    0x2ba5(%rip),%rax
mov    (%rax),%edi
lea    0xcaf(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
movb   $0x2e,0x120(%rsp,%r15,1)
jmp    14e7 <vink_tree_load_cfg+0x317>
mov    %r15,(%rsp)
cmp    $0x22,%al
je     15f1 <vink_tree_load_cfg+0x421>
mov    %r13,%r15
test   %al,%al
jne    1480 <vink_tree_load_cfg+0x2b0>
mov    %r13,%r15
jmp    1711 <vink_tree_load_cfg+0x541>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1080 <isspace@plt>
test   %rax,%rax
jne    1703 <vink_tree_load_cfg+0x533>
movzbl 0x1(%r15),%eax
add    $0x1,%r15
test   %al,%al
jne    1480 <vink_tree_load_cfg+0x2b0>
jmp    1711 <vink_tree_load_cfg+0x541>
movsbl 0x0(%r13),%edi
call   10b0 <isprint@plt>
test   %rax,%rax
mov    0x2b21(%rip),%rax
mov    (%rax),%edi
movsbl 0x0(%r13),%r8d
lea    0xbc4(%rip),%rsi
lea    0xbed(%rip),%rax
cmove  %rax,%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
test   %r15,%r15
jne    141f <vink_tree_load_cfg+0x24f>
xor    %ebx,%ebx
movsbl 0x0(%r13),%edi
call   10d0 <is_symbol_char@plt>
test   %rax,%rax
jne    158a <vink_tree_load_cfg+0x3ba>
mov    %r13,%r15
movsbl (%r15),%edi
call   1080 <isspace@plt>
test   %rax,%rax
je     1523 <vink_tree_load_cfg+0x353>
movb   $0x0,(%r15)
nop
movsbl 0x1(%r15),%edi
add    $0x1,%r15
call   1080 <isspace@plt>
test   %rax,%rax
jne    1510 <vink_tree_load_cfg+0x340>
mov    (%r15),%al
movsbl %al,%ecx
cmp    $0x7a,%ecx
jg     15b1 <vink_tree_load_cfg+0x3e1>
test   %ecx,%ecx
je     1696 <vink_tree_load_cfg+0x4c6>
cmp    $0x2e,%ecx
je     16eb <vink_tree_load_cfg+0x51b>
movl   $0x0,(%rsp)
test   %al,%al
jne    12eb <vink_tree_load_cfg+0x11b>
jmp    176d <vink_tree_load_cfg+0x59d>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r13),%r15
movzbl 0x0(%r13),%eax
mov    %al,0x120(%rsp,%rbx,1)
movsbl 0x1(%r13),%edi
call   10d0 <is_symbol_char@plt>
add    $0x1,%rbx
mov    %r15,%r13
test   %rax,%rax
je     14fd <vink_tree_load_cfg+0x32d>
cmp    $0xfff,%rbx
jne    1560 <vink_tree_load_cfg+0x390>
mov    0x2a3e(%rip),%rax
mov    (%rax),%edi
lea    0xb48(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
jmp    1560 <vink_tree_load_cfg+0x390>
cmp    $0x7b,%ecx
je     16b4 <vink_tree_load_cfg+0x4e4>
cmp    $0x7d,%ecx
jne    175e <vink_tree_load_cfg+0x58e>
mov    0x2a0e(%rip),%rax
mov    (%rax),%edi
movl   $0x0,(%rsp)
lea    0xb79(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
mov    $0x7d,%r8d
xor    %eax,%eax
call   1050 <errx@plt>
jmp    1751 <vink_tree_load_cfg+0x581>
mov    %r14,0x18(%rsp)
add    $0x1,%r13
mov    %r13,%r15
mov    %r13,%rbx
jmp    1627 <vink_tree_load_cfg+0x457>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%r14d
cmp    $0x22,%al
je     16fc <vink_tree_load_cfg+0x52c>
add    %r14,%r15
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%r15),%eax
test   %al,%al
je     1640 <vink_tree_load_cfg+0x470>
cmp    $0x5c,%al
jne    1610 <vink_tree_load_cfg+0x440>
jmp    1664 <vink_tree_load_cfg+0x494>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x2991(%rip),%rax
mov    (%rax),%edi
lea    0xb27(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
movzbl (%r15),%eax
cmp    $0x5c,%al
jne    1610 <vink_tree_load_cfg+0x440>
movzbl 0x1(%r15),%eax
mov    $0x2,%r14d
test   %al,%al
jne    161e <vink_tree_load_cfg+0x44e>
mov    0x295e(%rip),%rax
mov    (%rax),%edi
lea    0xaf4(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
movzbl 0x1(%r15),%eax
jmp    161e <vink_tree_load_cfg+0x44e>
mov    0x293b(%rip),%rax
mov    (%rax),%edi
lea    0xa62(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
jmp    16eb <vink_tree_load_cfg+0x51b>
cmpq   $0x20,0x8(%rsp)
jne    16d8 <vink_tree_load_cfg+0x508>
mov    0x2915(%rip),%rax
mov    (%rax),%edi
lea    0xa67(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <errx@plt>
mov    0x8(%rsp),%rax
mov    %rbx,0x20(%rsp,%rax,8)
add    $0x1,%rax
mov    %rax,0x8(%rsp)
movb   $0x0,(%r15)
add    $0x1,%r15
movl   $0x1,(%rsp)
jmp    1751 <vink_tree_load_cfg+0x581>
mov    0x18(%rsp),%r14
jmp    1709 <vink_tree_load_cfg+0x539>
cmpb   $0x0,(%r15)
je     1711 <vink_tree_load_cfg+0x541>
movb   $0x0,(%r15)
add    $0x1,%r15
mov    (%rsp),%rax
movb   $0x0,0x120(%rsp,%rax,1)
mov    %r14,%rdi
lea    0x120(%rsp),%rsi
mov    %r13,%rdx
call   1040 <vink_tree_create_node@plt>
movl   $0x1,(%rsp)
mov    0x8(%rsp),%rax
test   %rax,%rax
je     1748 <vink_tree_load_cfg+0x578>
mov    0x18(%rsp,%rax,8),%rbx
jmp    1751 <vink_tree_load_cfg+0x581>
xor    %ebx,%ebx
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    (%r15),%al
test   %al,%al
jne    12eb <vink_tree_load_cfg+0x11b>
jmp    176d <vink_tree_load_cfg+0x59d>
movl   $0x0,(%rsp)
test   %al,%al
jne    12eb <vink_tree_load_cfg+0x11b>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x1128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.vink_tree = type { i32 }
@O_RDONLY = global i32 0
@SEEK_END = global i32 0
@EX_OSERR = global i32 0
@.str = [34 x i8] c"%s: failed to seek to end of file\00"
@SEEK_SET = global i32 0
@.str.1 = [36 x i8] c"%s: failed to seek to start of file\00"
@.str.2 = [45 x i8] c"%s: failed to allocate %zu bytes for parsing\00"
@EX_DATAERR = global i32 0
@.str.3 = [22 x i8] c"%s:%d: unexpected '}'\00"
@.str.4 = [48 x i8] c"%s:%d: unexpected '%c' while looking for symbol\00"
@.str.5 = [50 x i8] c"%s:%d: unexpected 0x%02x while looking for symbol\00"
@.str.6 = [29 x i8] c"%s:%d: symbol stack overflow\00"
@.str.7 = [43 x i8] c"%s:%d: unexpected end-of-file after symbol\00"
@.str.8 = [32 x i8] c"%s:%d: too many nested sections\00"
@.str.9 = [36 x i8] c"%s:%d: unexpected '%c' after symbol\00"
@.str.10 = [40 x i8] c"%s:%d: unexpected end-of-file in string\00"
define %struct.vink_tree* @vink_tree_load_cfg(i8* %0) {
%2 = alloca %struct.vink_tree*
%3 = alloca i8*
%4 = alloca %struct.vink_tree*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca [4096 x i8]
%9 = alloca i64
%10 = alloca [32 x i64]
%11 = alloca i64
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
store i8* %0, i8** %3
store i64 0, i64* %9
store i64 0, i64* %11
store i32 1, i32* %12
store i32 1, i32* %14
%17 = load i8*, i8** %3
%18 = call %struct.vink_tree* @vink_tree_create(i8* %17)
store %struct.vink_tree* %18, %struct.vink_tree** %4
%19 = load i8*, i8** %3
%20 = load i32, i32* @O_RDONLY
%21 = call i32 @open(i8* %19, i32 %20)
store i32 %21, i32* %7
%22 = icmp eq i32 -1, %21
br i1 %22, label %23, label %25
23: ; preds = %1
%24 = load %struct.vink_tree*, %struct.vink_tree** %4
store %struct.vink_tree* %24, %struct.vink_tree** %2
br label %369
25: ; preds = %1
%26 = load i32, i32* %7
%27 = load i32, i32* @SEEK_END
%28 = call i32 @lseek(i32 %26, i32 0, i32 %27)
store i32 %28, i32* %6
%29 = icmp eq i32 -1, %28
br i1 %29, label %30, label %34
30: ; preds = %25
%31 = load i32, i32* @EX_OSERR
%32 = load i8*, i8** %3
%33 = call i32 (i32, i8*, i8*, ...) @err(i32 %31, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %30, %25
%35 = load i32, i32* %7
%36 = load i32, i32* @SEEK_SET
%37 = call i32 @lseek(i32 %35, i32 0, i32 %36)
%38 = icmp eq i32 -1, %37
br i1 %38, label %39, label %43
39: ; preds = %34
%40 = load i32, i32* @EX_OSERR
%41 = load i8*, i8** %3
%42 = call i32 (i32, i8*, i8*, ...) @err(i32 %40, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %41)
br label %43
43: ; preds = %39, %34
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
%46 = call i8* @malloc(i32 %45)
store i8* %46, i8** %5
%47 = icmp eq i8* null, %46
br i1 %47, label %48, label %55
48: ; preds = %43
%49 = load i32, i32* @EX_OSERR
%50 = load i8*, i8** %3
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = call i32 (i32, i8*, i8*, ...) @err(i32 %49, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %50, i64 %53)
br label %55
55: ; preds = %48, %43
%56 = load i32, i32* %7
%57 = load i8*, i8** %5
%58 = load i32, i32* %6
%59 = load i8*, i8** %3
%60 = call i32 @read_all(i32 %56, i8* %57, i32 %58, i8* %59)
%61 = load i8*, i8** %5
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %61, i64 %63
store i8 0, i8* %64
%65 = load i32, i32* %7
%66 = call i32 @close(i32 %65)
%67 = load i8*, i8** %5
store i8* %67, i8** %13
br label %68
68: ; preds = %364, %140, %114, %55
%69 = load i8*, i8** %13
%70 = load i8, i8* %69
%71 = icmp ne i8 %70, 0
br i1 %71, label %72, label %365
72: ; preds = %68
br label %73
73: ; preds = %87, %72
%74 = load i8*, i8** %13
%75 = load i8, i8* %74
%76 = call i64 @isspace(i8 signext %75)
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %88
78: ; preds = %73
%79 = load i8*, i8** %13
%80 = getelementptr inbounds i8, i8* %79, i32 1
store i8* %80, i8** %13
%81 = load i8, i8* %79
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 10
br i1 %83, label %84, label %87
84: ; preds = %78
%85 = load i32, i32* %14
%86 = add nsw i32 %85, 1
store i32 %86, i32* %14
br label %87
87: ; preds = %84, %78
br label %73
88: ; preds = %73
%89 = load i8*, i8** %13
%90 = load i8, i8* %89
%91 = icmp ne i8 %90, 0
br i1 %91, label %93, label %92
92: ; preds = %88
br label %365
93: ; preds = %88
%94 = load i8*, i8** %13
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %96, 35
br i1 %97, label %98, label %117
98: ; preds = %93
br label %99
99: ; preds = %111, %98
%100 = load i8*, i8** %13
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp ne i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %99
%105 = load i8*, i8** %13
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp ne i32 %107, 10
br label %109
109: ; preds = %104, %99
%110 = phi i1 [ false, %99 ], [ %108, %104 ]
br i1 %110, label %111, label %114
111: ; preds = %109
%112 = load i8*, i8** %13
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %13
br label %99
114: ; preds = %109
%115 = load i32, i32* %14
%116 = add nsw i32 %115, 1
store i32 %116, i32* %14
br label %68
117: ; preds = %93
%118 = load i8*, i8** %13
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp eq i32 %120, 125
br i1 %121, label %122, label %143
122: ; preds = %117
%123 = load i64, i64* %11
%124 = icmp ne i64 %123, 0
br i1 %124, label %130, label %125
125: ; preds = %122
%126 = load i32, i32* @EX_DATAERR
%127 = load i8*, i8** %3
%128 = load i32, i32* %14
%129 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %126, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %127, i32 %128)
br label %130
130: ; preds = %125, %122
%131 = load i64, i64* %11
%132 = add i64 %131, -1
store i64 %132, i64* %11
%133 = icmp ne i64 %132, 0
br i1 %133, label %135, label %134
134: ; preds = %130
store i64 0, i64* %9
br label %140
135: ; preds = %130
%136 = load i64, i64* %11
%137 = sub i64 %136, 1
%138 = getelementptr inbounds [32 x i64], [32 x i64]* %10, i64 0, i64 %137
%139 = load i64, i64* %138
store i64 %139, i64* %9
br label %140
140: ; preds = %135, %134
%141 = load i8*, i8** %13
%142 = getelementptr inbounds i8, i8* %141, i32 1
store i8* %142, i8** %13
br label %68
143: ; preds = %117
%144 = load i32, i32* %12
%145 = icmp ne i32 %144, 0
br i1 %145, label %146, label %265
146: ; preds = %143
%147 = load i8*, i8** %13
%148 = load i8, i8* %147
%149 = call i64 @is_symbol_char(i8 signext %148)
%150 = icmp ne i64 %149, 0
br i1 %150, label %173, label %151
151: ; preds = %146
%152 = load i8*, i8** %13
%153 = load i8, i8* %152
%154 = call i64 @isprint(i8 signext %153)
%155 = icmp ne i64 %154, 0
br i1 %155, label %156, label %164
156: ; preds = %151
%157 = load i32, i32* @EX_DATAERR
%158 = load i8*, i8** %3
%159 = load i32, i32* %14
%160 = load i8*, i8** %13
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %157, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* %158, i32 %159, i32 %162)
br label %172
164: ; preds = %151
%165 = load i32, i32* @EX_DATAERR
%166 = load i8*, i8** %3
%167 = load i32, i32* %14
%168 = load i8*, i8** %13
%169 = load i8, i8* %168
%170 = sext i8 %169 to i32
%171 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %165, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8* %166, i32 %167, i32 %170)
br label %172
172: ; preds = %164, %156
br label %173
173: ; preds = %172, %146
%174 = load i64, i64* %9
%175 = icmp ne i64 %174, 0
br i1 %175, label %176, label %189
176: ; preds = %173
%177 = load i64, i64* %9
%178 = add i64 %177, 1
%179 = icmp eq i64 %178, 4096
br i1 %179, label %180, label %185
180: ; preds = %176
%181 = load i32, i32* @EX_DATAERR
%182 = load i8*, i8** %3
%183 = load i32, i32* %14
%184 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %181, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %182, i32 %183)
br label %185
185: ; preds = %180, %176
%186 = load i64, i64* %9
%187 = add i64 %186, 1
store i64 %187, i64* %9
%188 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 %186
store i8 46, i8* %188
br label %189
189: ; preds = %185, %173
br label %190
190: ; preds = %204, %189
%191 = load i8*, i8** %13
%192 = load i8, i8* %191
%193 = call i64 @is_symbol_char(i8 signext %192)
%194 = icmp ne i64 %193, 0
br i1 %194, label %195, label %211
195: ; preds = %190
%196 = load i64, i64* %9
%197 = add i64 %196, 1
%198 = icmp eq i64 %197, 4096
br i1 %198, label %199, label %204
199: ; preds = %195
%200 = load i32, i32* @EX_DATAERR
%201 = load i8*, i8** %3
%202 = load i32, i32* %14
%203 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %201, i32 %202)
br label %204
204: ; preds = %199, %195
%205 = load i8*, i8** %13
%206 = getelementptr inbounds i8, i8* %205, i32 1
store i8* %206, i8** %13
%207 = load i8, i8* %205
%208 = load i64, i64* %9
%209 = add i64 %208, 1
store i64 %209, i64* %9
%210 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 %208
store i8 %207, i8* %210
br label %190
211: ; preds = %190
%212 = load i8*, i8** %13
%213 = load i8, i8* %212
%214 = call i64 @isspace(i8 signext %213)
%215 = icmp ne i64 %214, 0
br i1 %215, label %216, label %228
216: ; preds = %211
%217 = load i8*, i8** %13
%218 = getelementptr inbounds i8, i8* %217, i32 1
store i8* %218, i8** %13
store i8 0, i8* %217
br label %219
219: ; preds = %224, %216
%220 = load i8*, i8** %13
%221 = load i8, i8* %220
%222 = call i64 @isspace(i8 signext %221)
%223 = icmp ne i64 %222, 0
br i1 %223, label %224, label %227
224: ; preds = %219
%225 = load i8*, i8** %13
%226 = getelementptr inbounds i8, i8* %225, i32 1
store i8* %226, i8** %13
br label %219
227: ; preds = %219
br label %228
228: ; preds = %227, %211
%229 = load i8*, i8** %13
%230 = load i8, i8* %229
%231 = sext i8 %230 to i32
switch i32 %231, label %263 [
i32 0, label %232
i32 46, label %237
i32 123, label %240
i32 125, label %255
]
232: ; preds = %228
%233 = load i32, i32* @EX_DATAERR
%234 = load i8*, i8** %3
%235 = load i32, i32* %14
%236 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %233, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %234, i32 %235)
br label %237
237: ; preds = %228, %232
store i32 1, i32* %12
%238 = load i8*, i8** %13
%239 = getelementptr inbounds i8, i8* %238, i32 1
store i8* %239, i8** %13
store i8 0, i8* %238
br label %264
240: ; preds = %228
%241 = load i64, i64* %11
%242 = icmp eq i64 %241, 32
br i1 %242, label %243, label %248
243: ; preds = %240
%244 = load i32, i32* @EX_DATAERR
%245 = load i8*, i8** %3
%246 = load i32, i32* %14
%247 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %244, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %245, i32 %246)
br label %248
248: ; preds = %243, %240
%249 = load i64, i64* %9
%250 = load i64, i64* %11
%251 = add i64 %250, 1
store i64 %251, i64* %11
%252 = getelementptr inbounds [32 x i64], [32 x i64]* %10, i64 0, i64 %250
store i64 %249, i64* %252
store i32 1, i32* %12
%253 = load i8*, i8** %13
%254 = getelementptr inbounds i8, i8* %253, i32 1
store i8* %254, i8** %13
store i8 0, i8* %253
br label %264
255: ; preds = %228
%256 = load i32, i32* @EX_DATAERR
%257 = load i8*, i8** %3
%258 = load i32, i32* %14
%259 = load i8*, i8** %13
%260 = load i8, i8* %259
%261 = sext i8 %260 to i32
%262 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %256, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i8* %257, i32 %258, i32 %261)
br label %263
263: ; preds = %228, %255
store i32 0, i32* %12
br label %264
264: ; preds = %263, %248, %237
br label %364
265: ; preds = %143
%266 = load i8*, i8** %13
store i8* %266, i8** %15
%267 = load i8*, i8** %13
%268 = load i8, i8* %267
%269 = sext i8 %268 to i32
%270 = icmp eq i32 %269, 34
br i1 %270, label %271, label %323
271: ; preds = %265
%272 = load i8*, i8** %13
%273 = getelementptr inbounds i8, i8* %272, i32 1
store i8* %273, i8** %13
store i8* %273, i8** %15
store i8* %273, i8** %16
br label %274
274: ; preds = %319, %271
%275 = load i8*, i8** %13
%276 = load i8, i8* %275
%277 = icmp ne i8 %276, 0
br i1 %277, label %283, label %278
278: ; preds = %274
%279 = load i32, i32* @EX_DATAERR
%280 = load i8*, i8** %3
%281 = load i32, i32* %14
%282 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %279, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i8* %280, i32 %281)
br label %283
283: ; preds = %278, %274
%284 = load i8*, i8** %13
%285 = load i8, i8* %284
%286 = sext i8 %285 to i32
%287 = icmp eq i32 %286, 92
br i1 %287, label %288, label %306
288: ; preds = %283
%289 = load i8*, i8** %13
%290 = getelementptr inbounds i8, i8* %289, i64 1
%291 = load i8, i8* %290
%292 = icmp ne i8 %291, 0
br i1 %292, label %298, label %293
293: ; preds = %288
%294 = load i32, i32* @EX_DATAERR
%295 = load i8*, i8** %3
%296 = load i32, i32* %14
%297 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %294, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i8* %295, i32 %296)
br label %298
298: ; preds = %293, %288
%299 = load i8*, i8** %13
%300 = getelementptr inbounds i8, i8* %299, i32 1
store i8* %300, i8** %13
%301 = load i8*, i8** %13
%302 = getelementptr inbounds i8, i8* %301, i32 1
store i8* %302, i8** %13
%303 = load i8, i8* %301
%304 = load i8*, i8** %16
%305 = getelementptr inbounds i8, i8* %304, i32 1
store i8* %305, i8** %16
store i8 %303, i8* %304
br label %319
306: ; preds = %283
%307 = load i8*, i8** %13
%308 = load i8, i8* %307
%309 = sext i8 %308 to i32
%310 = icmp eq i32 %309, 34
br i1 %310, label %311, label %312
311: ; preds = %306
br label %320
312: ; preds = %306
%313 = load i8*, i8** %13
%314 = getelementptr inbounds i8, i8* %313, i32 1
store i8* %314, i8** %13
%315 = load i8, i8* %313
%316 = load i8*, i8** %16
%317 = getelementptr inbounds i8, i8* %316, i32 1
store i8* %317, i8** %16
store i8 %315, i8* %316
br label %318
318: ; preds = %312
br label %319
319: ; preds = %318, %298
br label %274
320: ; preds = %311
%321 = load i8*, i8** %13
%322 = getelementptr inbounds i8, i8* %321, i32 1
store i8* %322, i8** %13
store i8 0, i8* %321
br label %348
323: ; preds = %265
br label %324
324: ; preds = %337, %323
%325 = load i8*, i8** %13
%326 = load i8, i8* %325
%327 = sext i8 %326 to i32
%328 = icmp ne i32 %327, 0
br i1 %328, label %329, label %335
329: ; preds = %324
%330 = load i8*, i8** %13
%331 = load i8, i8* %330
%332 = call i64 @isspace(i8 signext %331)
%333 = icmp ne i64 %332, 0
%334 = xor i1 %333, true
br label %335
335: ; preds = %329, %324
%336 = phi i1 [ false, %324 ], [ %334, %329 ]
br i1 %336, label %337, label %340
337: ; preds = %335
%338 = load i8*, i8** %13
%339 = getelementptr inbounds i8, i8* %338, i32 1
store i8* %339, i8** %13
br label %324
340: ; preds = %335
%341 = load i8*, i8** %13
%342 = load i8, i8* %341
%343 = icmp ne i8 %342, 0
br i1 %343, label %344, label %347
344: ; preds = %340
%345 = load i8*, i8** %13
%346 = getelementptr inbounds i8, i8* %345, i32 1
store i8* %346, i8** %13
store i8 0, i8* %345
br label %347
347: ; preds = %344, %340
br label %348
348: ; preds = %347, %320
%349 = load i64, i64* %9
%350 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 %349
store i8 0, i8* %350
%351 = load %struct.vink_tree*, %struct.vink_tree** %4
%352 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%353 = load i8*, i8** %15
%354 = call i32 @vink_tree_create_node(%struct.vink_tree* %351, i8* %352, i8* %353)
%355 = load i64, i64* %11
%356 = icmp ne i64 %355, 0
br i1 %356, label %357, label %362
357: ; preds = %348
%358 = load i64, i64* %11
%359 = sub i64 %358, 1
%360 = getelementptr inbounds [32 x i64], [32 x i64]* %10, i64 0, i64 %359
%361 = load i64, i64* %360
store i64 %361, i64* %9
br label %363
362: ; preds = %348
store i64 0, i64* %9
br label %363
363: ; preds = %362, %357
store i32 1, i32* %12
br label %364
364: ; preds = %363, %264
br label %68
365: ; preds = %92, %68
%366 = load i8*, i8** %5
%367 = call i32 @free(i8* %366)
%368 = load %struct.vink_tree*, %struct.vink_tree** %4
store %struct.vink_tree* %368, %struct.vink_tree** %2
br label %369
369: ; preds = %365, %23
%370 = load %struct.vink_tree*, %struct.vink_tree** %2
ret %struct.vink_tree* %370
}

LLVM IR (-O2):
%struct.vink_tree = type { i32 }
@O_RDONLY = global i32 0
@SEEK_END = global i32 0
@EX_OSERR = global i32 0
@.str = [34 x i8] c"%s: failed to seek to end of file\00"
@SEEK_SET = global i32 0
@.str.1 = [36 x i8] c"%s: failed to seek to start of file\00"
@.str.2 = [45 x i8] c"%s: failed to allocate %zu bytes for parsing\00"
@EX_DATAERR = global i32 0
@.str.3 = [22 x i8] c"%s:%d: unexpected '}'\00"
@.str.4 = [48 x i8] c"%s:%d: unexpected '%c' while looking for symbol\00"
@.str.5 = [50 x i8] c"%s:%d: unexpected 0x%02x while looking for symbol\00"
@.str.6 = [29 x i8] c"%s:%d: symbol stack overflow\00"
@.str.7 = [43 x i8] c"%s:%d: unexpected end-of-file after symbol\00"
@.str.8 = [32 x i8] c"%s:%d: too many nested sections\00"
@.str.9 = [36 x i8] c"%s:%d: unexpected '%c' after symbol\00"
@.str.10 = [40 x i8] c"%s:%d: unexpected end-of-file in string\00"
define %struct.vink_tree* @vink_tree_load_cfg(i8* %0) {
%2 = alloca [4096 x i8]
%3 = alloca [32 x i64]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%5 = bitcast [32 x i64]* %3 to i8*
%6 = tail call %struct.vink_tree* @vink_tree_create(i8* %0)
%7 = load i32, i32* @O_RDONLY
%8 = tail call i32 @open(i8* %0, i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %247, label %10
10: ; preds = %1
%11 = load i32, i32* @SEEK_END
%12 = tail call i32 @lseek(i32 %8, i32 0, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* @EX_OSERR
%16 = tail call i32 (i32, i8*, i8*, ...) @err(i32 %15, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %17
17: ; preds = %14, %10
%18 = load i32, i32* @SEEK_SET
%19 = tail call i32 @lseek(i32 %8, i32 0, i32 %18)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i32, i32* @EX_OSERR
%23 = tail call i32 (i32, i8*, i8*, ...) @err(i32 %22, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %24
24: ; preds = %21, %17
%25 = add nsw i32 %12, 1
%26 = tail call i8* @malloc(i32 %25)
%27 = icmp eq i8* %26, null
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load i32, i32* @EX_OSERR
%30 = sext i32 %25 to i64
%31 = tail call i32 (i32, i8*, i8*, ...) @err(i32 %29, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %0, i64 %30)
br label %32
32: ; preds = %28, %24
%33 = tail call i32 @read_all(i32 %8, i8* %26, i32 %12, i8* %0)
%34 = sext i32 %12 to i64
%35 = getelementptr inbounds i8, i8* %26, i64 %34
store i8 0, i8* %35
%36 = tail call i32 @close(i32 %8)
%37 = load i8, i8* %26
%38 = icmp eq i8 %37, 0
br i1 %38, label %245, label %39
39: ; preds = %32, %238
%40 = phi i8 [ %239, %238 ], [ %37, %32 ]
%41 = phi i32 [ %71, %238 ], [ 1, %32 ]
%42 = phi i8* [ %243, %238 ], [ %26, %32 ]
%43 = phi i32 [ %242, %238 ], [ 1, %32 ]
%44 = phi i64 [ %241, %238 ], [ 0, %32 ]
%45 = phi i64 [ %240, %238 ], [ 0, %32 ]
br label %46
46: ; preds = %39, %95
%47 = phi i8 [ %40, %39 ], [ %99, %95 ]
%48 = phi i32 [ %41, %39 ], [ %71, %95 ]
%49 = phi i8* [ %42, %39 ], [ %98, %95 ]
%50 = phi i64 [ %44, %39 ], [ %96, %95 ]
%51 = phi i64 [ %45, %39 ], [ %97, %95 ]
br label %52
52: ; preds = %46, %79
%53 = phi i8 [ %47, %46 ], [ %74, %79 ]
%54 = phi i32 [ %48, %46 ], [ %80, %79 ]
%55 = phi i8* [ %49, %46 ], [ %75, %79 ]
%56 = call i64 @isspace(i8 signext %53)
%57 = icmp eq i64 %56, 0
br i1 %57, label %69, label %58
58: ; preds = %52, %58
%59 = phi i32 [ %65, %58 ], [ %54, %52 ]
%60 = phi i8* [ %61, %58 ], [ %55, %52 ]
%61 = getelementptr inbounds i8, i8* %60, i64 1
%62 = load i8, i8* %60
%63 = icmp eq i8 %62, 10
%64 = zext i1 %63 to i32
%65 = add nsw i32 %59, %64
%66 = load i8, i8* %61
%67 = call i64 @isspace(i8 signext %66)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %58
69: ; preds = %58, %52
%70 = phi i8* [ %55, %52 ], [ %61, %58 ]
%71 = phi i32 [ %54, %52 ], [ %65, %58 ]
%72 = load i8, i8* %70
switch i8 %72, label %101 [
i8 0, label %245
i8 35, label %73
i8 125, label %82
]
73: ; preds = %69, %76
%74 = phi i8 [ %78, %76 ], [ %72, %69 ]
%75 = phi i8* [ %77, %76 ], [ %70, %69 ]
switch i8 %74, label %76 [
i8 0, label %79
i8 10, label %79
]
76: ; preds = %73
%77 = getelementptr inbounds i8, i8* %75, i64 1
%78 = load i8, i8* %77
br label %73
79: ; preds = %73, %73
%80 = add nsw i32 %71, 1
%81 = icmp eq i8 %74, 0
br i1 %81, label %245, label %52
82: ; preds = %69
%83 = icmp eq i64 %50, 0
br i1 %83, label %84, label %87
84: ; preds = %82
%85 = load i32, i32* @EX_DATAERR
%86 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %85, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %71)
br label %90
87: ; preds = %82
%88 = add i64 %50, -1
%89 = icmp eq i64 %88, 0
br i1 %89, label %95, label %90
90: ; preds = %84, %87
%91 = phi i64 [ -1, %84 ], [ %88, %87 ]
%92 = add i64 %50, -2
%93 = getelementptr inbounds [32 x i64], [32 x i64]* %3, i64 0, i64 %92
%94 = load i64, i64* %93
br label %95
95: ; preds = %87, %90
%96 = phi i64 [ %91, %90 ], [ 0, %87 ]
%97 = phi i64 [ %94, %90 ], [ 0, %87 ]
%98 = getelementptr inbounds i8, i8* %70, i64 1
%99 = load i8, i8* %98
%100 = icmp eq i8 %99, 0
br i1 %100, label %245, label %46
101: ; preds = %69
%102 = icmp eq i32 %43, 0
br i1 %102, label %179, label %103
103: ; preds = %101
%104 = call i64 @is_symbol_char(i8 signext %72)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %115
106: ; preds = %103
%107 = load i8, i8* %70
%108 = call i64 @isprint(i8 signext %107)
%109 = icmp eq i64 %108, 0
%110 = load i32, i32* @EX_DATAERR
%111 = load i8, i8* %70
%112 = sext i8 %111 to i32
%113 = select i1 %109, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0)
%114 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %110, i8* %113, i8* %0, i32 %71, i32 %112)
br label %115
115: ; preds = %106, %103
%116 = icmp eq i64 %51, 0
br i1 %116, label %125, label %117
117: ; preds = %115
%118 = add i64 %51, 1
%119 = icmp eq i64 %118, 4096
br i1 %119, label %120, label %123
120: ; preds = %117
%121 = load i32, i32* @EX_DATAERR
%122 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %121, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %0, i32 %71)
br label %123
123: ; preds = %120, %117
%124 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %51
store i8 46, i8* %124
br label %125
125: ; preds = %123, %115
%126 = phi i64 [ %118, %123 ], [ 0, %115 ]
%127 = load i8, i8* %70
%128 = call i64 @is_symbol_char(i8 signext %127)
%129 = icmp eq i64 %128, 0
br i1 %129, label %145, label %130
130: ; preds = %125, %138
%131 = phi i8* [ %139, %138 ], [ %70, %125 ]
%132 = phi i64 [ %133, %138 ], [ %126, %125 ]
%133 = add i64 %132, 1
%134 = icmp eq i64 %133, 4096
br i1 %134, label %135, label %138
135: ; preds = %130
%136 = load i32, i32* @EX_DATAERR
%137 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %136, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %0, i32 %71)
br label %138
138: ; preds = %135, %130
%139 = getelementptr inbounds i8, i8* %131, i64 1
%140 = load i8, i8* %131
%141 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %132
store i8 %140, i8* %141
%142 = load i8, i8* %139
%143 = call i64 @is_symbol_char(i8 signext %142)
%144 = icmp eq i64 %143, 0
br i1 %144, label %145, label %130
145: ; preds = %138, %125
%146 = phi i64 [ %126, %125 ], [ %133, %138 ]
%147 = phi i8* [ %70, %125 ], [ %139, %138 ]
%148 = load i8, i8* %147
%149 = call i64 @isspace(i8 signext %148)
%150 = icmp eq i64 %149, 0
br i1 %150, label %158, label %151
151: ; preds = %145
store i8 0, i8* %147
br label %152
152: ; preds = %152, %151
%153 = phi i8* [ %147, %151 ], [ %154, %152 ]
%154 = getelementptr inbounds i8, i8* %153, i64 1
%155 = load i8, i8* %154
%156 = call i64 @isspace(i8 signext %155)
%157 = icmp eq i64 %156, 0
br i1 %157, label %158, label %152
158: ; preds = %152, %145
%159 = phi i8* [ %147, %145 ], [ %154, %152 ]
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
switch i32 %161, label %238 [
i32 0, label %162
i32 46, label %165
i32 123, label %167
i32 125, label %176
]
162: ; preds = %158
%163 = load i32, i32* @EX_DATAERR
%164 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %163, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %0, i32 %71)
br label %165
165: ; preds = %158, %162
%166 = getelementptr inbounds i8, i8* %159, i64 1
store i8 0, i8* %159
br label %232
167: ; preds = %158
%168 = icmp eq i64 %50, 32
br i1 %168, label %169, label %172
169: ; preds = %167
%170 = load i32, i32* @EX_DATAERR
%171 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %170, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %0, i32 %71)
br label %172
172: ; preds = %169, %167
%173 = add i64 %50, 1
%174 = getelementptr inbounds [32 x i64], [32 x i64]* %3, i64 0, i64 %50
store i64 %146, i64* %174
%175 = getelementptr inbounds i8, i8* %159, i64 1
store i8 0, i8* %159
br label %232
176: ; preds = %158
%177 = load i32, i32* @EX_DATAERR
%178 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %177, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i8* %0, i32 %71, i32 125)
br label %232
179: ; preds = %101
switch i8 %72, label %206 [
i8 34, label %180
i8 0, label %222
]
180: ; preds = %179
%181 = getelementptr inbounds i8, i8* %70, i64 1
br label %182
182: ; preds = %201, %180
%183 = phi i8* [ %181, %180 ], [ %204, %201 ]
%184 = phi i8* [ %181, %180 ], [ %205, %201 ]
%185 = load i8, i8* %183
%186 = icmp eq i8 %185, 0
br i1 %186, label %187, label %191
187: ; preds = %182
%188 = load i32, i32* @EX_DATAERR
%189 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %188, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i8* %0, i32 %71)
%190 = load i8, i8* %183
br label %191
191: ; preds = %187, %182
%192 = phi i8 [ %190, %187 ], [ %185, %182 ]
switch i8 %192, label %201 [
i8 92, label %193
i8 34, label %218
]
193: ; preds = %191
%194 = getelementptr inbounds i8, i8* %183, i64 1
%195 = load i8, i8* %194
%196 = icmp eq i8 %195, 0
br i1 %196, label %197, label %201
197: ; preds = %193
%198 = load i32, i32* @EX_DATAERR
%199 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 %198, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i8* %0, i32 %71)
%200 = load i8, i8* %194
br label %201
201: ; preds = %191, %193, %197
%202 = phi i64 [ 2, %197 ], [ 2, %193 ], [ 1, %191 ]
%203 = phi i8 [ %200, %197 ], [ %195, %193 ], [ %192, %191 ]
%204 = getelementptr inbounds i8, i8* %183, i64 %202
%205 = getelementptr inbounds i8, i8* %184, i64 1
store i8 %203, i8* %184
br label %182
206: ; preds = %179, %211
%207 = phi i8* [ %212, %211 ], [ %70, %179 ]
%208 = phi i8 [ %213, %211 ], [ %72, %179 ]
%209 = call i64 @isspace(i8 signext %208)
%210 = icmp eq i64 %209, 0
br i1 %210, label %211, label %215
211: ; preds = %206
%212 = getelementptr inbounds i8, i8* %207, i64 1
%213 = load i8, i8* %212
%214 = icmp eq i8 %213, 0
br i1 %214, label %222, label %206
215: ; preds = %206
%216 = load i8, i8* %207
%217 = icmp eq i8 %216, 0
br i1 %217, label %222, label %218
218: ; preds = %191, %215
%219 = phi i8* [ %207, %215 ], [ %183, %191 ]
%220 = phi i8* [ %70, %215 ], [ %181, %191 ]
%221 = getelementptr inbounds i8, i8* %219, i64 1
store i8 0, i8* %219
br label %222
222: ; preds = %211, %218, %179, %215
%223 = phi i8* [ %207, %215 ], [ %70, %179 ], [ %221, %218 ], [ %212, %211 ]
%224 = phi i8* [ %70, %215 ], [ %70, %179 ], [ %220, %218 ], [ %70, %211 ]
%225 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %51
store i8 0, i8* %225
%226 = call i32 @vink_tree_create_node(%struct.vink_tree* %6, i8* %4, i8* %224)
%227 = icmp eq i64 %50, 0
br i1 %227, label %232, label %228
228: ; preds = %222
%229 = add i64 %50, -1
%230 = getelementptr inbounds [32 x i64], [32 x i64]* %3, i64 0, i64 %229
%231 = load i64, i64* %230
br label %232
232: ; preds = %172, %165, %176, %222, %228
%233 = phi i64 [ 0, %222 ], [ %231, %228 ], [ %146, %176 ], [ %146, %165 ], [ %146, %172 ]
%234 = phi i64 [ 0, %222 ], [ %50, %228 ], [ %50, %176 ], [ %50, %165 ], [ %173, %172 ]
%235 = phi i32 [ 1, %222 ], [ 1, %228 ], [ 0, %176 ], [ 1, %165 ], [ 1, %172 ]
%236 = phi i8* [ %223, %222 ], [ %223, %228 ], [ %159, %176 ], [ %166, %165 ], [ %175, %172 ]
%237 = load i8, i8* %236
br label %238
238: ; preds = %232, %158
%239 = phi i8 [ %237, %232 ], [ %160, %158 ]
%240 = phi i64 [ %233, %232 ], [ %146, %158 ]
%241 = phi i64 [ %234, %232 ], [ %50, %158 ]
%242 = phi i32 [ %235, %232 ], [ 0, %158 ]
%243 = phi i8* [ %236, %232 ], [ %159, %158 ]
%244 = icmp eq i8 %239, 0
br i1 %244, label %245, label %39
245: ; preds = %238, %95, %79, %69, %32
%246 = call i32 @free(i8* %26)
br label %247
247: ; preds = %1, %245
ret %struct.vink_tree* %6
}