// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: output_port_to_port
static void output_port_to_port(s7_scheme *sc, s7_pointer obj, s7_pointer port, use_write_t use_write, shared_info *ci)
    {
        if ((obj == sc->standard_output) ||
                (obj == sc->standard_error))
            port_write_string(port)(sc, port_filename(obj), port_filename_length(obj), port);
        else
        {
            if (use_write == P_READABLE)
            {
                if (port_is_closed(obj))
                    port_write_string(port)(sc, "(let ((p (open-output-string))) (close-output-port p) p)", 56, port);
                else
                {
                    if (is_string_port(obj))
                    {
                        port_write_string(port)(sc, "(let ((p (open-output-string)))", 31, port);
                        if (port_position(obj) > 0)
                        {
                            port_write_string(port)(sc, " (display ", 10, port);
                            slashify_string_to_port(sc, port, (const char *)port_data(obj), port_position(obj), IN_QUOTES);
                            port_write_string(port)(sc, " p)", 3, port);
                        }
                        port_write_string(port)(sc, " p)", 3, port);
                    }
                    else
                    {
                        char str[256];
                        int32_t nlen;
                        str[0] = '\0';
                        nlen = catstrs(str, 256, "(open-output-file \"", port_filename(obj), "\" \"a\")", NULL);
                        port_write_string(port)(sc, str, nlen, port);
                    }
                }
            }
            else
            {
                if (is_string_port(obj))
                    port_write_string(port)(sc, "<output-string-port", 19, port);
                else
                {
                    if (is_file_port(obj))
                        port_write_string(port)(sc, "<output-file-port", 17, port);
                    else port_write_string(port)(sc, "<output-function-port", 21, port);
                }
                if (port_is_closed(obj))
                    port_write_string(port)(sc, " (closed)>", 10, port);
                else port_write_character(port)(sc, '>', port);
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq %rsi, 0x1d0(%rdi)
je 0xf1b13
cmpq %r15, 0x1d8(%r14)
je 0xf1b13
movq 0x8(%r15), %rax
cmpl $0x2, %ecx
jne 0xf1b3f
cmpb $0x1, 0x2(%rax)
jne 0xf1b70
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x28eac(%rip), %rsi     # 0x11a9b8
movl $0x38, %edx
jmp 0xf1b2b
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%r15), %rcx
movq 0x10(%rcx), %rsi
movq 0x30(%rcx), %rdx
movq %r14, %rdi
movq %rbx, %rcx
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movl 0x4(%rax), %ecx
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
testl %ecx, %ecx
je 0xf1c0e
cmpl $0x1, %ecx
jne 0xf1c1c
leaq 0x28ed1(%rip), %rsi     # 0x11aa37
movl $0x13, %edx
jmp 0xf1c28
cmpl $0x1, 0x4(%rax)
jne 0xf1c74
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x28e68(%rip), %rsi     # 0x11a9f1
movl $0x1f, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
cmpq $0x0, 0x20(%r15)
jle 0xf1bf1
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x28e64(%rip), %rsi     # 0x11aa11
movl $0xa, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
movq 0x10(%r15), %rdx
movq 0x20(%r15), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %r8d
callq 0xf492d
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
leaq 0x28e0a(%rip), %rsi     # 0x11a9ed
movl $0x3, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%rax)
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x28de9(%rip), %rsi     # 0x11a9ed
movl $0x3, %edx
jmp 0xf1b2b
leaq 0x28e36(%rip), %rsi     # 0x11aa4b
movl $0x11, %edx
jmp 0xf1c28
leaq 0x28e3a(%rip), %rsi     # 0x11aa5d
movl $0x15, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq *%rax
movq 0x8(%r15), %rcx
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rax
cmpb $0x1, 0x2(%rcx)
jne 0xf1c57
movq 0x10(%rax), %rax
leaq 0x28d60(%rip), %rsi     # 0x11a9ad
movl $0xa, %edx
jmp 0xf1b2b
movq 0x8(%rax), %rax
movq %r14, %rdi
movl $0x3e, %esi
movq %rbx, %rdx
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movq %rsp, %r15
movb $0x0, (%r15)
movq 0x10(%rax), %rcx
leaq 0x28d96(%rip), %rdx     # 0x11aa1c
leaq 0x28da3(%rip), %r8      # 0x11aa30
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9517
movq 0x8(%rbx), %rcx
movq 0x48(%rcx), %r8
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq *0x10(%r8)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq