// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: multivector_length
static s7_int multivector_length(s7_scheme *sc, s7_pointer x, s7_pointer caller)
                {
                    s7_int len, dims;
                    s7_pointer y;

                    dims = s7_list_length(sc, x);
                    if (dims <= 0)                /* 0 if circular, negative if dotted */
                        wrong_type_argument_with_type(sc, caller, 1, x, a_proper_list_string);
                    if (dims > sc->max_vector_dimensions)
                        out_of_range(sc, caller, small_int(1), x, its_too_large_string);

                    for (len = 1, y = x; is_pair(y); y = cdr(y))
                    {
                        if (!s7_is_integer(car(y)))
                            wrong_type_argument(sc, caller, position_of(y, x), car(y), T_INTEGER);
#if HAVE_OVERFLOW_CHECKS
                        if (multiply_overflow(len, s7_integer(car(y)), &len)) /* or better perhaps len > sc->max_vector_length */
                            out_of_range(sc, caller, s7_make_integer(sc, position_of(y, x)), car(y), its_too_large_string);
#else
                        len *= s7_integer(car(y));
#endif
                        if (len < 0)
                            wrong_type_argument_with_type(sc, caller, position_of(y, x), car(y), a_non_negative_integer_string);
                    }
                    return(len);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
callq 0x2dada
movq %rax, %rbx
testq %rax, %rax
jg 0x7b214
movq 0x8(%r14), %rsi
movq 0x9a75f(%rip), %rdx     # 0x115958
movq 0x140(%r15), %r8
movq 0xa6a11(%rip), %r9      # 0x121c18
movq %r15, %rdi
movq 0x8(%rsp), %rcx
callq 0x9bbb
cmpq 0x2b8(%r15), %rbx
jle 0x7b23c
movq 0x8(%r14), %rsi
movq 0x9a730(%rip), %rdx     # 0x115958
movq 0x9e811(%rip), %r8      # 0x119a40
movq %r15, %rdi
movq 0x8(%rsp), %rcx
callq 0xcb8f
pushq $0x1
popq %r12
movq 0x8(%rsp), %r13
movq %r14, 0x10(%rsp)
cmpb $0x1, (%r13)
jne 0x7b3c3
movq 0x8(%r13), %rbx
cmpb $0xb, (%rbx)
je 0x7b2f3
movq 0x8(%r14), %rbp
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x72a82
movslq %eax, %r14
cmpl $0x7ff, %r14d           # imm = 0x7FF
ja 0x7b28c
leaq 0x9a6ca(%rip), %rax     # 0x115950
movq (%rax,%r14,8), %rdx
jmp 0x7b2c9
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x7b2ab
movq %r15, %rdi
callq 0x9c27
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %r14, 0x8(%rdx)
movq 0x8(%r13), %rbx
movq 0x140(%r15), %r8
movq 0x9e7e1(%rip), %r9      # 0x119ab8
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rcx
callq 0x9bbb
movq 0x8(%r13), %rbx
cmpb $0xb, (%rbx)
movq 0x10(%rsp), %r14
jne 0x7b2f9
movq 0x8(%rbx), %rax
jmp 0x7b2fb
xorl %eax, %eax
imulq %rax, %r12
jno 0x7b336
movq 0x8(%r14), %rbx
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x72a82
movslq %eax, %rsi
movq %r15, %rdi
callq 0xc049
movq 0x8(%r13), %rcx
movq 0x9e718(%rip), %r8      # 0x119a40
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xcb8f
testq %r12, %r12
jns 0x7b3ba
movq 0x8(%r14), %rbp
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x72a82
movslq %eax, %rbx
cmpl $0x7ff, %ebx            # imm = 0x7FF
ja 0x7b364
leaq 0x9a5f2(%rip), %rax     # 0x115950
movq (%rax,%rbx,8), %rdx
jmp 0x7b39d
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x7b383
movq %r15, %rdi
callq 0x9c27
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %rbx, 0x8(%rdx)
movq 0x8(%r13), %rcx
movq 0x140(%r15), %r8
movq 0xa6829(%rip), %r9      # 0x121bd8
movq %r15, %rdi
movq %rbp, %rsi
callq 0x9bbb
movq 0x10(%r13), %r13
jmp 0x7b24a
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq