// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: make_vector_to_port
static void make_vector_to_port(s7_scheme *sc, s7_pointer vect, s7_pointer port)
    {
        s7_int vlen;
        int32_t plen;
        char buf[128];
        const char* vtyp = "";

        if (is_float_vector(vect))
            vtyp = "float-";
        else
        {
            if (is_int_vector(vect))
                vtyp = "int-";
            else
            {
                if (is_byte_vector(vect))
                    vtyp = "byte-";
            }
        }

        vlen = vector_length(vect);
        if (vector_rank(vect) == 1)
        {
            plen = catstrs_direct(buf, "(make-", vtyp, "vector ", integer_to_string_no_length(sc, vlen), " ", NULL);
            port_write_string(port)(sc, buf, plen, port);
        }
        else
        {
            s7_int dim;
            plen = catstrs_direct(buf, "(make-", vtyp, "vector '(", NULL);
            port_write_string(port)(sc, buf, plen, port);
            for (dim = 0; dim < vector_ndims(vect) - 1; dim++)
            {
                plen = catstrs_direct(buf, integer_to_string_no_length(sc, vector_dimension(vect, dim)), " ", NULL);
                port_write_string(port)(sc, buf, plen, port);
            }
            plen = catstrs_direct(buf, integer_to_string_no_length(sc, vector_dimension(vect, dim)), ") ", NULL);
            port_write_string(port)(sc, buf, plen, port);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %r14
movb (%rsi), %al
addb $-0x16, %al
cmpb $0x2, %al
ja 0xf3e93
movzbl %al, %eax
leaq 0x16016(%rip), %rcx     # 0x109ea0
movslq (%rcx,%rax,4), %r10
addq %rcx, %r10
jmp 0xf3e9a
leaq 0x28634(%rip), %r10     # 0x11c4ce
movq 0x8(%r15), %rcx
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xf3eb6
cmpq $0x1, 0x10(%rax)
jne 0xf3f44
xorl %eax, %eax
cmpb $0x0, 0x56b69(%rip)     # 0x14aa28
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
cmovneq %rdx, %rax
cmpq %rcx, %rax
jne 0xf3ede
leaq 0x2279f(%rip), %r8      # 0x116678
jmp 0xf4112
leaq 0xb2e(%r14), %r8
movb $0x0, 0xb2f(%r14)
movq %rcx, %rsi
negq %rsi
cmovsq %rcx, %rsi
leaq 0x22642(%rip), %rdi     # 0x116540
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rsi, %rax
mulq %r9
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %r11
subq %rax, %r11
movb (%rdi,%r11), %al
movb %al, (%r8)
decq %r8
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0xf3f08
testq %rcx, %rcx
js 0xf410e
incq %r8
jmp 0xf4112
leaq 0x2661b(%rip), %rsi     # 0x11a566
leaq 0x2661b(%rip), %rcx     # 0x11a56d
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r10, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xc442
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x48(%rdx), %r8
movslq %eax, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq *0x10(%r8)
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
cmpq $0x2, 0x10(%rax)
movabsq $-0x3333333333333333, %rbp # imm = 0xCCCCCCCCCCCCCCCD
jl 0xf4083
movq %r14, %rbx
leaq 0xb2e(%r14), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x20(%rsp), %r13
leaq 0x22584(%rip), %r14     # 0x116540
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %rdi
cmpb $0x0, 0x56a5b(%rip)     # 0x14aa28
movl $0x0, %eax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmovneq %rcx, %rax
leaq 0x22691(%rip), %rsi     # 0x116678
cmpq %rdi, %rax
je 0xf4039
movb $0x0, 0xb2f(%rbx)
movq %rdi, %rcx
negq %rcx
cmovsq %rdi, %rcx
movq 0x18(%rsp), %rsi
movq %rcx, %rax
mulq %rbp
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rcx, %r8
subq %rax, %r8
movb (%r14,%r8), %al
movb %al, (%rsi)
decq %rsi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xf4002
testq %rdi, %rdi
js 0xf4036
incq %rsi
jmp 0xf4039
movb $0x2d, (%rsi)
movq %r13, %rdi
leaq 0x26573(%rip), %rdx     # 0x11a5b6
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xc442
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x48(%rdx), %r8
movslq %eax, %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq *0x10(%r8)
incq %r12
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rcx
decq %rcx
cmpq %rcx, %r12
jl 0xf3fbf
jmp 0xf4086
movq %r14, %rbx
movq (%rax), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x56996(%rip)     # 0x14aa28
movq (%rax,%r12,8), %rdi
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmovneq %rax, %rcx
cmpq %rdi, %rcx
jne 0xf40b8
leaq 0x225c8(%rip), %rsi     # 0x116678
movq %rbx, %r14
jmp 0xf4143
movq %rbx, %r14
leaq 0xb2e(%rbx), %rsi
movb $0x0, 0xb2f(%rbx)
movq %rdi, %rcx
negq %rcx
cmovsq %rdi, %rcx
leaq 0x22466(%rip), %r8      # 0x116540
movq %rcx, %rax
mulq %rbp
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rcx, %r9
subq %rax, %r9
movb (%r8,%r9), %al
movb %al, (%rsi)
decq %rsi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xf40da
testq %rdi, %rdi
js 0xf4140
incq %rsi
jmp 0xf4143
movb $0x2d, (%r8)
movq $0x0, (%rsp)
leaq 0x26445(%rip), %rsi     # 0x11a566
leaq 0x2646c(%rip), %rcx     # 0x11a594
leaq 0x26487(%rip), %r9      # 0x11a5b6
leaq 0x20(%rsp), %rdi
movq %r10, %rdx
xorl %eax, %eax
callq 0xc442
jmp 0xf4158
movb $0x2d, (%rsi)
leaq 0x2666b(%rip), %rdx     # 0x11a7b5
leaq 0x20(%rsp), %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xc442
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x48(%rdx), %r8
movslq %eax, %rdx
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq *0x10(%r8)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq