// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: next_token
static int next_token(context_t *ctx, int dotisspecial) {
  int lineno = ctx->tok.lineno;
  char *p = ctx->tok.ptr;
  int i;

  /* eat this tok */
  for (i = 0; i < ctx->tok.len; i++) {
    if (*p++ == '\n')
      lineno++;
  }

  /* make next tok */
  while (p < ctx->stop) {
    /* skip comment. stop just before the \n. */
    if (*p == '#') {
      for (p++; p < ctx->stop && *p != '\n'; p++)
        ;
      continue;
    }

    if (dotisspecial && *p == '.') {
      set_token(ctx, DOT, lineno, p, 1);
      return 0;
    }

    switch (*p) {
    case ',':
      set_token(ctx, COMMA, lineno, p, 1);
      return 0;
    case '=':
      set_token(ctx, EQUAL, lineno, p, 1);
      return 0;
    case '{':
      set_token(ctx, LBRACE, lineno, p, 1);
      return 0;
    case '}':
      set_token(ctx, RBRACE, lineno, p, 1);
      return 0;
    case '[':
      set_token(ctx, LBRACKET, lineno, p, 1);
      return 0;
    case ']':
      set_token(ctx, RBRACKET, lineno, p, 1);
      return 0;
    case '\n':
      set_token(ctx, NEWLINE, lineno, p, 1);
      return 0;
    case '\r':
    case ' ':
    case '\t':
      /* ignore white spaces */
      p++;
      continue;
    }

    return scan_string(ctx, p, lineno, dotisspecial);
  }

  set_eof(ctx, lineno);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movl 0x24(%rdi), %ebp
movq 0x28(%rdi), %r14
movl 0x30(%rdi), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpl %ecx, %eax
je 0x25bd
xorl %edx, %edx
cmpb $0xa, (%r14,%rcx)
sete %dl
addl %edx, %ebp
incq %rcx
jmp 0x25a8
addq %rax, %r14
movq 0x8(%rbx), %rax
cmpq %rax, %r14
jae 0x2681
movzbl (%r14), %r12d
cmpl $0x23, %r12d
jne 0x25f4
incq %r14
cmpq %rax, %r14
jae 0x261a
leaq 0x1(%r14), %rcx
cmpb $0xa, (%r14)
movq %rcx, %r14
jne 0x25da
decq %rcx
movq %rcx, %r14
jmp 0x25c4
testl %r15d, %r15d
je 0x2603
cmpb $0x2e, %r12b
je 0x26a2
cmpl $0x9, %r12d
je 0x2615
cmpl $0xd, %r12d
je 0x2615
cmpl $0x20, %r12d
jne 0x261f
incq %r14
jmp 0x25c4
movq %rax, %r14
jmp 0x25c4
cmpl $0xa, %r12d
je 0x2704
cmpl $0x22, %r12d
je 0x26ae
cmpl $0x27, %r12d
je 0x2728
cmpl $0x7d, %r12d
je 0x2773
cmpl $0x3d, %r12d
je 0x271f
cmpl $0x5b, %r12d
je 0x270d
cmpl $0x5d, %r12d
je 0x2716
cmpl $0x7b, %r12d
je 0x26fb
cmpl $0x2c, %r12d
jne 0x279a
movl $0x2, 0x20(%rbx)
jmp 0x277a
movl $0x6, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %rax, 0x28(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x30(%rbx)
jmp 0x2789
movl $0x1, 0x20(%rbx)
jmp 0x277a
movb 0x1(%r14), %r12b
cmpb $0x22, %r12b
jne 0x281f
cmpb $0x22, 0x2(%r14)
jne 0x281f
leaq 0x3(%r14), %r12
leaq 0x2eb0(%rip), %r13      # 0x5582
movq %r12, %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x11e0
testq %rax, %rax
je 0x2982
movq %rax, %r12
cmpb $0x5c, -0x1(%rax)
jne 0x298e
incq %r12
jmp 0x26d5
movl $0x4, 0x20(%rbx)
jmp 0x277a
movl $0x6, 0x20(%rbx)
jmp 0x277a
movl $0x7, 0x20(%rbx)
jmp 0x277a
movl $0x8, 0x20(%rbx)
jmp 0x277a
movl $0x3, 0x20(%rbx)
jmp 0x277a
cmpb $0x27, 0x1(%r14)
jne 0x28ed
cmpb $0x27, 0x2(%r14)
jne 0x28ed
leaq 0x3(%r14), %rdi
leaq 0x2e19(%rip), %rsi      # 0x5562
callq 0x11e0
testq %rax, %rax
je 0x2a87
movl %eax, %ecx
subl %r14d, %ecx
addl $0x2, %ecx
addq $0x3, %rax
incl %ecx
cmpb $0x27, (%rax)
leaq 0x1(%rax), %rax
je 0x2763
jmp 0x2935
movl $0x5, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x28(%rbx)
movq $0x1, 0x30(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x351d
testl %eax, %eax
je 0x2912
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35b7
testl %eax, %eax
je 0x2912
xorl %r13d, %r13d
testb %r12b, %r12b
je 0x2954
movzbl %r12b, %eax
cmpl $0xa, %eax
je 0x2954
testl %r15d, %r15d
je 0x27ee
cmpb $0x2e, %r12b
je 0x2954
movl %r12d, %eax
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x1a, %al
jb 0x2815
movsbl %r12b, %esi
leaq 0x2e65(%rip), %rdi      # 0x5669
pushq $0xf
popq %rdx
callq 0x1130
testq %rax, %rax
je 0x2954
movb 0x1(%r14,%r13), %r12b
incq %r13
jmp 0x27c9
xorl %eax, %eax
pushq $0x2
popq %r13
xorl %ecx, %ecx
testb %r12b, %r12b
je 0x2948
movsbl %r12b, %esi
movzbl %r12b, %r15d
testl %ecx, %ecx
jne 0x2864
testl %eax, %eax
je 0x2884
movl %eax, %r15d
leaq 0x2d74(%rip), %rdi      # 0x55be
pushq $0x11
popq %rdx
callq 0x1130
testq %rax, %rax
je 0x2a7e
movl %r15d, %eax
decl %eax
xorl %ecx, %ecx
jmp 0x28e1
movl %eax, 0x8(%rsp)
leaq 0x2d33(%rip), %rdi      # 0x55a2
pushq $0x8
popq %rdx
callq 0x1130
xorl %ecx, %ecx
testq %rax, %rax
je 0x28a8
movl 0x8(%rsp), %eax
jmp 0x28e1
cmpb $0x27, %r12b
je 0x28bc
cmpl $0x5c, %r15d
je 0x28d7
cmpl $0xa, %r15d
je 0x2948
cmpl $0x22, %r15d
je 0x2954
xorl %eax, %eax
jmp 0x2860
cmpb $0x75, %r12b
je 0x28de
cmpl $0x55, %r15d
jne 0x2a75
pushq $0x8
jmp 0x28e0
xorl %eax, %eax
cmpb $0x27, (%r14,%r13)
jne 0x2860
cmpb $0x27, 0x1(%r14,%r13)
movl $0x0, %ecx
jne 0x28e1
jmp 0x2aab
xorl %eax, %eax
pushq $0x1
popq %rcx
jmp 0x28e1
pushq $0x4
popq %rax
movb (%r14,%r13), %r12b
incq %r13
jmp 0x2827
pushq $0x1
popq %rax
movzbl (%r14,%rax), %ecx
testl %ecx, %ecx
je 0x2906
incq %rax
cmpl $0x27, %ecx
je 0x2968
cmpl $0xa, %ecx
jne 0x28f0
leaq 0x2cff(%rip), %rdx      # 0x560c
jmp 0x2ab2
leaq 0x2d3c(%rip), %rsi      # 0x5655
movq %r14, %rdi
callq 0x1120
leal 0x1(%rax), %ecx
addq %r14, %rax
decq %rax
decl %ecx
cmpb $0x20, (%rax)
leaq -0x1(%rax), %rax
je 0x292a
movl $0x9, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x28(%rbx)
movl %ecx, 0x30(%rbx)
jmp 0x2979
leaq 0x2cf3(%rip), %rdx      # 0x5642
jmp 0x2ab2
movl $0x9, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x28(%rbx)
movl %r13d, 0x30(%rbx)
jmp 0x2979
movl $0x9, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x28(%rbx)
movl %eax, 0x30(%rbx)
andl $0x0, 0x34(%rbx)
jmp 0x2789
leaq 0x2bfd(%rip), %rdx      # 0x5586
jmp 0x2ab2
movl %r12d, %r13d
subl %r14d, %r13d
addl $0x2, %r13d
decq %r12
movq %r15, %rcx
incl %r13d
cmpb $0x22, 0x4(%r12)
leaq 0x1(%r12), %r12
je 0x299e
xorl %r15d, %r15d
xorl %edx, %edx
cmpq %r12, %rcx
jae 0x2a90
testl %edx, %edx
jne 0x29f1
testl %r15d, %r15d
je 0x2a23
movq %rcx, 0x8(%rsp)
movsbl (%rcx), %esi
leaq 0x2bea(%rip), %rdi      # 0x55be
pushq $0x11
popq %rdx
callq 0x1130
testq %rax, %rax
je 0x2a7e
decl %r15d
xorl %edx, %edx
movq 0x8(%rsp), %rcx
jmp 0x2a2e
movl %r15d, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movsbl (%rcx), %esi
leaq 0x2b9d(%rip), %rdi      # 0x55a2
movl %esi, %r15d
pushq $0x8
popq %rdx
callq 0x1130
xorl %edx, %edx
testq %rax, %rax
je 0x2a33
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %r15d
jmp 0x2a2e
xorl %edx, %edx
cmpb $0x5c, (%rcx)
sete %dl
xorl %r15d, %r15d
incq %rcx
jmp 0x29b3
movzbl %r15b, %eax
cmpl $0x75, %eax
je 0x2a4c
cmpl $0x55, %eax
movq 0x8(%rsp), %rcx
jne 0x2a52
pushq $0x8
popq %r15
jmp 0x2a2e
pushq $0x4
popq %r15
jmp 0x29ea
movq 0x8(%rsp), %rdi
leaq 0x2b4c(%rip), %rsi      # 0x55aa
callq 0x1120
xorl %edx, %edx
movq 0x8(%rsp), %rcx
cmpb $0xa, (%rcx,%rax)
movl 0x14(%rsp), %r15d
je 0x2a2e
leaq 0x2b32(%rip), %rdx      # 0x55ae
jmp 0x2ab2
leaq 0x2b4a(%rip), %rdx      # 0x55cf
jmp 0x2ab2
leaq 0x2ad8(%rip), %rdx      # 0x5566
jmp 0x2ab2
testl %edx, %edx
je 0x2a9d
leaq 0x2b44(%rip), %rdx      # 0x55df
jmp 0x2ab2
testl %r15d, %r15d
je 0x2ac4
leaq 0x2b4c(%rip), %rdx      # 0x55f5
jmp 0x2ab2
leaq 0x2b6f(%rip), %rdx      # 0x5621
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2e01
pushq $-0x1
popq %rax
jmp 0x278b
movl $0x9, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x28(%rbx)
movl %r13d, 0x30(%rbx)
jmp 0x2979