// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
movl 0x24(%rdi), %ebx
movq 0x28(%rdi), %r15
movslq 0x30(%rdi), %rax
testq %rax, %rax
jle 0x2baf
xorl %ecx, %ecx
xorl %edx, %edx
cmpb $0xa, (%r15,%rcx)
sete %dl
addl %edx, %ebx
incq %rcx
cmpl %ecx, %eax
jne 0x2b99
addq %rax, %r15
movq 0x8(%r14), %rax
cmpq %rax, %r15
jae 0x2c12
movzbl (%r15), %r12d
cmpl $0x23, %r12d
jne 0x2bdc
incq %r15
movq %r15, %rcx
movq %rcx, %r15
cmpq %rax, %rcx
jae 0x2bb3
leaq 0x1(%r15), %rcx
cmpb $0xa, (%r15)
jne 0x2bc8
jmp 0x2bb3
testl %ebp, %ebp
je 0x2be6
cmpb $0x2e, %r12b
je 0x2c5b
cmpl $0x1f, %r12d
jg 0x2bfd
cmpl $0x9, %r12d
je 0x2c0d
cmpl $0xd, %r12d
je 0x2c0d
jmp 0x2c81
cmpl $0x2b, %r12d
jg 0x2c35
cmpl $0x20, %r12d
jne 0x2cd8
incq %r15
jmp 0x2bb3
movl $0x6, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %rax, 0x28(%r14)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x30(%r14)
jmp 0x2cc7
cmpl $0x5c, %r12d
jg 0x2c65
cmpl $0x2c, %r12d
je 0x2ca5
cmpl $0x3d, %r12d
je 0x2c91
cmpl $0x5b, %r12d
jne 0x2cd8
movl $0x7, 0x20(%r14)
jmp 0x2cb7
movl $0x1, 0x20(%r14)
jmp 0x2cb7
cmpl $0x5d, %r12d
je 0x2caf
cmpl $0x7b, %r12d
je 0x2c9b
cmpl $0x7d, %r12d
jne 0x2cd8
movl $0x5, 0x20(%r14)
jmp 0x2cb7
cmpl $0xa, %r12d
jne 0x2cd8
movl $0x6, 0x20(%r14)
jmp 0x2cb7
movl $0x3, 0x20(%r14)
jmp 0x2cb7
movl $0x4, 0x20(%r14)
jmp 0x2cb7
movl $0x2, 0x20(%r14)
jmp 0x2cb7
movl $0x8, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movq $0x1, 0x30(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3824(%rip), %rsi      # 0x6503
movl $0x3, %edx
movq %r15, %rdi
callq 0x1060
testl %eax, %eax
je 0x2d56
leaq 0x382c(%rip), %rsi      # 0x6523
movl $0x3, %edx
movq %r15, %rdi
callq 0x1060
testl %eax, %eax
je 0x2d87
cmpl $0x22, %r12d
je 0x2e00
cmpl $0x27, %r12d
jne 0x2ee8
movl $0x1, %eax
movzbl (%r15,%rax), %ecx
testl %ecx, %ecx
je 0x2d3b
incq %rax
cmpl $0x27, %ecx
je 0x30d1
cmpl $0xa, %ecx
jne 0x2d21
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x351e(%rip), %rdx      # 0x6268
leaq 0x385c(%rip), %r8       # 0x65ad
jmp 0x315b
leaq 0x3(%r15), %rdi
leaq 0x37a2(%rip), %rsi      # 0x6503
callq 0x11f0
testq %rax, %rax
je 0x2de5
movl %eax, %ecx
subl %r15d, %ecx
addl $0x2, %ecx
addq $0x3, %rax
incl %ecx
cmpb $0x27, (%rax)
leaq 0x1(%rax), %rax
je 0x2d77
jmp 0x2fa5
leaq 0x3(%r15), %r12
leaq 0x3791(%rip), %rsi      # 0x6523
movq %r12, %rdi
callq 0x11f0
testq %rax, %rax
je 0x2dca
movq %rax, %r13
leaq 0x377a(%rip), %rbp      # 0x6523
cmpb $0x5c, -0x1(%r13)
jne 0x2fc6
incq %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x11f0
movq %rax, %r13
testq %rax, %rax
jne 0x2da9
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x348f(%rip), %rdx      # 0x6268
leaq 0x3747(%rip), %r8       # 0x6527
jmp 0x315b
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x3474(%rip), %rdx      # 0x6268
leaq 0x370c(%rip), %r8       # 0x6507
jmp 0x315b
movb 0x1(%r15), %r12b
testb %r12b, %r12b
je 0x2f67
xorl %ecx, %ecx
movl $0x2, %ebp
xorl %r13d, %r13d
testl %ecx, %ecx
jne 0x2e45
testl %r13d, %r13d
je 0x2e82
movsbl %r12b, %esi
movl $0x11, %edx
leaq 0x372f(%rip), %rdi      # 0x655f
callq 0x1140
testq %rax, %rax
je 0x30ea
decl %r13d
xorl %ecx, %ecx
jmp 0x2eb9
movsbl %r12b, %esi
movl $0x8, %edx
leaq 0x36ee(%rip), %rdi      # 0x6543
callq 0x1140
xorl %ecx, %ecx
testq %rax, %rax
jne 0x2eb9
movl $0x4, %r13d
cmpb $0x75, %r12b
je 0x2eb9
movzbl %r12b, %eax
cmpl $0x55, %eax
jne 0x309d
movl $0x8, %r13d
jmp 0x2eb9
movzbl %r12b, %eax
cmpl $0x5b, %eax
jg 0x2eac
cmpl $0x27, %eax
jne 0x2ece
xorl %r13d, %r13d
cmpb $0x27, (%r15,%rbp)
jne 0x2e41
cmpb $0x27, 0x1(%r15,%rbp)
movl $0x0, %ecx
jne 0x2eb9
jmp 0x3187
cmpl $0x5c, %eax
jne 0x2ee0
movl $0x1, %ecx
xorl %r13d, %r13d
movb (%r15,%rbp), %r12b
incq %rbp
testb %r12b, %r12b
jne 0x2e17
jmp 0x2f67
cmpl $0xa, %eax
je 0x2f67
cmpl $0x22, %eax
je 0x316e
xorl %r13d, %r13d
jmp 0x2e41
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3c73
testl %eax, %eax
je 0x2f82
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3d19
testl %eax, %eax
je 0x2f82
xorl %r13d, %r13d
leaq 0x36f0(%rip), %r12      # 0x660a
movzbl (%r15,%r13), %eax
testl %eax, %eax
je 0x30b8
cmpl $0xa, %eax
je 0x30b8
testl %ebp, %ebp
je 0x2f3c
cmpb $0x2e, %al
je 0x30b8
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
jb 0x2f62
movsbl %al, %esi
movl $0xf, %edx
movq %r12, %rdi
callq 0x1140
testq %rax, %rax
je 0x30b8
incq %r13
jmp 0x2f1a
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x32f2(%rip), %rdx      # 0x6268
leaq 0x3666(%rip), %r8       # 0x65e3
jmp 0x315b
leaq 0x366d(%rip), %rsi      # 0x65f6
movq %r15, %rdi
callq 0x1130
leal 0x1(%rax), %ecx
addq %r15, %rax
decq %rax
decl %ecx
cmpb $0x20, (%rax)
leaq -0x1(%rax), %rax
je 0x2f9a
movl $0x9, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movl %ecx, 0x30(%r14)
movl $0x0, 0x34(%r14)
jmp 0x2cc7
movl %r13d, %ebp
subl %r15d, %ebp
addl $0x2, %ebp
decq %r13
incl %ebp
cmpb $0x22, 0x4(%r13)
leaq 0x1(%r13), %r13
je 0x2fd2
movb $0x1, %al
movb $0x1, %cl
cmpq %r13, %r12
jae 0x310c
xorl %ecx, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x3023
testl %eax, %eax
je 0x304c
movl %eax, (%rsp)
movsbl (%r12), %esi
movl $0x11, %edx
leaq 0x3553(%rip), %rdi      # 0x655f
callq 0x1140
testq %rax, %rax
je 0x30ea
movl (%rsp), %eax
decl %eax
xorl %ecx, %ecx
jmp 0x3058
movl %eax, (%rsp)
movsbl (%r12), %esi
movl $0x8, %edx
leaq 0x350c(%rip), %rdi      # 0x6543
movl %esi, 0x4(%rsp)
callq 0x1140
xorl %ecx, %ecx
testq %rax, %rax
je 0x3065
movl (%rsp), %eax
jmp 0x3058
xorl %ecx, %ecx
cmpb $0x5c, (%r12)
sete %cl
xorl %eax, %eax
incq %r12
cmpq %r13, %r12
jb 0x2ff0
jmp 0x3102
movzbl 0x4(%rsp), %eax
cmpl $0x75, %eax
je 0x307b
cmpl $0x55, %eax
jne 0x3082
movl $0x8, %eax
jmp 0x3058
movl $0x4, %eax
jmp 0x3058
movq %r12, %rdi
leaq 0x34bf(%rip), %rsi      # 0x654b
callq 0x1130
xorl %ecx, %ecx
cmpb $0xa, (%r12,%rax)
movl (%rsp), %eax
je 0x3058
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x31bc(%rip), %rdx      # 0x6268
leaq 0x349c(%rip), %r8       # 0x654f
jmp 0x315b
movl $0x9, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movl %r13d, 0x30(%r14)
jmp 0x2fb9
movl $0x9, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movl %eax, 0x30(%r14)
jmp 0x2fb9
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x316f(%rip), %rdx      # 0x6268
leaq 0x3470(%rip), %r8       # 0x6570
jmp 0x315b
testl %ecx, %ecx
sete %cl
testl %eax, %eax
sete %al
testb %cl, %cl
je 0x312d
testb %al, %al
je 0x3145
movl $0x9, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movl %ebp, 0x30(%r14)
jmp 0x2fb9
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x312c(%rip), %rdx      # 0x6268
leaq 0x343d(%rip), %r8       # 0x6580
jmp 0x315b
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x3114(%rip), %rdx      # 0x6268
leaq 0x343b(%rip), %r8       # 0x6596
movl %ebx, %ecx
xorl %eax, %eax
callq 0x10f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2cc9
movl $0x9, 0x20(%r14)
movl %ebx, 0x24(%r14)
movq %r15, 0x28(%r14)
movl %ebp, 0x30(%r14)
jmp 0x2fb9
movq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
leaq 0x30d2(%rip), %rdx      # 0x6268
leaq 0x3425(%rip), %r8       # 0x65c2
jmp 0x315b