// File: 0x0584[P]scmin-plus/src/builtin/builtin.cpp
// Function: builtin::_unset(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::_unset(const sexpr_t& args, env_t& bindings) {
    if (args->length() != 1) {
        cerr << "Err: expecting one argument!" << endl;
        return nil();
    }
    if (not args->car()->issymb()) {
        cerr << "Err: cannot unset constant values!" << endl;
        return nil();
    }
    auto itr = bindings.find(any_cast<sexpr_text>(*args->car()->blob).text());
    if (itr == end(bindings)) {
        cerr << "Err: symbol is not defined" << endl;
        return nil();
    }
    bindings.erase(itr);
    return symb("t");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xe8(%rbp)
movq %rdi, %rax
movq %rax, -0xe0(%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 0xdfe2
movq 0x2003a(%rip), %rdi     # 0x2dff0
leaq 0x1341d(%rip), %rsi     # 0x213da
callq 0x32c0
movq %rax, %rdi
movq 0x1ffc4(%rip), %rsi     # 0x2df90
callq 0x32f0
movq -0xe8(%rbp), %rdi
callq 0x78f0
jmp 0xe29b
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0xb520
movq -0xf8(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7500
movb %al, -0xe9(%rbp)
jmp 0xe01a
movb -0xe9(%rbp), %al
xorb $-0x1, %al
movb %al, -0xf9(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4450
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0xe03d
jmp 0xe08a
movq 0x1ffac(%rip), %rdi     # 0x2dff0
leaq 0x133ac(%rip), %rsi     # 0x213f7
callq 0x32c0
movq %rax, %rdi
movq 0x1ff36(%rip), %rsi     # 0x2df90
callq 0x32f0
movq -0xe8(%rbp), %rdi
callq 0x78f0
jmp 0xe29b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4450
jmp 0xe2ab
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0xb520
movq -0x110(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x4520
movq %rax, -0x108(%rbp)
jmp 0xe0d1
movq -0x108(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x44d0
jmp 0xe0e6
leaq -0x60(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3a60
jmp 0xe0f8
movq -0x118(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x10b00
movq %rax, -0x120(%rbp)
jmp 0xe111
movq -0x120(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x31d0
leaq -0x88(%rbp), %rdi
callq 0x4550
leaq -0x98(%rbp), %rdi
callq 0x4450
movq -0x18(%rbp), %rdi
callq 0x10b30
movq %rax, -0xa0(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x10e50
testb $0x1, %al
jne 0xe166
jmp 0xe1e7
movq 0x1fe83(%rip), %rdi     # 0x2dff0
leaq 0x132a6(%rip), %rsi     # 0x2141a
callq 0x32c0
movq %rax, %rdi
movq 0x1fe0d(%rip), %rsi     # 0x2df90
callq 0x32f0
movq -0xe8(%rbp), %rdi
callq 0x78f0
jmp 0xe29b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xe1d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xe1ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x31d0
leaq -0x88(%rbp), %rdi
callq 0x4550
leaq -0x98(%rbp), %rdi
callq 0x4450
jmp 0xe2ab
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rsi
callq 0x10e80
movq %rax, -0xb0(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x3500
movq -0x128(%rbp), %rdx
leaq 0x135cf(%rip), %rsi     # 0x217f9
leaq -0xd0(%rbp), %rdi
callq 0xc230
jmp 0xe238
movq -0xe8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x7920
jmp 0xe24d
leaq -0xd0(%rbp), %rdi
callq 0x31d0
leaq -0xd1(%rbp), %rdi
callq 0x3310
jmp 0xe29b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xe28d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x31d0
leaq -0xd1(%rbp), %rdi
callq 0x3310
jmp 0xe2ab
movq -0xe0(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)