// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: print_vector_length
static int32_t print_vector_length(s7_scheme *sc, s7_pointer vect, s7_pointer port, use_write_t use_write)
    {
        int32_t len, plen;
        char buf[128];
        const char *vtype = "r";

        if (is_int_vector(vect))
            vtype = "i";
        else
        {
            if (is_byte_vector(vect))
                vtype = "u";
        }
        len = vector_length(vect);
        if (len == 0)
        {
            if (vector_rank(vect) > 1)
                plen = catstrs_direct(buf, "#", vtype, pos_int_to_str_direct(sc, vector_ndims(vect)), "d()", NULL);
            else plen = catstrs_direct(buf, "#", vtype, "()", NULL);
            port_write_string(port)(sc, buf, plen, port);
            return(-1);
        }

        if (use_write == P_READABLE)
            return(len);

        if (sc->print_length == 0)
        {
            if (vector_rank(vect) > 1)
            {
                plen = catstrs_direct(buf, "#", vtype, pos_int_to_str_direct(sc, vector_ndims(vect)), "d(...)", NULL);
                port_write_string(port)(sc, buf, plen, port);
            }
            else
            {
                if (is_int_vector(vect))
                    port_write_string(port)(sc, "#i(...)", 7, port);
                else
                {
                    if (is_float_vector(vect))
                        port_write_string(port)(sc, "#r(...)", 7, port);
                    else port_write_string(port)(sc, "#u(...)", 7, port);
                }
            }
            return(-1);
        }

        if (len > sc->print_length)
            return(sc->print_length);
        return(len);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movzbl (%rsi), %edx
cmpl $0x18, %edx
leaq 0x24616(%rip), %rax     # 0xe6523
leaq 0x245d3(%rip), %rdi     # 0xe64e7
cmoveq %rax, %rdi
cmpl $0x16, %edx
leaq 0x245fa(%rip), %r15     # 0xe651c
cmovneq %rdi, %r15
movq 0x8(%rsi), %rax
testl %eax, %eax
je 0xc1f54
cmpl $0x2, %ecx
je 0xc1fcf
movq 0x280(%r14), %rcx
testq %rcx, %rcx
je 0xc1fde
movslq %eax, %rdx
cmpq %rcx, %rdx
cmovlel %eax, %ecx
movl %ecx, %eax
jmp 0xc1fcf
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xc1f96
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xc1f96
movq %r14, %rdi
callq 0x91f9
leaq 0x21663(%rip), %rsi     # 0xe35dd
leaq 0x24568(%rip), %r8      # 0xe64e9
movq %rsp, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xb3a5
jmp 0xc1fb4
leaq 0x21640(%rip), %rsi     # 0xe35dd
leaq 0x24582(%rip), %rcx     # 0xe6526
movq %rsp, %rdi
movq %r15, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb3a5
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%r8)
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xc2034
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xc2034
movq %r14, %rdi
callq 0x91f9
leaq 0x215d9(%rip), %rsi     # 0xe35dd
leaq 0x244e2(%rip), %r8      # 0xe64ed
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xb3a5
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %r14, %rdi
movq %r12, %rsi
jmp 0xc1fc5
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x17, %edx
je 0xc2053
cmpl $0x16, %edx
jne 0xc205c
leaq 0x237dc(%rip), %rsi     # 0xe582d
jmp 0xc2063
leaq 0x2380b(%rip), %rsi     # 0xe5865
jmp 0xc2063
leaq 0x23839(%rip), %rsi     # 0xe589c
pushq $0x7
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq *%rax
jmp 0xc1fcc