// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x80, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movzbl (%rsi), %edx
cmpl $0x18, %edx
leaq 0x26a84(%rip), %rax     # 0x123473
leaq 0x26a41(%rip), %rdi     # 0x123437
cmoveq %rax, %rdi
cmpl $0x16, %edx
leaq 0x26a68(%rip), %r9      # 0x12346c
cmovneq %rdi, %r9
movq 0x8(%rsi), %rax
testl %eax, %eax
je 0xfca39
cmpl $0x2, %ecx
je 0xfcb08
movq 0x280(%r14), %rcx
testq %rcx, %rcx
je 0xfcb15
movslq %eax, %rdx
cmpq %rcx, %rdx
cmovlel %eax, %ecx
movl %ecx, %eax
jmp 0xfcb08
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xfcacd
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xfcacd
leaq 0xb6f(%r14), %rcx
movb $0x0, 0xb6f(%r14)
leaq 0x229c6(%rip), %rdi     # 0x11f430
movabsq $0x6666666666666667, %r8 # imm = 0x6666666666666667
movq %rsi, %rax
imulq %r8
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r10
subq %rax, %r10
movb (%rdi,%r10), %al
movb %al, -0x1(%rcx)
decq %rcx
addq $0x9, %rsi
cmpq $0x12, %rsi
movq %rdx, %rsi
ja 0xfca74
leaq 0x23a79(%rip), %rsi     # 0x12052d
leaq 0x2697e(%rip), %r8      # 0x123439
movq %rsp, %rdi
movq %r9, %rdx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xd1cb
jmp 0xfcaeb
leaq 0x23a59(%rip), %rsi     # 0x12052d
leaq 0x2699b(%rip), %rcx     # 0x123476
movq %rsp, %rdi
movq %r9, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xd1cb
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%r8)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xfcbc4
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xfcbc4
leaq 0xb6f(%r14), %rcx
movb $0x0, 0xb6f(%r14)
leaq 0x228e6(%rip), %rdi     # 0x11f430
movabsq $0x6666666666666667, %r8 # imm = 0x6666666666666667
movq %rsi, %rax
imulq %r8
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r10
subq %rax, %r10
movb (%rdi,%r10), %al
movb %al, -0x1(%rcx)
decq %rcx
addq $0x9, %rsi
cmpq $0x12, %rsi
movq %rdx, %rsi
ja 0xfcb54
leaq 0x23999(%rip), %rsi     # 0x12052d
leaq 0x268a2(%rip), %r8      # 0x12343d
movq %rsp, %r15
movq %r15, %rdi
movq %r9, %rdx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xd1cb
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
jmp 0xfcafc
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x17, %edx
je 0xfcbe3
cmpl $0x16, %edx
jne 0xfcbec
leaq 0x25b9c(%rip), %rsi     # 0x12277d
jmp 0xfcbf3
leaq 0x25bcb(%rip), %rsi     # 0x1227b5
jmp 0xfcbf3
leaq 0x25bf9(%rip), %rsi     # 0x1227ec
movl $0x7, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *%rax
jmp 0xfcb03