// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ff4
cmpq $0x1, %rax
ja 0xa172
movq 0xfec0(%rip), %rbx      # 0x19fe8
leaq 0x93a6(%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 0xa746
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 0x5c6e
movq %r15, -0xb0(%rbp)
movq (%r15), %rsi
leaq -0x70(%rbp), %rdi
callq 0x634a
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 0x4c7c
testb %al, %al
jne 0xa483
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x634a
movq -0x60(%rbp), %r14
movq -0x58(%rbp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %rbx, %rbx
je 0xa232
movq %rbx, %rdi
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa240
callq 0x4114
testq %r14, %r14
je 0xa438
movq %r12, %rbx
movq %r14, %rdi
callq 0x4cf4
testb %al, %al
je 0xa438
movq %r12, %rbx
movq %r14, %rdi
callq 0x4ff4
cmpq $0x2, %rax
jne 0xa438
movq %r13, %rdi
movq %r14, %rsi
callq 0x634a
movq -0x60(%rbp), %rdi
callq 0x4ef8
movl %eax, %ebx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa295
callq 0x4114
testb %bl, %bl
je 0xa6bf
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x634a
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %rbx
testq %rax, %rax
je 0xa75d
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x45ce
movb 0x20(%rbx), %al
movb %al, -0x40(%rbp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x38ac
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa30b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa319
callq 0x4114
leaq -0x130(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq %r15, %rsi
movq %r13, %rdx
callq 0xb2d8
movl %edx, %r14d
testb $0x1, %dl
je 0xa3b1
movq %r13, %rdi
callq 0x51b8
leaq -0xf8(%rbp), %rdi
movq %r15, %rsi
callq 0xb0ae
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0xa36a
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa378
callq 0x4114
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x627a
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa3a1
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa404
callq 0x4114
jmp 0xa404
movl $0x1d, %edx
movq 0xfc2b(%rip), %rdi      # 0x19fe8
leaq 0x918b(%rip), %rsi      # 0x1354f
callq 0x3210
movq 0xfc18(%rip), %rcx      # 0x19fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xfbfa(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq -0x78(%rbp), %rdi
callq 0x51b8
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa426
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %r12, %rbx
testb $0x1, %r14b
jne 0xa1f9
jmp 0xa70f
movq 0xfba9(%rip), %rbx      # 0x19fe8
leaq 0x90cf(%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 0xfb77(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
jmp 0xa705
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x634a
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa4b3
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa4c1
callq 0x4114
leaq -0x60(%rbp), %r14
leaq -0x88(%rbp), %r12
leaq -0xf8(%rbp), %r15
movq -0x70(%rbp), %rdi
callq 0x4c7c
testb %al, %al
jne 0xa685
movq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x634a
movq -0x60(%rbp), %r13
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %rbx, %rbx
je 0xa510
movq %rbx, %rdi
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa51e
callq 0x4114
movq %r12, %rdi
movq %r13, %rsi
callq 0x634a
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %rbx
testq %rax, %rax
je 0xa758
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x45ce
movb 0x20(%rbx), %al
movb %al, -0x40(%rbp)
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38ac
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa58f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa59d
callq 0x4114
leaq -0xc0(%rbp), %rdi
movq %r13, %rsi
callq 0x627a
movq -0xc0(%rbp), %rsi
movq %r12, %r13
movq %r12, %rdi
callq 0x634a
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %r13
movq %r15, %rdx
callq 0xf8dd
movq %r13, %rdi
movq %rbx, %rsi
callq 0xb0ae
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq 0x8(%rax), %rdi
movups %xmm0, (%rax)
testq %rdi, %rdi
je 0xa5f6
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa604
callq 0x4114
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa612
callq 0x4114
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0xa623
callq 0x4114
movq -0x70(%rbp), %rsi
movq %r14, %rdi
callq 0x627a
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movups %xmm0, -0x70(%rbp)
testq %rdi, %rdi
je 0xa64c
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa65a
callq 0x4114
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa67c
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x30(%rbp), %rbx
jmp 0xa4d3
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x627a
leaq -0x60(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
movq -0x78(%rbp), %rdi
callq 0x8902
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa6ba
callq 0x4114
movq %rbx, %r12
jmp 0xa70f
movq 0xf922(%rip), %rbx      # 0x19fe8
leaq 0x8e68(%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 0xf8f0(%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 0xafb4
testq %r12, %r12
je 0xa728
movq %r12, %rdi
callq 0x4114
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xa736
callq 0x4114
leaq -0xf8(%rbp), %rdi
callq 0x4014
movq -0x78(%rbp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
movq %r12, -0x30(%rbp)
callq 0x4667
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa896
callq 0x4114
jmp 0xa896
jmp 0xa893
jmp 0xa893
movq %rax, %r14
jmp 0xa8c4
jmp 0xa868
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0x58(%rbp), %rdi
jmp 0xa858
jmp 0xa868
jmp 0xa7d2
jmp 0xa868
movq %r12, -0x30(%rbp)
jmp 0xa81b
movq %r12, -0x30(%rbp)
jmp 0xa804
jmp 0xa7fc
jmp 0xa7d2
jmp 0xa804
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0x58(%rbp), %rdi
jmp 0xa80b
movq %r12, -0x30(%rbp)
jmp 0xa7f2
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa843
callq 0x4114
jmp 0xa843
jmp 0xa893
jmp 0xa86c
movq %rax, %r14
jmp 0xa89a
jmp 0xa804
movq %rax, %rdi
callq 0x4085
movq %rax, %r14
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa89a
callq 0x4114
jmp 0xa89a
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa807
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa807
jmp 0xa86c
movq %rax, %r14
jmp 0xa851
movq %rax, %r14
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xa851
callq 0x4114
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0xa86f
callq 0x4114
jmp 0xa86f
jmp 0xa893
jmp 0xa893
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xa89a
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa89a
movq %rax, %r14
movq %rbx, -0x30(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xafb4
cmpq $0x0, -0x30(%rbp)
je 0xa8b6
movq -0x30(%rbp), %rdi
callq 0x4114
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xa8c4
callq 0x4114
leaq -0xf8(%rbp), %rdi
callq 0x4014
movq %r14, %rdi
callq 0x3310