// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: g_divide
static s7_pointer g_divide(s7_scheme *sc, s7_pointer args)
    {
#define H_divide "(/ x1 ...) divides its first argument by the rest, or inverts the first if there is only one argument"
#define Q_divide sc->pcl_n

        s7_pointer x, y, p;

        x = car(args);
        p = cdr(args);

        if (is_null(p))            /* (/ x) */
        {
            if (!is_number(x))
                return(method_or_bust_with_type_one_arg(sc, x, sc->divide_symbol, args, a_number_string));
            if (s7_is_zero(x))     /* (/ 0) */
                return(division_by_zero_error(sc, sc->divide_symbol, args));
            return(s7_invert(sc, x));
        }
        if (is_null(cdr(p)))
            return(g_divide_xy(sc, x, cadr(args), args));

        y = g_multiply_1(sc, p, sc->divide_symbol); /* in some schemes (/ 1 0 +nan.0) is not equal to (/ 1 (* 0 +nan.0)), in s7 they're both +nan.0 */
#if WITH_GMP
        if (s7_is_bignum(y))
            return(big_divide(sc, set_plist_2(sc, x, y)));
#endif
        return(g_divide_xy(sc, x, y, args));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %rsi
movq 0x110(%rdi), %rax
cmpq %rax, %rsi
je 0x6afe4
cmpq %rax, 0x10(%rsi)
je 0x6b0ab
movq 0xe88(%rbx), %rdx
movq %rbx, %rdi
callq 0xfac9e
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
jmp 0x6b0b5
movzbl (%r15), %eax
leaq 0xdf981(%rip), %rcx     # 0x14a970
cmpb $0x0, (%rax,%rcx)
je 0x6b0c6
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x6b17a
leaq 0x9cae8(%rip), %rcx     # 0x107af4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r15), %r15
cmpq $-0x1, %r15
je 0x6b211
cmpq $0x1, %r15
je 0x6b205
testq %r15, %r15
je 0x6b105
movl 0xdf9ec(%rip), %eax     # 0x14aa28
shlq $0x3f, %rax
cmpq %r15, %rax
jne 0x6b250
movq %r15, 0x18(%rsp)
fildll 0x18(%rsp)
fld1
fdivp %st, %st(1)
fstpl 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6b08b
movq %rbx, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0xa550
movsd 0x8(%rsp), %xmm0
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xd, (%rax)
movsd %xmm0, 0x8(%rax)
jmp 0x6b2a3
movq 0x8(%rsi), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xfb6ec
movq 0xe88(%rbx), %rdx
movq 0xea2cc(%rip), %r8      # 0x1553a0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xfa261
movsd 0x8(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6b1ae
jp 0x6b1ae
movq 0xe88(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xd434
movsd 0x8(%r15), %xmm0
movsd 0x10(%r15), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
divsd %xmm3, %xmm0
xorpd 0x9ed64(%rip), %xmm1    # 0x109eb0
divsd %xmm3, %xmm1
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xd387
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rsi
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xfa58d
movq 0xe88(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xdb7cc(%rip), %rdx     # 0x146958
movq 0x140(%rbx), %r8
movq 0xea206(%rip), %r9      # 0x1553a0
movq %rbx, %rdi
movq %r15, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xa4e4
movsd 0x9ae7a(%rip), %xmm1    # 0x106030
divsd %xmm0, %xmm1
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6b1e5
movq %rbx, %rdi
movsd %xmm1, 0x8(%rsp)
callq 0xa550
movsd 0x8(%rsp), %xmm1
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xd, (%rax)
movsd %xmm1, 0x8(%rax)
jmp 0x6b2a3
movq 0xdb74c(%rip), %rax     # 0x146958
jmp 0x6b2a3
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6b230
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq $-0x1, 0x8(%rax)
jmp 0x6b2a3
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6b26f
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xc, (%rax)
testq %r15, %r15
js 0x6b294
movq $0x1, 0x8(%rax)
jmp 0x6b29f
movq $-0x1, 0x8(%rax)
negq %r15
movq %r15, 0x10(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq