// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movl %ecx, 0x11c(%rsp)
movq %r8, 0x110(%rsp)
movq 0x128(%rsp), %rax
movq 0x130(%rsp), %rcx
cmpq 0x1d0(%rcx), %rax
je 0x1a91a0
movq 0x128(%rsp), %rax
movq 0x130(%rsp), %rcx
cmpq 0x1d8(%rcx), %rax
jne 0x1a91eb
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x128(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rcx), %rsi
movq 0x128(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x30(%rcx), %rdx
movq 0x120(%rsp), %rcx
callq *%rax
jmp 0x1a9511
cmpl $0x2, 0x11c(%rsp)
jne 0x1a93dc
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
testb $0x1, 0x2(%rax)
je 0x1a9242
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x496a8(%rip), %rsi     # 0x1f28de
movl $0x38, %edx
callq *%rax
jmp 0x1a93d7
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x4(%rax)
jne 0x1a9368
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x49694(%rip), %rsi     # 0x1f2917
movl $0x1f, %edx
callq *%rax
movq 0x128(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jle 0x1a9334
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x4966f(%rip), %rsi     # 0x1f2937
movl $0xa, %edx
callq *%rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x128(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x1, %r8d
callq 0x1aee60
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x495e6(%rip), %rsi     # 0x1f2913
movl $0x3, %edx
callq *%rax
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x495b4(%rip), %rsi     # 0x1f2913
movl $0x3, %edx
callq *%rax
jmp 0x1a93d5
movb $0x0, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x495b4(%rip), %rdx     # 0x1f2942
leaq 0x495c1(%rip), %r8      # 0x1f2956
xorl %eax, %eax
movl %eax, %r9d
movb $0x0, %al
callq 0xabd0
movl %eax, 0xc(%rsp)
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movq 0x120(%rsp), %rcx
callq *%rax
jmp 0x1a93d7
jmp 0x1a950f
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x4(%rax)
jne 0x1a9422
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x49544(%rip), %rsi     # 0x1f295d
movl $0x13, %edx
callq *%rax
jmp 0x1a949c
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1a9468
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x49512(%rip), %rsi     # 0x1f2971
movl $0x11, %edx
callq *%rax
jmp 0x1a949a
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x494f0(%rip), %rsi     # 0x1f2983
movl $0x15, %edx
callq *%rax
jmp 0x1a949c
movq 0x128(%rsp), %rax
movq 0x8(%rax), %rax
testb $0x1, 0x2(%rax)
je 0x1a94e2
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rcx
leaq 0x493fa(%rip), %rsi     # 0x1f28d3
movl $0xa, %edx
callq *%rax
jmp 0x1a950d
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x130(%rsp), %rdi
movq 0x120(%rsp), %rdx
movl $0x3e, %esi
callq *%rax
jmp 0x1a950f
jmp 0x1a9511
addq $0x138, %rsp            # imm = 0x138
retq
nopl (%rax)