// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: byte_vector_to_port
static void byte_vector_to_port(s7_scheme *sc, s7_pointer vect, s7_pointer port, use_write_t use_write, shared_info *ignored)
    {
        s7_int i, len, plen;
        bool too_long;
        char buf[128];
        char *p;

        len = print_vector_length(sc, vect, port, use_write);
        if (len < 0) return;
        too_long = (len < vector_length(vect));

        if ((use_write == P_READABLE) &&
                (is_immutable_vector(vect)))
            port_write_string(port)(sc, "(immutable! ", 12, port);

        if (len > 1000)
        {
            s7_int vlen;
            uint8_t first;
            uint8_t *els;
            vlen = vector_length(vect);
            els = byte_vector_bytes(vect);
            first = els[0];
            for (i = 1; i < vlen; i++)
                if (els[i] != first)
                    break;
            if (i == vlen)
            {
                make_vector_to_port(sc, vect, port);
                p = integer_to_string(sc, byte_vector(vect, 0), &plen);
                port_write_string(port)(sc, p, plen, port);
                port_write_character(port)(sc, ')', port);
                if ((use_write == P_READABLE) &&
                        (is_immutable_vector(vect)))
                    port_write_character(port)(sc, ')', port);
                return;
            }
        }

        if (vector_rank(vect) == 1)
        {
            port_write_string(port)(sc, "#u(", 3, port);
            p = integer_to_string(sc, byte_vector(vect, 0), &plen);
            port_write_string(port)(sc, p, plen, port);
            for (i = 1; i < len; i++)
            {
                plen = catstrs_direct(buf, " ", integer_to_string_no_length(sc, byte_vector(vect, i)), NULL);
                port_write_string(port)(sc, buf, plen, port);
            }
            if (too_long)
                port_write_string(port)(sc, " ...)", 5, port);
            else port_write_character(port)(sc, ')', port);
        }
        else
        {
            bool last = false;
            plen = catstrs_direct(buf, "#u", pos_int_to_str_direct(sc, vector_ndims(vect)), "d", NULL);
            port_write_string(port)(sc, buf, plen, port);
            multivector_to_port(sc, vect, port, len, 0, 0, vector_ndims(vect), &last, P_DISPLAY, NULL);
        }

        if ((use_write == P_READABLE) &&
                (is_immutable_vector(vect)))
            port_write_character(port)(sc, ')', port);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0xfc9d0
testl %eax, %eax
js 0xf6832
movl %eax, %r12d
movq 0x8(%r15), %r13
cmpl $0x2, %ebp
jne 0xf645c
testb $0x1, 0x3(%r15)
je 0xf645c
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x295e6(%rip), %rsi     # 0x11fa34
movl $0xc, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
cmpl $0x3e9, %r12d           # imm = 0x3E9
jl 0xf6519
movq 0x8(%r15), %rax
movl $0x1, %ecx
cmpq $0x2, %rax
jl 0xf6490
movq 0x10(%r15), %rdx
movb (%rdx), %sil
cmpb %sil, (%rdx,%rcx)
jne 0xf6490
incq %rcx
cmpq %rcx, %rax
jne 0xf647f
movq %rax, %rcx
cmpq %rax, %rcx
jne 0xf6519
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xfcc05
movq 0x10(%r15), %rax
movb (%rax), %al
testb %al, %al
setne %cl
orb 0x5c570(%rip), %cl      # 0x152a28
testb $0x1, %cl
je 0xf67da
movzbl %al, %edi
leaq 0xb0f(%r14), %rsi
movb $0x0, 0xb0f(%r14)
xorl %ecx, %ecx
leaq 0x28f54(%rip), %r8      # 0x11f430
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %r9
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rdi, %r10
subq %rax, %r10
movb (%r8,%r10), %al
movb %al, -0x1(%rsi)
decq %rsi
incq %rcx
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0xf64e6
jmp 0xf67e6
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xf6534
movq 0x10(%rax), %rsi
cmpq $0x1, %rsi
jne 0xf670c
movq %r13, 0x28(%rsp)
movl %ebp, 0xc(%rsp)
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x2cf22(%rip), %rsi     # 0x12346e
movl $0x3, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
movq 0x10(%r15), %rax
movb (%rax), %al
testb %al, %al
setne %cl
orb 0x5c4bd(%rip), %cl      # 0x152a28
movabsq $-0x3333333333333333, %rbp # imm = 0xCCCCCCCCCCCCCCCD
testb $0x1, %cl
movq %r15, 0x18(%rsp)
je 0xf65ca
movzbl %al, %edi
leaq 0xb0f(%r14), %rsi
movb $0x0, 0xb0f(%r14)
xorl %ecx, %ecx
leaq 0x28e96(%rip), %r8      # 0x11f430
movq %rdi, %rax
mulq %rbp
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rdi, %r9
subq %rax, %r9
movb (%r8,%r9), %al
movb %al, -0x1(%rsi)
decq %rsi
incq %rcx
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0xf659a
jmp 0xf65d6
leaq 0x28f97(%rip), %rsi     # 0x11f568
movl $0x14, %ecx
movslq %r12d, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movq %rcx, %rdx
movq %rbx, %r14
movq %rbx, %rcx
callq *0x10(%rax)
cmpl $0x2, %r12d
jl 0xf66b8
movq 0x10(%rsp), %rax
leaq 0xb2f(%rax), %r15
movl $0x1, %r12d
leaq 0x28e13(%rip), %rbx     # 0x11f430
leaq 0x30(%rsp), %r13
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movb (%rax,%r12), %al
testb %al, %al
setne %dl
orb 0x5c3ee(%rip), %dl      # 0x152a28
leaq 0x28f27(%rip), %rcx     # 0x11f568
testb $0x1, %dl
je 0xf667a
movzbl %al, %esi
movb $0x0, (%r15)
movq %r15, %rcx
movq %rsi, %rax
mulq %rbp
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %rdi
subq %rax, %rdi
movb (%rbx,%rdi), %al
movb %al, -0x1(%rcx)
decq %rcx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0xf6650
movq %r13, %rdi
leaq 0x2ce22(%rip), %rsi     # 0x1234a6
movq %rcx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xd1cb
movq %r14, %rcx
movq 0x8(%r14), %rdx
movq 0x48(%rdx), %r8
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq *0x10(%r8)
incq %r12
cmpq 0x20(%rsp), %r12
jne 0xf6622
movq %r14, %rbx
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, 0x28(%rsp)
jle 0xf66eb
leaq 0x2af0a(%rip), %rsi     # 0x1215e0
movl $0x5, %edx
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
jmp 0xf66fe
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x29, %esi
movq %rbx, %rdx
callq *0x8(%rax)
movq 0x18(%rsp), %r15
movl 0xc(%rsp), %ebp
jmp 0xf6810
xorl %eax, %eax
movb %al, 0xb(%rsp)
leaq 0xb6f(%r14), %r8
movb %al, 0xb6f(%r14)
leaq 0x28d09(%rip), %rcx     # 0x11f430
movabsq $0x6666666666666667, %rdi # imm = 0x6666666666666667
movq %rsi, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r9
subq %rax, %r9
movb (%rcx,%r9), %al
movb %al, -0x1(%r8)
decq %r8
addq $0x9, %rsi
cmpq $0x12, %rsi
movq %rdx, %rsi
ja 0xf6731
leaq 0x2cd00(%rip), %rsi     # 0x123472
leaq 0x29ea8(%rip), %rcx     # 0x120621
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r8, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xd1cb
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq *0x10(%r8)
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
movl 0x10(%rax), %eax
leaq 0xb(%rsp), %r10
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
pushq %r10
pushq %rax
callq 0xfcf2f
addq $0x20, %rsp
jmp 0xf6810
leaq 0x28d87(%rip), %rsi     # 0x11f568
movl $0x14, %ecx
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %rcx, %rdx
movq %rbx, %rcx
callq *0x10(%rax)
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movl $0x29, %esi
movq %rbx, %rdx
callq *0x8(%rax)
cmpl $0x2, %ebp
jne 0xf6832
testb $0x1, 0x3(%r15)
je 0xf6832
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movl $0x29, %esi
movq %rbx, %rdx
callq *0x8(%rax)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq