// File: /workspace/github_cpp_makefile_star2_O1/0x0584[P]scmin-plus/src/builtin/arithmetic.cpp
// Function: builtin::_div(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::_div(const sexpr_t& args, env_t& bindings) {
    (void)bindings;

    if (not args->car()->isnum()) {
        cerr << "fatal: operands are not numbers!" << endl;
        return nullptr;
    }
    double d = any_cast<sexpr_number>(*args->car()->blob).n;
    sexpr_t walk = args->cdr();
    while (not walk->isnil()) {
        if (not walk->car()->isnum()) {
            cerr << "fatal: operands are not numbers!" << endl;
            return nullptr;
        }
        d /= any_cast<sexpr_number>(*walk->car()->blob).n;
        walk = walk->cdr();
    }
    return num(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
leaq -0x28(%rbp), %r15
movq %r15, %rdi
callq 0x634a
movq (%r15), %rdi
callq 0x4dfa
movl %eax, %r15d
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc44f
callq 0x4114
testb %r15b, %r15b
je 0xc565
movq (%r14), %rsi
leaq -0x28(%rbp), %r15
movq %r15, %rdi
callq 0x634a
movq (%r15), %rax
movq (%rax), %rdi
callq 0xaf0f
testq %rax, %rax
je 0xc62f
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc492
callq 0x4114
movq (%r14), %rsi
leaq -0x28(%rbp), %rdi
callq 0x627a
leaq -0x40(%rbp), %r14
movq -0x28(%rbp), %rdi
callq 0x4c7c
testb %al, %al
jne 0xc5b1
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x634a
movq -0x40(%rbp), %rdi
callq 0x4dfa
movl %eax, %r15d
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc4d9
callq 0x4114
testb %r15b, %r15b
je 0xc5c0
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x634a
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0xaf0f
testq %rax, %rax
je 0xc62a
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc51a
callq 0x4114
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x627a
movaps -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movups %xmm0, -0x28(%rbp)
testq %rdi, %rdi
je 0xc543
callq 0x4114
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc551
callq 0x4114
movsd -0x48(%rbp), %xmm0
divsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xc4a2
movq 0xda7c(%rip), %r14      # 0x19fe8
leaq 0x7115(%rip), %rsi      # 0x13688
movl $0x20, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
jmp 0xc61c
movq %rbx, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x5244
jmp 0xc60e
movq 0xda21(%rip), %r14      # 0x19fe8
leaq 0x70ba(%rip), %rsi      # 0x13688
movl $0x20, %edx
movq %r14, %rdi
callq 0x3210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xd9ef(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc61c
callq 0x4114
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x4667
callq 0x4667
jmp 0xc65f
jmp 0xc640
jmp 0xc65f
jmp 0xc65f
jmp 0xc64c
jmp 0xc65f
movq %rax, %rdi
callq 0x4085
jmp 0xc65f
jmp 0xc65f
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc662
callq 0x4114
jmp 0xc662
movq %rax, %rbx
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc670
callq 0x4114
movq %rbx, %rdi
callq 0x3310