// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xf8, %rsp
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movl %ecx, 0xd4(%rsp)
leaq 0x44ab0(%rip), %rax     # 0x1f246d
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x16, %eax
jne 0x1ad9e0
leaq 0x44ac9(%rip), %rax     # 0x1f24a2
movq %rax, 0x38(%rsp)
jmp 0x1ad9fe
movq 0xe0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x18, %eax
jne 0x1ad9fc
leaq 0x44ab2(%rip), %rax     # 0x1f24a9
movq %rax, 0x38(%rsp)
jmp 0x1ad9fe
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movl %eax, 0xd0(%rsp)
cmpl $0x0, 0xd0(%rsp)
jne 0x1adb37
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x1ada4d
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x1ada59
movl $0x1, %eax
movq %rax, 0x30(%rsp)
jmp 0x1ada59
movq 0x30(%rsp), %rax
cmpq $0x1, %rax
jle 0x1adac9
leaq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rsi
callq 0xae30
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %rax, %rcx
leaq 0x41650(%rip), %rsi     # 0x1ef0fd
leaq 0x449bb(%rip), %r8      # 0x1f246f
xorl %eax, %eax
movl %eax, %r9d
movb $0x0, %al
callq 0x10540
movl %eax, 0xcc(%rsp)
jmp 0x1adaf4
leaq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x41623(%rip), %rsi     # 0x1ef0fd
leaq 0x449cb(%rip), %rcx     # 0x1f24ac
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0xcc(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movslq 0xcc(%rsp), %rdx
movq 0xd8(%rsp), %rcx
callq *%rax
movl $0xffffffff, 0xf4(%rsp) # imm = 0xFFFFFFFF
jmp 0x1add58
cmpl $0x2, 0xd4(%rsp)
jne 0x1adb54
movl 0xd0(%rsp), %eax
movl %eax, 0xf4(%rsp)
jmp 0x1add58
movq 0xe8(%rsp), %rax
cmpq $0x0, 0x280(%rax)
jne 0x1add19
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x1adb98
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x1adba4
movl $0x1, %eax
movq %rax, 0x18(%rsp)
jmp 0x1adba4
movq 0x18(%rsp), %rax
cmpq $0x1, %rax
jle 0x1adc4e
leaq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rsi
callq 0xae30
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x41501(%rip), %rsi     # 0x1ef0fd
leaq 0x44870(%rip), %r8      # 0x1f2473
xorl %eax, %eax
movl %eax, %r9d
movb $0x0, %al
callq 0x10540
movl %eax, 0xcc(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movslq 0xcc(%rsp), %rdx
movq 0xd8(%rsp), %rcx
callq *%rax
jmp 0x1add0c
movq 0xe0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x16, %eax
jne 0x1adc92
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rcx
leaq 0x43b1c(%rip), %rsi     # 0x1f17a5
movl $0x7, %edx
callq *%rax
jmp 0x1add0a
movq 0xe0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x17, %eax
jne 0x1adcd6
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rcx
leaq 0x43b10(%rip), %rsi     # 0x1f17dd
movl $0x7, %edx
callq *%rax
jmp 0x1add08
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rcx
leaq 0x43b13(%rip), %rsi     # 0x1f1814
movl $0x7, %edx
callq *%rax
jmp 0x1add0a
jmp 0x1add0c
movl $0xffffffff, 0xf4(%rsp) # imm = 0xFFFFFFFF
jmp 0x1add58
movslq 0xd0(%rsp), %rax
movq 0xe8(%rsp), %rcx
cmpq 0x280(%rcx), %rax
jle 0x1add4a
movq 0xe8(%rsp), %rax
movq 0x280(%rax), %rax
movl %eax, 0xf4(%rsp)
jmp 0x1add58
movl 0xd0(%rsp), %eax
movl %eax, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
addq $0xf8, %rsp
retq
nopw (%rax,%rax)