// File: /workspace/github_c_makefile_star2_O3/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 0x2693d(%rip), %rax     # 0x11a583
leaq 0x268fa(%rip), %rdi     # 0x11a547
cmoveq %rax, %rdi
cmpl $0x16, %edx
leaq 0x26921(%rip), %r9      # 0x11a57c
cmovneq %rdi, %r9
movq 0x8(%rsi), %rax
testl %eax, %eax
je 0xf3c90
cmpl $0x2, %ecx
je 0xf3d5f
movq 0x280(%r14), %rcx
testq %rcx, %rcx
je 0xf3d6c
movslq %eax, %rdx
cmpq %rcx, %rdx
cmovlel %eax, %ecx
movl %ecx, %eax
jmp 0xf3d5f
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xf3d24
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xf3d24
leaq 0xb6f(%r14), %rcx
movb $0x0, 0xb6f(%r14)
leaq 0x2287f(%rip), %rdi     # 0x116540
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 0xf3ccb
leaq 0x23932(%rip), %rsi     # 0x11763d
leaq 0x26837(%rip), %r8      # 0x11a549
movq %rsp, %rdi
movq %r9, %rdx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xc442
jmp 0xf3d42
leaq 0x23912(%rip), %rsi     # 0x11763d
leaq 0x26854(%rip), %rcx     # 0x11a586
movq %rsp, %rdi
movq %r9, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xc442
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 0xf3e1b
movq 0x10(%rax), %rsi
cmpq $0x2, %rsi
jl 0xf3e1b
leaq 0xb6f(%r14), %rcx
movb $0x0, 0xb6f(%r14)
leaq 0x2279f(%rip), %rdi     # 0x116540
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 0xf3dab
leaq 0x23852(%rip), %rsi     # 0x11763d
leaq 0x2675b(%rip), %r8      # 0x11a54d
movq %rsp, %r15
movq %r15, %rdi
movq %r9, %rdx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0xc442
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
jmp 0xf3d53
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x17, %edx
je 0xf3e3a
cmpl $0x16, %edx
jne 0xf3e43
leaq 0x25a55(%rip), %rsi     # 0x11988d
jmp 0xf3e4a
leaq 0x25a84(%rip), %rsi     # 0x1198c5
jmp 0xf3e4a
leaq 0x25ab2(%rip), %rsi     # 0x1198fc
movl $0x7, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *%rax
jmp 0xf3d5a