// File: /workspace/github_c_makefile_star2_O2/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 %rdi, %rbx
movq 0x48(%rdi), %rax
andq $0x0, 0x8(%rax)
movq %rsi, 0x8(%rsp)
leaq 0xafd6(%rip), %r14      # 0x20824
pushq $0x2d
popq %rbp
movl $0x4801, %r12d          # imm = 0x4801
movl (%rbx), %r15d
leal 0x1(%r15), %eax
cmpl $0x3f, %eax
ja 0x15957
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1588b
callq 0x1273c
jmp 0x1589a
movq %rbx, %rdi
callq 0x161ca
jmp 0x15857
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x15857
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x158af
callq 0x1273c
jmp 0x158be
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x2d, %eax
jne 0x15f1d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x158da
callq 0x1273c
jmp 0x158e9
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x5b, %eax
jne 0x15945
movq %rbx, %rdi
callq 0x1624b
movq 0x48(%rbx), %rcx
andq $0x0, 0x8(%rcx)
testl %eax, %eax
js 0x1591f
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x162d6
movq 0x48(%rbx), %rax
andq $0x0, 0x8(%rax)
jmp 0x15857
movl (%rbx), %eax
jmp 0x15945
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15934
callq 0x1273c
jmp 0x15943
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
incl %eax
cmpl $0xe, %eax
ja 0x15923
btl %eax, %r12d
jae 0x15923
jmp 0x15857
cmpl $0x5b, %r15d
je 0x15f25
cmpl $0x7e, %r15d
jne 0x159a4
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x160a0
callq 0x1273c
jmp 0x160af
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15a4f
callq 0x1273c
movl %eax, %esi
jmp 0x15a5e
movslq %r15d, %rax
leaq 0xad72(%rip), %r14      # 0x20720
testb $0x1, 0x1(%rax,%r14)
jne 0x159ce
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x160f9
callq 0x1273c
jmp 0x16108
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x159ed
callq 0x1273c
movl %eax, %r15d
jmp 0x159fd
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 0x159ce
movq 0x48(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x15706
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movl $0x124, %r15d           # imm = 0x124
cmpb $0x4, 0x8(%rax)
jne 0x1608e
movzbl 0xa(%rax), %eax
testl %eax, %eax
je 0x1608e
orl $0x100, %eax            # imm = 0x100
movl %eax, %r15d
jmp 0x1608e
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %esi
movl %esi, (%rbx)
pushq $0x5c
popq %r12
leaq 0xacb5(%rip), %r14      # 0x20720
leaq 0xaeb2(%rip), %rbp      # 0x20924
cmpl %r15d, %esi
je 0x15e1f
cmpl $0x5c, %esi
je 0x15abb
cmpl $0xd, %esi
je 0x1611a
cmpl $0xa, %esi
je 0x1611a
cmpl $-0x1, %esi
je 0x1612e
movq %rbx, %rdi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15b34
callq 0x1273c
jmp 0x15b43
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15ad7
callq 0x1273c
jmp 0x15ae6
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
leal -0x6e(%rax), %ecx
cmpl $0xc, %ecx
jbe 0x15b4a
cmpl $-0x1, %eax
je 0x15cf2
cmpl $0xa, %eax
je 0x15b63
cmpl $0xd, %eax
je 0x15b63
cmpl $0x22, %eax
je 0x15b5b
cmpl $0x27, %eax
je 0x15b5b
cmpl $0x5c, %eax
je 0x15b5b
pushq $0x7
popq %r13
cmpl $0x61, %eax
je 0x15cbd
cmpl $0x66, %eax
je 0x15cb9
cmpl $0x62, %eax
jne 0x15b74
pushq $0x8
jmp 0x15cbb
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x15cf2
movslq (%rbp,%rcx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
pushq $0xa
jmp 0x15cbb
movl %eax, %r13d
jmp 0x15cbd
movq %rbx, %rdi
callq 0x161ca
pushq $0xa
popq %r13
jmp 0x15cdf
cltq
movzbl 0x1(%rax,%r14), %esi
andl $0x2, %esi
movq %rbx, %rdi
leaq 0xaee5(%rip), %rdx      # 0x20a6e
callq 0x165ae
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0x3, %r12d
je 0x15be2
movslq (%rbx), %rbp
testb $0x2, 0x1(%rbp,%r14)
je 0x15be2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15bc0
callq 0x1273c
jmp 0x15bcf
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
imull $0xa, %r13d, %ecx
leal (%rcx,%rbp), %r13d
addl $-0x30, %r13d
movl %eax, (%rbx)
incq %r12
jmp 0x15b94
xorl %esi, %esi
cmpl $0x100, %r13d           # imm = 0x100
setl %sil
movq %rbx, %rdi
leaq 0xaed6(%rip), %rdx      # 0x20acf
callq 0x165ae
movq 0x48(%rbx), %rax
subq %r12, 0x8(%rax)
pushq $0x5c
popq %r12
leaq 0xad13(%rip), %rbp      # 0x20924
jmp 0x15cdf
pushq $0xb
jmp 0x15cbb
movq %rbx, %rdi
callq 0x165ff
movl %eax, %ebp
shll $0x4, %ebp
movq %rbx, %rdi
callq 0x165ff
movl %eax, %r13d
addl %ebp, %r13d
leaq 0xace5(%rip), %rbp      # 0x20924
movq 0x48(%rbx), %rax
addq $-0x2, 0x8(%rax)
jmp 0x15cbd
pushq $0x9
jmp 0x15cbb
movq 0x48(%rbx), %rax
decq 0x8(%rax)
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15c67
callq 0x1273c
jmp 0x15c76
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,%r14)
je 0x15cf2
cmpl $0xd, %eax
je 0x15c8d
cmpl $0xa, %eax
jne 0x15c56
movq %rbx, %rdi
callq 0x161ca
movl (%rbx), %eax
jmp 0x15c78
movq %rbx, %rdi
pushq $0x75
popq %rsi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15cf9
callq 0x1273c
jmp 0x15d08
pushq $0xd
jmp 0x15cbb
pushq $0xc
popq %r13
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15cce
callq 0x1273c
jmp 0x15cdd
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 %r13d, %esi
callq 0x1615d
movl (%rbx), %esi
jmp 0x15a72
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
leaq 0xad9e(%rip), %r12      # 0x20aad
movl %eax, (%rbx)
xorl %esi, %esi
cmpl $0x7b, %eax
sete %sil
movq %rbx, %rdi
leaq 0xad7d(%rip), %rdx      # 0x20aa1
callq 0x165ae
movq %rbx, %rdi
callq 0x165ff
movslq %eax, %r13
pushq $-0x4
popq %rbp
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15d54
callq 0x1273c
movl %eax, %edi
jmp 0x15d63
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,%r14)
je 0x15d9b
shlq $0x4, %r13
callq 0xaf3c
cltq
addq %rax, %r13
xorl %esi, %esi
cmpq $0x110000, %r13         # imm = 0x110000
setb %sil
movq %rbx, %rdi
movq %r12, %rdx
callq 0x165ae
decq %rbp
jmp 0x15d37
xorl %esi, %esi
cmpl $0x7d, %edi
sete %sil
movq %rbx, %rdi
leaq 0xad15(%rip), %rdx      # 0x20ac3
callq 0x165ae
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15dc4
callq 0x1273c
jmp 0x15dd3
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movq 0x48(%rbx), %rax
addq %rbp, 0x8(%rax)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xb136
movslq %eax, %r12
leaq 0x18(%rsp), %r13
subq %r12, %r13
leaq 0xab28(%rip), %rbp      # 0x20924
testq %r12, %r12
jle 0x15e16
movsbl (%r13), %esi
movq %rbx, %rdi
callq 0x1615d
decq %r12
incq %r13
jmp 0x15dfc
pushq $0x5c
popq %r12
jmp 0x15cf2
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15ee8
callq 0x1273c
jmp 0x15ef7
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15f4f
callq 0x1273c
jmp 0x15f5e
movl $0x121, %r15d           # imm = 0x121
jmp 0x1608e
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x1615d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15f7a
callq 0x1273c
jmp 0x15f89
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15fbf
callq 0x1273c
jmp 0x15fce
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x15fea
callq 0x1273c
jmp 0x15ff9
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x16027
callq 0x1273c
jmp 0x16036
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1604f
callq 0x1273c
jmp 0x1605e
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 0x15706
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x15f44
movl %ebp, %r15d
jmp 0x1608e
movq %rbx, %rdi
callq 0x1624b
testl %eax, %eax
js 0x1610c
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movl %eax, %edx
callq 0x162d6
movl $0x125, %r15d           # imm = 0x125
jmp 0x1608e
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x3d
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16444
testl %eax, %eax
movl $0x11a, %r15d           # imm = 0x11A
jmp 0x1608a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x2e
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x16444
testl %eax, %eax
je 0x160cd
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x16444
cmpl $0x1, %eax
movl $0x119, %r15d           # imm = 0x119
sbbl $0x0, %r15d
jmp 0x1608e
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x3a
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16444
testl %eax, %eax
movl $0x120, %r15d           # imm = 0x120
jmp 0x1608a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0x16444
movl $0x11b, %r15d           # imm = 0x11B
testl %eax, %eax
jne 0x1608e
pushq $0x3e
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16444
testl %eax, %eax
movl $0x11f, %r15d           # imm = 0x11F
jmp 0x1608a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x2f
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16444
testl %eax, %eax
movl $0x117, %r15d           # imm = 0x117
jmp 0x1608a
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0x16444
movl $0x11c, %r15d           # imm = 0x11C
testl %eax, %eax
jne 0x1608e
pushq $0x3c
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16444
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)
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0x16444
testl %eax, %eax
pushq $0x7e
popq %rax
movl $0x11d, %r15d           # imm = 0x11D
cmovel %eax, %r15d
jmp 0x1608e
movslq (%rbx), %rax
leaq 0xa649(%rip), %rcx      # 0x20720
testb $0x2, 0x1(%rax,%rcx)
je 0x1608e
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16475
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x1608e
cmpl $-0x1, %eax
jne 0x16142
pushq $0x5b
popq %r15
jmp 0x1608e
leaq 0xa93b(%rip), %rsi      # 0x20a5c
movq %rbx, %rdi
movl $0x125, %edx            # imm = 0x125
callq 0x1567f
leaq 0xa927(%rip), %rsi      # 0x20a5c
movq %rbx, %rdi
movl $0x121, %edx            # imm = 0x121
callq 0x1567f
leaq 0xa8ab(%rip), %rsi      # 0x209f4
jmp 0x16121