// File: /workspace/github_c_makefile_star2_O0/mtnygard[P]complisp/lisp.c
// Function: read_rec
ASTNode *read_rec(char *input, word *pos) {
  char c = skip_whitespace(input, pos);
  if (isdigit(c)) {
    return read_integer(input, pos, 1);
  }
  if (c == '+' && isdigit(input[*pos + 1])) {
    advance(pos);
    return read_integer(input, pos, 1);
  }
  if (c == '-' && isdigit(input[*pos + 1])) {
    advance(pos);
    return read_integer(input, pos, -1);
  }
  if (starts_symbol(c)) {
    return read_symbol(input, pos);
  }
  if (c == '\'') {
    advance(pos);
    return read_char(input, pos);
  }
  if (c == '#' && input[*pos + 1] == 't') {
    advance(pos);
    advance(pos);
    return AST_new_bool(true);
  }
  if (c == '#' && input[*pos + 1] == 'f') {
    advance(pos);
    advance(pos);
    return AST_new_bool(false);
  }
  if (c == '(') {
    advance(pos);
    return read_list(input, pos);
  }
  return AST_error();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4860
movb %al, -0x19(%rbp)
callq 0x1180
movq (%rax), %rax
movsbl -0x19(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4c88
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x4930
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x2b, %eax
jne 0x4cde
callq 0x1180
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movsbl 0x1(%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4cde
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x4930
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x2d, %eax
jne 0x4d34
callq 0x1180
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movsbl 0x1(%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4d34
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4930
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %edi
callq 0x48c0
testb $0x1, %al
jne 0x4d43
jmp 0x4d59
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4a10
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x27, %eax
jne 0x4d81
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4ab0
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x23, %eax
jne 0x4dc1
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movsbl 0x1(%rax,%rcx), %eax
cmpl $0x74, %eax
jne 0x4dc1
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x18(%rbp), %rdi
callq 0x4810
movl $0x1, %edi
callq 0x1680
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x23, %eax
jne 0x4dfe
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movsbl 0x1(%rax,%rcx), %eax
cmpl $0x66, %eax
jne 0x4dfe
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x18(%rbp), %rdi
callq 0x4810
xorl %edi, %edi
callq 0x1680
movq %rax, -0x8(%rbp)
jmp 0x4e2c
movsbl -0x19(%rbp), %eax
cmpl $0x28, %eax
jne 0x4e23
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4b30
movq %rax, -0x8(%rbp)
jmp 0x4e2c
callq 0x1770
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)