// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/cons.cpp
// Function: cons_flavor(bool, 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>>>>&)
static sexpr_t _cons_flavor(bool cdr, const sexpr_t& args, env_t& bindings) {
    sexpr_t e, set;

    if (args->length() != 2) {
        cerr << "Err: operator expect two arguments" << endl;
        return nullptr;
    }
    if (e = ::eval(args->car(), bindings); not (e and e->iscons())) {
        cerr << "Err: cannot set constant!" << endl;
        return nil();
    }
    set = ::eval(args->cdr()->car(), bindings);
    if (cdr) e->setcdr(set);
    else e->setcar(set);
    sexpr_t walk = args->car();
    while (not walk->issymb())
        walk = walk->cdr()->car();
    return ::eval(walk, bindings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, -0x58(%rbp)
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq (%rdx), %rdi
xorl %ebx, %ebx
callq 0x4ff4
cmpq $0x2, %rax
jne 0xbbd7
movq (%r12), %rsi
leaq -0x50(%rbp), %rdi
callq 0x634a
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0xf8dd
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbb24
callq 0x4114
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbb32
callq 0x4114
testq %r15, %r15
je 0xbc33
movq %r15, %rdi
callq 0x4cb8
testb %al, %al
je 0xbc33
movq (%r12), %rsi
leaq -0x68(%rbp), %rdi
callq 0x627a
movq -0x68(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x634a
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0xf8dd
movaps -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x40(%rbp)
movq -0x78(%rbp), %rdi
movaps %xmm0, -0x80(%rbp)
testq %rdi, %rdi
je 0xbb93
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbba1
callq 0x4114
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbbaf
callq 0x4114
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xbbbd
callq 0x4114
testb %r13b, %r13b
je 0xbc86
leaq -0x80(%rbp), %rsi
movq %r15, %rdi
callq 0x6218
jmp 0xbc92
xorl %ebx, %ebx
movq 0xe408(%rip), %r15      # 0x19fe8
leaq 0x7a46(%rip), %rsi      # 0x1362d
movl $0x22, %edx
movq %r15, %rdi
callq 0x3210
movq (%r15), %rax
addq -0x18(%rax), %r15
xorl %ebx, %ebx
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
xorl %ebx, %ebx
movsbl %al, %esi
movq 0xe3d2(%rip), %rdi      # 0x19fe8
callq 0x3030
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
xorl %ebx, %ebx
jmp 0xbd25
movq 0xe3ae(%rip), %r15      # 0x19fe8
leaq 0x7a0f(%rip), %rsi      # 0x13650
movl $0x19, %edx
movq %r15, %rdi
callq 0x3210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xe37c(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
callq 0x51b8
jmp 0xbd25
leaq -0x80(%rbp), %rsi
movq %r15, %rdi
callq 0x62ea
movq (%r12), %rsi
leaq -0x40(%rbp), %rdi
callq 0x634a
leaq -0x68(%rbp), %r15
leaq -0x50(%rbp), %r12
movq -0x40(%rbp), %rdi
callq 0x4ef8
testb %al, %al
jne 0xbd07
movq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x627a
movq -0x68(%rbp), %rsi
movq %r12, %rdi
callq 0x634a
movaps -0x50(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movups %xmm0, -0x40(%rbp)
testq %rdi, %rdi
je 0xbce9
callq 0x4114
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbcf7
callq 0x4114
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xbca7
callq 0x4114
jmp 0xbca7
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
movq -0x58(%rbp), %rdx
callq 0xf8dd
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbd25
callq 0x4114
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0xbd33
callq 0x4114
testq %rbx, %rbx
je 0xbd40
movq %rbx, %rdi
callq 0x4114
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbda3
jmp 0xbdb6
movq %rax, %r14
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbd6c
callq 0x4114
jmp 0xbd6c
movq %rax, %r14
movq -0x60(%rbp), %rdi
jmp 0xbdaa
jmp 0xbdb6
movq %rax, %r14
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xbd8a
callq 0x4114
jmp 0xbd8a
movq %rax, %r14
xorl %ebx, %ebx
jmp 0xbdb9
jmp 0xbda3
movq %rax, %r14
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xbda6
callq 0x4114
jmp 0xbda6
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xbdb9
callq 0x4114
jmp 0xbdb9
movq %rax, %r14
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0xbdc7
callq 0x4114
testq %rbx, %rbx
je 0xbdd4
movq %rbx, %rdi
callq 0x4114
movq %r14, %rdi
callq 0x3310