// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0xe8(%rbp)
movb %sil, %al
movq %rdi, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6ef0
leaq -0x40(%rbp), %rdi
callq 0x6ef0
movq -0x18(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x75d0
movq %rax, -0xd8(%rbp)
jmp 0x1371c
movq -0xd8(%rbp), %rax
cmpq $0x2, %rax
je 0x13787
movq 0x1a8c0(%rip), %rdi     # 0x2dff0
leaq 0xded8(%rip), %rsi      # 0x2160f
callq 0x32c0
movq %rax, -0xf0(%rbp)
jmp 0x13745
movq -0xf0(%rbp), %rdi
movq 0x1a83d(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x1375a
movq -0xe8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4570
movl $0x1, -0x50(%rbp)
jmp 0x13a6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x13a8c
movq -0x18(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xb520
jmp 0x1379e
movq -0x20(%rbp), %rdx
leaq -0x60(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x19aa0
jmp 0x137b1
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4420
leaq -0x60(%rbp), %rdi
callq 0x4450
leaq -0x70(%rbp), %rdi
callq 0x4450
leaq -0x30(%rbp), %rdi
callq 0xb5c0
testb $0x1, %al
jne 0x137df
jmp 0x13804
leaq -0x30(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x72b0
movb %al, -0xf1(%rbp)
jmp 0x137f8
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x13869
jmp 0x13804
movq 0x1a7e5(%rip), %rdi     # 0x2dff0
leaq 0xde20(%rip), %rsi      # 0x21632
callq 0x32c0
movq %rax, -0x100(%rbp)
jmp 0x13820
movq -0x100(%rbp), %rdi
movq 0x1a762(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x13835
movq -0xe8(%rbp), %rdi
callq 0x78f0
jmp 0x13843
movl $0x1, -0x50(%rbp)
jmp 0x13a6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4450
jmp 0x13a8c
movq -0x18(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xb440
jmp 0x13883
leaq -0xa0(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0xb520
jmp 0x138a0
movq -0x20(%rbp), %rdx
leaq -0x80(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x19aa0
jmp 0x138b6
leaq -0x40(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4420
leaq -0x80(%rbp), %rdi
callq 0x4450
leaq -0x90(%rbp), %rdi
callq 0x4450
leaq -0xa0(%rbp), %rdi
callq 0x4450
testb $0x1, -0x9(%rbp)
je 0x1393a
leaq -0x30(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0xb3d0
jmp 0x13901
jmp 0x13953
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x13929
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x4450
leaq -0xa0(%rbp), %rdi
callq 0x4450
jmp 0x13a8c
leaq -0x30(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0xb4b0
jmp 0x13951
jmp 0x13953
movq -0x18(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0xb520
jmp 0x1396d
jmp 0x1396f
leaq -0xb0(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7500
movb %al, -0x101(%rbp)
jmp 0x1398b
movb -0x101(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1399c
jmp 0x13a2e
leaq -0xb0(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0xb440
jmp 0x139b9
leaq -0xd0(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
callq 0xb520
jmp 0x139d6
leaq -0xb0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4420
leaq -0xc0(%rbp), %rdi
callq 0x4450
leaq -0xd0(%rbp), %rdi
callq 0x4450
jmp 0x1396f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x13a5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4450
jmp 0x13a5c
movq -0xe8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0xb0(%rbp), %rsi
callq 0x19aa0
jmp 0x13a47
movl $0x1, -0x50(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4450
jmp 0x13a6a
leaq -0xb0(%rbp), %rdi
callq 0x4450
jmp 0x13a8c
leaq -0x40(%rbp), %rdi
callq 0x4450
leaq -0x30(%rbp), %rdi
callq 0x4450
movq -0xe0(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x4450
leaq -0x30(%rbp), %rdi
callq 0x4450
movq -0x48(%rbp), %rdi
callq 0x34f0
nopw (%rax,%rax)