// File: /workspace/github_cpp_makefile_star2_O3/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 0x4fb6
cmpq $0x2, %rax
jne 0x800b
movq (%r15), %rsi
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x628e
movq (%r12), %rdi
callq 0x4ed6
movl %eax, %r12d
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7eb1
callq 0x4104
testb %r12b, %r12b
je 0x8020
movq (%r15), %rsi
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x628e
movq (%r12), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %r12
testq %rax, %rax
je 0x8097
leaq -0x50(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x45ca
movb 0x20(%r12), %al
leaq -0x60(%rbp), %rsi
movb %al, 0x20(%rsi)
leaq -0x80(%rbp), %rdi
callq 0x389c
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0xad96
movq %rax, %r12
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f3b
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f50
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x7f5e
callq 0x4104
testq %r12, %r12
je 0x8035
movq (%r15), %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x61be
movq (%r15), %rsi
leaq -0x80(%rbp), %rdi
callq 0x628e
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %r14, %rdx
callq 0xf373
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x30(%r12), %rdi
movups %xmm0, 0x28(%r12)
testq %rdi, %rdi
je 0x7fc0
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7fc0
callq 0x4104
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x7fce
callq 0x4104
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x7fdc
callq 0x4104
movq 0x28(%r12), %rax
movq %rax, (%rbx)
movq 0x30(%r12), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x807f
movq 0x11f83(%rip), %rcx     # 0x19f80
cmpb $0x0, (%rcx)
je 0x8091
incl 0x8(%rax)
jmp 0x807f
movq 0x11fd6(%rip), %r14     # 0x19fe8
leaq 0xb371(%rip), %rsi      # 0x1338a
movl $0x1d, %edx
jmp 0x8048
movq 0x11fc1(%rip), %r14     # 0x19fe8
leaq 0xb37a(%rip), %rsi      # 0x133a8
movl $0x20, %edx
jmp 0x8048
movq 0x11fac(%rip), %r14     # 0x19fe8
leaq 0xb386(%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 0x514c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x807f
callq 0x4668
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x80f4
callq 0x4104
jmp 0x80f4
jmp 0x80f1
movq %rax, %rbx
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x80d2
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x80d2
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x80f4
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x80f4
movq %rax, %rdi
callq 0x4075
movq %rax, %rbx
movq -0x30(%rbp), %rdi
jmp 0x8101
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x810b
callq 0x4104
movq %rbx, %rdi
callq 0x3310
nop