// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/builtin.cpp
// Function: builtin::_let_astrk(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_astrk(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->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] = ::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, %r14
movq %rdi, %r15
movq (%rsi), %rdi
callq 0x4ff4
cmpq $0x1, %rax
ja 0x9b97
movq 0x10498(%rip), %rbx     # 0x19fe8
leaq 0x997e(%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, (%r15)
jmp 0x9faf
xorl %eax, %eax
leaq -0x128(%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 -0xf0(%rbp), %rdx
movq %rdi, (%rdx)
movq %rbx, %rsi
callq 0x5c6e
movq %r14, -0xa8(%rbp)
movq (%r14), %rsi
leaq -0x70(%rbp), %rdi
callq 0x634a
leaq -0xc0(%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
movq -0x70(%rbp), %rdi
callq 0x4c7c
testb %al, %al
jne 0x9ef2
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x634a
movq -0x60(%rbp), %r12
movq -0x58(%rbp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %rbx, %rbx
je 0x9c4c
movq %rbx, %rdi
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9c5a
callq 0x4114
movq %r14, %rbx
movq %r12, %rdi
callq 0x4cf4
testb %al, %al
movq %r14, -0x30(%rbp)
je 0x9eaa
movq %r14, %rbx
movq %r12, %rdi
callq 0x4ff4
cmpq $0x2, %rax
jne 0x9eaa
movq %r13, %rdi
movq %r12, %rsi
callq 0x634a
movq -0x60(%rbp), %rdi
callq 0x4ef8
movl %eax, %ebx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9caa
callq 0x4114
testb %bl, %bl
je 0x9f2b
leaq -0x80(%rbp), %rdi
movq %r12, %rsi
callq 0x634a
movq -0x80(%rbp), %rax
movq (%rax), %rdi
callq 0x4695
movq %rax, %rbx
testq %rax, %rax
je 0x9fc4
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)
leaq -0xa0(%rbp), %rdi
movq %r13, %rsi
callq 0x38ac
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
leaq -0x80(%rbp), %rbx
je 0x9d22
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %r15, %r14
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x9d33
callq 0x4114
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x60(%rbp)
leaq -0xa0(%rbp), %rsi
movq %r13, %rdx
callq 0xb2d8
movl %edx, %r15d
testb $0x1, %dl
je 0x9e1d
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
callq 0x627a
movq -0xb8(%rbp), %rsi
movq %rbx, %rdi
callq 0x634a
movq %r13, %rdi
movq %rbx, %rsi
leaq -0x128(%rbp), %rbx
movq %rbx, %rdx
callq 0xf8dd
movq %rbx, %rdi
leaq -0xa0(%rbp), %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 0x9db7
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9dc5
callq 0x4114
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x9dd3
callq 0x4114
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x9de4
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 0x9e0d
callq 0x4114
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9e6f
callq 0x4114
jmp 0x9e6f
movl $0x1d, %edx
movq 0x101bf(%rip), %rdi     # 0x19fe8
leaq 0x971f(%rip), %rsi      # 0x1354f
callq 0x3210
movq 0x101ac(%rip), %rcx     # 0x19fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x1018e(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
callq 0x51b8
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x9e91
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x30(%rbp), %r12
movq %r12, %rbx
testb $0x1, %r15b
movq %r14, %r15
jne 0x9c13
jmp 0x9f7c
movq 0x10137(%rip), %rbx     # 0x19fe8
leaq 0x965d(%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 0x10105(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
jmp 0x9f71
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x627a
leaq -0x60(%rbp), %rsi
leaq -0x128(%rbp), %rdx
movq %r15, %rdi
callq 0x8902
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9f26
callq 0x4114
movq %rbx, %r12
jmp 0x9f7c
movq 0x100b6(%rip), %rbx     # 0x19fe8
leaq 0x95fc(%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 0x10084(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq -0x30(%rbp), %r12
leaq -0xf0(%rbp), %rdi
callq 0xafb4
testq %r12, %r12
je 0x9f95
movq %r12, %rdi
callq 0x4114
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x9fa3
callq 0x4114
leaq -0x128(%rbp), %rdi
callq 0x4014
movq %r15, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
movq %rax, %r15
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa0b4
callq 0x4114
jmp 0xa0b4
jmp 0xa0b1
movq %rax, %r15
jmp 0xa0e2
jmp 0xa083
movq %rax, %r15
jmp 0xa01a
movq %rax, %r15
jmp 0xa028
jmp 0xa08a
jmp 0xa08a
movq %rax, %r15
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa01a
callq 0x4114
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0xa028
callq 0x4114
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0xa08d
callq 0x4114
jmp 0xa08d
jmp 0xa047
jmp 0xa08a
movq %rax, %rdi
callq 0x4085
movq %rax, %r15
jmp 0xa068
movq %rax, %r15
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0xa068
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x78(%rbp), %rdi
jmp 0xa077
jmp 0xa083
movq %rax, %r15
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa0b8
callq 0x4114
jmp 0xa0b8
movq %rax, %r15
jmp 0xa0b8
jmp 0xa0b1
movq %rax, %r15
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0xa0b8
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa0b8
movq %rax, %r15
movq %rbx, -0x30(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xafb4
cmpq $0x0, -0x30(%rbp)
je 0xa0d4
movq -0x30(%rbp), %rdi
callq 0x4114
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0xa0e2
callq 0x4114
leaq -0x128(%rbp), %rdi
callq 0x4014
movq %r15, %rdi
callq 0x3310