#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 */
struct script_section {
  int dummy;
};
struct script {
  int dummy;
};
typedef int /*<<< orphan*/ buffer;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long INT32_MAX;
long long UINT32_MAX;
scalar_t__ ferror(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, size_t,
                           ...);
scalar_t__ isalnum(char);
scalar_t__ isdigit(char);
scalar_t__ memcmp(char *, char *, int);
int /*<<< orphan*/ perror(char *);
char *rtrim(char *, char *);
scalar_t__ script_gpio_entry_new(struct script_section *, char const *, int,
                                 int, int *);
scalar_t__ script_null_entry_new(struct script_section *, char const *);
struct script_section *script_section_new(struct script *, char *);
scalar_t__ script_single_entry_new(struct script_section *, char const *,
                                   long long);
scalar_t__ script_string_entry_new(struct script_section *, char const *, int,
                                   char *);
char *skip_blank(char *);
int /*<<< orphan*/ stderr;
long strtol(char *, char **, int);
long long strtoll(char *, char **, int /*<<< orphan*/);
int script_parse_fex(FILE *in, const char *filename, struct script *script) {
  char buffer[255 + 1];
  int ok = 1;
  struct script_section *last_section = NULL;
  for (size_t line = 1; ok && fgets(buffer, sizeof(buffer), in); line++) {
    char *s = skip_blank(buffer);
    char *pe = s;
    if (*pe)
      while (*++pe)
        ;
    if (pe > s && pe[-1] == '\n') {
      if (pe > s + 1 && pe[-2] == '\r')
        pe -= 2;
      else
        pe -= 1;
      *pe = '\0';
    }
    pe = rtrim(s, pe);
    if (pe == s || *s == ';' || *s == '#')
      continue;
    else if (*s == '[') {
      char *p = ++s;
      while (isalnum(*p) || *p == '_')
        p++;
      if (*p == ']' && *(p + 1) == '\0') {
        *p = '\0';
        if ((last_section = script_section_new(script, s)))
          continue;
        perror("malloc");
      } else if (*p) {
        fprintf(stderr, "E: %s:%zu: invalid character at %zu.\n", filename,
                line, p - buffer + 1);
      } else {
        fprintf(stderr, "E: %s:%zu: incomplete section declaration.\n",
                filename, line);
      }
      ok = 0;
    } else {
      const char *key = s;
      char *mark, *p = s;
      if (!last_section) {
        fprintf(stderr, "E: %s:%zu: data must follow a section.\n", filename,
                line);
        goto parse_error;
      };
      while (isalnum(*p) || *p == '_')
        p++;
      mark = p;
      p = skip_blank(p);
      if (*p != '=')
        goto invalid_char_at_p;
      *mark = '\0';
      p = skip_blank(p + 1);
      if (*p == '\0') {
        if (script_null_entry_new(last_section, key))
          continue;
        perror("malloc");
      } else if (pe > p + 1 && *p == '"' && pe[-1] == '"') {
        p++;
        *--pe = '\0';
        if (script_string_entry_new(last_section, key, pe - p, p)) {

          ;
          continue;
        }
        perror("malloc");
      } else if (memcmp("port:", p, 5) == 0) {
        p += 5;
        if (p[0] == 'P' && (p[1] < 'A' || p[1] > ('A' + 13)))
          ;
        else if (*p != 'P' && memcmp(p, "power", 5) != 0)
          ;
        else {
          char *end;
          int port;
          long v;
          if (*p == 'P') {
            port = p[1] - 'A' + 1;
            p += 2;
          } else {
            port = 0xffff;
            p += 5;
          }
          v = strtol(p, &end, 10);
          if (end == p)
            goto invalid_char_at_p;
          else if (v < 0 || v > 255) {
            fprintf(stderr, "E: %s:%zu: port out of range at %zu (%ld).\n",
                    filename, line, p - buffer + 1, v);
          } else {
            int data[] = {-1, -1, -1, -1};
            int port_num = v;
            p = end;
            for (int i = 0; *p && i < 4; i++) {
              if (memcmp(p, "<default>", 9) == 0) {
                p += 9;
                continue;
              } else if (*p == '<') {
                v = strtol(++p, &end, 10);
                if (end == p) {
                  ;
                } else if (v < 0 || v > INT32_MAX) {
                  fprintf(stderr,
                          "E: %s:%zu: value out of range at %zu (%ld).\n",
                          filename, line, p - buffer + 1, v);
                  goto parse_error;
                } else if (*end != '>') {
                  p = end;
                } else {
                  p = end + 1;
                  data[i] = v;
                  continue;
                }
              }
              break;
            }
            if (*p)
              goto invalid_char_at_p;
            if (script_gpio_entry_new(last_section, key, port, port_num,
                                      data)) {

              ;
              continue;
            }
            perror("malloc");
          }
        }
      } else if (isdigit(*p) || (*p == '-' && isdigit(*(p + 1)))) {
        long long v = 0;
        char *end;
        v = strtoll(p, &end, 0);
        p = end;
        if (p != pe) {
          goto invalid_char_at_p;
        } else if (v > UINT32_MAX) {
          fprintf(stderr, "E: %s:%zu: value out of range %lld.\n", filename,
                  line, v);
        } else if (script_single_entry_new(last_section, key, v)) {

          ;
          continue;
        }
      } else {
        goto invalid_char_at_p;
      }
      goto parse_error;
    invalid_char_at_p:
      fprintf(stderr, "E: %s:%zu: invalid character at %zu.\n", filename, line,
              p - buffer + 1);
    parse_error:
      ok = 0;
    }
  };
  if (ferror(in))
    ok = 0;
  return ok;
}


x86 assembly (clang, -O0):
<script_parse_fex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x124(%rbp)
movq   $0x0,-0x130(%rbp)
movq   $0x1,-0x138(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x124(%rbp)
mov    %al,-0x1a9(%rbp)
je     126e <script_parse_fex+0x6e>
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x100,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1a9(%rbp)
mov    -0x1a9(%rbp),%al
test   $0x1,%al
jne    1281 <script_parse_fex+0x81>
jmp    1ce3 <script_parse_fex+0xae3>
lea    -0x120(%rbp),%rdi
call   1050 <skip_blank@plt>
mov    %rax,-0x140(%rbp)
mov    -0x140(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
cmpb   $0x0,(%rax)
je     12e0 <script_parse_fex+0xe0>
jmp    12b7 <script_parse_fex+0xb7>
mov    -0x148(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x148(%rbp)
cmpb   $0x0,0x1(%rax)
je     12db <script_parse_fex+0xdb>
jmp    12b7 <script_parse_fex+0xb7>
jmp    12e0 <script_parse_fex+0xe0>
mov    -0x148(%rbp),%rax
cmp    -0x140(%rbp),%rax
jbe    136a <script_parse_fex+0x16a>
mov    -0x148(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
jne    136a <script_parse_fex+0x16a>
mov    -0x148(%rbp),%rax
mov    -0x140(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jbe    134e <script_parse_fex+0x14e>
mov    -0x148(%rbp),%rax
movsbl -0x2(%rax),%eax
cmp    $0xd,%eax
jne    134e <script_parse_fex+0x14e>
mov    -0x148(%rbp),%rax
add    $0xfffffffffffffffe,%rax
mov    %rax,-0x148(%rbp)
jmp    1360 <script_parse_fex+0x160>
mov    -0x148(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x140(%rbp),%rdi
mov    -0x148(%rbp),%rsi
call   10b0 <rtrim@plt>
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
cmp    -0x140(%rbp),%rax
je     13be <script_parse_fex+0x1be>
mov    -0x140(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     13be <script_parse_fex+0x1be>
mov    -0x140(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    13c3 <script_parse_fex+0x1c3>
jmp    1ccc <script_parse_fex+0xacc>
mov    -0x140(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    153d <script_parse_fex+0x33d>
mov    -0x140(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x140(%rbp)
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1aa(%rbp)
jne    1429 <script_parse_fex+0x229>
mov    -0x150(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x1aa(%rbp)
mov    -0x1aa(%rbp),%al
test   $0x1,%al
jne    143c <script_parse_fex+0x23c>
jmp    1453 <script_parse_fex+0x253>
mov    -0x150(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x150(%rbp)
jmp    13ef <script_parse_fex+0x1ef>
mov    -0x150(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5d,%eax
jne    14bb <script_parse_fex+0x2bb>
mov    -0x150(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    14bb <script_parse_fex+0x2bb>
mov    -0x150(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x140(%rbp),%rsi
call   10f0 <script_section_new@plt>
mov    %rax,-0x130(%rbp)
cmp    $0x0,%rax
je     14aa <script_parse_fex+0x2aa>
jmp    1ccc <script_parse_fex+0xacc>
lea    0xb4f(%rip),%rdi
call   1110 <perror@plt>
jmp    152e <script_parse_fex+0x32e>
mov    -0x150(%rbp),%rax
cmpb   $0x0,(%rax)
je     1507 <script_parse_fex+0x307>
mov    0x2b06(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
mov    -0x150(%rbp),%r8
lea    -0x120(%rbp),%rax
sub    %rax,%r8
add    $0x1,%r8
lea    0xb0c(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1529 <script_parse_fex+0x329>
mov    0x2aca(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
lea    0xb0b(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    152e <script_parse_fex+0x32e>
movl   $0x0,-0x124(%rbp)
jmp    1cc2 <script_parse_fex+0xac2>
mov    -0x140(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    -0x140(%rbp),%rax
mov    %rax,-0x168(%rbp)
cmpq   $0x0,-0x130(%rbp)
jne    158e <script_parse_fex+0x38e>
mov    0x2a6a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
lea    0xad7(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1cb8 <script_parse_fex+0xab8>
jmp    1593 <script_parse_fex+0x393>
mov    -0x168(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1ab(%rbp)
jne    15cd <script_parse_fex+0x3cd>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x1ab(%rbp)
mov    -0x1ab(%rbp),%al
test   $0x1,%al
jne    15e0 <script_parse_fex+0x3e0>
jmp    15f7 <script_parse_fex+0x3f7>
mov    -0x168(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x168(%rbp)
jmp    1593 <script_parse_fex+0x393>
mov    -0x168(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x168(%rbp),%rdi
call   1050 <skip_blank@plt>
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1630 <script_parse_fex+0x430>
jmp    1c81 <script_parse_fex+0xa81>
mov    -0x160(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x168(%rbp),%rdi
add    $0x1,%rdi
call   1050 <skip_blank@plt>
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1697 <script_parse_fex+0x497>
mov    -0x130(%rbp),%rdi
mov    -0x158(%rbp),%rsi
call   1100 <script_null_entry_new@plt>
cmp    $0x0,%rax
je     1686 <script_parse_fex+0x486>
jmp    1ccc <script_parse_fex+0xacc>
lea    0x973(%rip),%rdi
call   1110 <perror@plt>
jmp    1c7c <script_parse_fex+0xa7c>
mov    -0x148(%rbp),%rax
mov    -0x168(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jbe    1751 <script_parse_fex+0x551>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1751 <script_parse_fex+0x551>
mov    -0x148(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x22,%eax
jne    1751 <script_parse_fex+0x551>
mov    -0x168(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x168(%rbp)
mov    -0x148(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x148(%rbp)
movb   $0x0,-0x1(%rax)
mov    -0x130(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    -0x148(%rbp),%rax
mov    -0x168(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
mov    -0x168(%rbp),%rcx
call   1040 <script_string_entry_new@plt>
cmp    $0x0,%rax
je     1740 <script_parse_fex+0x540>
jmp    1ccc <script_parse_fex+0xacc>
lea    0x8b9(%rip),%rdi
call   1110 <perror@plt>
jmp    1c77 <script_parse_fex+0xa77>
mov    -0x168(%rbp),%rsi
lea    0x922(%rip),%rdi
mov    $0x5,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%rax
jne    1b57 <script_parse_fex+0x957>
mov    -0x168(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
jne    17c5 <script_parse_fex+0x5c5>
mov    -0x168(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x41,%eax
jl     17c0 <script_parse_fex+0x5c0>
mov    -0x168(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x4e,%eax
jle    17c5 <script_parse_fex+0x5c5>
jmp    1b52 <script_parse_fex+0x952>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
je     17ff <script_parse_fex+0x5ff>
mov    -0x168(%rbp),%rdi
lea    0x8a1(%rip),%rsi
mov    $0x5,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%rax
je     17ff <script_parse_fex+0x5ff>
jmp    1b4d <script_parse_fex+0x94d>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
jne    1840 <script_parse_fex+0x640>
mov    -0x168(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x41,%eax
add    $0x1,%eax
mov    %eax,-0x174(%rbp)
mov    -0x168(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x168(%rbp)
jmp    185c <script_parse_fex+0x65c>
movl   $0xffff,-0x174(%rbp)
mov    -0x168(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rdi
lea    -0x170(%rbp),%rsi
mov    $0xa,%edx
call   10d0 <strtol@plt>
mov    %rax,-0x180(%rbp)
mov    -0x170(%rbp),%rax
cmp    -0x168(%rbp),%rax
jne    1894 <script_parse_fex+0x694>
jmp    1c81 <script_parse_fex+0xa81>
cmpq   $0x0,-0x180(%rbp)
jl     18b3 <script_parse_fex+0x6b3>
cmpq   $0xff,-0x180(%rbp)
jle    18f6 <script_parse_fex+0x6f6>
mov    0x271e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
mov    -0x168(%rbp),%r8
lea    -0x120(%rbp),%rax
sub    %rax,%r8
add    $0x1,%r8
mov    -0x180(%rbp),%r9
lea    0x7a3(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1b43 <script_parse_fex+0x943>
mov    0x823(%rip),%rax
mov    %rax,-0x190(%rbp)
mov    0x81d(%rip),%rax
mov    %rax,-0x188(%rbp)
mov    -0x180(%rbp),%rax
mov    %eax,-0x194(%rbp)
mov    -0x170(%rbp),%rax
mov    %rax,-0x168(%rbp)
movl   $0x0,-0x198(%rbp)
mov    -0x168(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1ac(%rbp)
je     1962 <script_parse_fex+0x762>
cmpl   $0x4,-0x198(%rbp)
setl   %al
mov    %al,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%al
test   $0x1,%al
jne    1975 <script_parse_fex+0x775>
jmp    1aed <script_parse_fex+0x8ed>
mov    -0x168(%rbp),%rdi
lea    0x736(%rip),%rsi
mov    $0x9,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%rax
jne    19ae <script_parse_fex+0x7ae>
mov    -0x168(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x168(%rbp)
jmp    1ad9 <script_parse_fex+0x8d9>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
jne    1acf <script_parse_fex+0x8cf>
mov    -0x168(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x168(%rbp)
lea    -0x170(%rbp),%rsi
mov    $0xa,%edx
call   10d0 <strtol@plt>
mov    %rax,-0x180(%rbp)
mov    -0x170(%rbp),%rax
cmp    -0x168(%rbp),%rax
jne    1a04 <script_parse_fex+0x804>
jmp    1aca <script_parse_fex+0x8ca>
cmpq   $0x0,-0x180(%rbp)
jl     1a29 <script_parse_fex+0x829>
mov    -0x180(%rbp),%rax
mov    0x25b0(%rip),%rcx
cmp    (%rcx),%rax
jle    1a6c <script_parse_fex+0x86c>
mov    0x25a8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
mov    -0x168(%rbp),%r8
lea    -0x120(%rbp),%rax
sub    %rax,%r8
add    $0x1,%r8
mov    -0x180(%rbp),%r9
lea    0x663(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1cb8 <script_parse_fex+0xab8>
mov    -0x170(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
je     1a92 <script_parse_fex+0x892>
mov    -0x170(%rbp),%rax
mov    %rax,-0x168(%rbp)
jmp    1ac0 <script_parse_fex+0x8c0>
mov    -0x170(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x168(%rbp)
mov    -0x180(%rbp),%rax
mov    %eax,%ecx
movslq -0x198(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
jmp    1ad9 <script_parse_fex+0x8d9>
jmp    1ac5 <script_parse_fex+0x8c5>
jmp    1aca <script_parse_fex+0x8ca>
jmp    1acf <script_parse_fex+0x8cf>
jmp    1ad4 <script_parse_fex+0x8d4>
jmp    1aed <script_parse_fex+0x8ed>
mov    -0x198(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x198(%rbp)
jmp    1937 <script_parse_fex+0x737>
mov    -0x168(%rbp),%rax
cmpb   $0x0,(%rax)
je     1b02 <script_parse_fex+0x902>
jmp    1c81 <script_parse_fex+0xa81>
mov    -0x130(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    -0x174(%rbp),%edx
mov    -0x194(%rbp),%ecx
lea    -0x190(%rbp),%r8
call   10e0 <script_gpio_entry_new@plt>
cmp    $0x0,%rax
je     1b37 <script_parse_fex+0x937>
jmp    1ccc <script_parse_fex+0xacc>
lea    0x4c2(%rip),%rdi
call   1110 <perror@plt>
jmp    1b48 <script_parse_fex+0x948>
jmp    1b4d <script_parse_fex+0x94d>
jmp    1b52 <script_parse_fex+0x952>
jmp    1c72 <script_parse_fex+0xa72>
mov    -0x168(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
jne    1b9d <script_parse_fex+0x99d>
mov    -0x168(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1c68 <script_parse_fex+0xa68>
mov    -0x168(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1c68 <script_parse_fex+0xa68>
movq   $0x0,-0x1a0(%rbp)
mov    -0x168(%rbp),%rdi
lea    -0x1a8(%rbp),%rsi
xor    %edx,%edx
call   10a0 <strtoll@plt>
mov    %rax,-0x1a0(%rbp)
mov    -0x1a8(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rax
cmp    -0x148(%rbp),%rax
je     1beb <script_parse_fex+0x9eb>
jmp    1c81 <script_parse_fex+0xa81>
mov    -0x1a0(%rbp),%rax
mov    0x23ff(%rip),%rcx
cmp    (%rcx),%rax
jle    1c30 <script_parse_fex+0xa30>
mov    0x23cf(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
mov    -0x1a0(%rbp),%r8
lea    0x4cc(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1c5e <script_parse_fex+0xa5e>
mov    -0x130(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    -0x1a0(%rbp),%rdx
call   1120 <script_single_entry_new@plt>
cmp    $0x0,%rax
je     1c59 <script_parse_fex+0xa59>
jmp    1ccc <script_parse_fex+0xacc>
jmp    1c5e <script_parse_fex+0xa5e>
jmp    1c63 <script_parse_fex+0xa63>
jmp    1c6d <script_parse_fex+0xa6d>
jmp    1c81 <script_parse_fex+0xa81>
jmp    1c72 <script_parse_fex+0xa72>
jmp    1c77 <script_parse_fex+0xa77>
jmp    1c7c <script_parse_fex+0xa7c>
jmp    1cb8 <script_parse_fex+0xab8>
mov    0x2350(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x138(%rbp),%rcx
mov    -0x168(%rbp),%r8
lea    -0x120(%rbp),%rax
sub    %rax,%r8
add    $0x1,%r8
lea    0x356(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x0,-0x124(%rbp)
jmp    1cc7 <script_parse_fex+0xac7>
jmp    1ccc <script_parse_fex+0xacc>
mov    -0x138(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x138(%rbp)
jmp    1237 <script_parse_fex+0x37>
mov    -0x8(%rbp),%rdi
call   1060 <ferror@plt>
cmp    $0x0,%rax
je     1d00 <script_parse_fex+0xb00>
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<script_parse_fex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r12
lea    0x60(%rsp),%r13
mov    %r13,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
mov    $0x1,%r14d
test   %rax,%rax
je     17aa <script_parse_fex+0x5aa>
mov    %rbx,0x50(%rsp)
mov    %rbp,0x8(%rsp)
mov    $0x1,%r15d
mov    $0x1,%eax
sub    %r13,%rax
mov    %rax,0x18(%rsp)
mov    $0x2,%eax
sub    %r13,%rax
mov    %rax,0x58(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %r13,%rbx
jmp    12ad <script_parse_fex+0xad>
mov    0x10(%rsp),%rdi
mov    %r14,%rsi
call   1100 <script_null_entry_new@plt>
test   %rax,%rax
mov    (%rsp),%r12
je     1669 <script_parse_fex+0x469>
xchg   %ax,%ax
add    $0x1,%r15
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     16cb <script_parse_fex+0x4cb>
mov    %rbx,%rdi
call   1050 <skip_blank@plt>
mov    %rax,%r14
cmpb   $0x0,(%rax)
mov    %rax,%rsi
je     130c <script_parse_fex+0x10c>
mov    %r14,%rsi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xffffffffffffffff,%rax
cmpb   $0x0,0x1(%rsi)
lea    0x1(%rsi),%rsi
jne    12d0 <script_parse_fex+0xd0>
cmpb   $0xa,-0x1(%rsi)
jne    130c <script_parse_fex+0x10c>
cmp    $0xffffffffffffffff,%rax
je     1300 <script_parse_fex+0x100>
cmpb   $0xd,-0x2(%rsi)
jne    1300 <script_parse_fex+0x100>
add    $0xfffffffffffffffe,%rsi
mov    %rsi,%rax
jmp    1309 <script_parse_fex+0x109>
nopl   0x0(%rax)
not    %rax
add    %r14,%rax
mov    %rax,%rsi
movb   $0x0,(%rax)
mov    %r14,%rdi
call   10b0 <rtrim@plt>
cmp    %r14,%rax
je     1290 <script_parse_fex+0x90>
mov    %rax,%r13
mov    (%r14),%al
cmp    $0x23,%al
je     1290 <script_parse_fex+0x90>
cmp    $0x3b,%al
je     1290 <script_parse_fex+0x90>
cmp    $0x5b,%al
jne    13af <script_parse_fex+0x1af>
mov    %rbx,%r13
mov    0x58(%rsp),%rax
lea    (%rax,%r14,1),%rbp
add    $0x1,%r14
mov    %r14,%rbx
jmp    1358 <script_parse_fex+0x158>
nopl   0x0(%rax)
add    $0x1,%rbx
add    $0x1,%rbp
movsbl (%rbx),%edi
call   1070 <isalnum@plt>
test   %rax,%rax
jne    1350 <script_parse_fex+0x150>
movzbl (%rbx),%eax
cmp    $0x5f,%al
je     1350 <script_parse_fex+0x150>
test   %al,%al
je     16a4 <script_parse_fex+0x4a4>
cmp    $0x5d,%al
jne    167a <script_parse_fex+0x47a>
cmpb   $0x0,0x1(%rbx)
jne    167a <script_parse_fex+0x47a>
movb   $0x0,(%rbx)
mov    0x50(%rsp),%rdi
mov    %r14,%rsi
call   10f0 <script_section_new@plt>
mov    %rax,%rcx
mov    %rax,0x10(%rsp)
test   %rax,%rax
mov    %r13,%rbx
jne    1290 <script_parse_fex+0x90>
jmp    1669 <script_parse_fex+0x469>
mov    %r14,%rbp
cmpq   $0x0,0x10(%rsp)
jne    13c8 <script_parse_fex+0x1c8>
jmp    16d6 <script_parse_fex+0x4d6>
nop
movzbl 0x1(%rbp),%eax
add    $0x1,%rbp
movsbl %al,%edi
call   1070 <isalnum@plt>
test   %rax,%rax
jne    13c0 <script_parse_fex+0x1c0>
cmpb   $0x5f,0x0(%rbp)
je     13c0 <script_parse_fex+0x1c0>
mov    %r12,(%rsp)
mov    %rbp,%rdi
call   1050 <skip_blank@plt>
mov    %rax,%r12
cmpb   $0x3d,(%rax)
jne    177c <script_parse_fex+0x57c>
movb   $0x0,0x0(%rbp)
add    $0x1,%r12
mov    %r12,%rdi
call   1050 <skip_blank@plt>
mov    %rax,%r12
mov    (%rax),%al
test   %al,%al
je     1274 <script_parse_fex+0x74>
lea    0x1(%r12),%rbp
cmp    %rbp,%r13
jbe    1449 <script_parse_fex+0x249>
cmp    $0x22,%al
jne    1449 <script_parse_fex+0x249>
cmpb   $0x22,-0x1(%r13)
jne    1449 <script_parse_fex+0x249>
add    $0xffffffffffffffff,%r13
movb   $0x0,0x0(%r13)
sub    %ebp,%r13d
mov    0x10(%rsp),%rdi
mov    %r14,%rsi
mov    %r13d,%edx
mov    %rbp,%rcx
call   1040 <script_string_entry_new@plt>
jmp    1281 <script_parse_fex+0x81>
lea    0xc41(%rip),%rdi
mov    %r12,%rsi
mov    $0x5,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     14dd <script_parse_fex+0x2dd>
movsbl (%r12),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    148e <script_parse_fex+0x28e>
cmpb   $0x2d,(%r12)
jne    177c <script_parse_fex+0x57c>
movsbl 0x0(%rbp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     177c <script_parse_fex+0x57c>
mov    %r12,%rdi
lea    0x30(%rsp),%rsi
xor    %edx,%edx
call   10a0 <strtoll@plt>
mov    0x30(%rsp),%r12
cmp    %r13,%r12
jne    177c <script_parse_fex+0x57c>
mov    0x2b46(%rip),%rcx
cmp    (%rcx),%rax
jg     171a <script_parse_fex+0x51a>
mov    0x10(%rsp),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1120 <script_single_entry_new@plt>
test   %rax,%rax
mov    (%rsp),%r12
jne    1290 <script_parse_fex+0x90>
jmp    1740 <script_parse_fex+0x540>
cmpb   $0x50,0x5(%r12)
jne    14f5 <script_parse_fex+0x2f5>
mov    0x6(%r12),%al
add    $0xb1,%al
cmp    $0xf2,%al
jae    151d <script_parse_fex+0x31d>
jmp    1745 <script_parse_fex+0x545>
lea    0x5(%r12),%rbp
mov    %rbp,%rdi
lea    0xb93(%rip),%rsi
mov    $0x5,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
jne    1745 <script_parse_fex+0x545>
cmpb   $0x50,0x0(%rbp)
jne    152d <script_parse_fex+0x32d>
movsbl 0x6(%r12),%ebp
add    $0xffffffc0,%ebp
mov    $0x7,%eax
jmp    1537 <script_parse_fex+0x337>
mov    $0xffff,%ebp
mov    $0xa,%eax
add    %rax,%r12
mov    %r12,%rdi
lea    0x20(%rsp),%rsi
mov    $0xa,%edx
call   10d0 <strtol@plt>
mov    0x20(%rsp),%r13
cmp    %r12,%r13
je     177c <script_parse_fex+0x57c>
cmp    $0x100,%rax
jae    174a <script_parse_fex+0x54a>
pcmpeqd %xmm0,%xmm0
movdqa %xmm0,0x30(%rsp)
cmpb   $0x0,0x0(%r13)
mov    (%rsp),%r12
je     164a <script_parse_fex+0x44a>
mov    %rax,0x48(%rsp)
mov    %ebp,0x2c(%rsp)
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
lea    0xb2f(%rip),%rsi
mov    $0x9,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     1610 <script_parse_fex+0x410>
movzbl 0x0(%r13),%ecx
cmp    $0x3c,%cl
jne    1639 <script_parse_fex+0x439>
add    $0x1,%r13
mov    %r13,%rdi
lea    0x20(%rsp),%rsi
mov    $0xa,%edx
call   10d0 <strtol@plt>
mov    0x20(%rsp),%rdx
cmp    %r13,%rdx
je     1630 <script_parse_fex+0x430>
test   %rax,%rax
js     16e8 <script_parse_fex+0x4e8>
mov    0x29e9(%rip),%rcx
cmp    (%rcx),%rax
jg     16e8 <script_parse_fex+0x4e8>
movzbl (%rdx),%ecx
cmp    $0x3e,%cl
jne    1636 <script_parse_fex+0x436>
add    $0x1,%rdx
mov    %eax,0x30(%rsp,%rbp,4)
mov    %rdx,%r13
jmp    1614 <script_parse_fex+0x414>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x9,%r13
movzbl 0x0(%r13),%ecx
test   %cl,%cl
je     1639 <script_parse_fex+0x439>
lea    0x1(%rbp),%rax
cmp    $0x3,%rbp
mov    %rax,%rbp
jb     1590 <script_parse_fex+0x390>
jmp    1639 <script_parse_fex+0x439>
mov    0x0(%r13),%cl
jmp    1639 <script_parse_fex+0x439>
mov    %rdx,%r13
test   %cl,%cl
mov    0x2c(%rsp),%ebp
mov    0x48(%rsp),%rax
jne    1779 <script_parse_fex+0x579>
mov    0x10(%rsp),%rdi
mov    %r14,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
lea    0x30(%rsp),%r8
call   10e0 <script_gpio_entry_new@plt>
test   %rax,%rax
jne    1290 <script_parse_fex+0x90>
lea    0x9a0(%rip),%rdi
call   1110 <perror@plt>
jmp    1740 <script_parse_fex+0x540>
mov    0x2957(%rip),%rax
mov    (%rax),%edi
lea    0x98d(%rip),%rsi
xor    %r14d,%r14d
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
mov    %rbp,%r8
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    17aa <script_parse_fex+0x5aa>
mov    0x292d(%rip),%rax
mov    (%rax),%edi
lea    0x989(%rip),%rsi
xor    %r14d,%r14d
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    17aa <script_parse_fex+0x5aa>
mov    $0x1,%r14d
jmp    17aa <script_parse_fex+0x5aa>
mov    0x28fb(%rip),%rax
mov    (%rax),%edi
lea    0x983(%rip),%rsi
jmp    16b4 <script_parse_fex+0x4b4>
mov    0x28e9(%rip),%rcx
mov    (%rcx),%edi
mov    0x18(%rsp),%r8
add    %r13,%r8
lea    0x9d3(%rip),%rsi
xor    %r14d,%r14d
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
mov    %rax,%r9
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    17aa <script_parse_fex+0x5aa>
mov    0x28b7(%rip),%rcx
mov    (%rcx),%edi
lea    0x9d6(%rip),%rsi
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rsp),%r12
xor    %r14d,%r14d
jmp    17aa <script_parse_fex+0x5aa>
xor    %r14d,%r14d
jmp    17a6 <script_parse_fex+0x5a6>
mov    %rax,%r9
mov    0x2884(%rip),%rax
mov    (%rax),%edi
mov    0x18(%rsp),%r8
add    %r12,%r8
lea    0x938(%rip),%rsi
xor    %r14d,%r14d
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    17a6 <script_parse_fex+0x5a6>
mov    %r13,%r12
mov    0x2855(%rip),%rax
mov    (%rax),%edi
mov    0x18(%rsp),%r8
add    %r12,%r8
lea    0x883(%rip),%rsi
xor    %r14d,%r14d
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rsp),%r12
mov    %r12,%rdi
call   1060 <ferror@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %r14d,%ecx
mov    %ecx,%eax
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.script = type { i32 }
%struct.script_section = type { i32 }
@.str = [7 x i8] c"malloc\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"E: %s:%zu: invalid character at %zu.\0A\00"
@.str.2 = [44 x i8] c"E: %s:%zu: incomplete section declaration.\0A\00"
@.str.3 = [40 x i8] c"E: %s:%zu: data must follow a section.\0A\00"
@.str.4 = [6 x i8] c"port:\00"
@.str.5 = [6 x i8] c"power\00"
@.str.6 = [44 x i8] c"E: %s:%zu: port out of range at %zu (%ld).\0A\00"
@__const.script_parse_fex.data = [4 x i32] [i32 -1, i32 -1, i32 -1, i32 -1]
@.str.7 = [10 x i8] c"<default>\00"
@INT32_MAX = global i64 0
@.str.8 = [45 x i8] c"E: %s:%zu: value out of range at %zu (%ld).\0A\00"
@UINT32_MAX = global i64 0
@.str.9 = [37 x i8] c"E: %s:%zu: value out of range %lld.\0A\00"
define i32 @script_parse_fex(i32* %0, i8* %1, %struct.script* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca %struct.script*
%7 = alloca [256 x i8]
%8 = alloca i32
%9 = alloca %struct.script_section*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i64
%20 = alloca [4 x i32]
%21 = alloca i32
%22 = alloca i32
%23 = alloca i64
%24 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store %struct.script* %2, %struct.script** %6
store i32 1, i32* %8
store %struct.script_section* null, %struct.script_section** %9
store i64 1, i64* %10
br label %25
25: ; preds = %486, %3
%26 = load i32, i32* %8
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%30 = load i32*, i32** %4
%31 = call i64 @fgets(i8* %29, i32 256, i32* %30)
%32 = icmp ne i64 %31, 0
br label %33
33: ; preds = %28, %25
%34 = phi i1 [ false, %25 ], [ %32, %28 ]
br i1 %34, label %35, label %489
35: ; preds = %33
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%37 = call i8* @skip_blank(i8* %36)
store i8* %37, i8** %11
%38 = load i8*, i8** %11
store i8* %38, i8** %12
%39 = load i8*, i8** %12
%40 = load i8, i8* %39
%41 = icmp ne i8 %40, 0
br i1 %41, label %42, label %50
42: ; preds = %35
br label %43
43: ; preds = %48, %42
%44 = load i8*, i8** %12
%45 = getelementptr inbounds i8, i8* %44, i32 1
store i8* %45, i8** %12
%46 = load i8, i8* %45
%47 = icmp ne i8 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %43
br label %43
49: ; preds = %43
br label %50
50: ; preds = %49, %35
%51 = load i8*, i8** %12
%52 = load i8*, i8** %11
%53 = icmp ugt i8* %51, %52
br i1 %53, label %54, label %79
54: ; preds = %50
%55 = load i8*, i8** %12
%56 = getelementptr inbounds i8, i8* %55, i64 -1
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 10
br i1 %59, label %60, label %79
60: ; preds = %54
%61 = load i8*, i8** %12
%62 = load i8*, i8** %11
%63 = getelementptr inbounds i8, i8* %62, i64 1
%64 = icmp ugt i8* %61, %63
br i1 %64, label %65, label %74
65: ; preds = %60
%66 = load i8*, i8** %12
%67 = getelementptr inbounds i8, i8* %66, i64 -2
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 13
br i1 %70, label %71, label %74
71: ; preds = %65
%72 = load i8*, i8** %12
%73 = getelementptr inbounds i8, i8* %72, i64 -2
store i8* %73, i8** %12
br label %77
74: ; preds = %65, %60
%75 = load i8*, i8** %12
%76 = getelementptr inbounds i8, i8* %75, i64 -1
store i8* %76, i8** %12
br label %77
77: ; preds = %74, %71
%78 = load i8*, i8** %12
store i8 0, i8* %78
br label %79
79: ; preds = %77, %54, %50
%80 = load i8*, i8** %11
%81 = load i8*, i8** %12
%82 = call i8* @rtrim(i8* %80, i8* %81)
store i8* %82, i8** %12
%83 = load i8*, i8** %12
%84 = load i8*, i8** %11
%85 = icmp eq i8* %83, %84
br i1 %85, label %96, label %86
86: ; preds = %79
%87 = load i8*, i8** %11
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp eq i32 %89, 59
br i1 %90, label %96, label %91
91: ; preds = %86
%92 = load i8*, i8** %11
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = icmp eq i32 %94, 35
br i1 %95, label %96, label %97
96: ; preds = %91, %86, %79
br label %486
97: ; preds = %91
%98 = load i8*, i8** %11
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = icmp eq i32 %100, 91
br i1 %101, label %102, label %162
102: ; preds = %97
%103 = load i8*, i8** %11
%104 = getelementptr inbounds i8, i8* %103, i32 1
store i8* %104, i8** %11
store i8* %104, i8** %13
br label %105
105: ; preds = %117, %102
%106 = load i8*, i8** %13
%107 = load i8, i8* %106
%108 = call i64 @isalnum(i8 signext %107)
%109 = icmp ne i64 %108, 0
br i1 %109, label %115, label %110
110: ; preds = %105
%111 = load i8*, i8** %13
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 95
br label %115
115: ; preds = %110, %105
%116 = phi i1 [ true, %105 ], [ %114, %110 ]
br i1 %116, label %117, label %120
117: ; preds = %115
%118 = load i8*, i8** %13
%119 = getelementptr inbounds i8, i8* %118, i32 1
store i8* %119, i8** %13
br label %105
120: ; preds = %115
%121 = load i8*, i8** %13
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 93
br i1 %124, label %125, label %140
125: ; preds = %120
%126 = load i8*, i8** %13
%127 = getelementptr inbounds i8, i8* %126, i64 1
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 0
br i1 %130, label %131, label %140
131: ; preds = %125
%132 = load i8*, i8** %13
store i8 0, i8* %132
%133 = load %struct.script*, %struct.script** %6
%134 = load i8*, i8** %11
%135 = call %struct.script_section* @script_section_new(%struct.script* %133, i8* %134)
store %struct.script_section* %135, %struct.script_section** %9
%136 = icmp ne %struct.script_section* %135, null
br i1 %136, label %137, label %138
137: ; preds = %131
br label %486
138: ; preds = %131
%139 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %161
140: ; preds = %125, %120
%141 = load i8*, i8** %13
%142 = load i8, i8* %141
%143 = icmp ne i8 %142, 0
br i1 %143, label %144, label %155
144: ; preds = %140
%145 = load i32, i32* @stderr
%146 = load i8*, i8** %5
%147 = load i64, i64* %10
%148 = load i8*, i8** %13
%149 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%150 = ptrtoint i8* %148 to i64
%151 = ptrtoint i8* %149 to i64
%152 = sub i64 %150, %151
%153 = add nsw i64 %152, 1
%154 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %145, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %146, i64 %147, i64 %153)
br label %160
155: ; preds = %140
%156 = load i32, i32* @stderr
%157 = load i8*, i8** %5
%158 = load i64, i64* %10
%159 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* %157, i64 %158)
br label %160
160: ; preds = %155, %144
br label %161
161: ; preds = %160, %138
store i32 0, i32* %8
br label %484
162: ; preds = %97
%163 = load i8*, i8** %11
store i8* %163, i8** %14
%164 = load i8*, i8** %11
store i8* %164, i8** %16
%165 = load %struct.script_section*, %struct.script_section** %9
%166 = icmp ne %struct.script_section* %165, null
br i1 %166, label %172, label %167
167: ; preds = %162
%168 = load i32, i32* @stderr
%169 = load i8*, i8** %5
%170 = load i64, i64* %10
%171 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i8* %169, i64 %170)
br label %483
172: ; preds = %162
br label %173
173: ; preds = %185, %172
%174 = load i8*, i8** %16
%175 = load i8, i8* %174
%176 = call i64 @isalnum(i8 signext %175)
%177 = icmp ne i64 %176, 0
br i1 %177, label %183, label %178
178: ; preds = %173
%179 = load i8*, i8** %16
%180 = load i8, i8* %179
%181 = sext i8 %180 to i32
%182 = icmp eq i32 %181, 95
br label %183
183: ; preds = %178, %173
%184 = phi i1 [ true, %173 ], [ %182, %178 ]
br i1 %184, label %185, label %188
185: ; preds = %183
%186 = load i8*, i8** %16
%187 = getelementptr inbounds i8, i8* %186, i32 1
store i8* %187, i8** %16
br label %173
188: ; preds = %183
%189 = load i8*, i8** %16
store i8* %189, i8** %15
%190 = load i8*, i8** %16
%191 = call i8* @skip_blank(i8* %190)
store i8* %191, i8** %16
%192 = load i8*, i8** %16
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = icmp ne i32 %194, 61
br i1 %195, label %196, label %197
196: ; preds = %188
br label %472
197: ; preds = %188
%198 = load i8*, i8** %15
store i8 0, i8* %198
%199 = load i8*, i8** %16
%200 = getelementptr inbounds i8, i8* %199, i64 1
%201 = call i8* @skip_blank(i8* %200)
store i8* %201, i8** %16
%202 = load i8*, i8** %16
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp eq i32 %204, 0
br i1 %205, label %206, label %214
206: ; preds = %197
%207 = load %struct.script_section*, %struct.script_section** %9
%208 = load i8*, i8** %14
%209 = call i64 @script_null_entry_new(%struct.script_section* %207, i8* %208)
%210 = icmp ne i64 %209, 0
br i1 %210, label %211, label %212
211: ; preds = %206
br label %486
212: ; preds = %206
%213 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %471
214: ; preds = %197
%215 = load i8*, i8** %12
%216 = load i8*, i8** %16
%217 = getelementptr inbounds i8, i8* %216, i64 1
%218 = icmp ugt i8* %215, %217
br i1 %218, label %219, label %249
219: ; preds = %214
%220 = load i8*, i8** %16
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = icmp eq i32 %222, 34
br i1 %223, label %224, label %249
224: ; preds = %219
%225 = load i8*, i8** %12
%226 = getelementptr inbounds i8, i8* %225, i64 -1
%227 = load i8, i8* %226
%228 = sext i8 %227 to i32
%229 = icmp eq i32 %228, 34
br i1 %229, label %230, label %249
230: ; preds = %224
%231 = load i8*, i8** %16
%232 = getelementptr inbounds i8, i8* %231, i32 1
store i8* %232, i8** %16
%233 = load i8*, i8** %12
%234 = getelementptr inbounds i8, i8* %233, i32 -1
store i8* %234, i8** %12
store i8 0, i8* %234
%235 = load %struct.script_section*, %struct.script_section** %9
%236 = load i8*, i8** %14
%237 = load i8*, i8** %12
%238 = load i8*, i8** %16
%239 = ptrtoint i8* %237 to i64
%240 = ptrtoint i8* %238 to i64
%241 = sub i64 %239, %240
%242 = trunc i64 %241 to i32
%243 = load i8*, i8** %16
%244 = call i64 @script_string_entry_new(%struct.script_section* %235, i8* %236, i32 %242, i8* %243)
%245 = icmp ne i64 %244, 0
br i1 %245, label %246, label %247
246: ; preds = %230
br label %486
247: ; preds = %230
%248 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %470
249: ; preds = %224, %219, %214
%250 = load i8*, i8** %16
%251 = call i64 @memcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %250, i32 5)
%252 = icmp eq i64 %251, 0
br i1 %252, label %253, label %423
253: ; preds = %249
%254 = load i8*, i8** %16
%255 = getelementptr inbounds i8, i8* %254, i64 5
store i8* %255, i8** %16
%256 = load i8*, i8** %16
%257 = getelementptr inbounds i8, i8* %256, i64 0
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = icmp eq i32 %259, 80
br i1 %260, label %261, label %274
261: ; preds = %253
%262 = load i8*, i8** %16
%263 = getelementptr inbounds i8, i8* %262, i64 1
%264 = load i8, i8* %263
%265 = sext i8 %264 to i32
%266 = icmp slt i32 %265, 65
br i1 %266, label %273, label %267
267: ; preds = %261
%268 = load i8*, i8** %16
%269 = getelementptr inbounds i8, i8* %268, i64 1
%270 = load i8, i8* %269
%271 = sext i8 %270 to i32
%272 = icmp sgt i32 %271, 78
br i1 %272, label %273, label %274
273: ; preds = %267, %261
br label %422
274: ; preds = %267, %253
%275 = load i8*, i8** %16
%276 = load i8, i8* %275
%277 = sext i8 %276 to i32
%278 = icmp ne i32 %277, 80
br i1 %278, label %279, label %284
279: ; preds = %274
%280 = load i8*, i8** %16
%281 = call i64 @memcmp(i8* %280, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%282 = icmp ne i64 %281, 0
br i1 %282, label %283, label %284
283: ; preds = %279
br label %421
284: ; preds = %279, %274
%285 = load i8*, i8** %16
%286 = load i8, i8* %285
%287 = sext i8 %286 to i32
%288 = icmp eq i32 %287, 80
br i1 %288, label %289, label %298
289: ; preds = %284
%290 = load i8*, i8** %16
%291 = getelementptr inbounds i8, i8* %290, i64 1
%292 = load i8, i8* %291
%293 = sext i8 %292 to i32
%294 = sub nsw i32 %293, 65
%295 = add nsw i32 %294, 1
store i32 %295, i32* %18
%296 = load i8*, i8** %16
%297 = getelementptr inbounds i8, i8* %296, i64 2
store i8* %297, i8** %16
br label %301
298: ; preds = %284
store i32 65535, i32* %18
%299 = load i8*, i8** %16
%300 = getelementptr inbounds i8, i8* %299, i64 5
store i8* %300, i8** %16
br label %301
301: ; preds = %298, %289
%302 = load i8*, i8** %16
%303 = call i64 @strtol(i8* %302, i8** %17, i32 10)
store i64 %303, i64* %19
%304 = load i8*, i8** %17
%305 = load i8*, i8** %16
%306 = icmp eq i8* %304, %305
br i1 %306, label %307, label %308
307: ; preds = %301
br label %472
308: ; preds = %301
%309 = load i64, i64* %19
%310 = icmp slt i64 %309, 0
br i1 %310, label %314, label %311
311: ; preds = %308
%312 = load i64, i64* %19
%313 = icmp sgt i64 %312, 255
br i1 %313, label %314, label %326
314: ; preds = %311, %308
%315 = load i32, i32* @stderr
%316 = load i8*, i8** %5
%317 = load i64, i64* %10
%318 = load i8*, i8** %16
%319 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%320 = ptrtoint i8* %318 to i64
%321 = ptrtoint i8* %319 to i64
%322 = sub i64 %320, %321
%323 = add nsw i64 %322, 1
%324 = load i64, i64* %19
%325 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %315, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i8* %316, i64 %317, i64 %323, i64 %324)
br label %419
326: ; preds = %311
%327 = bitcast [4 x i32]* %20 to i8*
%328 = load i64, i64* %19
%329 = trunc i64 %328 to i32
store i32 %329, i32* %21
%330 = load i8*, i8** %17
store i8* %330, i8** %16
store i32 0, i32* %22
br label %331
331: ; preds = %400, %326
%332 = load i8*, i8** %16
%333 = load i8, i8* %332
%334 = sext i8 %333 to i32
%335 = icmp ne i32 %334, 0
br i1 %335, label %336, label %339
336: ; preds = %331
%337 = load i32, i32* %22
%338 = icmp slt i32 %337, 4
br label %339
339: ; preds = %336, %331
%340 = phi i1 [ false, %331 ], [ %338, %336 ]
br i1 %340, label %341, label %403
341: ; preds = %339
%342 = load i8*, i8** %16
%343 = call i64 @memcmp(i8* %342, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%344 = icmp eq i64 %343, 0
br i1 %344, label %345, label %348
345: ; preds = %341
%346 = load i8*, i8** %16
%347 = getelementptr inbounds i8, i8* %346, i64 9
store i8* %347, i8** %16
br label %400
348: ; preds = %341
%349 = load i8*, i8** %16
%350 = load i8, i8* %349
%351 = sext i8 %350 to i32
%352 = icmp eq i32 %351, 60
br i1 %352, label %353, label %398
353: ; preds = %348
%354 = load i8*, i8** %16
%355 = getelementptr inbounds i8, i8* %354, i32 1
store i8* %355, i8** %16
%356 = call i64 @strtol(i8* %355, i8** %17, i32 10)
store i64 %356, i64* %19
%357 = load i8*, i8** %17
%358 = load i8*, i8** %16
%359 = icmp eq i8* %357, %358
br i1 %359, label %360, label %361
360: ; preds = %353
br label %397
361: ; preds = %353
%362 = load i64, i64* %19
%363 = icmp slt i64 %362, 0
br i1 %363, label %368, label %364
364: ; preds = %361
%365 = load i64, i64* %19
%366 = load i64, i64* @INT32_MAX
%367 = icmp sgt i64 %365, %366
br i1 %367, label %368, label %380
368: ; preds = %364, %361
%369 = load i32, i32* @stderr
%370 = load i8*, i8** %5
%371 = load i64, i64* %10
%372 = load i8*, i8** %16
%373 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%374 = ptrtoint i8* %372 to i64
%375 = ptrtoint i8* %373 to i64
%376 = sub i64 %374, %375
%377 = add nsw i64 %376, 1
%378 = load i64, i64* %19
%379 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %369, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i8* %370, i64 %371, i64 %377, i64 %378)
br label %483
380: ; preds = %364
%381 = load i8*, i8** %17
%382 = load i8, i8* %381
%383 = sext i8 %382 to i32
%384 = icmp ne i32 %383, 62
br i1 %384, label %385, label %387
385: ; preds = %380
%386 = load i8*, i8** %17
store i8* %386, i8** %16
br label %395
387: ; preds = %380
%388 = load i8*, i8** %17
%389 = getelementptr inbounds i8, i8* %388, i64 1
store i8* %389, i8** %16
%390 = load i64, i64* %19
%391 = trunc i64 %390 to i32
%392 = load i32, i32* %22
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %393
store i32 %391, i32* %394
br label %400
395: ; preds = %385
br label %396
396: ; preds = %395
br label %397
397: ; preds = %396, %360
br label %398
398: ; preds = %397, %348
br label %399
399: ; preds = %398
br label %403
400: ; preds = %387, %345
%401 = load i32, i32* %22
%402 = add nsw i32 %401, 1
store i32 %402, i32* %22
br label %331
403: ; preds = %399, %339
%404 = load i8*, i8** %16
%405 = load i8, i8* %404
%406 = icmp ne i8 %405, 0
br i1 %406, label %407, label %408
407: ; preds = %403
br label %472
408: ; preds = %403
%409 = load %struct.script_section*, %struct.script_section** %9
%410 = load i8*, i8** %14
%411 = load i32, i32* %18
%412 = load i32, i32* %21
%413 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 0
%414 = call i64 @script_gpio_entry_new(%struct.script_section* %409, i8* %410, i32 %411, i32 %412, i32* %413)
%415 = icmp ne i64 %414, 0
br i1 %415, label %416, label %417
416: ; preds = %408
br label %486
417: ; preds = %408
%418 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %419
419: ; preds = %417, %314
br label %420
420: ; preds = %419
br label %421
421: ; preds = %420, %283
br label %422
422: ; preds = %421, %273
br label %469
423: ; preds = %249
%424 = load i8*, i8** %16
%425 = load i8, i8* %424
%426 = call i64 @isdigit(i8 signext %425)
%427 = icmp ne i64 %426, 0
br i1 %427, label %439, label %428
428: ; preds = %423
%429 = load i8*, i8** %16
%430 = load i8, i8* %429
%431 = sext i8 %430 to i32
%432 = icmp eq i32 %431, 45
br i1 %432, label %433, label %467
433: ; preds = %428
%434 = load i8*, i8** %16
%435 = getelementptr inbounds i8, i8* %434, i64 1
%436 = load i8, i8* %435
%437 = call i64 @isdigit(i8 signext %436)
%438 = icmp ne i64 %437, 0
br i1 %438, label %439, label %467
439: ; preds = %433, %423
store i64 0, i64* %23
%440 = load i8*, i8** %16
%441 = call i64 @strtoll(i8* %440, i8** %24, i32 0)
store i64 %441, i64* %23
%442 = load i8*, i8** %24
store i8* %442, i8** %16
%443 = load i8*, i8** %16
%444 = load i8*, i8** %12
%445 = icmp ne i8* %443, %444
br i1 %445, label %446, label %447
446: ; preds = %439
br label %472
447: ; preds = %439
%448 = load i64, i64* %23
%449 = load i64, i64* @UINT32_MAX
%450 = icmp sgt i64 %448, %449
br i1 %450, label %451, label %457
451: ; preds = %447
%452 = load i32, i32* @stderr
%453 = load i8*, i8** %5
%454 = load i64, i64* %10
%455 = load i64, i64* %23
%456 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %452, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i8* %453, i64 %454, i64 %455)
br label %465
457: ; preds = %447
%458 = load %struct.script_section*, %struct.script_section** %9
%459 = load i8*, i8** %14
%460 = load i64, i64* %23
%461 = call i64 @script_single_entry_new(%struct.script_section* %458, i8* %459, i64 %460)
%462 = icmp ne i64 %461, 0
br i1 %462, label %463, label %464
463: ; preds = %457
br label %486
464: ; preds = %457
br label %465
465: ; preds = %464, %451
br label %466
466: ; preds = %465
br label %468
467: ; preds = %433, %428
br label %472
468: ; preds = %466
br label %469
469: ; preds = %468, %422
br label %470
470: ; preds = %469, %247
br label %471
471: ; preds = %470, %212
br label %483
472: ; preds = %467, %446, %407, %307, %196
%473 = load i32, i32* @stderr
%474 = load i8*, i8** %5
%475 = load i64, i64* %10
%476 = load i8*, i8** %16
%477 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%478 = ptrtoint i8* %476 to i64
%479 = ptrtoint i8* %477 to i64
%480 = sub i64 %478, %479
%481 = add nsw i64 %480, 1
%482 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %473, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %474, i64 %475, i64 %481)
br label %483
483: ; preds = %472, %471, %368, %167
store i32 0, i32* %8
br label %484
484: ; preds = %483, %161
br label %485
485: ; preds = %484
br label %486
486: ; preds = %485, %463, %416, %246, %211, %137, %96
%487 = load i64, i64* %10
%488 = add i64 %487, 1
store i64 %488, i64* %10
br label %25
489: ; preds = %33
%490 = load i32*, i32** %4
%491 = call i64 @ferror(i32* %490)
%492 = icmp ne i64 %491, 0
br i1 %492, label %493, label %494
493: ; preds = %489
store i32 0, i32* %8
br label %494
494: ; preds = %493, %489
%495 = load i32, i32* %8
ret i32 %495
}

LLVM IR (-O2):
%struct.script = type { i32 }
%struct.script_section = type { i32 }
@.str = [7 x i8] c"malloc\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"E: %s:%zu: invalid character at %zu.\0A\00"
@.str.2 = [44 x i8] c"E: %s:%zu: incomplete section declaration.\0A\00"
@.str.3 = [40 x i8] c"E: %s:%zu: data must follow a section.\0A\00"
@.str.4 = [6 x i8] c"port:\00"
@.str.5 = [6 x i8] c"power\00"
@.str.6 = [44 x i8] c"E: %s:%zu: port out of range at %zu (%ld).\0A\00"
@.str.7 = [10 x i8] c"<default>\00"
@INT32_MAX = global i64 0
@.str.8 = [45 x i8] c"E: %s:%zu: value out of range at %zu (%ld).\0A\00"
@UINT32_MAX = global i64 0
@.str.9 = [37 x i8] c"E: %s:%zu: value out of range %lld.\0A\00"
define i32 @script_parse_fex(i32* nocapture %0, i8* %1, %struct.script* %2) {
%4 = alloca [256 x i8]
%5 = alloca i8*
%6 = alloca [4 x i32]
%7 = alloca i8*
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%9 = ptrtoint [256 x i8]* %4 to i64
%10 = sub i64 1, %9
%11 = bitcast i8** %7 to i8*
%12 = bitcast i8** %5 to i8*
%13 = bitcast [4 x i32]* %6 to i8*
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%15 = call i64 @fgets(i8* %8, i32 256, i32* %0)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %259, %143, %137, %3, %84, %253, %128, %110, %224, %207, %251, %79, %74, %72
%18 = phi i32 [ 0, %72 ], [ 0, %74 ], [ 0, %79 ], [ 0, %251 ], [ 0, %207 ], [ 0, %224 ], [ 0, %110 ], [ 0, %128 ], [ 0, %253 ], [ 0, %84 ], [ 1, %3 ], [ 0, %137 ], [ 0, %143 ], [ 1, %259 ]
%19 = call i64 @ferror(i32* %0)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i32 %18, i32 0
ret i32 %21
22: ; preds = %3, %259
%23 = phi i64 [ %261, %259 ], [ 1, %3 ]
%24 = phi %struct.script_section* [ %260, %259 ], [ null, %3 ]
%25 = call i8* @skip_blank(i8* %8)
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 0
br i1 %27, label %48, label %28
28: ; preds = %22, %28
%29 = phi i64 [ %30, %28 ], [ 0, %22 ]
%30 = add nuw nsw i64 %29, 1
%31 = getelementptr inbounds i8, i8* %25, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 0
br i1 %33, label %34, label %28
34: ; preds = %28
%35 = getelementptr inbounds i8, i8* %25, i64 %30
%36 = getelementptr inbounds i8, i8* %25, i64 %29
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 10
br i1 %38, label %39, label %48
39: ; preds = %34
%40 = icmp eq i64 %29, 0
br i1 %40, label %45, label %41
41: ; preds = %39
%42 = getelementptr inbounds i8, i8* %35, i64 -2
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 13
br i1 %44, label %46, label %45
45: ; preds = %41, %39
br label %46
46: ; preds = %41, %45
%47 = phi i8* [ %36, %45 ], [ %42, %41 ]
store i8 0, i8* %47
br label %48
48: ; preds = %22, %46, %34
%49 = phi i8* [ %47, %46 ], [ %35, %34 ], [ %25, %22 ]
%50 = call i8* @rtrim(i8* %25, i8* %49)
%51 = icmp eq i8* %50, %25
br i1 %51, label %259, label %52
52: ; preds = %48
%53 = load i8, i8* %25
switch i8 %53, label %82 [
i8 59, label %259
i8 35, label %259
i8 91, label %54
]
54: ; preds = %52
%55 = getelementptr inbounds i8, i8* %25, i64 1
br label %56
56: ; preds = %63, %54
%57 = phi i8* [ %55, %54 ], [ %64, %63 ]
%58 = load i8, i8* %57
%59 = call i64 @isalnum(i8 signext %58)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %56
%62 = load i8, i8* %57
switch i8 %62, label %74 [
i8 95, label %63
i8 93, label %65
i8 0, label %79
]
63: ; preds = %61, %56
%64 = getelementptr inbounds i8, i8* %57, i64 1
br label %56
65: ; preds = %61
%66 = getelementptr inbounds i8, i8* %57, i64 1
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %65
store i8 0, i8* %57
%70 = call %struct.script_section* @script_section_new(%struct.script* %2, i8* %55)
%71 = icmp eq %struct.script_section* %70, null
br i1 %71, label %72, label %259
72: ; preds = %69
%73 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %17
74: ; preds = %65, %61
%75 = load i32, i32* @stderr
%76 = ptrtoint i8* %57 to i64
%77 = add i64 %10, %76
%78 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %1, i64 %23, i64 %77)
br label %17
79: ; preds = %61
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* %1, i64 %23)
br label %17
82: ; preds = %52
%83 = icmp eq %struct.script_section* %24, null
br i1 %83, label %84, label %87
84: ; preds = %82
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i8* %1, i64 %23)
br label %17
87: ; preds = %82, %95
%88 = phi i8 [ %97, %95 ], [ %53, %82 ]
%89 = phi i8* [ %96, %95 ], [ %25, %82 ]
%90 = call i64 @isalnum(i8 signext %88)
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %95
92: ; preds = %87
%93 = load i8, i8* %89
%94 = icmp eq i8 %93, 95
br i1 %94, label %95, label %98
95: ; preds = %87, %92
%96 = getelementptr inbounds i8, i8* %89, i64 1
%97 = load i8, i8* %96
br label %87
98: ; preds = %92
%99 = call i8* @skip_blank(i8* %89)
%100 = load i8, i8* %99
%101 = icmp eq i8 %100, 61
br i1 %101, label %102, label %253
102: ; preds = %98
store i8 0, i8* %89
%103 = getelementptr inbounds i8, i8* %99, i64 1
%104 = call i8* @skip_blank(i8* %103)
%105 = load i8, i8* %104
%106 = icmp eq i8 %105, 0
br i1 %106, label %107, label %112
107: ; preds = %102
%108 = call i64 @script_null_entry_new(%struct.script_section* %24, i8* %25)
%109 = icmp eq i64 %108, 0
br i1 %109, label %110, label %259
110: ; preds = %107
%111 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %17
112: ; preds = %102
%113 = getelementptr inbounds i8, i8* %104, i64 1
%114 = icmp ugt i8* %50, %113
%115 = icmp eq i8 %105, 34
%116 = select i1 %114, i1 %115, i1 false
br i1 %116, label %117, label %130
117: ; preds = %112
%118 = getelementptr inbounds i8, i8* %50, i64 -1
%119 = load i8, i8* %118
%120 = icmp eq i8 %119, 34
br i1 %120, label %121, label %130
121: ; preds = %117
store i8 0, i8* %118
%122 = ptrtoint i8* %118 to i64
%123 = ptrtoint i8* %113 to i64
%124 = sub i64 %122, %123
%125 = trunc i64 %124 to i32
%126 = call i64 @script_string_entry_new(%struct.script_section* %24, i8* %25, i32 %125, i8* %113)
%127 = icmp eq i64 %126, 0
br i1 %127, label %128, label %259
128: ; preds = %121
%129 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %17
130: ; preds = %117, %112
%131 = call i64 @memcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %104, i32 5)
%132 = icmp eq i64 %131, 0
br i1 %132, label %133, label %226
133: ; preds = %130
%134 = getelementptr inbounds i8, i8* %104, i64 5
%135 = load i8, i8* %134
%136 = icmp eq i8 %135, 80
br i1 %136, label %137, label %143
137: ; preds = %133
%138 = getelementptr inbounds i8, i8* %104, i64 6
%139 = load i8, i8* %138
%140 = add i8 %139, -79
%141 = icmp ult i8 %140, -14
br i1 %141, label %17, label %142
142: ; preds = %137
br label %149
143: ; preds = %133
%144 = call i64 @memcmp(i8* %134, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%145 = icmp eq i64 %144, 0
br i1 %145, label %146, label %17
146: ; preds = %143
%147 = load i8, i8* %134
%148 = icmp eq i8 %147, 80
br i1 %148, label %149, label %154
149: ; preds = %142, %146
%150 = getelementptr inbounds i8, i8* %104, i64 6
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = add nsw i32 %152, -64
br label %154
154: ; preds = %146, %149
%155 = phi i64 [ 7, %149 ], [ 10, %146 ]
%156 = phi i32 [ %153, %149 ], [ 65535, %146 ]
%157 = getelementptr inbounds i8, i8* %104, i64 %155
%158 = call i64 @strtol(i8* %157, i8** %5, i32 10)
%159 = load i8*, i8** %5
%160 = icmp eq i8* %159, %157
br i1 %160, label %161, label %162
161: ; preds = %154
br label %253
162: ; preds = %154
%163 = icmp ugt i64 %158, 255
br i1 %163, label %164, label %169
164: ; preds = %162
%165 = load i32, i32* @stderr
%166 = ptrtoint i8* %157 to i64
%167 = add i64 %10, %166
%168 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %165, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i8* %1, i64 %23, i64 %167, i64 %158)
br label %224
169: ; preds = %162
%170 = trunc i64 %158 to i32
%171 = load i8, i8* %159
%172 = icmp eq i8 %171, 0
br i1 %172, label %218, label %173
173: ; preds = %169, %200
%174 = phi i64 [ %202, %200 ], [ 0, %169 ]
%175 = phi i8* [ %201, %200 ], [ %159, %169 ]
%176 = call i64 @memcmp(i8* %175, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%177 = icmp eq i64 %176, 0
br i1 %177, label %178, label %180
178: ; preds = %173
%179 = getelementptr inbounds i8, i8* %175, i64 9
br label %200
180: ; preds = %173
%181 = load i8, i8* %175
%182 = icmp eq i8 %181, 60
br i1 %182, label %183, label %214
183: ; preds = %180
%184 = getelementptr inbounds i8, i8* %175, i64 1
%185 = call i64 @strtol(i8* %184, i8** %5, i32 10)
%186 = load i8*, i8** %5
%187 = icmp eq i8* %186, %184
br i1 %187, label %212, label %188
188: ; preds = %183
%189 = icmp slt i64 %185, 0
%190 = load i64, i64* @INT32_MAX
%191 = icmp sgt i64 %185, %190
%192 = select i1 %189, i1 true, i1 %191
br i1 %192, label %207, label %193
193: ; preds = %188
%194 = load i8, i8* %186
%195 = icmp eq i8 %194, 62
br i1 %195, label %196, label %214
196: ; preds = %193
%197 = getelementptr inbounds i8, i8* %186, i64 1
%198 = trunc i64 %185 to i32
%199 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 %174
store i32 %198, i32* %199
br label %200
200: ; preds = %196, %178
%201 = phi i8* [ %179, %178 ], [ %197, %196 ]
%202 = add nuw nsw i64 %174, 1
%203 = load i8, i8* %201
%204 = icmp ne i8 %203, 0
%205 = icmp ult i64 %174, 3
%206 = select i1 %204, i1 %205, i1 false
br i1 %206, label %173, label %214
207: ; preds = %188
%208 = load i32, i32* @stderr
%209 = ptrtoint i8* %184 to i64
%210 = add i64 %10, %209
%211 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %208, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i8* %1, i64 %23, i64 %210, i64 %185)
br label %17
212: ; preds = %183
%213 = load i8, i8* %184
br label %214
214: ; preds = %180, %193, %200, %212
%215 = phi i8 [ %213, %212 ], [ %181, %180 ], [ %194, %193 ], [ %203, %200 ]
%216 = phi i8* [ %184, %212 ], [ %175, %180 ], [ %186, %193 ], [ %201, %200 ]
%217 = icmp eq i8 %215, 0
br i1 %217, label %218, label %225
218: ; preds = %169, %214
%219 = call i64 @script_gpio_entry_new(%struct.script_section* %24, i8* %25, i32 %156, i32 %170, i32* %14)
%220 = icmp eq i64 %219, 0
br i1 %220, label %222, label %221
221: ; preds = %218
br label %259
222: ; preds = %218
%223 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %224
224: ; preds = %222, %164
br label %17
225: ; preds = %214
br label %253
226: ; preds = %130
%227 = load i8, i8* %104
%228 = call i64 @isdigit(i8 signext %227)
%229 = icmp eq i64 %228, 0
br i1 %229, label %230, label %237
230: ; preds = %226
%231 = load i8, i8* %104
%232 = icmp eq i8 %231, 45
br i1 %232, label %233, label %253
233: ; preds = %230
%234 = load i8, i8* %113
%235 = call i64 @isdigit(i8 signext %234)
%236 = icmp eq i64 %235, 0
br i1 %236, label %253, label %237
237: ; preds = %233, %226
%238 = call i64 @strtoll(i8* %104, i8** %7, i32 0)
%239 = load i8*, i8** %7
%240 = icmp eq i8* %239, %50
br i1 %240, label %241, label %252
241: ; preds = %237
%242 = load i64, i64* @UINT32_MAX
%243 = icmp sgt i64 %238, %242
br i1 %243, label %244, label %247
244: ; preds = %241
%245 = load i32, i32* @stderr
%246 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %245, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i8* %1, i64 %23, i64 %238)
br label %251
247: ; preds = %241
%248 = call i64 @script_single_entry_new(%struct.script_section* %24, i8* %25, i64 %238)
%249 = icmp eq i64 %248, 0
br i1 %249, label %251, label %250
250: ; preds = %247
br label %259
251: ; preds = %247, %244
br label %17
252: ; preds = %237
br label %253
253: ; preds = %230, %233, %98, %252, %225, %161
%254 = phi i8* [ %216, %225 ], [ %239, %252 ], [ %157, %161 ], [ %99, %98 ], [ %104, %233 ], [ %104, %230 ]
%255 = load i32, i32* @stderr
%256 = ptrtoint i8* %254 to i64
%257 = add i64 %10, %256
%258 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %255, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %1, i64 %23, i64 %257)
br label %17
259: ; preds = %250, %221, %107, %121, %69, %52, %52, %48
%260 = phi %struct.script_section* [ %24, %52 ], [ %24, %52 ], [ %24, %48 ], [ %70, %69 ], [ %24, %121 ], [ %24, %107 ], [ %24, %221 ], [ %24, %250 ]
%261 = add i64 %23, 1
%262 = call i64 @fgets(i8* %8, i32 256, i32* %0)
%263 = icmp eq i64 %262, 0
br i1 %263, label %17, label %22
}