// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ff4
cmpq $0x2, %rax
jne 0x6dae
movq (%r12), %rsi
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x634a
movq (%r14), %rdi
callq 0x4cf4
movl %eax, %r14d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6d9a
callq 0x4114
movq (%r12), %rsi
testb %r14b, %r14b
je 0x6dfb
leaq -0x60(%rbp), %rdi
callq 0x634a
jmp 0x6e22
movq 0x13233(%rip), %r14     # 0x19fe8
leaq 0xc4d5(%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 0x7103
movq %rsi, -0x60(%rbp)
movq 0x8(%r12), %rax
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x6e22
movq 0x1316c(%rip), %rcx     # 0x19f80
cmpb $0x0, (%rcx)
je 0x6e1e
incl 0x8(%rax)
jmp 0x6e22
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x634a
movq -0x90(%rbp), %rdi
callq 0x4ef8
movl %eax, %r13d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x6e52
callq 0x4114
testb %r13b, %r13b
je 0x6f52
movq -0x60(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x634a
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %r13
movl %r14d, -0x2c(%rbp)
testq %rax, %rax
je 0x7118
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x45ce
movb 0x20(%r13), %al
leaq -0x90(%rbp), %rsi
movb %al, 0x20(%rsi)
leaq -0xe0(%rbp), %rdi
callq 0x38ac
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x6ed5
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
movl -0x2c(%rbp), %r14d
je 0x6ee7
callq 0x4114
leaq -0xe0(%rbp), %rsi
movq %r15, %rdi
callq 0xb06a
testq %rax, %rax
je 0x6fa3
movq 0x130e2(%rip), %r14     # 0x19fe8
leaq 0xc3c3(%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 0x130b0(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x51b8
jmp 0x70d6
movq 0x1308f(%rip), %r14     # 0x19fe8
leaq 0xc353(%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 0x1305d(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x70f5
testb %r14b, %r14b
je 0x7001
movq (%r12), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x634a
movq -0xc0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x627a
movq (%r12), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x627a
movq -0xa0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x634a
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x5279
jmp 0x701b
movq (%r12), %rsi
leaq -0x50(%rbp), %rdi
callq 0x627a
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x634a
leaq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %r15, %rdx
callq 0xf8dd
leaq -0xe0(%rbp), %rsi
movq %r15, %rdi
callq 0xb0ae
movaps -0x90(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x90(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0x705f
callq 0x4114
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x7070
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x707e
callq 0x4114
testb %r14b, %r14b
je 0x70bc
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x7094
callq 0x4114
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x70a5
callq 0x4114
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x70b3
callq 0x4114
movq -0xb8(%rbp), %rdi
jmp 0x70c0
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x70ca
callq 0x4114
movq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x634a
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70f5
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7103
callq 0x4114
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
movq %rax, %rbx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x71c3
movq %rax, %rbx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x71da
movq %rax, %rbx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x71f1
movq %rax, %rbx
movb $0x1, %r15b
movl $0x0, -0x2c(%rbp)
jmp 0x71ad
movq %rax, %rbx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x7205
movq %rax, %rbx
movb $0x1, %r15b
movl $0x0, -0x2c(%rbp)
jmp 0x71c0
movq %rax, %rbx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x721c
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x7195
callq 0x4114
jmp 0x7195
movq %rax, %rbx
movl -0x2c(%rbp), %eax
movl %eax, %r15d
xorb $0x1, %r15b
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x71ad
callq 0x4114
testb %r15b, %r15b
je 0x71c0
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x71c0
callq 0x4114
testb %r15b, %r15b
cmpb $0x0, -0x2c(%rbp)
je 0x71da
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x71da
callq 0x4114
cmpb $0x0, -0x2c(%rbp)
je 0x71f1
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x71f1
callq 0x4114
cmpb $0x0, -0x2c(%rbp)
je 0x7205
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x7205
callq 0x4114
cmpb $0x0, -0x2c(%rbp)
je 0x721c
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x721c
callq 0x4114
cmpb $0x0, -0x2c(%rbp)
jmp 0x727b
jmp 0x7278
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x724e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x724e
movq %rax, %rdi
callq 0x4085
jmp 0x729c
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x725e
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x729f
callq 0x4114
jmp 0x729f
jmp 0x729c
movq %rax, %rbx
movq -0x88(%rbp), %rdi
jmp 0x72a3
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x729f
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x729f
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x72ad
callq 0x4114
movq %rbx, %rdi
callq 0x3310
nop