// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: g_mul_xi
static s7_pointer g_mul_xi(s7_scheme *sc, s7_pointer x, s7_int n)
    {
        switch (type(x))
        {
#if HAVE_OVERFLOW_CHECKS
            case T_INTEGER:
                {
                    s7_int val;
                    if (multiply_overflow(integer(x), n, &val))
                        return(make_real(sc, (double)integer(x) * (double)n));
                    return(make_integer(sc, val));
                }
            case T_RATIO:
                {
                    s7_int val;
                    if (multiply_overflow(numerator(x), n, &val))
                        return(make_real(sc, fraction(x) * (double)n));
                    return(s7_make_ratio(sc, val, denominator(x)));
                }
#else
            case T_INTEGER: return(make_integer(sc, integer(x) * n));
            case T_RATIO:   return(s7_make_ratio(sc, numerator(x) * n, denominator(x)));
#endif
            case T_REAL:    return(make_real(sc, real(x) * n));
            case T_COMPLEX: return(s7_make_complex(sc, real_part(x) * n, imag_part(x) * n));
            default:
                            /* we can get here from mul_2_xi for example so the non-integer argument might not be a symbol */
                            return(method_or_bust_with_type(sc, x, sc->multiply_symbol, list_2(sc, x, make_integer(sc, n)), a_number_string, 1));
        }
        return(x);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rsi), %eax
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x6fb30
leaq 0x64420(%rip), %rcx     # 0xd3e10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rax
movq %rax, %r14
imulq %r12, %r14
jno 0x6fb4d
cvtsi2sd %rax, %xmm0
cvtsi2sd %r12, %xmm1
mulsd %xmm0, %xmm1
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6fa43
movq %rbx, %rdi
movsd %xmm1, 0x8(%rsp)
callq 0x9c27
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 0x6fb22
cvtsi2sd %r12, %xmm0
mulsd 0x8(%r14), %xmm0
jmp 0x6fadc
cvtsi2sd %r12, %xmm1
movsd 0x8(%r14), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x10(%r14), %xmm1
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc152
movq 0x8(%r14), %rax
movq 0x10(%r14), %rdx
movq %rax, %rsi
imulq %r12, %rsi
jno 0x6fb67
movq %rax, 0x20(%rsp)
fildll 0x20(%rsp)
movq %rdx, 0x28(%rsp)
fildll 0x28(%rsp)
fdivrp %st, %st(1)
cvtsi2sd %r12, %xmm0
movsd %xmm0, 0x18(%rsp)
fmull 0x18(%rsp)
fstpl 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6fb07
movq %rbx, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x9c27
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)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x1358(%rbx), %r15
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0x6fb7c
leaq 0xa5e09(%rip), %rax     # 0x115950
movq (%rax,%r12,8), %r13
jmp 0x6fbb6
cmpq $0x7ff, %r14            # imm = 0x7FF
ja 0x6fc42
leaq 0xa5def(%rip), %rax     # 0x115950
movq (%rax,%r14,8), %rax
jmp 0x6fb22
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xbd87
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6fb9b
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r13
movq $0xb, (%r13)
movq %r12, 0x8(%r13)
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
cmpq 0x98(%rbx), %rax
ja 0x6fbdc
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movl $0x200001, %edx         # imm = 0x200001
movq %rdx, (%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x10(%rax)
movq 0x90(%rbx), %rcx
leaq -0x8(%rcx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rcx), %rcx
movq %rdx, (%rcx)
movq %r14, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq 0xb477d(%rip), %r8      # 0x1243a0
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xcf9a
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x6fc61
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r14, 0x8(%rax)
jmp 0x6fb22