// File: /workspace/github_cpp_makefile_star2_O3/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 0x628e
movq (%r15), %rdi
callq 0x4df2
movl %eax, %r15d
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc13b
callq 0x4104
testb %r15b, %r15b
je 0xc251
movq (%r14), %rsi
leaq -0x28(%rbp), %r15
movq %r15, %rdi
callq 0x628e
movq (%r15), %rax
movq (%rax), %rdi
callq 0xac3b
testq %rax, %rax
je 0xc31b
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc17e
callq 0x4104
movq (%r14), %rsi
leaq -0x28(%rbp), %rdi
callq 0x61be
leaq -0x40(%rbp), %r14
movq -0x28(%rbp), %rdi
callq 0x4c74
testb %al, %al
jne 0xc29d
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x628e
movq -0x40(%rbp), %rdi
callq 0x4df2
movl %eax, %r15d
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc1c5
callq 0x4104
testb %r15b, %r15b
je 0xc2ac
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x628e
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0xac3b
testq %rax, %rax
je 0xc316
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc206
callq 0x4104
movq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x61be
movaps -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movups %xmm0, -0x28(%rbp)
testq %rdi, %rdi
je 0xc23d
callq 0x4104
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc23d
callq 0x4104
movsd -0x48(%rbp), %xmm0
divsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xc18e
movq 0xdd90(%rip), %r14      # 0x19fe8
leaq 0x7429(%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 0xc308
movq %rbx, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x51d8
jmp 0xc2fa
movq 0xdd35(%rip), %r14      # 0x19fe8
leaq 0x73ce(%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 0xdd03(%rip), %rdi      # 0x19fe8
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc308
callq 0x4104
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x4668
callq 0x4668
jmp 0xc34b
jmp 0xc32c
jmp 0xc34b
jmp 0xc34b
jmp 0xc338
jmp 0xc34b
movq %rax, %rdi
callq 0x4075
jmp 0xc34b
jmp 0xc34b
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xc34e
callq 0x4104
jmp 0xc34e
movq %rax, %rbx
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xc35c
callq 0x4104
movq %rbx, %rdi
callq 0x3310