// File: /workspace/github_c_makefile_star2_O3/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), %r12
xorl %ebp, %ebp
movl $0x7, %r15d
leaq 0x2201(%rip), %r13      # 0xd380
movq %rbx, %rdi
callq 0xb445
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 0xb17f
movslq 0xa90(%rbx), %rax
shlq $0x5, %rax
testb $0x1, (%r12,%rax)
je 0xb1bf
addq %r12, %rax
addl %ebp, 0x14(%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %r14d
je 0xb345
movl %r14d, 0x2c(%rbx)
movq %rbx, %rdi
callq 0xb445
cmpl $0x3a, %eax
jg 0xb21c
leal -0x22(%rax), %ecx
cmpl $0xc, %ecx
ja 0xb2bc
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0xb445
cmpl $0x21, %eax
jne 0xb26b
movq %rbx, %rdi
callq 0xb445
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xb345
cmpl $0xa, %ebp
jne 0xb202
jmp 0xb23d
cmpl $0x3b, %eax
jne 0xb2af
movq %rbx, %rdi
callq 0xb445
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xb345
cmpl $0xa, %ebp
jne 0xb225
movslq 0xa90(%rbx), %rax
movq %rax, %rcx
shlq $0x5, %rcx
testb $0x1, (%r12,%rcx)
movl $0x0, %ebp
je 0xb17f
shlq $0x5, %rax
incl 0x14(%r12,%rax)
xorl %ebp, %ebp
jmp 0xb17f
movl $0xb, %r15d
cmpl $-0x1, %eax
je 0xb2b4
movl $0xc, %ebp
cmpl $0x28, %eax
je 0xb345
movl %eax, 0x2c(%rbx)
xorl %ecx, %ecx
leaq 0x2a4c(%rip), %rdx      # 0xdcdc
movl $0xb, %ebp
cmpq $0x8, %rcx
je 0xb332
movsbl (%rcx,%rdx), %esi
incq %rcx
cmpl %esi, %eax
jne 0xb295
jmp 0xb345
cmpl $0x60, %eax
jne 0xb2c5
movl %r15d, %ebp
jmp 0xb345
cmpl $-0x1, %eax
je 0xb345
movl %eax, 0x2c(%rbx)
jmp 0xb340
movl $0x1, %ebp
jmp 0xb345
movl $0x6, %ebp
jmp 0xb345
movq %rbx, %rdi
callq 0xb445
cmpl $-0x1, %eax
je 0xb2f2
movl $0x9, %ebp
cmpl $0x40, %eax
je 0xb345
movl %eax, 0x2c(%rbx)
movl $0x8, %ebp
jmp 0xb345
movl $0x4, %ebp
jmp 0xb345
xorl %ebp, %ebp
jmp 0xb345
movq %rbx, %rdi
callq 0xb445
movl $0x2, %ebp
cmpl $-0x1, %eax
je 0xb345
xorl %ecx, %ecx
leaq 0x29b9(%rip), %rdx      # 0xdcd8
cmpq $0x3, %rcx
je 0xb339
movsbl (%rcx,%rdx), %esi
incq %rcx
cmpl %esi, %eax
jne 0xb31f
jmp 0xb345
movl $0xa, %ebp
jmp 0xb345
movl $0x2e, 0x2c(%rbx)
movl $0x3, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq