// File: 0x0584[P]scmin-plus/src/builtin/cons.cpp
// Function: builtin::_car(std::shared_ptr<sexpr> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<sexpr>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::shared_ptr<sexpr>>>>&)
sexpr_t builtin::_car(const sexpr_t& args, env_t& bindings) {
    (void)bindings;
    if (args->length() != 1) {
        cerr << "car expects only one argument" << endl;
        return nullptr;
    }
    if (not (args->car()->islist() or args->car()->ispair())) {
        // cerr << args << endl;
        cerr << "car is applicable only on conslists" << endl;
        return nullptr;
    }
    return args->car()->car();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x75d0
cmpq $0x1, %rax
je 0x132cd
movq 0x1ad50(%rip), %rdi     # 0x2dff0
leaq 0xe308(%rip), %rsi      # 0x215af
callq 0x32c0
movq %rax, %rdi
movq 0x1acda(%rip), %rsi     # 0x2df90
callq 0x32f0
movq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4570
jmp 0x1344c
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xb520
movq -0x80(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
movb $0x0, -0x49(%rbp)
callq 0x72f0
movb %al, -0x71(%rbp)
jmp 0x13300
movb -0x71(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x81(%rbp)
jne 0x13354
jmp 0x13312
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0xb520
jmp 0x13329
movb $0x1, -0x49(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7360
movb %al, -0x82(%rbp)
jmp 0x13346
movb -0x82(%rbp), %al
movb %al, -0x81(%rbp)
jmp 0x13354
movb -0x81(%rbp), %al
xorb $-0x1, %al
movb %al, -0x83(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x1336a
jmp 0x13373
leaq -0x48(%rbp), %rdi
callq 0x4450
leaq -0x28(%rbp), %rdi
callq 0x4450
movb -0x83(%rbp), %al
testb $0x1, %al
jne 0x13388
jmp 0x133f4
movq 0x1ac61(%rip), %rdi     # 0x2dff0
leaq 0xe237(%rip), %rsi      # 0x215cd
callq 0x32c0
movq %rax, %rdi
movq 0x1abeb(%rip), %rsi     # 0x2df90
callq 0x32f0
movq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4570
jmp 0x1344c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x133e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x133de
jmp 0x133e7
leaq -0x48(%rbp), %rdi
callq 0x4450
jmp 0x133e9
leaq -0x28(%rbp), %rdi
callq 0x4450
jmp 0x13459
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0xb520
movq -0x90(%rbp), %rdi
callq 0x4400
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0xb520
jmp 0x1342a
leaq -0x60(%rbp), %rdi
callq 0x4450
jmp 0x1344c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4450
jmp 0x13459
movq -0x68(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)