// File: /workspace/github_cpp_makefile_star2_O3/0x0584[P]scmin-plus/src/builtin/builtin.cpp
// Function: builtin::_define(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::_define(const sexpr_t& args, env_t& bindings) {
    if (args->length() != 2) {
        cerr << "Err: define expects two arguments" << endl;
        return nullptr;
    }
    bool is_lambda = args->car()->islist();
    sexpr_t def = is_lambda ? args->car() : args;
    if (not def->car()->issymb()) {
        cerr << "Err: define is mal-formatted" << endl;
        return nullptr;
    }
    auto sy = any_cast<sexpr_text>(*def->car()->blob).text();
    if (bindings.find(sy) != end(bindings)) {
        cerr << "Err: symbol is already defined, use set! instead" << endl;
        return nil();
    }
    bindings[sy] = ::eval(is_lambda ? lambda(args->car()->cdr(),
                                             args->cdr()->car()) :
                          args->cdr()->car(), bindings);
    return def->car();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x4fb6
cmpq $0x2, %rax
jne 0x6c52
movq (%r12), %rsi
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x628e
movq (%r14), %rdi
callq 0x4cec
movl %eax, %r14d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6c3e
callq 0x4104
movq (%r12), %rsi
testb %r14b, %r14b
je 0x6c9f
leaq -0x60(%rbp), %rdi
callq 0x628e
jmp 0x6cc6
movq 0x1338f(%rip), %r14     # 0x19fe8
leaq 0xc631(%rip), %rsi      # 0x13291
movl $0x21, %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
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x6fa7
movq %rsi, -0x60(%rbp)
movq 0x8(%r12), %rax
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x6cc6
movq 0x132c8(%rip), %rcx     # 0x19f80
cmpb $0x0, (%rcx)
je 0x6cc2
incl 0x8(%rax)
jmp 0x6cc6
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x628e
movq -0x90(%rbp), %rdi
callq 0x4ed6
movl %eax, %r13d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6cf6
callq 0x4104
testb %r13b, %r13b
je 0x6df6
movq -0x60(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x628e
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %r13
movb %r14b, -0x29(%rbp)
testq %rax, %rax
je 0x6fbc
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x45ca
movb 0x20(%r13), %al
leaq -0x90(%rbp), %rsi
movb %al, 0x20(%rsi)
leaq -0xe0(%rbp), %rdi
callq 0x389c
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x6d79
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
movb -0x29(%rbp), %r14b
je 0x6d8b
callq 0x4104
leaq -0xe0(%rbp), %rsi
movq %r15, %rdi
callq 0xad96
testq %rax, %rax
je 0x6e47
movq 0x1323e(%rip), %r14     # 0x19fe8
leaq 0xc51f(%rip), %rsi      # 0x132d0
movl $0x30, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x1320c(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x514c
jmp 0x6f7a
movq 0x131eb(%rip), %r14     # 0x19fe8
leaq 0xc4af(%rip), %rsi      # 0x132b3
movl $0x1c, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x131b9(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x6f99
testb %r14b, %r14b
je 0x6ea5
movq (%r12), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x628e
movq -0xc0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x61be
movq (%r12), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x61be
movq -0xa0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x628e
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x520d
jmp 0x6ebf
movq (%r12), %rsi
leaq -0x40(%rbp), %rdi
callq 0x61be
movq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x628e
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %r15, %rdx
callq 0xf373
leaq -0xe0(%rbp), %rsi
movq %r15, %rdi
callq 0xadda
movaps -0x90(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x90(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0x6f03
callq 0x4104
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6f14
callq 0x4104
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x6f22
callq 0x4104
testb %r14b, %r14b
je 0x6f60
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x6f38
callq 0x4104
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x6f49
callq 0x4104
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x6f57
callq 0x4104
movq -0xb8(%rbp), %rdi
jmp 0x6f64
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x6f6e
callq 0x4104
movq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x628e
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f99
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x6fa7
callq 0x4104
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4668
movq %rax, %rbx
jmp 0x7011
movq %rax, %rbx
jmp 0x7022
movq %rax, %rbx
jmp 0x7033
movq %rax, %rbx
jmp 0x704a
movq %rax, %rbx
jmp 0x7041
jmp 0x70b0
jmp 0x70b0
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6ffd
callq 0x4104
jmp 0x6ffd
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x700b
callq 0x4104
cmpb $0x0, -0x29(%rbp)
je 0x704a
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x7022
callq 0x4104
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x7033
callq 0x4104
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x7041
callq 0x4104
movq -0xb8(%rbp), %rdi
jmp 0x704e
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x70b3
callq 0x4104
jmp 0x70b3
jmp 0x70b0
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x7086
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x7086
movq %rax, %rdi
callq 0x4075
jmp 0x70d4
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x7096
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x70d7
callq 0x4104
jmp 0x70d7
jmp 0x70d4
movq %rax, %rbx
movq -0x88(%rbp), %rdi
jmp 0x70db
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70d7
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x70d7
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x70e5
callq 0x4104
movq %rbx, %rdi
callq 0x3310
nop