// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/builtin.cpp
// Function: builtin::_set(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::_set(const sexpr_t& args, env_t& bindings) {
    if (args->length() != 2) {
        cerr << "Err: expecting two arguments!" << endl;
        return nil();
    }
    if (not args->car()->issymb()) {
        cerr << "Err: cannot set 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, use define instead" << endl;
        return nil();
    }
    itr->second = ::eval(args->cdr()->car(), bindings);
    return itr->second;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x4ff4
cmpq $0x2, %rax
jne 0x8253
movq (%r15), %rsi
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x634a
movq (%r12), %rdi
callq 0x4ef8
movl %eax, %r12d
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x80f9
callq 0x4114
testb %r12b, %r12b
je 0x8268
movq (%r15), %rsi
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x634a
movq (%r12), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %r12
testq %rax, %rax
je 0x82df
leaq -0x50(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x45ce
movb 0x20(%r12), %al
leaq -0x60(%rbp), %rsi
movb %al, 0x20(%rsi)
leaq -0x80(%rbp), %rdi
callq 0x38ac
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0xb06a
movq %rax, %r12
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8183
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8198
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x81a6
callq 0x4114
testq %r12, %r12
je 0x827d
movq (%r15), %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x627a
movq (%r15), %rsi
leaq -0x80(%rbp), %rdi
callq 0x634a
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %r14, %rdx
callq 0xf8dd
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x30(%r12), %rdi
movups %xmm0, 0x28(%r12)
testq %rdi, %rdi
je 0x81fa
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8208
callq 0x4114
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x8216
callq 0x4114
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x8224
callq 0x4114
movq 0x28(%r12), %rax
movq %rax, (%rbx)
movq 0x30(%r12), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x82c7
movq 0x11d3b(%rip), %rcx     # 0x19f80
cmpb $0x0, (%rcx)
je 0x82d9
incl 0x8(%rax)
jmp 0x82c7
movq 0x11d8e(%rip), %r14     # 0x19fe8
leaq 0xb129(%rip), %rsi      # 0x1338a
movl $0x1d, %edx
jmp 0x8290
movq 0x11d79(%rip), %r14     # 0x19fe8
leaq 0xb132(%rip), %rsi      # 0x133a8
movl $0x20, %edx
jmp 0x8290
movq 0x11d64(%rip), %r14     # 0x19fe8
leaq 0xb13e(%rip), %rsi      # 0x133c9
movl $0x2e, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x51b8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x82c7
callq 0x4667
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x833c
callq 0x4114
jmp 0x833c
jmp 0x8339
movq %rax, %rbx
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x831a
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x831a
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x833c
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x833c
movq %rax, %rdi
callq 0x4085
movq %rax, %rbx
movq -0x30(%rbp), %rdi
jmp 0x8349
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8353
callq 0x4114
movq %rbx, %rdi
callq 0x3310
nop