// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: int_vector_to_port
static void int_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;
            s7_int first;
            s7_int *els;
            vlen = vector_length(vect);
            els = int_vector_ints(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, int_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, "#i(", 3, port);
            if (!is_string_port(port))
            {
                p = integer_to_string(sc, int_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, int_vector(vect, i)), NULL);
                    port_write_string(port)(sc, buf, plen, port);
                }
            }
            else
            {
                /* an experiment */
                s7_int new_len, next_len;
                uint8_t *dbuf;
                new_len = port_position(port);
                next_len = port_data_size(port) - 128;
                dbuf = port_data(port);

                if (new_len >= next_len)
                {
                    resize_port_data(sc, port, port_data_size(port) * 2);
                    next_len = port_data_size(port) - 128;
                    dbuf = port_data(port);
                }
                p = integer_to_string(sc, int_vector(vect, 0), &plen);
                memcpy((void *)(dbuf + new_len), (void *)p, plen);
                new_len += plen;
                for (i = 1; i < len; i++)
                {
                    if (new_len >= next_len)
                    {
                        resize_port_data(sc, port, port_data_size(port) * 2);
                        next_len = port_data_size(port) - 128;
                        dbuf = port_data(port);
                    }
                    plen = catstrs_direct(buf, " ", integer_to_string_no_length(sc, int_vector(vect, i)), NULL);
                    memcpy((void *)(dbuf + new_len), (void *)buf, plen);
                    new_len += plen;
                }
                port_position(port) = new_len;
            }

            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, "#i", 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 $0xd8, %rsp
movl %ecx, %r14d
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r15
callq 0xf3c27
testl %eax, %eax
js 0xed5c0
movl %eax, %r12d
movq 0x8(%r13), %rbx
cmpl $0x2, %r14d
jne 0xece83
testb $0x1, 0x3(%r13)
je 0xece83
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
leaq 0x29ccf(%rip), %rsi     # 0x116b44
movl $0xc, %edx
movq %r15, %rdi
movq %rbp, %rcx
callq *0x10(%rax)
cmpl $0x3e9, %r12d           # imm = 0x3E9
jb 0xecef0
movq 0x8(%r13), %rax
movl $0x1, %ecx
cmpq $0x2, %rax
jl 0xeceb2
movq 0x10(%r13), %rdx
movq (%rdx), %rsi
cmpq %rsi, (%rdx,%rcx,8)
jne 0xeceb2
incq %rcx
cmpq %rcx, %rax
jne 0xecea2
jmp 0xeceb7
cmpq %rax, %rcx
jne 0xecef0
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xf3e5c
movq 0x10(%r13), %rax
movq (%rax), %r8
movl 0x5db56(%rip), %eax     # 0x14aa28
shlq $0x3f, %rax
cmpq %r8, %rax
jne 0xed0de
leaq 0x29792(%rip), %rsi     # 0x116678
movl $0x14, %ecx
jmp 0xed262
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xecf0b
movq 0x10(%rax), %rsi
cmpq $0x1, %rsi
jne 0xed00a
movslq %r12d, %rax
movq %rax, 0x38(%rsp)
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
leaq 0x2d655(%rip), %rsi     # 0x11a577
movl $0x3, %edx
movq %r15, %rdi
movq %rbp, %rcx
callq *0x10(%rax)
movq 0x8(%rbp), %rax
cmpl $0x1, 0x4(%rax)
movq %rbp, 0x20(%rsp)
movq %r15, 0x8(%rsp)
movq %r13, 0x28(%rsp)
movl %r14d, 0x1c(%rsp)
movq %rbx, 0x40(%rsp)
jne 0xecfc8
movq 0x18(%rbp), %rdx
movq 0x20(%rbp), %rbx
leaq -0x80(%rdx), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %rbx
jl 0xecf86
addq %rdx, %rdx
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x94b07
movq 0x18(%rbp), %rax
addq $-0x80, %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%r13), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x5da8c(%rip)     # 0x14aa28
movq (%rax), %r8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmovneq %rax, %rcx
cmpq %r8, %rcx
jne 0xed15c
leaq 0x296bb(%rip), %rsi     # 0x116678
movl $0x14, %r13d
jmp 0xed2dd
movq 0x10(%r13), %rax
movq (%rax), %r8
xorl %eax, %eax
cmpb $0x0, 0x5da50(%rip)     # 0x14aa28
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmovneq %rcx, %rax
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
cmpq %r8, %rax
jne 0xed1dc
leaq 0x29678(%rip), %rsi     # 0x116678
movl $0x14, %ecx
jmp 0xed441
movq %r13, %rbx
xorl %eax, %eax
movb %al, 0x7(%rsp)
leaq 0xb6f(%r15), %r8
movb %al, 0xb6f(%r15)
leaq 0x29518(%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 0xed032
leaq 0x2d508(%rip), %rsi     # 0x11a57b
leaq 0x2a6b7(%rip), %rcx     # 0x117731
leaq 0x50(%rsp), %r13
movq %r13, %rdi
movq %r8, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xc442
movq 0x8(%rbp), %rcx
movq 0x48(%rcx), %r8
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq *0x10(%r8)
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rax
movl 0x10(%rax), %eax
leaq 0x7(%rsp), %r10
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
pushq %r10
pushq %rax
callq 0xf4186
addq $0x20, %rsp
jmp 0xed59e
movl %r14d, %r12d
leaq 0xb0f(%r15), %rsi
leaq 0xb0e(%r15), %r9
movb $0x0, 0xb0f(%r15)
movq %r8, %rdi
negq %rdi
cmovsq %r8, %rdi
movq $-0x1, %r10
xorl %ecx, %ecx
leaq 0x2942f(%rip), %r11     # 0x116540
movabsq $-0x3333333333333333, %rbx # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %rbx
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rdi, %r14
subq %rax, %r14
movb (%r11,%r14), %al
movb %al, 0x1(%r9,%r10)
incq %rcx
decq %r10
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0xed11b
testq %r8, %r8
js 0xed24d
subq %rcx, %rsi
jmp 0xed25f
movq 0x8(%rsp), %rax
leaq 0xb0f(%rax), %rsi
leaq 0xb0e(%rax), %rdi
movb $0x0, 0xb0f(%rax)
movq %r8, %rcx
negq %rcx
cmovsq %r8, %rcx
movq $-0x1, %r9
xorl %r13d, %r13d
leaq 0x293af(%rip), %r10     # 0x116540
movabsq $-0x3333333333333333, %r11 # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rax
mulq %r11
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rcx, %r14
subq %rax, %r14
movb (%r10,%r14), %al
movb %al, 0x1(%rdi,%r9)
incq %r13
decq %r9
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xed19b
testq %r8, %r8
js 0xed2cb
subq %r13, %rsi
jmp 0xed2dd
leaq 0xb0f(%r15), %rsi
leaq 0xb0e(%r15), %r9
movq %r8, %rdi
negq %rdi
cmovsq %r8, %rdi
movb $0x0, 0xb0f(%r15)
movq $-0x1, %r10
xorl %ecx, %ecx
leaq 0x29334(%rip), %r11     # 0x116540
movq %rdi, %rax
mulq %r14
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rdi, %rbx
subq %rax, %rbx
movb (%r11,%rbx), %al
movb %al, 0x1(%r9,%r10)
incq %rcx
decq %r10
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0xed20c
testq %r8, %r8
js 0xed42f
subq %rcx, %rsi
jmp 0xed441
movb $0x2d, 0x1(%r9,%r10)
subq %rcx, %r9
negq %r10
movq %r10, %rcx
movq %r9, %rsi
movl %r12d, %r14d
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movq %rcx, %rdx
movq %rbp, %rcx
callq *0x10(%rax)
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movl $0x29, %esi
movq %rbp, %rdx
callq *0x8(%rax)
cmpl $0x2, %r14d
jne 0xed5c0
testb $0x1, 0x3(%r13)
je 0xed5c0
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %r15, %rdi
movl $0x29, %esi
movq %rbp, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movb $0x2d, 0x1(%rdi,%r9)
subq %r13, %rdi
negq %r9
movq %r9, %r13
movq %rdi, %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%rbx), %rdi
movq %r13, %rdx
callq 0x83e0
addq %rbx, %r13
cmpl $0x2, %r12d
jl 0xed421
movq 0x8(%rsp), %rax
addq $0xb2e, %rax            # imm = 0xB2E
movq %rax, 0x48(%rsp)
movl $0x1, %r14d
leaq 0x29228(%rip), %rbp     # 0x116540
movabsq $-0x3333333333333333, %rbx # imm = 0xCCCCCCCCCCCCCCCD
cmpq 0x30(%rsp), %r13
jl 0xed358
movq 0x20(%rsp), %r15
movq 0x18(%r15), %rdx
addq %rdx, %rdx
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x94b07
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%r15), %rax
addq $-0x80, %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rdi
cmpb $0x0, 0x5d6bc(%rip)     # 0x14aa28
movl $0x0, %eax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmovneq %rcx, %rax
leaq 0x292f2(%rip), %rcx     # 0x116678
cmpq %rdi, %rax
je 0xed3de
movq 0x8(%rsp), %rax
movb $0x0, 0xb2f(%rax)
movq %rdi, %rsi
negq %rsi
cmovsq %rdi, %rsi
movq 0x48(%rsp), %rcx
movq %rsi, %rax
mulq %rbx
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r8
subq %rax, %r8
movb (%rbp,%r8), %al
movb %al, (%rcx)
decq %rcx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0xed3a6
testq %rdi, %rdi
js 0xed3db
incq %rcx
jmp 0xed3de
movb $0x2d, (%rcx)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
leaq 0x2d1c9(%rip), %rsi     # 0x11a5b6
movq %rcx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xc442
movq %rax, %r12
movq 0x10(%rsp), %rax
leaq (%rax,%r13), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x83e0
addq %r12, %r13
incq %r14
cmpq 0x38(%rsp), %r14
jne 0xed322
movq 0x20(%rsp), %rax
movq %r13, 0x20(%rax)
jmp 0xed54c
movb $0x2d, 0x1(%r9,%r10)
subq %rcx, %r9
negq %r10
movq %r10, %rcx
movq %r9, %rsi
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movq %rcx, %rdx
movq %rbp, %rcx
callq *0x10(%rax)
cmpl $0x2, %r12d
jl 0xed54c
movq 0x8(%rsp), %rax
addq $0xb2e, %rax            # imm = 0xB2E
movq %rax, 0x10(%rsp)
movl $0x1, %r15d
leaq 0x291fc(%rip), %rbp     # 0x116678
leaq 0x2d133(%rip), %r12     # 0x11a5b6
leaq 0x50(%rsp), %r13
leaq 0x290b1(%rip), %rbx     # 0x116540
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r15,8), %rdi
cmpb $0x0, 0x5d585(%rip)     # 0x14aa28
movl $0x0, %eax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmovneq %rcx, %rax
movq %rbp, %rcx
cmpq %rdi, %rax
je 0xed510
movq 0x8(%rsp), %rax
movb $0x0, 0xb2f(%rax)
movq %rdi, %rsi
negq %rsi
cmovsq %rdi, %rsi
movq 0x10(%rsp), %rcx
movq %rsi, %rax
mulq %r14
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r8
subq %rax, %r8
movb (%rbx,%r8), %al
movb %al, (%rcx)
decq %rcx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0xed4d9
testq %rdi, %rdi
js 0xed50d
incq %rcx
jmp 0xed510
movb $0x2d, (%rcx)
movq %r13, %rdi
movq %r12, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xc442
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x48(%rdx), %r8
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq *0x10(%r8)
incq %r15
cmpq 0x38(%rsp), %r15
jne 0xed48f
movq 0x20(%rsp), %rbp
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, 0x40(%rsp)
jle 0xed581
leaq 0x2b184(%rip), %rsi     # 0x1186f0
movl $0x5, %edx
movq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rcx
callq *0x10(%rax)
jmp 0xed594
movq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x29, %esi
movq %rbp, %rdx
callq *0x8(%rax)
movq 0x28(%rsp), %rbx
movl 0x1c(%rsp), %r14d
cmpl $0x2, %r14d
jne 0xed5c0
testb $0x1, 0x3(%rbx)
je 0xed5c0
movq 0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movl $0x29, %esi
movq %rbp, %rdx
callq *0x8(%rax)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq