// File: /workspace/github_cpp_makefile_star2_O3/0x0584[P]scmin-plus/src/builtin/builtin.cpp
// Function: builtin::_let_rec(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::_let_rec(const sexpr_t& args, env_t& bindings) {
    if (args->length() < 2) {
        cerr << "Err: let requires an env and sexpr(s)" << endl;
        return nullptr;
    }

    env_t local = bindings;
    sexpr_t walk = args->car(), curr;
    unordered_set<string> seen;

    while (not walk->isnil()) {
        curr = walk->car();
        if (not curr or not curr->islist() or curr->length() != 2) {
            cerr << "Err: let bound is mal formatted" << endl;
            return nullptr;
        }
        if (not curr->car()->issymb()) {
            cerr << "Err: cannot bind constant" << endl;
            return nullptr;
        }
        auto sy = any_cast<sexpr_text>(*curr->car()->blob).text();
        if (not seen.insert(sy).second) {
            cerr << "Err: variable appeared twice!" << endl;
            return nil();
        }
        local[sy] = nil();
        walk = walk->cdr();
    }
    walk = args->car();
    while (not walk->isnil()) {
        curr = walk->car();
        auto sy = any_cast<sexpr_text>(*curr->car()->blob).text();
        local[sy] = ::eval(curr->cdr()->car(), local);
        walk = walk->cdr();
    }
    return builtin::_begin(args->cdr(), local);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rdi
callq 0x4fb6
cmpq $0x1, %rax
ja 0x9e9e
movq 0x10194(%rip), %rbx     # 0x19fe8
leaq 0x967a(%rip), %rsi      # 0x134d5
movl $0x25, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %r14, %rax
jmp 0xa472
movq %r14, -0x78(%rbp)
xorl %eax, %eax
leaq -0xf8(%rbp), %rdi
movq %rax, (%rdi)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rdi)
movups 0x20(%rbx), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rax, 0x30(%rdi)
leaq -0x130(%rbp), %rdx
movq %rdi, (%rdx)
movq %rbx, %rsi
callq 0x5bc0
movq %r15, -0xb0(%rbp)
movq (%r15), %rsi
leaq -0x70(%rbp), %rdi
callq 0x628e
leaq -0x100(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %ebx, %ebx
leaq -0x60(%rbp), %r13
leaq -0xa8(%rbp), %r15
movq -0x70(%rbp), %rdi
callq 0x4c74
testb %al, %al
jne 0xa1af
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x628e
movq -0x60(%rbp), %r14
movq -0x58(%rbp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %rbx, %rbx
je 0x9f6c
movq %rbx, %rdi
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9f6c
callq 0x4104
testq %r14, %r14
je 0xa164
movq %r12, %rbx
movq %r14, %rdi
callq 0x4cec
testb %al, %al
je 0xa164
movq %r12, %rbx
movq %r14, %rdi
callq 0x4fb6
cmpq $0x2, %rax
jne 0xa164
movq %r13, %rdi
movq %r14, %rsi
callq 0x628e
movq -0x60(%rbp), %rdi
callq 0x4ed6
movl %eax, %ebx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9fc1
callq 0x4104
testb %bl, %bl
je 0xa3eb
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x628e
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %rbx
testq %rax, %rax
je 0xa489
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x45ca
movb 0x20(%rbx), %al
movb %al, -0x40(%rbp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x389c
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa037
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa045
callq 0x4104
leaq -0x130(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq %r15, %rsi
movq %r13, %rdx
callq 0xafec
movl %edx, %r14d
testb $0x1, %dl
je 0xa0dd
movq %r13, %rdi
callq 0x514c
leaq -0xf8(%rbp), %rdi
movq %r15, %rsi
callq 0xadda
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0xa096
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa0a4
callq 0x4104
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x61be
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa130
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa130
callq 0x4104
jmp 0xa130
movl $0x1d, %edx
movq 0xfeff(%rip), %rdi      # 0x19fe8
leaq 0x945f(%rip), %rsi      # 0x1354f
callq 0x3210
movq 0xfeec(%rip), %rcx      # 0x19fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xfece(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq -0x78(%rbp), %rdi
callq 0x514c
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa152
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %r12, %rbx
testb $0x1, %r14b
jne 0x9f25
jmp 0xa43b
movq 0xfe7d(%rip), %rbx      # 0x19fe8
leaq 0x93a3(%rip), %rsi      # 0x13515
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xfe4b(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
jmp 0xa431
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x628e
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa1ed
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa1ed
callq 0x4104
leaq -0x60(%rbp), %r14
leaq -0x88(%rbp), %r12
leaq -0xf8(%rbp), %r15
movq -0x70(%rbp), %rdi
callq 0x4c74
testb %al, %al
jne 0xa3b1
movq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x628e
movq -0x60(%rbp), %r13
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %rbx, %rbx
je 0xa24a
movq %rbx, %rdi
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa24a
callq 0x4104
movq %r12, %rdi
movq %r13, %rsi
callq 0x628e
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %rbx
testq %rax, %rax
je 0xa484
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x45ca
movb 0x20(%rbx), %al
movb %al, -0x40(%rbp)
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x389c
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa2bb
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa2c9
callq 0x4104
leaq -0xc0(%rbp), %rdi
movq %r13, %rsi
callq 0x61be
movq -0xc0(%rbp), %rsi
movq %r12, %r13
movq %r12, %rdi
callq 0x628e
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %r13
movq %r15, %rdx
callq 0xf373
movq %r13, %rdi
movq %rbx, %rsi
callq 0xadda
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0xa322
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa330
callq 0x4104
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa33e
callq 0x4104
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0xa34f
callq 0x4104
movq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x61be
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa386
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa386
callq 0x4104
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa3a8
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x30(%rbp), %rbx
jmp 0xa1ff
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x61be
leaq -0x60(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
movq -0x78(%rbp), %rdi
callq 0x86ba
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa3e6
callq 0x4104
movq %rbx, %r12
jmp 0xa43b
movq 0xfbf6(%rip), %rbx      # 0x19fe8
leaq 0x913c(%rip), %rsi      # 0x13535
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xfbc4(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movq -0x78(%rbp), %rax
movups %xmm0, (%rax)
leaq -0x130(%rbp), %rdi
callq 0xace0
testq %r12, %r12
je 0xa454
movq %r12, %rdi
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xa462
callq 0x4104
leaq -0xf8(%rbp), %rdi
callq 0x4004
movq -0x78(%rbp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4668
movq %r12, -0x30(%rbp)
callq 0x4668
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa5c2
callq 0x4104
jmp 0xa5c2
jmp 0xa5bf
jmp 0xa5bf
movq %rax, %r14
jmp 0xa5f0
jmp 0xa594
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0x58(%rbp), %rdi
jmp 0xa584
jmp 0xa594
jmp 0xa4fe
jmp 0xa594
movq %r12, -0x30(%rbp)
jmp 0xa547
movq %r12, -0x30(%rbp)
jmp 0xa530
jmp 0xa528
jmp 0xa4fe
jmp 0xa530
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0x58(%rbp), %rdi
jmp 0xa537
movq %r12, -0x30(%rbp)
jmp 0xa51e
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa56f
callq 0x4104
jmp 0xa56f
jmp 0xa5bf
jmp 0xa598
movq %rax, %r14
jmp 0xa5c6
jmp 0xa530
movq %rax, %rdi
callq 0x4075
movq %rax, %r14
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa5c6
callq 0x4104
jmp 0xa5c6
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa533
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa533
jmp 0xa598
movq %rax, %r14
jmp 0xa57d
movq %rax, %r14
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa57d
callq 0x4104
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0xa59b
callq 0x4104
jmp 0xa59b
jmp 0xa5bf
jmp 0xa5bf
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa5c6
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa5c6
movq %rax, %r14
movq %rbx, -0x30(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xace0
cmpq $0x0, -0x30(%rbp)
je 0xa5e2
movq -0x30(%rbp), %rdi
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xa5f0
callq 0x4104
leaq -0xf8(%rbp), %rdi
callq 0x4004
movq %r14, %rdi
callq 0x3310