// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/llex.c
// Function: llex
static int llex (LexState *ls, SemInfo *seminfo) {
  luaZ_resetbuffer(ls->buff);
  for (;;) {
    switch (ls->current) {
      case '\n': case '\r': {  /* line breaks */
        inclinenumber(ls);
        break;
      }
      case ' ': case '\f': case '\t': case '\v': {  /* spaces */
        next(ls);
        break;
      }
      case '-': {  /* '-' or '--' (comment) */
        next(ls);
        if (ls->current != '-') return '-';
        /* else is a comment */
        next(ls);
        if (ls->current == '[') {  /* long comment? */
          int sep = skip_sep(ls);
          luaZ_resetbuffer(ls->buff);  /* 'skip_sep' may dirty the buffer */
          if (sep >= 0) {
            read_long_string(ls, NULL, sep);  /* skip long comment */
            luaZ_resetbuffer(ls->buff);  /* previous call may dirty the buff. */
            break;
          }
        }
        /* else short comment */
        while (!currIsNewline(ls) && ls->current != EOZ)
          next(ls);  /* skip until end of line (or end of file) */
        break;
      }
      case '[': {  /* long string or simply '[' */
        int sep = skip_sep(ls);
        if (sep >= 0) {
          read_long_string(ls, seminfo, sep);
          return TK_STRING;
        }
        else if (sep != -1)  /* '[=...' missing second bracket */
          lexerror(ls, "invalid long string delimiter", TK_STRING);
        return '[';
      }
      case '=': {
        next(ls);
        if (check_next1(ls, '=')) return TK_EQ;
        else return '=';
      }
      case '<': {
        next(ls);
        if (check_next1(ls, '=')) return TK_LE;
        else if (check_next1(ls, '<')) return TK_SHL;
        else return '<';
      }
      case '>': {
        next(ls);
        if (check_next1(ls, '=')) return TK_GE;
        else if (check_next1(ls, '>')) return TK_SHR;
        else return '>';
      }
      case '/': {
        next(ls);
        if (check_next1(ls, '/')) return TK_IDIV;
        else return '/';
      }
      case '~': {
        next(ls);
        if (check_next1(ls, '=')) return TK_NE;
        else return '~';
      }
      case ':': {
        next(ls);
        if (check_next1(ls, ':')) return TK_DBCOLON;
        else return ':';
      }
      case '"': case '\'': {  /* short literal strings */
        read_string(ls, ls->current, seminfo);
        return TK_STRING;
      }
      case '.': {  /* '.', '..', '...', or number */
        save_and_next(ls);
        if (check_next1(ls, '.')) {
          if (check_next1(ls, '.'))
            return TK_DOTS;   /* '...' */
          else return TK_CONCAT;   /* '..' */
        }
        else if (!lisdigit(ls->current)) return '.';
        else return read_numeral(ls, seminfo);
      }
      case '0': case '1': case '2': case '3': case '4':
      case '5': case '6': case '7': case '8': case '9': {
        return read_numeral(ls, seminfo);
      }
      case EOZ: {
        return TK_EOS;
      }
      default: {
        if (lislalpha(ls->current)) {  /* identifier or reserved word? */
          TString *ts;
          do {
            save_and_next(ls);
          } while (lislalnum(ls->current));
          ts = luaX_newstring(ls, luaZ_buffer(ls->buff),
                                  luaZ_bufflen(ls->buff));
          seminfo->ts = ts;
          if (isreserved(ts))  /* reserved word? */
            return ts->extra - 1 + FIRST_RESERVED;
          else {
            return TK_NAME;
          }
        }
        else {  /* single-char tokens (+ - / ...) */
          int c = ls->current;
          next(ls);
          return c;
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq $0x0, 0x8(%rax)
leaq 0xbc9f(%rip), %r12      # 0x23794
movl $0x4801, %ebp           # imm = 0x4801
movl (%rbx), %r15d
leal 0x1(%r15), %eax
cmpl $0x3f, %eax
ja 0x17bff
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17b2e
callq 0x14598
jmp 0x17b3d
movq %rbx, %rdi
callq 0x184df
jmp 0x17afa
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x17afa
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17b52
callq 0x14598
jmp 0x17b61
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x2d, %eax
jne 0x18207
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17b7d
callq 0x14598
jmp 0x17b8c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x5b, %eax
jne 0x17bee
movq %rbx, %rdi
callq 0x18560
movq 0x48(%rbx), %rcx
movq $0x0, 0x8(%rcx)
testl %eax, %eax
js 0x17bc8
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x185e5
movq 0x48(%rbx), %rax
movq $0x0, 0x8(%rax)
jmp 0x17afa
movl (%rbx), %eax
jmp 0x17bee
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17bdd
callq 0x14598
jmp 0x17bec
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
incl %eax
cmpl $0xe, %eax
ja 0x17bcc
btl %eax, %ebp
jae 0x17bcc
jmp 0x17afa
cmpl $0x5b, %r15d
je 0x18212
cmpl $0x7e, %r15d
jne 0x17c4c
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x183b2
callq 0x14598
jmp 0x183c1
movq %rbx, %rdi
movl %r15d, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17cf3
callq 0x14598
movl %eax, %esi
jmp 0x17d02
movslq %r15d, %rax
leaq 0xba3a(%rip), %r14      # 0x23690
testb $0x1, 0x1(%rax,%r14)
jne 0x17c76
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1840d
callq 0x14598
jmp 0x1841c
movq %rbx, %rdi
movl %r15d, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17c95
callq 0x14598
movl %eax, %r15d
jmp 0x17ca5
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %r15d
movl %r15d, (%rbx)
movslq %r15d, %rax
testb $0x3, 0x1(%rax,%r14)
jne 0x17c76
movq 0x48(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x179a0
movq %rax, (%r13)
movl $0x124, %r15d           # imm = 0x124
cmpb $0x4, 0x8(%rax)
jne 0x183a0
movzbl 0xa(%rax), %eax
testl %eax, %eax
je 0x183a0
orl $0x100, %eax            # imm = 0x100
movl %eax, %r15d
jmp 0x183a0
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %esi
movl %esi, (%rbx)
cmpl %r15d, %esi
jne 0x17d2c
movq %rbx, %rdi
movl %r15d, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x181d6
callq 0x14598
jmp 0x181e5
leaq 0xb95d(%rip), %rbp      # 0x23690
leaq 0xbb5a(%rip), %r14      # 0x23894
movq %r13, 0x8(%rsp)
cmpl $0x5b, %esi
jle 0x17d67
cmpl $0x5c, %esi
jne 0x17d82
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17db1
callq 0x14598
jmp 0x17dc0
cmpl $-0x1, %esi
je 0x1844c
cmpl $0xa, %esi
je 0x18438
cmpl $0xd, %esi
je 0x18438
movq %rbx, %rdi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17d9b
callq 0x14598
jmp 0x17daa
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x17fee
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x61, %eax
jg 0x17ddd
cmpl $0x21, %eax
jle 0x17df9
cmpl $0x5b, %eax
jg 0x17e1f
cmpl $0x22, %eax
je 0x17e35
cmpl $0x27, %eax
je 0x17e35
jmp 0x17e56
leal -0x6e(%rax), %ecx
cmpl $0xc, %ecx
ja 0x17e3d
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movl $0xa, %r12d
jmp 0x17fb9
cmpl $-0x1, %eax
je 0x17fee
cmpl $0xa, %eax
je 0x17e0c
cmpl $0xd, %eax
jne 0x17e56
movq %rbx, %rdi
callq 0x184df
movl $0xa, %r12d
jmp 0x17fdb
cmpl $0x5c, %eax
je 0x17e35
movl $0x7, %r12d
cmpl $0x61, %eax
je 0x17fb9
jmp 0x17e56
movl %eax, %r12d
jmp 0x17fb9
cmpl $0x66, %eax
je 0x17fb3
cmpl $0x62, %eax
jne 0x17e56
movl $0x8, %r12d
jmp 0x17fb9
cltq
movzbl 0x1(%rax,%rbp), %esi
andl $0x2, %esi
movq %rbx, %rdi
leaq 0xbb74(%rip), %rdx      # 0x239de
callq 0x188c4
movl (%rbx), %r13d
xorl %r12d, %r12d
xorl %r14d, %r14d
movslq %r13d, %rax
testb $0x2, 0x1(%rax,%rbp)
je 0x17eca
movq %rbx, %rdi
movl %r13d, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17e9e
callq 0x14598
jmp 0x17ead
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
leal (%r12,%r12,4), %ecx
leal -0x30(%r13,%rcx,2), %r12d
movl %eax, (%rbx)
incl %r14d
movl %eax, %r13d
cmpl $0x3, %r14d
jne 0x17e78
movl $0x3, %r14d
xorl %esi, %esi
cmpl $0x100, %r12d           # imm = 0x100
setl %sil
movq %rbx, %rdi
leaq 0xbb5e(%rip), %rdx      # 0x23a3f
callq 0x188c4
movl %r14d, %eax
movq 0x48(%rbx), %rcx
subq %rax, 0x8(%rcx)
movq 0x8(%rsp), %r13
leaq 0xb997(%rip), %r14      # 0x23894
jmp 0x17fdb
movq 0x48(%rbx), %rax
decq 0x8(%rax)
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17f1b
callq 0x14598
jmp 0x17f2a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movslq %eax, %rcx
testb $0x8, 0x1(%rcx,%rbp)
je 0x17fee
cmpl $0xd, %eax
je 0x17f44
cmpl $0xa, %eax
jne 0x17f0a
movq %rbx, %rdi
callq 0x184df
movl (%rbx), %eax
jmp 0x17f2c
movl $0xd, %r12d
jmp 0x17fb9
movq %rbx, %rdi
callq 0x18915
movl %eax, %r13d
shll $0x4, %r13d
movq %rbx, %rdi
callq 0x18915
movl %eax, %r12d
addl %r13d, %r12d
movq 0x8(%rsp), %r13
movq 0x48(%rbx), %rax
addq $-0x2, 0x8(%rax)
jmp 0x17fb9
movq %rbx, %rdi
movl $0x75, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17ffe
callq 0x14598
jmp 0x1800d
movl $0x9, %r12d
jmp 0x17fb9
movl $0xb, %r12d
jmp 0x17fb9
movl $0xc, %r12d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17fca
callq 0x14598
jmp 0x17fd9
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq 0x48(%rbx), %rax
decq 0x8(%rax)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x18472
movl (%rbx), %esi
cmpl %r15d, %esi
jne 0x17d3f
jmp 0x17d09
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
leaq 0xba09(%rip), %r14      # 0x23a1d
movl %eax, (%rbx)
xorl %esi, %esi
cmpl $0x7b, %eax
sete %sil
movq %rbx, %rdi
leaq 0xb9e8(%rip), %rdx      # 0x23a11
callq 0x188c4
movq %rbx, %rdi
callq 0x18915
movslq %eax, %r12
movq $-0x4, %r13
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1805d
callq 0x14598
movl %eax, %edi
jmp 0x1806c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %edi
movl %edi, (%rbx)
movslq %edi, %rax
testb $0x10, 0x1(%rax,%rbp)
je 0x180a3
shlq $0x4, %r12
callq 0xbc99
cltq
addq %rax, %r12
xorl %esi, %esi
cmpq $0x110000, %r12         # imm = 0x110000
setb %sil
movq %rbx, %rdi
movq %r14, %rdx
callq 0x188c4
decq %r13
jmp 0x18040
xorl %esi, %esi
cmpl $0x7d, %edi
sete %sil
movq %rbx, %rdi
leaq 0xb97d(%rip), %rdx      # 0x23a33
callq 0x188c4
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x180cc
callq 0x14598
jmp 0x180db
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq 0x48(%rbx), %rax
addq %r13, 0x8(%rax)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xbeb2
testl %eax, %eax
jle 0x1811d
movl %eax, %r14d
leaq 0x18(%rsp), %r12
subq %r14, %r12
incq %r14
movsbl (%r12), %esi
movq %rbx, %rdi
callq 0x18472
decq %r14
incq %r12
cmpq $0x1, %r14
ja 0x18104
movq 0x8(%rsp), %r13
leaq 0xb76b(%rip), %r14      # 0x23894
jmp 0x17fee
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1823a
callq 0x14598
jmp 0x18249
movl $0x121, %r15d           # imm = 0x121
jmp 0x183a0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x18472
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1826a
callq 0x14598
jmp 0x18279
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x182b5
callq 0x14598
jmp 0x182c4
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x182e5
callq 0x14598
jmp 0x182f4
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1832d
callq 0x14598
jmp 0x1833c
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1835a
callq 0x14598
jmp 0x18369
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq 0x48(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
incq %rsi
addq $-0x2, %rdx
movq %rbx, %rdi
callq 0x179a0
movq %rax, (%r13)
jmp 0x1822f
movl $0x2d, %r15d
jmp 0x183a0
movq %rbx, %rdi
callq 0x18560
testl %eax, %eax
js 0x18420
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x185e5
movl $0x125, %r15d           # imm = 0x125
jmp 0x183a0
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl $0x3d, %ebp
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x18758
testl %eax, %eax
movl $0x11a, %r15d           # imm = 0x11A
jmp 0x1839c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl $0x2e, %r15d
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x18758
testl %eax, %eax
je 0x183e3
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x18758
cmpl $0x1, %eax
movl $0x119, %r15d           # imm = 0x119
sbbl $0x0, %r15d
jmp 0x183a0
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl $0x3a, %ebp
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x18758
testl %eax, %eax
movl $0x120, %r15d           # imm = 0x120
jmp 0x1839c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x18758
movl $0x11b, %r15d           # imm = 0x11B
testl %eax, %eax
jne 0x183a0
movl $0x3e, %ebp
movq %rbx, %rdi
movl $0x3e, %esi
callq 0x18758
testl %eax, %eax
movl $0x11f, %r15d           # imm = 0x11F
jmp 0x1839c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl $0x2f, %ebp
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x18758
testl %eax, %eax
movl $0x117, %r15d           # imm = 0x117
jmp 0x1839c
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x18758
movl $0x11c, %r15d           # imm = 0x11C
testl %eax, %eax
jne 0x183a0
movl $0x3c, %ebp
movq %rbx, %rdi
movl $0x3c, %esi
callq 0x18758
testl %eax, %eax
movl $0x11e, %r15d           # imm = 0x11E
cmovel %ebp, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x18758
testl %eax, %eax
movl $0x7e, %eax
movl $0x11d, %r15d           # imm = 0x11D
cmovel %eax, %r15d
jmp 0x183a0
movslq (%rbx), %rax
leaq 0xb2a3(%rip), %rcx      # 0x23690
testb $0x2, 0x1(%rax,%rcx)
je 0x183a0
movq %rbx, %rdi
movq %r13, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1878b
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x183a0
movl $0x5b, %r15d
cmpl $-0x1, %eax
je 0x183a0
leaq 0xb52e(%rip), %rsi      # 0x23964
jmp 0x1843f
leaq 0xb58d(%rip), %rsi      # 0x239cc
movq %rbx, %rdi
movl $0x125, %edx            # imm = 0x125
callq 0x17917
leaq 0xb579(%rip), %rsi      # 0x239cc
movq %rbx, %rdi
movl $0x121, %edx            # imm = 0x121
callq 0x17917