// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]tundra/src/JsonParse.cpp
// Function: t2::JsonLexerFetchNext(t2::JsonLexerState*)
static JsonLexeme JsonLexerFetchNext(JsonLexerState* state)
{
  char* p = SkipWhitespace(state);
  char ch = *p;

  switch (ch)
  {
    case '-':
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
      return GetNumberLexeme(state);

    case '"':
      return GetStringLexeme(state);

    case '{':
      state->m_Cursor = p + 1;
      return s_BeginObjectLexeme;

    case '}':
      state->m_Cursor = p + 1;
      return s_EndObjectLexeme;
  
    case '[':
      state->m_Cursor = p + 1;
      return s_BeginArrayLexeme;

    case ']':
      state->m_Cursor = p + 1;
      return s_EndArrayLexeme;

    case ',':
      state->m_Cursor = p + 1;
      return s_ValueSeparatorLexeme;

    case ':':
      state->m_Cursor = p + 1;
      return s_NameSeparatorLexeme;

    case '\0':
      return s_EofLexeme;

    default:
      return GetLiteralLexeme(state);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
leaq -0x1(%r14), %r12
xorl %ecx, %ecx
xorl %edx, %edx
movq %rdx, %r13
movq %rcx, %rbp
movsbl (%r14,%rcx), %edi
testl %edi, %edi
je 0xd3ff
cmpb $0xa, %dil
jne 0xd3ee
incl 0x8(%rbx)
callq 0x3070
leaq -0x1(%r13), %rdx
leaq 0x1(%rbp), %rcx
testl %eax, %eax
jne 0xd3d6
movq %r14, %r15
subq %r13, %r15
movq %r15, (%rbx)
movzbl (%r14,%rbp), %ecx
leal -0x22(%rcx), %eax
cmpl $0x18, %eax
ja 0xd44e
leaq 0x7750(%rip), %rcx      # 0x14b6c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3270
movq (%r14), %rax
movq %rax, (%rbx)
cmpq %rax, %r15
je 0xd483
movq %xmm0, %r14
pushq $0x1
popq %rax
jmp 0xd498
testl %ecx, %ecx
je 0xd68b
cmpl $0x5b, %ecx
je 0xd65b
cmpl $0x5d, %ecx
je 0xd67b
cmpl $0x7b, %ecx
je 0xd66b
cmpl $0x7d, %ecx
jne 0xd4aa
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x6
jmp 0xd494
leaq 0x778f(%rip), %rsi      # 0x14c19
movq %rbx, %rdi
callq 0xd70e
pushq $0xb
popq %rax
xorl %r14d, %r14d
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq %r13, %r12
pushq $-0x1
popq %r14
movsbl 0x1(%r12), %edi
incq %r12
callq 0x3350
incq %r14
testl %eax, %eax
jne 0xd4b1
cmpq $0x5, %r14
je 0xd696
cmpq $0x4, %r14
jne 0xd6ac
leaq 0x77d0(%rip), %rdi      # 0x14cb1
pushq $0x4
popq %rdx
movq %r15, %rsi
callq 0x3170
testl %eax, %eax
je 0xd6ea
leaq 0x77f1(%rip), %rdi      # 0x14cec
pushq $0x4
popq %rdx
movq %r15, %rsi
callq 0x3170
testl %eax, %eax
jne 0xd6ac
movq %r12, (%rbx)
pushq $0x9
jmp 0xd494
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x2
jmp 0xd494
subq %r13, %r14
leaq 0x1(%r14), %rdi
movzbl (%rdi), %r12d
cmpl $0x5c, %r12d
je 0xd554
incq %rdi
cmpl $0x22, %r12d
je 0xd6d0
testl %r12d, %r12d
jne 0xd62b
jmp 0xd6de
leaq 0x2(%rdi), %rsi
movb 0x1(%rdi), %r12b
movzbl %r12b, %eax
leal -0x6e(%rax), %ecx
cmpl $0x7, %ecx
jbe 0xd59d
cmpl $0x22, %eax
je 0xd628
cmpl $0x2f, %eax
je 0xd628
cmpl $0x5c, %eax
je 0xd628
cmpl $0x62, %eax
je 0xd625
cmpl $0x66, %eax
jne 0xd702
movb $0xc, %r12b
jmp 0xd628
leaq 0x762c(%rip), %rdx      # 0x14bd0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movb $0xa, %r12b
jmp 0xd628
movb $0xd, %r12b
jmp 0xd628
addq $0x6, %rdi
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %rdi, 0x8(%rsp)
movq %r15, (%rsp)
cmpl $0x4, %r13d
je 0xd636
movsbl (%rsi,%r13), %ebp
testl %ebp, %ebp
je 0xd6b8
movq %rsi, %r15
movl %ebp, %edi
callq 0x3090
testl %eax, %eax
je 0xd6c4
movl %ebp, %edi
callq 0x34a0
shll $0x4, %r12d
leal -0x61(%rax), %ecx
leal -0x30(%rax), %edx
addl $-0x57, %eax
cmpl $0x6, %ecx
cmovael %edx, %eax
orl %r12d, %eax
incq %r13
movl %eax, %r12d
movq %r15, %rsi
movq (%rsp), %r15
movq 0x8(%rsp), %rdi
jmp 0xd5ca
movb $0x9, %r12b
jmp 0xd628
movb $0x8, %r12b
movq %rsi, %rdi
movb %r12b, (%r15)
incq %r15
jmp 0xd52f
cmpl $0x80, %r12d
jb 0xd62b
leaq 0x7633(%rip), %rsi      # 0x14c79
jmp 0xd48a
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x3
jmp 0xd494
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x5
jmp 0xd494
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x4
jmp 0xd494
subq %r13, %r14
incq %r14
movq %r14, (%rbx)
pushq $0x7
jmp 0xd494
pushq $0xa
popq %rax
movq %rcx, %r14
jmp 0xd498
leaq 0x7619(%rip), %rdi      # 0x14cb6
pushq $0x5
popq %rdx
movq %r15, %rsi
callq 0x3170
testl %eax, %eax
je 0xd6f8
leaq 0x7609(%rip), %rsi      # 0x14cbc
jmp 0xd48a
leaq 0x757f(%rip), %rsi      # 0x14c3e
jmp 0xd48a
leaq 0x758d(%rip), %rsi      # 0x14c58
jmp 0xd48a
movb $0x0, (%r15)
movq %rdi, (%rbx)
xorl %eax, %eax
jmp 0xd498
leaq 0x753f(%rip), %rsi      # 0x14c24
jmp 0xd48a
movq %r12, (%rbx)
pushq $0x1
popq %r14
pushq $0x8
jmp 0xd44b
movq %r12, (%rbx)
pushq $0x8
jmp 0xd494
leaq 0x7590(%rip), %rsi      # 0x14c99
jmp 0xd48a