// File: /workspace/github_c_makefile_star2_O3/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 0xf3c27
testl %eax, %eax
js 0xeda0c
movl %eax, %r12d
movq 0x8(%r15), %r13
cmpl $0x2, %ebp
jne 0xed62b
testb $0x1, 0x3(%r15)
je 0xed62b
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x29527(%rip), %rsi     # 0x116b44
movl $0xc, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
cmpl $0x3e9, %r12d           # imm = 0x3E9
jb 0xed6e7
movq 0x8(%r15), %rax
movl $0x1, %ecx
cmpq $0x2, %rax
jl 0xed65e
movq 0x10(%r15), %rdx
movb (%rdx), %sil
cmpb %sil, (%rdx,%rcx)
jne 0xed65e
incq %rcx
cmpq %rcx, %rax
jne 0xed64e
jmp 0xed667
cmpq %rax, %rcx
jne 0xed6e7
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xf3e5c
movq 0x10(%r15), %rax
movb (%rax), %al
testb %al, %al
setne %cl
orb 0x5d3a2(%rip), %cl      # 0x14aa28
testb $0x1, %cl
je 0xed9ca
movzbl %al, %edi
leaq 0xb0f(%r14), %rsi
movb $0x0, 0xb0f(%r14)
xorl %ecx, %ecx
leaq 0x28e96(%rip), %r8      # 0x116540
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 0xed6b4
jmp 0xed9d6
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xed702
movq 0x10(%rax), %rsi
cmpq $0x1, %rsi
jne 0xed8da
movq %r13, 0x28(%rsp)
movl %ebp, 0xc(%rsp)
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x2ce64(%rip), %rsi     # 0x11a57e
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 0x5d2ef(%rip), %cl      # 0x14aa28
movabsq $-0x3333333333333333, %rbp # imm = 0xCCCCCCCCCCCCCCCD
testb $0x1, %cl
movq %r15, 0x18(%rsp)
je 0xed798
movzbl %al, %edi
leaq 0xb0f(%r14), %rsi
movb $0x0, 0xb0f(%r14)
xorl %ecx, %ecx
leaq 0x28dd8(%rip), %r8      # 0x116540
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 0xed768
jmp 0xed7a4
leaq 0x28ed9(%rip), %rsi     # 0x116678
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 0xed886
movq 0x10(%rsp), %rax
leaq 0xb2f(%rax), %r15
movl $0x1, %r12d
leaq 0x28d55(%rip), %rbx     # 0x116540
leaq 0x30(%rsp), %r13
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movb (%rax,%r12), %al
testb %al, %al
setne %dl
orb 0x5d220(%rip), %dl      # 0x14aa28
leaq 0x28e69(%rip), %rcx     # 0x116678
testb $0x1, %dl
je 0xed848
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 0xed81e
movq %r13, %rdi
leaq 0x2cd64(%rip), %rsi     # 0x11a5b6
movq %rcx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xc442
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 0xed7f0
movq %r14, %rbx
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, 0x28(%rsp)
jle 0xed8b9
leaq 0x2ae4c(%rip), %rsi     # 0x1186f0
movl $0x5, %edx
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
jmp 0xed8cc
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 0xed9a6
xorl %eax, %eax
movb %al, 0xb(%rsp)
leaq 0xb6f(%r14), %r8
movb %al, 0xb6f(%r14)
leaq 0x28c4b(%rip), %rcx     # 0x116540
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 0xed8ff
leaq 0x2cc42(%rip), %rsi     # 0x11a582
leaq 0x29dea(%rip), %rcx     # 0x117731
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r8, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xc442
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 0xf4186
addq $0x20, %rsp
cmpl $0x2, %ebp
jne 0xeda0c
testb $0x1, 0x3(%r15)
je 0xeda0c
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movl $0x29, %esi
movq %rbx, %rdx
callq *0x8(%rax)
jmp 0xeda0c
leaq 0x28ca7(%rip), %rsi     # 0x116678
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 0xeda0c
testb $0x1, 0x3(%r15)
jne 0xeda1e
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %r14, %rdi
movl $0x29, %esi
movq %rbx, %rdx
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax