// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: token
static int token(scheme * sc) {
  int c;
  c = skipspace(sc);
  if (c == EOF) {
    return (TOK_EOF);
  }
  switch (c = inchar(sc)) {
  case EOF:
    return (TOK_EOF);
  case '(':
    return (TOK_LPAREN);
  case ')':
    return (TOK_RPAREN);
  case '.':
    c = inchar(sc);
    if (is_one_of(" \n\t", c)) {
      return (TOK_DOT);
    } else {
      backchar(sc, c);
      backchar(sc, '.');
      return TOK_ATOM;
    }
  case '\'':
    return (TOK_QUOTE);
  case ';':
    while ((c = inchar(sc)) != '\n' && c != EOF) {
    }

#if SHOW_ERROR_LINE
    if (c == '\n' && sc->load_stack[sc->file_i].kind & port_file)
      sc->load_stack[sc->file_i].rep.stdio.curr_line++;
#endif

    if (c == EOF) {
      return (TOK_EOF);
    } else {
      return (token(sc));
    }
  case '"':
    return (TOK_DQUOTE);
  case BACKQUOTE:
    return (TOK_BQUOTE);
  case ',':
    if ((c = inchar(sc)) == '@') {
      return (TOK_ATMARK);
    } else {
      backchar(sc, c);
      return (TOK_COMMA);
    }
  case '#':
    c = inchar(sc);
    if (c == '(') {
      return (TOK_VEC);
    } else if (c == '!') {
      while ((c = inchar(sc)) != '\n' && c != EOF) {
      }

#if SHOW_ERROR_LINE
      if (c == '\n' && sc->load_stack[sc->file_i].kind & port_file)
        sc->load_stack[sc->file_i].rep.stdio.curr_line++;
#endif

      if (c == EOF) {
        return (TOK_EOF);
      } else {
        return (token(sc));
      }
    } else {
      backchar(sc, c);
      if (is_one_of(" tfodxb\\", c)) {
        return TOK_SHARP_CONST;
      } else {
        return (TOK_SHARP);
      }
    }
  default:
    backchar(sc, c);
    return (TOK_ATOM);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x190(%rdi), %r15
leaq 0x20b9(%rip), %r12      # 0xd380
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0xb5ae
movl %eax, %r14d
xorl %eax, %eax
cmpl $0xa, %r14d
sete %al
addl %eax, %ebp
callq 0x4300
movq (%rax), %rax
movslq %r14d, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0xb2c9
movslq 0xa90(%rbx), %rax
shlq $0x5, %rax
testb $0x1, 0x190(%rbx,%rax)
je 0xb312
addq %rbx, %rax
addq $0x190, %rax            # imm = 0x190
addl %ebp, 0x14(%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %r14d
je 0xb3a4
movl %r14d, 0x2c(%rbx)
movq %rbx, %rdi
callq 0xb5ae
cmpl $0x3a, %eax
jg 0xb368
leal -0x22(%rax), %ecx
cmpl $0xc, %ecx
ja 0xb3f6
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0xb5ae
cmpl $0x21, %eax
jne 0xb3af
movq %rbx, %rdi
callq 0xb5ae
cmpl $-0x1, %eax
je 0xb3a2
cmpl $0xa, %eax
jne 0xb354
jmp 0xb37f
cmpl $0x3b, %eax
jne 0xb3ea
movq %rbx, %rdi
callq 0xb5ae
cmpl $-0x1, %eax
je 0xb3a2
cmpl $0xa, %eax
jne 0xb36d
movslq 0xa90(%rbx), %rcx
shlq $0x5, %rcx
testb $0x1, (%r15,%rcx)
je 0xb397
addq %r15, %rcx
incl 0x14(%rcx)
cmpl $-0x1, %eax
jne 0xb2c7
jmp 0xb3a4
movl %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, %eax
je 0xb482
movl $0xc, %ebp
cmpl $0x28, %eax
je 0xb3a4
movl %eax, 0x2c(%rbx)
xorl %ecx, %ecx
leaq 0x2915(%rip), %rdx      # 0xdce3
movl $0xb, %ebp
cmpq $0x8, %rcx
je 0xb48c
movsbl (%rcx,%rdx), %esi
incq %rcx
cmpl %esi, %eax
jne 0xb3d3
jmp 0xb3a4
cmpl $0x60, %eax
jne 0xb3ff
movl $0x7, %ebp
jmp 0xb3a4
cmpl $-0x1, %eax
jne 0xb3ff
movl %eax, %ebp
jmp 0xb3a4
movl %eax, 0x2c(%rbx)
jmp 0xb4a5
movl $0x1, %ebp
jmp 0xb3a4
movq %rbx, %rdi
callq 0xb5ae
movl $0x2, %ebp
cmpl $-0x1, %eax
je 0xb3a4
xorl %ecx, %ecx
leaq 0x28b6(%rip), %rdx      # 0xdcdf
cmpq $0x3, %rcx
je 0xb496
movsbl (%rcx,%rdx), %esi
incq %rcx
cmpl %esi, %eax
jne 0xb429
jmp 0xb3a4
movl $0x4, %ebp
jmp 0xb3a4
movl $0x6, %ebp
jmp 0xb3a4
xorl %ebp, %ebp
jmp 0xb3a4
movq %rbx, %rdi
callq 0xb5ae
cmpl $-0x1, %eax
je 0xb478
movl $0x9, %ebp
cmpl $0x40, %eax
je 0xb3a4
movl %eax, 0x2c(%rbx)
movl $0x8, %ebp
jmp 0xb3a4
movl $0xb, %ebp
jmp 0xb3a4
movl $0xa, %ebp
jmp 0xb3a4
cmpl $-0x1, %eax
je 0xb49e
movl %eax, 0x2c(%rbx)
movl $0x2e, 0x2c(%rbx)
movl $0x3, %ebp
jmp 0xb3a4