// File: /workspace/github_c_makefile_star2_O1/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 0xb797(%rip), %r12      # 0x22704
movl $0x4801, %ebp           # imm = 0x4801
movl (%rbx), %r15d
leal 0x1(%r15), %eax
cmpl $0x3f, %eax
ja 0x17075
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x16fa6
callq 0x13ad0
jmp 0x16fb5
movq %rbx, %rdi
callq 0x17971
jmp 0x16f72
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x16f72
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x16fca
callq 0x13ad0
jmp 0x16fd9
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x2d, %eax
jne 0x1769c
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x16ff5
callq 0x13ad0
jmp 0x17004
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x5b, %eax
jne 0x17062
movq %rbx, %rdi
callq 0x179f2
movq 0x48(%rbx), %rcx
movq $0x0, 0x8(%rcx)
testl %eax, %eax
js 0x17062
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x17a77
movq 0x48(%rbx), %rax
movq $0x0, 0x8(%rax)
jmp 0x16f72
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17051
callq 0x13ad0
jmp 0x17060
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movl (%rbx), %eax
incl %eax
cmpl $0xe, %eax
ja 0x17040
btl %eax, %ebp
jae 0x17040
jmp 0x16f72
cmpl $0x5b, %r15d
je 0x176a7
cmpl $0x7e, %r15d
jne 0x170c2
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17847
callq 0x13ad0
jmp 0x17856
movq %rbx, %rdi
movl %r15d, %esi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17162
callq 0x13ad0
movl %eax, %esi
jmp 0x17171
movslq %r15d, %rax
leaq 0xb534(%rip), %r14      # 0x22600
testb $0x1, 0x1(%rax,%r14)
jne 0x170ec
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x178a2
callq 0x13ad0
jmp 0x178b1
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17107
callq 0x13ad0
jmp 0x17116
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cltq
testb $0x3, 0x1(%rax,%r14)
jne 0x170ec
movq 0x48(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x16e18
movq %rax, (%r13)
movl $0x124, %r15d           # imm = 0x124
cmpb $0x4, 0x8(%rax)
jne 0x17835
movzbl 0xa(%rax), %eax
testl %eax, %eax
je 0x17835
orl $0x100, %eax            # imm = 0x100
movl %eax, %r15d
jmp 0x17835
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %esi
movl %esi, (%rbx)
cmpl %r15d, %esi
jne 0x17198
movq %rbx, %rdi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1766b
callq 0x13ad0
jmp 0x1767a
leaq 0xb461(%rip), %rbp      # 0x22600
leaq 0xb65e(%rip), %r14      # 0x22804
movq %r13, 0x8(%rsp)
cmpl $0x5b, %esi
jle 0x171ce
cmpl $0x5c, %esi
jne 0x171e9
movq %rbx, %rdi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17218
callq 0x13ad0
jmp 0x17227
cmpl $-0x1, %esi
je 0x178e1
cmpl $0xa, %esi
je 0x178cd
cmpl $0xd, %esi
je 0x178cd
movq %rbx, %rdi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17202
callq 0x13ad0
jmp 0x17211
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x17426
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
cmpl $0x61, %eax
jg 0x17244
cmpl $0x21, %eax
jle 0x17260
cmpl $0x5b, %eax
jg 0x17286
cmpl $0x22, %eax
je 0x1729c
cmpl $0x27, %eax
je 0x1729c
jmp 0x172bd
leal -0x6e(%rax), %ecx
cmpl $0xc, %ecx
ja 0x172a4
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movl $0xa, %r12d
jmp 0x173f1
cmpl $-0x1, %eax
je 0x17426
cmpl $0xa, %eax
je 0x17273
cmpl $0xd, %eax
jne 0x172bd
movq %rbx, %rdi
callq 0x17971
movl $0xa, %r12d
jmp 0x17413
cmpl $0x5c, %eax
je 0x1729c
movl $0x7, %r12d
cmpl $0x61, %eax
je 0x173f1
jmp 0x172bd
movl %eax, %r12d
jmp 0x173f1
cmpl $0x66, %eax
je 0x173eb
cmpl $0x62, %eax
jne 0x172bd
movl $0x8, %r12d
jmp 0x173f1
cltq
movzbl 0x1(%rax,%rbp), %esi
andl $0x2, %esi
movq %rbx, %rdi
leaq 0xb67d(%rip), %rdx      # 0x2294e
callq 0x17d56
xorl %r12d, %r12d
xorl %r14d, %r14d
movslq (%rbx), %r13
testb $0x2, 0x1(%r13,%rbp)
je 0x1732c
movq %rbx, %rdi
movl %r13d, %esi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17303
callq 0x13ad0
jmp 0x17312
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
cmpl $0x3, %r14d
jne 0x172dc
movl $0x3, %r14d
xorl %esi, %esi
cmpl $0x100, %r12d           # imm = 0x100
setl %sil
movq %rbx, %rdi
leaq 0xb66c(%rip), %rdx      # 0x229af
callq 0x17d56
movl %r14d, %eax
movq 0x48(%rbx), %rcx
subq %rax, 0x8(%rcx)
movq 0x8(%rsp), %r13
leaq 0xb4a5(%rip), %r14      # 0x22804
jmp 0x17413
movq 0x48(%rbx), %rax
decq 0x8(%rax)
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17436
callq 0x13ad0
jmp 0x17445
movl $0xd, %r12d
jmp 0x173f1
movq %rbx, %rdi
callq 0x17da7
movl %eax, %r13d
shll $0x4, %r13d
movq %rbx, %rdi
callq 0x17da7
movl %eax, %r12d
addl %r13d, %r12d
movq 0x8(%rsp), %r13
movq 0x48(%rbx), %rax
addq $-0x2, 0x8(%rax)
jmp 0x173f1
movq %rbx, %rdi
movl %eax, %esi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17493
callq 0x13ad0
jmp 0x174a2
movl $0x9, %r12d
jmp 0x173f1
movl $0xb, %r12d
jmp 0x173f1
movl $0xc, %r12d
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17402
callq 0x13ad0
jmp 0x17411
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 0x17907
movl (%rbx), %esi
cmpl %r15d, %esi
jne 0x171ab
jmp 0x17178
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 0x17426
cmpl $0xd, %eax
je 0x1745b
cmpl $0xa, %eax
jne 0x17465
movq %rbx, %rdi
callq 0x17971
jmp 0x17487
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17476
callq 0x13ad0
jmp 0x17485
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
movslq (%rbx), %rax
testb $0x8, 0x1(%rax,%rbp)
jne 0x17451
jmp 0x17426
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
leaq 0xb4e4(%rip), %r14      # 0x2298d
movl %eax, (%rbx)
xorl %esi, %esi
cmpl $0x7b, %eax
sete %sil
movq %rbx, %rdi
leaq 0xb4c3(%rip), %rdx      # 0x22981
callq 0x17d56
movq %rbx, %rdi
callq 0x17da7
movslq %eax, %r12
movq $-0x4, %r13
movl (%rbx), %esi
movq %rbx, %rdi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x174f2
callq 0x13ad0
movl %eax, %edi
jmp 0x17501
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 0x17538
shlq $0x4, %r12
callq 0xb7f3
cltq
addq %rax, %r12
xorl %esi, %esi
cmpq $0x110000, %r12         # imm = 0x110000
setb %sil
movq %rbx, %rdi
movq %r14, %rdx
callq 0x17d56
decq %r13
jmp 0x174d5
xorl %esi, %esi
cmpl $0x7d, %edi
sete %sil
movq %rbx, %rdi
leaq 0xb458(%rip), %rdx      # 0x229a3
callq 0x17d56
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x17561
callq 0x13ad0
jmp 0x17570
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 0xba53
testl %eax, %eax
jle 0x175b2
movl %eax, %r14d
leaq 0x18(%rsp), %r12
subq %r14, %r12
incq %r14
movsbl (%r12), %esi
movq %rbx, %rdi
callq 0x17907
decq %r14
incq %r12
cmpq $0x1, %r14
jg 0x17599
movq 0x8(%rsp), %r13
leaq 0xb246(%rip), %r14      # 0x22804
jmp 0x17426
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x176cf
callq 0x13ad0
jmp 0x176de
movl $0x121, %r15d           # imm = 0x121
jmp 0x17835
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x17907
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x176ff
callq 0x13ad0
jmp 0x1770e
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1774a
callq 0x13ad0
jmp 0x17759
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x1777a
callq 0x13ad0
jmp 0x17789
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x177c2
callq 0x13ad0
jmp 0x177d1
movq 0x40(%rbx), %rdi
subq $0x1, (%rdi)
jae 0x177ef
callq 0x13ad0
jmp 0x177fe
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 0x16e18
movq %rax, (%r13)
jmp 0x176c4
movl $0x2d, %r15d
jmp 0x17835
movq %rbx, %rdi
callq 0x179f2
testl %eax, %eax
js 0x178b5
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x17a77
movl $0x125, %r15d           # imm = 0x125
jmp 0x17835
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 0x17bea
testl %eax, %eax
movl $0x11a, %r15d           # imm = 0x11A
jmp 0x17831
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 0x17bea
testl %eax, %eax
je 0x17878
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x17bea
cmpl $0x1, %eax
movl $0x119, %r15d           # imm = 0x119
sbbl $0x0, %r15d
jmp 0x17835
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 0x17bea
testl %eax, %eax
movl $0x120, %r15d           # imm = 0x120
jmp 0x17831
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 0x17bea
movl $0x11b, %r15d           # imm = 0x11B
testl %eax, %eax
jne 0x17835
movl $0x3e, %ebp
movq %rbx, %rdi
movl $0x3e, %esi
callq 0x17bea
testl %eax, %eax
movl $0x11f, %r15d           # imm = 0x11F
jmp 0x17831
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 0x17bea
testl %eax, %eax
movl $0x117, %r15d           # imm = 0x117
jmp 0x17831
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 0x17bea
movl $0x11c, %r15d           # imm = 0x11C
testl %eax, %eax
jne 0x17835
movl $0x3c, %ebp
movq %rbx, %rdi
movl $0x3c, %esi
callq 0x17bea
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 0x17bea
testl %eax, %eax
movl $0x7e, %eax
movl $0x11d, %r15d           # imm = 0x11D
cmovel %eax, %r15d
jmp 0x17835
movslq (%rbx), %rax
leaq 0xad7e(%rip), %rcx      # 0x22600
testb $0x2, 0x1(%rax,%rcx)
je 0x17835
movq %rbx, %rdi
movq %r13, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17c1d
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
movl %eax, (%rbx)
jmp 0x17835
movl $0x5b, %r15d
cmpl $-0x1, %eax
je 0x17835
leaq 0xb009(%rip), %rsi      # 0x228d4
jmp 0x178d4
leaq 0xb068(%rip), %rsi      # 0x2293c
movq %rbx, %rdi
movl $0x125, %edx            # imm = 0x125
callq 0x16d8f
leaq 0xb054(%rip), %rsi      # 0x2293c
movq %rbx, %rdi
movl $0x121, %edx            # imm = 0x121
callq 0x16d8f