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

    unordered_set<string> seen;
    bool labeled = args->car()->issymb();
    env_t local = bindings;
    sexpr_t walk = labeled ? args->cdr()->car(): args->car(),
        curr;
    sexpr_t let_args, let_args_tail;

    if (not (walk->islist() or walk->isnil())) {
        cerr << "Err: let is mal formatted" << endl;
        return nullptr;
    }
    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();
        }
        if (labeled) {
            auto tmp = cons(curr->car(), nil());
            if (not let_args) {
                let_args_tail = let_args = tmp;
            } else {
                let_args_tail->setcdr(tmp);
                let_args_tail = let_args_tail->cdr();
            }
        }
        local[sy] = ::eval(curr->cdr()->car(), bindings);
        walk = walk->cdr();
    }
    if (labeled) {
        auto let_lambda = lambda(let_args, cons(symb("begin"),
                                                args->cdr()->cdr()));
        local[any_cast<sexpr_text>(*args->car()->blob).text()] = let_lambda;
    }
    return builtin::_begin(labeled ? args->cdr()->cdr() : args->cdr(), local) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
callq 0x4fb6
cmpq $0x1, %rax
ja 0x8cf4
movq 0x1133e(%rip), %rbx     # 0x19fe8
leaq 0xa824(%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 0x9574
leaq -0x158(%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)
movq %rbx, -0xc8(%rbp)
movq (%rbx), %rsi
leaq -0x128(%rbp), %rbx
movq %rbx, %rdi
callq 0x628e
movq -0x128(%rbp), %rdi
callq 0x4ed6
movb %al, -0x29(%rbp)
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
je 0x8d52
callq 0x4104
xorl %eax, %eax
movq %rax, -0x128(%rbp)
movq 0x8(%r12), %rcx
movq %rcx, -0x120(%rbp)
movq %rax, -0x118(%rbp)
movq 0x18(%r12), %rcx
movq %rcx, -0x110(%rbp)
movups 0x20(%r12), %xmm0
movups %xmm0, -0x108(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0x60(%rbp), %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5bc0
cmpb $0x0, -0x29(%rbp)
movq -0xc8(%rbp), %rax
je 0x8dd9
movq (%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x61be
movq -0x60(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x628e
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8de8
callq 0x4104
jmp 0x8de8
movq (%rax), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x628e
xorps %xmm0, %xmm0
movaps %xmm0, -0xf0(%rbp)
movaps %xmm0, -0xe0(%rbp)
xorl %r15d, %r15d
movq -0xc0(%rbp), %rdi
callq 0x4cec
testb %al, %al
movq %r14, -0x90(%rbp)
jne 0x8e2a
xorl %r15d, %r15d
movq -0xc0(%rbp), %rdi
callq 0x4c74
testb %al, %al
je 0x923b
movq %r12, -0x130(%rbp)
leaq -0x50(%rbp), %r13
xorl %r14d, %r14d
leaq -0x60(%rbp), %rbx
xorl %r15d, %r15d
movq -0xc0(%rbp), %rdi
callq 0x4c74
testb %al, %al
jne 0x929c
movq -0xc0(%rbp), %rsi
movq %rbx, %rdi
callq 0x628e
movq -0x60(%rbp), %r12
movq -0x58(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
testq %r14, %r14
je 0x8e8c
movq %r14, %rdi
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8e8c
callq 0x4104
movq %r12, %rdi
callq 0x4cec
testb %al, %al
je 0x91e9
movq %r12, %rdi
callq 0x4fb6
cmpq $0x2, %rax
jne 0x91e9
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, -0x78(%rbp)
callq 0x628e
movq -0x60(%rbp), %rdi
callq 0x4ed6
movl %eax, %r14d
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8ed7
callq 0x4104
testb %r14b, %r14b
je 0x946a
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x628e
movq -0x70(%rbp), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %r14
testq %rax, %rax
je 0x9586
movq %r13, -0x60(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x45ca
movb 0x20(%r14), %al
movb %al, -0x40(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rbx, %rsi
callq 0x389c
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
movq -0x90(%rbp), %r14
je 0x8f4c
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq %r13, %r15
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x8f5d
callq 0x4104
leaq -0x188(%rbp), %rdi
movq %rdi, -0x60(%rbp)
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdx
callq 0xafec
movl %edx, %r13d
testb $0x1, %dl
je 0x903e
cmpb $0x0, -0x29(%rbp)
je 0x90de
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x628e
leaq -0x88(%rbp), %r14
movq %r14, %rdi
callq 0x514c
movq %rbx, %rdi
leaq -0x70(%rbp), %rsi
movq %r14, %rdx
callq 0x5289
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x8fc5
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x8fd3
callq 0x4104
cmpq $0x0, -0xf0(%rbp)
je 0x9095
movq -0xe0(%rbp), %rdi
movq %rbx, %rsi
callq 0x615c
movq -0xe0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x61be
movaps -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x70(%rbp)
movq -0xd8(%rbp), %rdi
movaps %xmm0, -0xe0(%rbp)
testq %rdi, %rdi
je 0x90d0
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x90d0
callq 0x4104
jmp 0x90d0
movl $0x1d, %edx
movq 0x10f9e(%rip), %rdi     # 0x19fe8
leaq 0xa4fe(%rip), %rsi      # 0x1354f
callq 0x3210
movq 0x10f8b(%rip), %rcx     # 0x19fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x10f6d(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
callq 0x514c
jmp 0x91ab
movq -0x60(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %r14
movq %r14, %rdi
leaq -0x58(%rbp), %rsi
callq 0x62fc
movq -0xf0(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
movq %r14, %rsi
callq 0x62fc
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x90de
callq 0x4104
leaq -0x88(%rbp), %rdi
movq %r12, %rsi
callq 0x61be
movq -0x88(%rbp), %rsi
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x628e
movq %rbx, %rdi
movq %r14, %rsi
movq -0x130(%rbp), %rdx
callq 0xf373
leaq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %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 0x9141
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x914f
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x915d
callq 0x4104
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x916b
callq 0x4104
movq -0xc0(%rbp), %rsi
movq %rbx, %rdi
callq 0x61be
movaps -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x60(%rbp)
movq -0xb8(%rbp), %rdi
movups %xmm0, -0xc0(%rbp)
testq %rdi, %rdi
je 0x91ab
callq 0x4104
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x91ab
callq 0x4104
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x91cd
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x78(%rbp), %rax
movq %rax, %r14
testb $0x1, %r13b
movq %r15, %r13
movq %rax, %r15
jne 0x8e3f
jmp 0x9512
movq 0x10df8(%rip), %rbx     # 0x19fe8
leaq 0xa31e(%rip), %rsi      # 0x13515
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x3210
movq -0x90(%rbp), %r14
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x10dbf(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
jmp 0x94b7
xorl %r15d, %r15d
movq 0x10da3(%rip), %rbx     # 0x19fe8
leaq 0xa2af(%rip), %rsi      # 0x134fb
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
xorl %r15d, %r15d
movsbl %al, %esi
movq 0x10d6b(%rip), %rdi     # 0x19fe8
callq 0x3030
xorl %r15d, %r15d
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
xorl %r15d, %r15d
jmp 0x9512
cmpb $0x0, -0x29(%rbp)
je 0x94c0
leaq -0x60(%rbp), %rdi
movq %r13, (%rdi)
leaq 0xa2b9(%rip), %rsi      # 0x1356d
leaq 0xa2b7(%rip), %rdx      # 0x13572
callq 0x6b44
movq -0xc8(%rbp), %rbx
leaq -0x88(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5176
movq (%rbx), %rsi
leaq -0x140(%rbp), %rdi
callq 0x61be
movq -0x140(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x61be
leaq -0xb0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x5289
leaq -0x70(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x520d
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x933b
callq 0x4104
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x934c
callq 0x4104
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x935d
callq 0x4104
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x936b
callq 0x4104
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x9380
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq (%rbx), %rsi
leaq -0x88(%rbp), %rdi
callq 0x628e
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4696
movq %rax, %rbx
testq %rax, %rax
je 0x958b
leaq -0x60(%rbp), %rdi
movq %r13, (%rdi)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
callq 0x45ca
movb 0x20(%rbx), %al
leaq -0x60(%rbp), %rsi
movb %al, 0x20(%rsi)
leaq -0xb0(%rbp), %rdi
callq 0x389c
leaq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x4840
leaq -0x68(%rbp), %rsi
movq -0x8(%rsi), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, %rdi
callq 0x62fc
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x9425
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x943a
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x9448
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x9456
callq 0x4104
movq -0xc8(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x61be
jmp 0x94c7
movq 0x10b77(%rip), %rbx     # 0x19fe8
leaq 0xa0bd(%rip), %rsi      # 0x13535
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3210
movq -0x90(%rbp), %r14
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0x10b3e(%rip), %rdi     # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
jmp 0x9512
movq -0xc8(%rbp), %rbx
movq (%rbx), %rsi
leaq -0x60(%rbp), %rdi
callq 0x61be
leaq -0x60(%rbp), %rsi
leaq -0x128(%rbp), %rdx
movq -0x90(%rbp), %rdi
callq 0x86ba
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x94f8
callq 0x4104
cmpb $0x0, -0x29(%rbp)
je 0x950f
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x950f
callq 0x4104
movq %r14, %r15
movq -0xd8(%rbp), %rdi
testq %rdi, %rdi
je 0x9523
callq 0x4104
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x9534
callq 0x4104
testq %r15, %r15
movq -0x90(%rbp), %rbx
je 0x9548
movq %r15, %rdi
callq 0x4104
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x9559
callq 0x4104
leaq -0x128(%rbp), %rdi
callq 0x4004
leaq -0x188(%rbp), %rdi
callq 0xace0
movq %rbx, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4668
callq 0x4668
jmp 0x97aa
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x95bf
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x95bf
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x9668
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x9668
jmp 0x9764
movq %rax, %rbx
jmp 0x9676
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x9603
callq 0x4104
jmp 0x9603
movq %rax, %rbx
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x9619
callq 0x4104
jmp 0x9619
movq %rax, %rbx
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x962f
callq 0x4104
jmp 0x962f
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x9642
callq 0x4104
jmp 0x9642
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x97ad
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x97ad
jmp 0x97aa
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x9676
callq 0x4104
movq -0x68(%rbp), %rdi
jmp 0x96a3
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9692
callq 0x4104
jmp 0x9692
movq %rax, %rbx
cmpb $0x0, -0x29(%rbp)
je 0x97ad
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x97ad
callq 0x4104
jmp 0x97ad
movq %rax, %rbx
movq -0x58(%rbp), %rdi
jmp 0x981a
jmp 0x96c4
movq %rax, %rbx
jmp 0x9824
jmp 0x96ce
movq %rax, %rbx
movq -0x58(%rbp), %rdi
jmp 0x9756
jmp 0x96f6
movq %rax, %rbx
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
je 0x9830
callq 0x4104
jmp 0x9830
movq %rax, %rbx
jmp 0x9830
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x9714
callq 0x4104
jmp 0x9714
movq %rax, %rbx
movq -0x68(%rbp), %rdi
jmp 0x9756
jmp 0x97b3
movq %rax, %rbx
jmp 0x9744
movq %rax, %rbx
jmp 0x9752
jmp 0x97b3
jmp 0x97b3
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9744
callq 0x4104
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x9752
callq 0x4104
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x97b6
callq 0x4104
jmp 0x97b6
jmp 0x97da
movq %rax, %rdi
callq 0x4075
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x978d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x978d
jmp 0x97de
jmp 0x978a
movq %rax, %rbx
movq -0x68(%rbp), %rdi
jmp 0x979e
jmp 0x97b3
jmp 0x97de
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x97e1
callq 0x4104
jmp 0x97e1
movq %rax, %rbx
movq %r14, -0x78(%rbp)
jmp 0x97e1
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x97e1
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x31f0
jmp 0x97e1
movq %r15, -0x78(%rbp)
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
testq %rdi, %rdi
je 0x97f2
callq 0x4104
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x9803
callq 0x4104
cmpq $0x0, -0x78(%rbp)
je 0x9813
movq -0x78(%rbp), %rdi
callq 0x4104
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x9824
callq 0x4104
leaq -0x128(%rbp), %rdi
callq 0x4004
leaq -0x188(%rbp), %rdi
callq 0xace0
movq %rbx, %rdi
callq 0x3310