// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x29b5
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x29a8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x29aa
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x297c
jmp 0x29b7
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2c10
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x2a1f
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x25(%rbp)
jae 0x2a04
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x2a0d
jmp 0x2a1d
jmp 0x2a0f
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29e1
jmp 0x29b7
cmpl $0x0, -0x14(%rbp)
je 0x2a56
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2a56
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
movl %r8d, %esi
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x9, %eax
je 0x2be7
jmp 0x2a6b
movl -0x2c(%rbp), %eax
subl $0xa, %eax
je 0x2bc3
jmp 0x2a79
movl -0x2c(%rbp), %eax
subl $0xd, %eax
je 0x2be7
jmp 0x2a87
movl -0x2c(%rbp), %eax
subl $0x20, %eax
je 0x2be7
jmp 0x2a95
movl -0x2c(%rbp), %eax
subl $0x2c, %eax
je 0x2adc
jmp 0x2a9f
movl -0x2c(%rbp), %eax
subl $0x3d, %eax
je 0x2b03
jmp 0x2aa9
movl -0x2c(%rbp), %eax
subl $0x5b, %eax
je 0x2b78
jmp 0x2ab7
movl -0x2c(%rbp), %eax
subl $0x5d, %eax
je 0x2b9f
jmp 0x2ac5
movl -0x2c(%rbp), %eax
subl $0x7b, %eax
je 0x2b2a
jmp 0x2acf
movl -0x2c(%rbp), %eax
subl $0x7d, %eax
je 0x2b51
jmp 0x2bf8
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x2, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x3, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x5, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x7, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x6, %esi
movl $0x1, %r8d
callq 0x72d0
movl $0x0, -0x4(%rbp)
jmp 0x2c23
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29b7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x7330
movl %eax, -0x4(%rbp)
jmp 0x2c23
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x7a50
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)