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

    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
subq $0xb0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x43d0
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7270
movb %al, -0x91(%rbp)
jmp 0x13b46
movb -0x91(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x13b57
jmp 0x13cdb
leaq -0x28(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
callq 0xb520
jmp 0x13b6e
leaq -0x50(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x7430
movb %al, -0x92(%rbp)
jmp 0x13b87
movb -0x92(%rbp), %al
xorb $-0x1, %al
movb %al, -0x93(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4450
movb -0x93(%rbp), %al
testb $0x1, %al
jne 0x13baa
jmp 0x13c22
movq 0x1a43f(%rip), %rdi     # 0x2dff0
leaq 0xdaa0(%rip), %rsi      # 0x21658
callq 0x32c0
movq %rax, -0xa0(%rbp)
jmp 0x13bc6
movq -0xa0(%rbp), %rdi
movq 0x1a3bc(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x13bdb
movq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4570
movl $0x1, -0x54(%rbp)
jmp 0x13cf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x13d0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4450
jmp 0x13d0e
leaq -0x28(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xb520
jmp 0x13c39
leaq -0x70(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x4520
movq %rax, -0xa8(%rbp)
jmp 0x13c53
movq -0xa8(%rbp), %rdi
callq 0x10fa0
movsd %xmm0, -0xb0(%rbp)
jmp 0x13c69
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4450
leaq -0x28(%rbp), %rdi
callq 0x4400
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
callq 0xb440
jmp 0x13ca9
leaq -0x28(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4420
leaq -0x80(%rbp), %rdi
callq 0x4450
jmp 0x13b2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4450
jmp 0x13d0e
movq -0x90(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x7990
jmp 0x13cee
movl $0x1, -0x54(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4450
movq -0x88(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x4450
movq -0x38(%rbp), %rdi
callq 0x34f0