// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %rbp
movq %rdi, %r15
callq 0x3c299
movq %rax, %r12
testq %rax, %rax
jg 0xa0669
movq (%rsp), %rax
movq 0x8(%rax), %rsi
movq 0xae308(%rip), %rdx     # 0x14e958
movq 0x140(%r15), %r8
movq 0xba5ba(%rip), %r9      # 0x15ac18
movq %r15, %rdi
movq %rbp, %rcx
callq 0xb31d
cmpq 0x2b8(%r15), %r12
jle 0xa06c5
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq 0xae2d7(%rip), %rcx     # 0x14e958
movq 0xb23b8(%rip), %rdx     # 0x152a40
movq 0x1ee8(%r15), %rsi
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rbp, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%r15), %rsi
movq 0x1ee8(%r15), %rdx
movq %r15, %rdi
callq 0x3b366
movl $0x1, %r12d
cmpb $0x1, (%rbp)
jne 0xa08a0
movq %rbp, %r14
movq 0x8(%r14), %rax
cmpb $0xb, (%rax)
je 0xa0773
movl $0x1, %eax
cmpq %rbp, %r14
je 0xa06fd
movq %rbp, %rcx
incl %eax
movq 0x10(%rcx), %rcx
cmpq %r14, %rcx
jne 0xa06f2
movq (%rsp), %rcx
movq 0x8(%rcx), %r13
movslq %eax, %rbx
cmpl $0x7ff, %ebx            # imm = 0x7FF
ja 0xa071d
leaq 0xae239(%rip), %rax     # 0x14e950
movq (%rax,%rbx,8), %rdx
jmp 0xa0756
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0xa0735
movq %r15, %rdi
callq 0xb389
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(%r14), %rcx
movq 0x140(%r15), %r8
movq 0xb2350(%rip), %r9      # 0x152ab8
movq %r15, %rdi
movq %r13, %rsi
callq 0xb31d
movq 0x8(%r14), %rax
cmpb $0xb, (%rax)
jne 0xa0782
movq 0x8(%rax), %rax
jmp 0xa0784
xorl %eax, %eax
imulq %rax, %r12
jno 0xa07fb
movl $0x1, %esi
cmpq %rbp, %r14
je 0xa07a3
movq %rbp, %rax
movq 0x10(%rax), %rax
incq %rsi
cmpq %r14, %rax
jne 0xa0797
movq (%rsp), %rax
movq 0x8(%rax), %rbx
movq %r15, %rdi
callq 0xdff8
movq 0x8(%r14), %rcx
movq 0xb2282(%rip), %rdx     # 0x152a40
movq 0x1ee8(%r15), %rsi
movq 0x10(%rsi), %rsi
movq %rbx, 0x8(%rsi)
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%r15), %rsi
movq 0x1ee8(%r15), %rdx
movq %r15, %rdi
callq 0x3b366
testq %r12, %r12
jns 0xa0892
movl $0x1, %eax
cmpq %rbp, %r14
je 0xa081c
movq %rbp, %rcx
incl %eax
movq 0x10(%rcx), %rcx
cmpq %r14, %rcx
jne 0xa0811
movq (%rsp), %rcx
movq 0x8(%rcx), %r13
movslq %eax, %rbx
cmpl $0x7ff, %ebx            # imm = 0x7FF
ja 0xa083c
leaq 0xae11a(%rip), %rax     # 0x14e950
movq (%rax,%rbx,8), %rdx
jmp 0xa0875
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0xa0854
movq %r15, %rdi
callq 0xb389
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(%r14), %rcx
movq 0x140(%r15), %r8
movq 0xba351(%rip), %r9      # 0x15abd8
movq %r15, %rdi
movq %r13, %rsi
callq 0xb31d
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
je 0xa06d8
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq