// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: multivector_to_port
static int32_t multivector_to_port(s7_scheme *sc, s7_pointer vec, s7_pointer port,
            int32_t out_len, int32_t flat_ref, int32_t dimension, int32_t dimensions, bool *last,
            use_write_t use_write, shared_info *ci)
    {
        int32_t i;
        if (use_write != P_READABLE)
        {
            if (*last)
                port_write_string(port)(sc, " (", 2, port);
            else port_write_character(port)(sc, '(', port);
            (*last) = false;
        }

        for (i = 0; i < vector_dimension(vec, dimension); i++)
        {
            if (dimension == (dimensions - 1))
            {
                if (flat_ref < out_len)
                {
                    object_to_port_with_circle_check(sc, vector_getter(vec)(sc, vec, flat_ref), port, NOT_P_DISPLAY(use_write), ci);

                    if (use_write == P_READABLE)
                        port_write_string(port)(sc, ") ", 2, port);
                    flat_ref++;
                }
                else
                {
                    port_write_string(port)(sc, "...)", 4, port);
                    return(flat_ref);
                }
                if ((use_write != P_READABLE) &&
                        (i < (vector_dimension(vec, dimension) - 1)))
                    port_write_character(port)(sc, ' ', port);
            }
            else
            {
                if (flat_ref < out_len)
                    flat_ref = multivector_to_port(sc, vec, port, out_len, flat_ref, dimension + 1, dimensions, last, NOT_P_DISPLAY(use_write), ci);
                else
                {
                    port_write_string(port)(sc, "...)", 4, port);
                    return(flat_ref);
                }
            }
        }
        if (use_write != P_READABLE)
            port_write_character(port)(sc, ')', port);
        (*last) = true;
        return(flat_ref);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movl %r8d, %ebx
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0x68(%rsp), %rcx
movq 0x8(%rdx), %rax
movq 0x48(%rax), %rax
cmpb $0x1, (%rcx)
jne 0xf41d0
leaq 0x26482(%rip), %rsi     # 0x11a642
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rcx
callq *0x10(%rax)
jmp 0xf41de
movq %r15, %rdi
movl $0x28, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq 0x68(%rsp), %rax
movb $0x0, (%rax)
movslq %ebp, %r12
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
cmpq $0x0, (%rax,%r12,8)
jle 0xf4326
movl 0x70(%rsp), %eax
movl 0x60(%rsp), %ecx
decl %ecx
movl %ecx, 0x1c(%rsp)
cmpl $0x1, %eax
adcl $0x0, %eax
movq %rax, 0x10(%rsp)
movq %rbp, 0x20(%rsp)
leal 0x1(%rbp), %eax
movl %eax, 0x18(%rsp)
xorl %ebp, %ebp
movl 0x1c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jne 0xf4289
cmpl 0xc(%rsp), %ebx
jge 0xf4346
movslq %ebx, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq *0x20(%r13)
movq %rax, %rsi
movzbl (%rax), %eax
cmpq $0x0, 0x78(%rsp)
je 0xf42c4
leaq 0x5e0e4(%rip), %rcx     # 0x152340
cmpb $0x1, (%rax,%rcx)
jne 0xf42c4
cmpl $0x15, %eax
jne 0xf4272
movl $0x15, %eax
testb $0x1, 0x7(%rsi)
jne 0xf42c4
movq %r15, %rdi
movq %r14, %rdx
movq 0x10(%rsp), %rcx
movq 0x78(%rsp), %r8
callq 0x9596b
jmp 0xf42df
movl 0xc(%rsp), %ecx
cmpl %ecx, %ebx
jge 0xf4346
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl %ebx, %r8d
movl 0x18(%rsp), %r9d
pushq 0x78(%rsp)
pushq 0x18(%rsp)
pushq 0x78(%rsp)
movl 0x78(%rsp), %eax
pushq %rax
callq 0xf4186
addq $0x20, %rsp
movl %eax, %ebx
jmp 0xf430e
movq %r15, %rdi
movq %r14, %rdx
movq 0x10(%rsp), %rcx
movq 0x78(%rsp), %r8
leaq 0x5e0a5(%rip), %r9      # 0x152380
callq *(%r9,%rax,8)
incl %ebx
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
decq %rax
cmpq %rbp, %rax
jle 0xf430e
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq *0x8(%rax)
incq %rbp
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
cmpq %rbp, (%rax,%r12,8)
jg 0xf4226
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %r15, %rdi
movl $0x29, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq 0x68(%rsp), %rax
movb $0x1, (%rax)
jmp 0xf4363
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
leaq 0x2439c(%rip), %rsi     # 0x1186f1
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rcx
callq *0x10(%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq