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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int,
                           char const *, int, int);
scalar_t__ isalnum(char);
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
scalar_t__ isprint(char);
scalar_t__ isspace(char);
int open(char const *, int /*<<< orphan*/);
scalar_t__ parse(int, char *, int, int);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int str2token(char *);
int lex(const char *path) {
  int fd = -1, i = 0, n = -1, t_i = 0, line = 1, col = 1, src_line = 0;
  int tok_id = 0, yy_col = 1;
  char c = '\0', buf[1024], tok[64];
  void *parser = NULL;
  enum {
    LL_START = 0,
    LL_COMMENT = 1,
    LL_INTEGER = 2,
    LL_WORD = 3,
    LL_STRING = 4,
    LL_QUOTE = 5,
    LL_ERROR = 255
  } ll_state = LL_START;
  buf[0] = '\0';
  if ((fd = open(path, O_RDONLY)) < 0) {
    perror("open");
    return (-1);
  }
  for (;;) {
    if ((n = read(fd, buf, 1024)) < 0) {
      if (EINTR == errno) {
        continue;
      } else {
        perror("read");
        close(fd);
        return (-1);
      }
    } else if (0 == n) {
      close(fd);
      if ((LL_START == ll_state) || (LL_COMMENT == ll_state) ||
          (LL_QUOTE == ll_state)) {
        return (parse(34, "", line, yy_col));
      } else if (LL_WORD == ll_state) {
        if (0 != (tok_id = str2token(tok))) {
          if (0 == parse(tok_id, tok, line, yy_col)) {
            return (parse(34, "", line, yy_col));
          } else {
            return (-1);
          }
        } else {
          do {
            src_line = 160;
            ll_state = LL_ERROR;
          } while (0);
        }
      } else if (LL_INTEGER == ll_state) {
        return (parse(26, tok, line, yy_col));
      } else {
        return (-1);
      }
    } else {
      for (i = 0; i < n; i++) {
        c = buf[i];
        if (LL_START == ll_state) {
          if (('\n' == c) || isspace(c)) {
            ll_state = LL_START;
          } else if ('#' == c) {
            ll_state = LL_COMMENT;
          } else if (isdigit(c)) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 176;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
            ll_state = LL_INTEGER;
            yy_col = col;
          } else if (('_' == c) || isalpha(c)) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 178;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
            ll_state = LL_WORD;
            yy_col = col;
          } else if ('\'' == c) {
            ll_state = LL_STRING;
            yy_col = col;
            tok[0] = '\0';
          } else if ('=' == c) {
            yy_col = col;
            if (parse(5, "=", line, yy_col) < 0) {
              return (-1);
            } else {
              ll_state = LL_START;
            }
          } else {
            do {
              src_line = 189;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else if (LL_INTEGER == ll_state) {
          if (isdigit(c)) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 193;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
          } else if (isspace(c)) {
            if (parse(26, tok, line, yy_col) < 0) {
              return (-1);
            } else {
              t_i = 0;
              ll_state = LL_START;
            }
          } else {
            do {
              src_line = 201;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else if (LL_WORD == ll_state) {
          if (isalnum(c) || ('_' == c)) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 205;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
          } else if (isspace(c)) {
            if ((tok_id = str2token(tok)) > 0) {
              if (parse(tok_id, tok, line, yy_col) < 0) {
                return (-1);
              } else {
                ll_state = LL_START;
                t_i = 0;
              }
            } else {
              do {
                src_line = 214;
                ll_state = LL_ERROR;
              } while (0);
            }
          } else if (':' == c) {
            if ((tok_id = str2token(tok)) > 0) {
              if (parse(tok_id, tok, line, yy_col) < 0) {
                return (-1);
              } else if (parse(3, ":", line, yy_col) < 0) {
                return (-1);
              } else {
                ll_state = LL_START;
                t_i = 0;
              }
            } else {
              do {
                src_line = 226;
                ll_state = LL_ERROR;
              } while (0);
            }
          } else if ('=' == c) {
            if ((tok_id = str2token(tok)) > 0) {
              if (parse(tok_id, tok, line, yy_col) < 0) {
                return (-1);
              } else if (parse(5, "=", line, yy_col) < 0) {
                return (-1);
              } else {
                ll_state = LL_START;
                t_i = 0;
              }
            } else {
              do {
                src_line = 238;
                ll_state = LL_ERROR;
              } while (0);
            }
          } else {
            do {
              src_line = 241;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else if (LL_COMMENT == ll_state) {
          if ('\n' == c) {
            ll_state = LL_START;
          } else if (!isprint(c)) {
            do {
              src_line = 247;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else if (LL_STRING == ll_state) {
          if ('\'' == c) {
            ll_state = LL_QUOTE;
          } else if (isprint(c)) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 253;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
          } else {
            do {
              src_line = 255;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else if (LL_QUOTE == ll_state) {
          if ('\'' == c) {
            do {
              if (t_i < 64 - 1) {
                tok[t_i++] = c;
                tok[t_i] = '\0';
              } else {
                do {
                  src_line = 259;
                  ll_state = LL_ERROR;
                } while (0);
              }
            } while (0);
            ll_state = LL_STRING;
          } else if (isspace(c)) {
            if (parse(6, tok, line, yy_col) < 0) {
              return (-1);
            } else {
              ll_state = LL_START;
              t_i = 0;
            }
          } else {
            do {
              src_line = 267;
              ll_state = LL_ERROR;
            } while (0);
          }
        } else {
          do {
            src_line = 270;
            ll_state = LL_ERROR;
          } while (0);
        }
        if (LL_ERROR == ll_state) {
          (void)fprintf(stderr, "%s(%d): ERROR: Lexical error @ %s(%d.%d)\n",
                        "/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/zma0472/"
                        "miso/refs/heads/master/src/lex.c",
                        src_line, path, line, col);
          return (-1);
        }
        if ('\n' == c) {
          line++;
          col = 1;
        } else {
          col++;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<lex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4a0,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
movb   $0x0,-0x35(%rbp)
movq   $0x0,-0x488(%rbp)
movl   $0x0,-0x48c(%rbp)
movb   $0x0,-0x440(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2daf(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1264 <lex+0xa4>
lea    0xdad(%rip),%rdi
call   10d0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
jmp    1269 <lex+0xa9>
mov    -0x14(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x400,%edx
call   1070 <read@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    12c8 <lex+0x108>
mov    0x2d38(%rip),%rax
mov    (%rax),%rax
mov    0x2d36(%rip),%rcx
cmp    (%rcx),%rax
jne    12a8 <lex+0xe8>
jmp    1269 <lex+0xa9>
lea    0xd56(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
xor    %eax,%eax
cmp    -0x1c(%rbp),%eax
jne    140a <lex+0x24a>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
cmp    -0x48c(%rbp),%eax
je     130b <lex+0x14b>
mov    $0x1,%eax
cmp    -0x48c(%rbp),%eax
je     130b <lex+0x14b>
mov    $0x5,%eax
cmp    -0x48c(%rbp),%eax
jne    132a <lex+0x16a>
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x22,%edi
lea    0xd1a(%rip),%rsi
call   10e0 <parse@plt>
mov    %eax,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
mov    $0x3,%eax
cmp    -0x48c(%rbp),%eax
jne    13c4 <lex+0x204>
lea    -0x480(%rbp),%rdi
call   1080 <str2token@plt>
mov    %eax,%ecx
mov    %ecx,-0x30(%rbp)
xor    %eax,%eax
cmp    %ecx,%eax
je     13a4 <lex+0x1e4>
mov    -0x30(%rbp),%edi
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   10e0 <parse@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1398 <lex+0x1d8>
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x22,%edi
lea    0xcac(%rip),%rsi
call   10e0 <parse@plt>
mov    %eax,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
jmp    13a9 <lex+0x1e9>
movl   $0xa0,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    13bf <lex+0x1ff>
jmp    1400 <lex+0x240>
mov    $0x2,%eax
cmp    -0x48c(%rbp),%eax
jne    13f4 <lex+0x234>
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x1a,%edi
call   10e0 <parse@plt>
mov    %eax,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
jmp    1405 <lex+0x245>
jmp    1d09 <lex+0xb49>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1d04 <lex+0xb44>
movslq -0x18(%rbp),%rax
mov    -0x440(%rbp,%rax,1),%al
mov    %al,-0x35(%rbp)
xor    %eax,%eax
cmp    -0x48c(%rbp),%eax
jne    1654 <lex+0x494>
movsbl -0x35(%rbp),%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
je     145d <lex+0x29d>
movsbl -0x35(%rbp),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     146c <lex+0x2ac>
movl   $0x0,-0x48c(%rbp)
jmp    164f <lex+0x48f>
movsbl -0x35(%rbp),%ecx
mov    $0x23,%eax
cmp    %ecx,%eax
jne    148c <lex+0x2cc>
movl   $0x1,-0x48c(%rbp)
jmp    164a <lex+0x48a>
movsbl -0x35(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     150b <lex+0x34b>
jmp    14a4 <lex+0x2e4>
cmpl   $0x3f,-0x20(%rbp)
jge    14d6 <lex+0x316>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    14f1 <lex+0x331>
jmp    14db <lex+0x31b>
movl   $0xb0,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    14f1 <lex+0x331>
jmp    14f6 <lex+0x336>
movl   $0x2,-0x48c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1645 <lex+0x485>
movsbl -0x35(%rbp),%ecx
mov    $0x5f,%eax
cmp    %ecx,%eax
je     152f <lex+0x36f>
movsbl -0x35(%rbp),%edi
call   10a0 <isalpha@plt>
cmp    $0x0,%rax
je     159b <lex+0x3db>
jmp    1534 <lex+0x374>
cmpl   $0x3f,-0x20(%rbp)
jge    1566 <lex+0x3a6>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    1581 <lex+0x3c1>
jmp    156b <lex+0x3ab>
movl   $0xb2,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1581 <lex+0x3c1>
jmp    1586 <lex+0x3c6>
movl   $0x3,-0x48c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1640 <lex+0x480>
movsbl -0x35(%rbp),%ecx
mov    $0x27,%eax
cmp    %ecx,%eax
jne    15c8 <lex+0x408>
movl   $0x4,-0x48c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
movb   $0x0,-0x480(%rbp)
jmp    163b <lex+0x47b>
movsbl -0x35(%rbp),%ecx
mov    $0x3d,%eax
cmp    %ecx,%eax
jne    161b <lex+0x45b>
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x5,%edi
lea    0xa19(%rip),%rsi
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    160c <lex+0x44c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x48c(%rbp)
jmp    1636 <lex+0x476>
jmp    1620 <lex+0x460>
movl   $0xbd,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1636 <lex+0x476>
jmp    163b <lex+0x47b>
jmp    1640 <lex+0x480>
jmp    1645 <lex+0x485>
jmp    164a <lex+0x48a>
jmp    164f <lex+0x48f>
jmp    1c78 <lex+0xab8>
mov    $0x2,%eax
cmp    -0x48c(%rbp),%eax
jne    174f <lex+0x58f>
movsbl -0x35(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     16d4 <lex+0x514>
jmp    167d <lex+0x4bd>
cmpl   $0x3f,-0x20(%rbp)
jge    16af <lex+0x4ef>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    16ca <lex+0x50a>
jmp    16b4 <lex+0x4f4>
movl   $0xc1,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    16ca <lex+0x50a>
jmp    16cf <lex+0x50f>
jmp    174a <lex+0x58a>
movsbl -0x35(%rbp),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     172a <lex+0x56a>
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x1a,%edi
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    1714 <lex+0x554>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x48c(%rbp)
jmp    1745 <lex+0x585>
jmp    172f <lex+0x56f>
movl   $0xc9,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1745 <lex+0x585>
jmp    174a <lex+0x58a>
jmp    1c73 <lex+0xab3>
mov    $0x3,%eax
cmp    -0x48c(%rbp),%eax
jne    1a13 <lex+0x853>
movsbl -0x35(%rbp),%edi
call   1040 <isalnum@plt>
cmp    $0x0,%rax
jne    1784 <lex+0x5c4>
movsbl -0x35(%rbp),%ecx
mov    $0x5f,%eax
cmp    %ecx,%eax
jne    17e0 <lex+0x620>
jmp    1789 <lex+0x5c9>
cmpl   $0x3f,-0x20(%rbp)
jge    17bb <lex+0x5fb>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    17d6 <lex+0x616>
jmp    17c0 <lex+0x600>
movl   $0xcd,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    17d6 <lex+0x616>
jmp    17db <lex+0x61b>
jmp    1a0e <lex+0x84e>
movsbl -0x35(%rbp),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     186c <lex+0x6ac>
lea    -0x480(%rbp),%rdi
call   1080 <str2token@plt>
mov    %eax,-0x30(%rbp)
cmp    $0x0,%eax
jle    184c <lex+0x68c>
mov    -0x30(%rbp),%edi
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    1836 <lex+0x676>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x48c(%rbp)
movl   $0x0,-0x20(%rbp)
jmp    1867 <lex+0x6a7>
jmp    1851 <lex+0x691>
movl   $0xd6,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1867 <lex+0x6a7>
jmp    1a09 <lex+0x849>
movsbl -0x35(%rbp),%ecx
mov    $0x3a,%eax
cmp    %ecx,%eax
jne    1928 <lex+0x768>
lea    -0x480(%rbp),%rdi
call   1080 <str2token@plt>
mov    %eax,-0x30(%rbp)
cmp    $0x0,%eax
jle    1908 <lex+0x748>
mov    -0x30(%rbp),%edi
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    18c0 <lex+0x700>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x3,%edi
lea    0x73a(%rip),%rsi
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    18ed <lex+0x72d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x48c(%rbp)
movl   $0x0,-0x20(%rbp)
jmp    1903 <lex+0x743>
jmp    1923 <lex+0x763>
jmp    190d <lex+0x74d>
movl   $0xe2,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1923 <lex+0x763>
jmp    1a04 <lex+0x844>
movsbl -0x35(%rbp),%ecx
mov    $0x3d,%eax
cmp    %ecx,%eax
jne    19e4 <lex+0x824>
lea    -0x480(%rbp),%rdi
call   1080 <str2token@plt>
mov    %eax,-0x30(%rbp)
cmp    $0x0,%eax
jle    19c4 <lex+0x804>
mov    -0x30(%rbp),%edi
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    197c <lex+0x7bc>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x5,%edi
lea    0x67c(%rip),%rsi
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    19a9 <lex+0x7e9>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x48c(%rbp)
movl   $0x0,-0x20(%rbp)
jmp    19bf <lex+0x7ff>
jmp    19df <lex+0x81f>
jmp    19c9 <lex+0x809>
movl   $0xee,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    19df <lex+0x81f>
jmp    19ff <lex+0x83f>
jmp    19e9 <lex+0x829>
movl   $0xf1,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    19ff <lex+0x83f>
jmp    1a04 <lex+0x844>
jmp    1a09 <lex+0x849>
jmp    1a0e <lex+0x84e>
jmp    1c6e <lex+0xaae>
mov    $0x1,%eax
cmp    -0x48c(%rbp),%eax
jne    1a7c <lex+0x8bc>
movsbl -0x35(%rbp),%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
jne    1a44 <lex+0x884>
movl   $0x0,-0x48c(%rbp)
jmp    1a77 <lex+0x8b7>
movsbl -0x35(%rbp),%edi
call   10b0 <isprint@plt>
cmp    $0x0,%rax
jne    1a72 <lex+0x8b2>
jmp    1a5c <lex+0x89c>
movl   $0xf7,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1a72 <lex+0x8b2>
jmp    1a77 <lex+0x8b7>
jmp    1c69 <lex+0xaa9>
mov    $0x4,%eax
cmp    -0x48c(%rbp),%eax
jne    1b41 <lex+0x981>
movsbl -0x35(%rbp),%ecx
mov    $0x27,%eax
cmp    %ecx,%eax
jne    1aad <lex+0x8ed>
movl   $0x5,-0x48c(%rbp)
jmp    1b3c <lex+0x97c>
movsbl -0x35(%rbp),%edi
call   10b0 <isprint@plt>
cmp    $0x0,%rax
je     1b1c <lex+0x95c>
jmp    1ac5 <lex+0x905>
cmpl   $0x3f,-0x20(%rbp)
jge    1af7 <lex+0x937>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    1b12 <lex+0x952>
jmp    1afc <lex+0x93c>
movl   $0xfd,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1b12 <lex+0x952>
jmp    1b17 <lex+0x957>
jmp    1b37 <lex+0x977>
jmp    1b21 <lex+0x961>
movl   $0xff,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1b37 <lex+0x977>
jmp    1b3c <lex+0x97c>
jmp    1c64 <lex+0xaa4>
mov    $0x5,%eax
cmp    -0x48c(%rbp),%eax
jne    1c44 <lex+0xa84>
movsbl -0x35(%rbp),%ecx
mov    $0x27,%eax
cmp    %ecx,%eax
jne    1bc9 <lex+0xa09>
jmp    1b68 <lex+0x9a8>
cmpl   $0x3f,-0x20(%rbp)
jge    1b9a <lex+0x9da>
mov    -0x35(%rbp),%cl
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x20(%rbp)
cltq
mov    %cl,-0x480(%rbp,%rax,1)
movslq -0x20(%rbp),%rax
movb   $0x0,-0x480(%rbp,%rax,1)
jmp    1bb5 <lex+0x9f5>
jmp    1b9f <lex+0x9df>
movl   $0x103,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1bb5 <lex+0x9f5>
jmp    1bba <lex+0x9fa>
movl   $0x4,-0x48c(%rbp)
jmp    1c3f <lex+0xa7f>
movsbl -0x35(%rbp),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     1c1f <lex+0xa5f>
lea    -0x480(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    $0x6,%edi
call   10e0 <parse@plt>
cmp    $0x0,%rax
jge    1c09 <lex+0xa49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movl   $0x0,-0x48c(%rbp)
movl   $0x0,-0x20(%rbp)
jmp    1c3a <lex+0xa7a>
jmp    1c24 <lex+0xa64>
movl   $0x10b,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1c3a <lex+0xa7a>
jmp    1c3f <lex+0xa7f>
jmp    1c5f <lex+0xa9f>
jmp    1c49 <lex+0xa89>
movl   $0x10e,-0x2c(%rbp)
movl   $0xff,-0x48c(%rbp)
jmp    1c5f <lex+0xa9f>
jmp    1c64 <lex+0xaa4>
jmp    1c69 <lex+0xaa9>
jmp    1c6e <lex+0xaae>
jmp    1c73 <lex+0xab3>
jmp    1c78 <lex+0xab8>
mov    $0xff,%eax
cmp    -0x48c(%rbp),%eax
jne    1cc2 <lex+0xb02>
mov    0x2348(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
lea    0x367(%rip),%rsi
lea    0x38a(%rip),%rdx
mov    %eax,(%rsp)
call   1090 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d13 <lex+0xb53>
movsbl -0x35(%rbp),%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
jne    1ce8 <lex+0xb28>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
jmp    1cf1 <lex+0xb31>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1cf6 <lex+0xb36>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1411 <lex+0x251>
jmp    1d09 <lex+0xb49>
jmp    1d0e <lex+0xb4e>
jmp    1269 <lex+0xa9>
mov    -0x4(%rbp),%eax
add    $0x4a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x488,%rsp
mov    %rdi,%rbp
movb   $0x0,0x80(%rsp)
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
test   %eax,%eax
js     17e8 <lex+0x628>
mov    %eax,%ebx
mov    %rbp,0x70(%rsp)
xor    %eax,%eax
mov    %rax,0x18(%rsp)
lea    0x80(%rsp),%rbp
mov    0x2db9(%rip),%r13
mov    0x2dba(%rip),%r15
mov    $0x1,%r9d
mov    $0x1,%r12d
movl   $0x1,0x14(%rsp)
xor    %r14d,%r14d
mov    %r9d,0x10(%rsp)
jmp    124d <lex+0x8d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13),%rax
cmp    (%r15),%rax
jne    1774 <lex+0x5b4>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x400,%edx
call   1070 <read@plt>
test   %eax,%eax
js     1240 <lex+0x80>
jne    128c <lex+0xcc>
mov    %ebx,%edi
call   1050 <close@plt>
cmp    $0x3,%r14d
jne    1754 <lex+0x594>
lea    0x30(%rsp),%rdi
call   1080 <str2token@plt>
mov    $0xff,%r14d
test   %eax,%eax
je     124d <lex+0x8d>
jmp    179a <lex+0x5da>
mov    %eax,%eax
mov    %rax,0x78(%rsp)
xor    %edx,%edx
mov    0x10(%rsp),%r9d
jmp    12d6 <lex+0x116>
mov    %eax,%esi
mov    $0x1,%r14d
mov    0x10(%rsp),%r9d
mov    0x20(%rsp),%rdx
add    $0x1,%r12d
xor    %eax,%eax
cmp    $0xa,%sil
mov    $0x1,%ecx
cmove  %ecx,%r12d
sete   %al
add    %eax,%r9d
add    $0x1,%rdx
cmp    %rdx,0x78(%rsp)
je     122d <lex+0x6d>
cmp    $0x5,%r14d
ja     17f6 <lex+0x636>
movzbl 0x80(%rsp,%rdx,1),%esi
mov    %r14d,%eax
lea    0xd0e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %r14d,%r14d
cmp    $0xa,%sil
je     12ae <lex+0xee>
mov    %rdx,0x20(%rsp)
mov    %r9d,0x10(%rsp)
movsbl %sil,%edi
mov    %edi,0x2c(%rsp)
mov    %sil,0xf(%rsp)
call   1060 <isspace@plt>
test   %rax,%rax
je     1583 <lex+0x3c3>
mov    0x10(%rsp),%r9d
mov    0x20(%rsp),%rdx
movzbl 0xf(%rsp),%esi
jmp    12ae <lex+0xee>
xor    %r14d,%r14d
cmp    $0xa,%sil
je     12ae <lex+0xee>
movsbl %sil,%edi
mov    %r9d,0x10(%rsp)
mov    %rdx,%r14
mov    %sil,0xf(%rsp)
call   10b0 <isprint@plt>
movzbl 0xf(%rsp),%esi
mov    %r14,%rdx
mov    0x10(%rsp),%r9d
mov    $0x1,%r14d
test   %rax,%rax
jne    12ae <lex+0xee>
jmp    1804 <lex+0x644>
mov    %rdx,0x20(%rsp)
mov    %r9d,0x10(%rsp)
mov    %sil,0xf(%rsp)
movsbl %sil,%r14d
mov    %r14d,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     152f <lex+0x36f>
mov    0x18(%rsp),%rax
cmp    $0x3e,%eax
jg     17fd <lex+0x63d>
cltq
lea    0x1(%rax),%rcx
mov    %rcx,0x18(%rsp)
movzbl 0xf(%rsp),%esi
mov    %sil,0x30(%rsp,%rax,1)
movb   $0x0,0x31(%rsp,%rax,1)
mov    $0x2,%r14d
jmp    12a4 <lex+0xe4>
mov    %rdx,0x20(%rsp)
mov    %r9d,0x10(%rsp)
movsbl %sil,%r14d
mov    %r14d,%edi
mov    %sil,0xf(%rsp)
call   1040 <isalnum@plt>
movzbl 0xf(%rsp),%esi
test   %rax,%rax
jne    14d6 <lex+0x316>
cmp    $0x5f,%sil
je     14d6 <lex+0x316>
mov    %r14d,%edi
call   1060 <isspace@plt>
test   %rax,%rax
lea    0x30(%rsp),%r14
je     15e0 <lex+0x420>
mov    %r14,%rdi
call   1080 <str2token@plt>
test   %eax,%eax
jle    1831 <lex+0x671>
mov    %eax,%edi
mov    %r14,%rsi
jmp    154a <lex+0x38a>
mov    $0x5,%r14d
cmp    $0x27,%sil
je     12ae <lex+0xee>
mov    %rdx,%r14
mov    %r9d,0x10(%rsp)
mov    %sil,0xf(%rsp)
movsbl %sil,%edi
call   10b0 <isprint@plt>
test   %rax,%rax
je     180b <lex+0x64b>
mov    0x18(%rsp),%rax
cmp    $0x3e,%eax
mov    0x10(%rsp),%r9d
jg     1823 <lex+0x663>
mov    %r14,%rdx
cltq
lea    0x1(%rax),%rcx
mov    %rcx,0x18(%rsp)
movzbl 0xf(%rsp),%esi
mov    %sil,0x30(%rsp,%rax,1)
movb   $0x0,0x31(%rsp,%rax,1)
mov    $0x4,%r14d
jmp    12ae <lex+0xee>
cmp    $0x27,%sil
jne    1504 <lex+0x344>
mov    $0x4,%r14d
mov    0x18(%rsp),%rcx
cmp    $0x3e,%ecx
jg     12ae <lex+0xee>
movslq %ecx,%rax
add    $0x1,%ecx
mov    %rcx,0x18(%rsp)
movw   $0x27,0x30(%rsp,%rax,1)
jmp    12ae <lex+0xee>
mov    0x18(%rsp),%rax
cmp    $0x3e,%eax
jg     1812 <lex+0x652>
cltq
lea    0x1(%rax),%rcx
mov    %rcx,0x18(%rsp)
mov    %sil,0x30(%rsp,%rax,1)
movb   $0x0,0x31(%rsp,%rax,1)
mov    $0x3,%r14d
jmp    12a4 <lex+0xe4>
mov    %rdx,0x20(%rsp)
mov    %r9d,%r14d
mov    %sil,0xf(%rsp)
movsbl %sil,%edi
call   1060 <isspace@plt>
test   %rax,%rax
je     1819 <lex+0x659>
mov    $0x6,%edi
lea    0x30(%rsp),%rsi
jmp    154f <lex+0x38f>
mov    %r14d,%edi
call   1060 <isspace@plt>
test   %rax,%rax
lea    0x30(%rsp),%rsi
je     182a <lex+0x66a>
mov    $0x1a,%edi
mov    0x10(%rsp),%r14d
mov    %r14d,%edx
mov    0x14(%rsp),%ecx
call   10e0 <parse@plt>
mov    %r14d,%r9d
xor    %ecx,%ecx
mov    %rcx,0x18(%rsp)
mov    $0x0,%r14d
test   %rax,%rax
mov    0x20(%rsp),%rdx
movzbl 0xf(%rsp),%esi
jns    12ae <lex+0xee>
jmp    1787 <lex+0x5c7>
movzbl 0xf(%rsp),%eax
cmp    $0x23,%al
je     129c <lex+0xdc>
mov    0x2c(%rsp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     16ae <lex+0x4ee>
mov    $0x2,%r14d
mov    0x18(%rsp),%rax
cmp    $0x3e,%eax
mov    0x10(%rsp),%r9d
mov    0x20(%rsp),%rdx
movzbl 0xf(%rsp),%esi
jg     15d6 <lex+0x416>
cltq
lea    0x1(%rax),%rcx
mov    %rcx,0x18(%rsp)
mov    %sil,0x30(%rsp,%rax,1)
movb   $0x0,0x31(%rsp,%rax,1)
mov    %r12d,0x14(%rsp)
jmp    12ae <lex+0xee>
movzbl 0xf(%rsp),%eax
cmp    $0x3d,%al
je     1633 <lex+0x473>
cmp    $0x3a,%al
jne    1838 <lex+0x678>
mov    %r14,%rdi
call   1080 <str2token@plt>
test   %eax,%eax
jle    183f <lex+0x67f>
mov    %eax,%edi
mov    %r14,%rsi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%r14d
mov    %r14d,%ecx
call   10e0 <parse@plt>
mov    $0xffffffff,%ecx
test   %rax,%rax
js     17d4 <lex+0x614>
mov    $0x3,%edi
lea    0x9f3(%rip),%rsi
jmp    1673 <lex+0x4b3>
mov    %r14,%rdi
call   1080 <str2token@plt>
test   %eax,%eax
jle    1846 <lex+0x686>
mov    %eax,%edi
mov    %r14,%rsi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%r14d
mov    %r14d,%ecx
call   10e0 <parse@plt>
mov    $0xffffffff,%ecx
test   %rax,%rax
js     17d4 <lex+0x614>
mov    $0x5,%edi
lea    0x9af(%rip),%rsi
mov    0x10(%rsp),%edx
mov    %r14d,%ecx
call   10e0 <parse@plt>
xor    %ecx,%ecx
mov    %rcx,0x18(%rsp)
mov    $0xffffffff,%ecx
mov    $0x0,%r14d
test   %rax,%rax
mov    0x10(%rsp),%r9d
mov    0x20(%rsp),%rdx
movzbl 0xf(%rsp),%esi
jns    12ae <lex+0xee>
jmp    17d4 <lex+0x614>
movzbl 0xf(%rsp),%esi
cmp    $0x5f,%sil
je     16cc <lex+0x50c>
mov    0x2c(%rsp),%edi
call   10a0 <isalpha@plt>
movzbl 0xf(%rsp),%esi
test   %rax,%rax
je     16ef <lex+0x52f>
mov    $0x3,%r14d
mov    0x18(%rsp),%rax
cmp    $0x3e,%eax
mov    0x10(%rsp),%r9d
mov    0x20(%rsp),%rdx
jle    15c1 <lex+0x401>
jmp    15d6 <lex+0x416>
cmp    $0x3d,%sil
mov    0x10(%rsp),%r9d
je     171e <lex+0x55e>
cmp    $0x27,%sil
mov    0x20(%rsp),%rdx
jne    187a <lex+0x6ba>
movb   $0x0,0x30(%rsp)
mov    $0x4,%r14d
mov    %r12d,0x14(%rsp)
jmp    12ae <lex+0xee>
mov    $0x5,%edi
lea    0x8f8(%rip),%rsi
mov    %r9d,%edx
mov    %r12d,%ecx
call   10e0 <parse@plt>
movzbl 0xf(%rsp),%esi
mov    0x10(%rsp),%r9d
mov    %r12d,0x14(%rsp)
test   %rax,%rax
mov    0x20(%rsp),%rdx
jns    12ae <lex+0xee>
jmp    1787 <lex+0x5c7>
cmp    $0x2,%r14d
mov    0x10(%rsp),%edx
jb     1766 <lex+0x5a6>
je     178e <lex+0x5ce>
cmp    $0x5,%r14d
jne    1787 <lex+0x5c7>
lea    0x8e2(%rip),%rsi
mov    $0x22,%edi
jmp    17c8 <lex+0x608>
lea    0x8a2(%rip),%rdi
call   10d0 <perror@plt>
mov    %ebx,%edi
call   1050 <close@plt>
mov    $0xffffffff,%ecx
jmp    17d4 <lex+0x614>
lea    0x30(%rsp),%rsi
mov    $0x1a,%edi
jmp    17c8 <lex+0x608>
lea    0x30(%rsp),%rsi
mov    %eax,%edi
mov    0x10(%rsp),%ebx
mov    %ebx,%edx
mov    0x14(%rsp),%ecx
call   10e0 <parse@plt>
mov    $0xffffffff,%ecx
test   %rax,%rax
jne    17d4 <lex+0x614>
lea    0x88e(%rip),%rsi
mov    $0x22,%edi
mov    %ebx,%edx
mov    0x14(%rsp),%ecx
call   10e0 <parse@plt>
mov    %rax,%rcx
mov    %ecx,%eax
add    $0x488,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x829(%rip),%rdi
call   10d0 <perror@plt>
jmp    1787 <lex+0x5c7>
mov    $0x10e,%ecx
jmp    1850 <lex+0x690>
mov    $0xc1,%ecx
jmp    184b <lex+0x68b>
mov    $0xf7,%ecx
jmp    1850 <lex+0x690>
mov    $0xff,%ecx
jmp    184b <lex+0x68b>
mov    $0xcd,%ecx
jmp    184b <lex+0x68b>
mov    $0x10b,%ecx
mov    %r14d,%r9d
jmp    1850 <lex+0x690>
mov    $0xfd,%ecx
jmp    1850 <lex+0x690>
mov    $0xc9,%ecx
jmp    184b <lex+0x68b>
mov    $0xd6,%ecx
jmp    184b <lex+0x68b>
mov    $0xf1,%ecx
jmp    184b <lex+0x68b>
mov    $0xe2,%ecx
jmp    184b <lex+0x68b>
mov    $0xee,%ecx
mov    0x10(%rsp),%r9d
mov    0x2781(%rip),%rax
mov    (%rax),%edi
mov    %r12d,(%rsp)
lea    0x7c2(%rip),%rsi
lea    0x7e5(%rip),%rdx
mov    0x70(%rsp),%r8
call   1090 <fprintf@plt>
jmp    1787 <lex+0x5c7>
mov    $0xbd,%ecx
jmp    1850 <lex+0x690>

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

LLVM IR (-O2):
@O_RDONLY = global i32 0
@.str = [5 x i8] c"open\00"
@EINTR = global i64 0
@errno = global i64 0
@.str.1 = [5 x i8] c"read\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [2 x i8] c"=\00"
@.str.4 = [2 x i8] c":\00"
@stderr = global i32 0
@.str.5 = [42 x i8] c"%s(%d): ERROR: Lexical error @ %s(%d.%d)\0A\00"
@.str.6 = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zma0472/miso/refs/heads/master/src/lex.c\00"
define i32 @lex(i8* %0) {
%2 = alloca [1024 x i8]
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%6 = load i32, i32* @O_RDONLY
%7 = tail call i32 @open(i8* %0, i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %194
9: ; preds = %1
%10 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %202
11: ; preds = %200, %14
%12 = call i32 @read(i32 %7, i8* %4, i32 1024)
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i64, i64* @EINTR
%16 = load i64, i64* @errno
%17 = icmp eq i64 %15, %16
br i1 %17, label %11, label %18
18: ; preds = %14
%19 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @close(i32 %7)
br label %202
21: ; preds = %11
%22 = icmp eq i32 %12, 0
br i1 %22, label %25, label %23
23: ; preds = %21
%24 = zext i32 %12 to i64
br label %42
25: ; preds = %21
%26 = call i32 @close(i32 %7)
switch i32 %201, label %202 [
i32 5, label %27
i32 1, label %27
i32 0, label %27
i32 3, label %30
i32 2, label %39
]
27: ; preds = %25, %25, %25
%28 = call i64 @parse(i32 34, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %196, i32 %198)
%29 = trunc i64 %28 to i32
br label %202
30: ; preds = %25
%31 = call i32 @str2token(i8* %5)
%32 = icmp eq i32 %31, 0
br i1 %32, label %200, label %33
33: ; preds = %30
%34 = call i64 @parse(i32 %31, i8* %5, i32 %196, i32 %198)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %202
36: ; preds = %33
%37 = call i64 @parse(i32 34, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %196, i32 %198)
%38 = trunc i64 %37 to i32
br label %202
39: ; preds = %25
%40 = call i64 @parse(i32 26, i8* %5, i32 %196, i32 %198)
%41 = trunc i64 %40 to i32
br label %202
42: ; preds = %23, %183
%43 = phi i64 [ 0, %23 ], [ %192, %183 ]
%44 = phi i32 [ %201, %23 ], [ %186, %183 ]
%45 = phi i32 [ %198, %23 ], [ %185, %183 ]
%46 = phi i32 [ %197, %23 ], [ %191, %183 ]
%47 = phi i32 [ %196, %23 ], [ %190, %183 ]
%48 = phi i32 [ %195, %23 ], [ %184, %183 ]
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %43
%50 = load i8, i8* %49
switch i32 %44, label %179 [
i32 0, label %51
i32 2, label %87
i32 3, label %104
i32 1, label %145
i32 4, label %150
i32 5, label %163
]
51: ; preds = %42
%52 = icmp eq i8 %50, 10
br i1 %52, label %183, label %53
53: ; preds = %51
%54 = call i64 @isspace(i8 signext %50)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %183
56: ; preds = %53
%57 = icmp eq i8 %50, 35
br i1 %57, label %183, label %58
58: ; preds = %56
%59 = call i64 @isdigit(i8 signext %50)
%60 = icmp eq i64 %59, 0
br i1 %60, label %69, label %61
61: ; preds = %58
%62 = icmp slt i32 %48, 63
br i1 %62, label %63, label %183
63: ; preds = %61
%64 = add nsw i32 %48, 1
%65 = sext i32 %48 to i64
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %65
store i8 %50, i8* %66
%67 = sext i32 %64 to i64
%68 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %67
store i8 0, i8* %68
br label %183
69: ; preds = %58
%70 = icmp eq i8 %50, 95
br i1 %70, label %74, label %71
71: ; preds = %69
%72 = call i64 @isalpha(i8 signext %50)
%73 = icmp eq i64 %72, 0
br i1 %73, label %82, label %74
74: ; preds = %69, %71
%75 = icmp slt i32 %48, 63
br i1 %75, label %76, label %183
76: ; preds = %74
%77 = add nsw i32 %48, 1
%78 = sext i32 %48 to i64
%79 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %78
store i8 %50, i8* %79
%80 = sext i32 %77 to i64
%81 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %80
store i8 0, i8* %81
br label %183
82: ; preds = %71
switch i8 %50, label %179 [
i8 39, label %83
i8 61, label %84
]
83: ; preds = %82
store i8 0, i8* %5
br label %183
84: ; preds = %82
%85 = call i64 @parse(i32 5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %47, i32 %46)
%86 = icmp slt i64 %85, 0
br i1 %86, label %202, label %183
87: ; preds = %42
%88 = call i64 @isdigit(i8 signext %50)
%89 = icmp eq i64 %88, 0
br i1 %89, label %98, label %90
90: ; preds = %87
%91 = icmp slt i32 %48, 63
br i1 %91, label %92, label %179
92: ; preds = %90
%93 = add nsw i32 %48, 1
%94 = sext i32 %48 to i64
%95 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %94
store i8 %50, i8* %95
%96 = sext i32 %93 to i64
%97 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %96
store i8 0, i8* %97
br label %183
98: ; preds = %87
%99 = call i64 @isspace(i8 signext %50)
%100 = icmp eq i64 %99, 0
br i1 %100, label %179, label %101
101: ; preds = %98
%102 = call i64 @parse(i32 26, i8* %5, i32 %47, i32 %45)
%103 = icmp slt i64 %102, 0
br i1 %103, label %202, label %183
104: ; preds = %42
%105 = call i64 @isalnum(i8 signext %50)
%106 = icmp ne i64 %105, 0
%107 = icmp eq i8 %50, 95
%108 = select i1 %106, i1 true, i1 %107
br i1 %108, label %109, label %117
109: ; preds = %104
%110 = icmp slt i32 %48, 63
br i1 %110, label %111, label %179
111: ; preds = %109
%112 = add nsw i32 %48, 1
%113 = sext i32 %48 to i64
%114 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %113
store i8 %50, i8* %114
%115 = sext i32 %112 to i64
%116 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %115
store i8 0, i8* %116
br label %183
117: ; preds = %104
%118 = call i64 @isspace(i8 signext %50)
%119 = icmp eq i64 %118, 0
br i1 %119, label %126, label %120
120: ; preds = %117
%121 = call i32 @str2token(i8* %5)
%122 = icmp sgt i32 %121, 0
br i1 %122, label %123, label %179
123: ; preds = %120
%124 = call i64 @parse(i32 %121, i8* %5, i32 %47, i32 %45)
%125 = icmp slt i64 %124, 0
br i1 %125, label %202, label %183
126: ; preds = %117
switch i8 %50, label %179 [
i8 58, label %127
i8 61, label %136
]
127: ; preds = %126
%128 = call i32 @str2token(i8* %5)
%129 = icmp sgt i32 %128, 0
br i1 %129, label %130, label %179
130: ; preds = %127
%131 = call i64 @parse(i32 %128, i8* %5, i32 %47, i32 %45)
%132 = icmp slt i64 %131, 0
br i1 %132, label %202, label %133
133: ; preds = %130
%134 = call i64 @parse(i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32 %47, i32 %45)
%135 = icmp slt i64 %134, 0
br i1 %135, label %202, label %183
136: ; preds = %126
%137 = call i32 @str2token(i8* %5)
%138 = icmp sgt i32 %137, 0
br i1 %138, label %139, label %179
139: ; preds = %136
%140 = call i64 @parse(i32 %137, i8* %5, i32 %47, i32 %45)
%141 = icmp slt i64 %140, 0
br i1 %141, label %202, label %142
142: ; preds = %139
%143 = call i64 @parse(i32 5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %47, i32 %45)
%144 = icmp slt i64 %143, 0
br i1 %144, label %202, label %183
145: ; preds = %42
%146 = icmp eq i8 %50, 10
br i1 %146, label %183, label %147
147: ; preds = %145
%148 = call i64 @isprint(i8 signext %50)
%149 = icmp eq i64 %148, 0
br i1 %149, label %179, label %183
150: ; preds = %42
%151 = icmp eq i8 %50, 39
br i1 %151, label %183, label %152
152: ; preds = %150
%153 = call i64 @isprint(i8 signext %50)
%154 = icmp eq i64 %153, 0
br i1 %154, label %179, label %155
155: ; preds = %152
%156 = icmp slt i32 %48, 63
br i1 %156, label %157, label %179
157: ; preds = %155
%158 = add nsw i32 %48, 1
%159 = sext i32 %48 to i64
%160 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %159
store i8 %50, i8* %160
%161 = sext i32 %158 to i64
%162 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %161
store i8 0, i8* %162
br label %183
163: ; preds = %42
%164 = icmp eq i8 %50, 39
br i1 %164, label %165, label %173
165: ; preds = %163
%166 = icmp slt i32 %48, 63
br i1 %166, label %167, label %183
167: ; preds = %165
%168 = add nsw i32 %48, 1
%169 = sext i32 %48 to i64
%170 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %169
store i8 39, i8* %170
%171 = sext i32 %168 to i64
%172 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %171
store i8 0, i8* %172
br label %183
173: ; preds = %163
%174 = call i64 @isspace(i8 signext %50)
%175 = icmp eq i64 %174, 0
br i1 %175, label %179, label %176
176: ; preds = %173
%177 = call i64 @parse(i32 6, i8* %5, i32 %47, i32 %45)
%178 = icmp slt i64 %177, 0
br i1 %178, label %202, label %183
179: ; preds = %147, %82, %90, %98, %109, %120, %127, %136, %126, %155, %152, %173, %42
%180 = phi i32 [ 189, %82 ], [ 193, %90 ], [ 201, %98 ], [ 205, %109 ], [ 214, %120 ], [ 226, %127 ], [ 238, %136 ], [ 241, %126 ], [ 253, %155 ], [ 255, %152 ], [ 267, %173 ], [ 270, %42 ], [ 247, %147 ]
%181 = load i32, i32* @stderr
%182 = call i32 @fprintf(i32 %181, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.6, i64 0, i64 0), i32 %180, i8* %0, i32 %47, i32 %46)
br label %202
183: ; preds = %83, %92, %111, %147, %157, %53, %51, %56, %61, %63, %74, %76, %84, %101, %123, %133, %142, %145, %150, %165, %167, %176
%184 = phi i32 [ 0, %176 ], [ %48, %165 ], [ %168, %167 ], [ %48, %150 ], [ %48, %145 ], [ 0, %142 ], [ 0, %133 ], [ 0, %123 ], [ 0, %101 ], [ %48, %84 ], [ %48, %74 ], [ %77, %76 ], [ %48, %61 ], [ %64, %63 ], [ %48, %56 ], [ %48, %51 ], [ %48, %53 ], [ %158, %157 ], [ %48, %147 ], [ %112, %111 ], [ %93, %92 ], [ %48, %83 ]
%185 = phi i32 [ %45, %176 ], [ %45, %165 ], [ %45, %167 ], [ %45, %150 ], [ %45, %145 ], [ %45, %142 ], [ %45, %133 ], [ %45, %123 ], [ %45, %101 ], [ %46, %84 ], [ %46, %74 ], [ %46, %76 ], [ %46, %61 ], [ %46, %63 ], [ %45, %56 ], [ %45, %51 ], [ %45, %53 ], [ %45, %157 ], [ %45, %147 ], [ %45, %111 ], [ %45, %92 ], [ %46, %83 ]
%186 = phi i32 [ 0, %176 ], [ 4, %165 ], [ 4, %167 ], [ 5, %150 ], [ 0, %145 ], [ 0, %142 ], [ 0, %133 ], [ 0, %123 ], [ 0, %101 ], [ 0, %84 ], [ 3, %74 ], [ 3, %76 ], [ 2, %61 ], [ 2, %63 ], [ 1, %56 ], [ 0, %51 ], [ 0, %53 ], [ 4, %157 ], [ 1, %147 ], [ 3, %111 ], [ 2, %92 ], [ 4, %83 ]
%187 = icmp eq i8 %50, 10
%188 = add nsw i32 %46, 1
%189 = zext i1 %187 to i32
%190 = add nsw i32 %47, %189
%191 = select i1 %187, i32 1, i32 %188
%192 = add nuw nsw i64 %43, 1
%193 = icmp eq i64 %192, %24
br i1 %193, label %194, label %42
194: ; preds = %183, %1
%195 = phi i32 [ 0, %1 ], [ %184, %183 ]
%196 = phi i32 [ 1, %1 ], [ %190, %183 ]
%197 = phi i32 [ 1, %1 ], [ %191, %183 ]
%198 = phi i32 [ 1, %1 ], [ %185, %183 ]
%199 = phi i32 [ 0, %1 ], [ %186, %183 ]
br label %200
200: ; preds = %194, %30
%201 = phi i32 [ 255, %30 ], [ %199, %194 ]
br label %11
202: ; preds = %25, %176, %142, %139, %133, %130, %123, %101, %84, %33, %179, %39, %36, %27, %18, %9
%203 = phi i32 [ -1, %9 ], [ -1, %18 ], [ %29, %27 ], [ %38, %36 ], [ %41, %39 ], [ -1, %179 ], [ -1, %33 ], [ -1, %84 ], [ -1, %101 ], [ -1, %123 ], [ -1, %130 ], [ -1, %133 ], [ -1, %139 ], [ -1, %142 ], [ -1, %176 ], [ -1, %25 ]
ret i32 %203
}