// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x190(%rdi), %r13
xorl %r15d, %r15d
pushq $0x7
popq %rbp
leaq 0x1b37(%rip), %r12      # 0xc3ac
movq %rbx, %rdi
callq 0xaa56
movl %eax, %r14d
xorl %eax, %eax
cmpl $0xa, %r14d
sete %al
addl %eax, %r15d
callq 0x4300
movq (%rax), %rax
movslq %r14d, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0xa875
movslq 0xa90(%rbx), %rax
shlq $0x5, %rax
testb $0x1, (%r13,%rax)
je 0xa8b8
addq %r13, %rax
addl %r15d, 0x14(%rax)
cmpl $-0x1, %r14d
je 0xa962
movl %r14d, 0x2c(%rbx)
movq %rbx, %rdi
callq 0xaa56
leal -0x22(%rax), %ecx
cmpl $0xc, %ecx
ja 0xa900
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0xaa56
cmpl $0x21, %eax
jne 0xa966
movq %rbx, %rdi
callq 0xaa56
cmpl $-0x1, %eax
je 0xa948
cmpl $0xa, %eax
jne 0xa8ec
jmp 0xa917
cmpl $0x3b, %eax
jne 0xa94f
movq %rbx, %rdi
callq 0xaa56
cmpl $-0x1, %eax
je 0xa948
cmpl $0xa, %eax
jne 0xa905
movslq 0xa90(%rbx), %rax
movq %rax, %rcx
shlq $0x5, %rcx
testb $0x1, (%r13,%rcx)
movl $0x0, %r15d
je 0xa875
shlq $0x5, %rax
incl 0x14(%r13,%rax)
xorl %r15d, %r15d
jmp 0xa875
movl %eax, %ebp
jmp 0xa9e4
cmpl $-0x1, %eax
je 0xa962
cmpl $0x60, %eax
je 0xa9e4
movl %eax, 0x2c(%rbx)
jmp 0xa9da
pushq $-0x1
jmp 0xa9e3
cmpl $-0x1, %eax
je 0xa976
pushq $0xc
popq %rbp
cmpl $0x28, %eax
je 0xa9e4
movl %eax, 0x2c(%rbx)
leaq 0x232f(%rip), %rdi      # 0xccac
movl %eax, %esi
callq 0xab07
cmpl $0x1, %eax
pushq $0xb
popq %rbp
sbbl $0x0, %ebp
jmp 0xa9e4
pushq $0x1
jmp 0xa9e3
xorl %ebp, %ebp
jmp 0xa9e4
movq %rbx, %rdi
callq 0xaa56
cmpl $-0x1, %eax
je 0xa9e1
cmpl $0x40, %eax
jne 0xa9de
pushq $0x9
jmp 0xa9e3
pushq $0x4
jmp 0xa9e3
movq %rbx, %rdi
callq 0xaa56
leaq 0x22e8(%rip), %rdi      # 0xcca8
movl %eax, %esi
callq 0xab07
testl %eax, %eax
je 0xa9d3
pushq $0x2
jmp 0xa9e3
pushq $0x6
jmp 0xa9e3
movl $0x2e, 0x2c(%rbx)
pushq $0x3
jmp 0xa9e3
movl %eax, 0x2c(%rbx)
pushq $0x8
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq