// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: closure_to_port
static void closure_to_port(s7_scheme *sc, s7_pointer obj, s7_pointer port, use_write_t use_write, shared_info *ci)
    {
        if (has_active_methods(sc, obj))
        {
            /* look for object->string method else fallback on ordinary case.
             * can't use recursion on closure_let here because then the fallback name is #<let>.
             * this is tricky!: (display (openlet (with-let (mock-c-pointer 0) (lambda () 1))))
             *   calls object->string on the closure whose closure_let is the mock-c-pointer;
             *   it has an object->string method that clears mock-c-pointers and tries again...
             *   so, display methods need to use coverlet/openlet.
             */
            s7_pointer print_func;
            print_func = find_method(sc, closure_let(obj), sc->object_to_string_symbol);
            if (print_func != sc->undefined)
            {
                s7_pointer p;
                p = s7_apply_function(sc, print_func, list_1(sc, obj));
                if (string_length(p) > 0)
                    port_write_string(port)(sc, string_value(p), string_length(p), port);
                return;
            }
        }
        if (use_write == P_READABLE)
            write_closure_readably(sc, obj, port, ci);
        else write_closure_name(sc, obj, port);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
testb $0x40, 0x3(%rsi)
je 0xf25ec
cmpb $0x1, 0x24c(%rbx)
jne 0xf25ec
movq 0x18(%r12), %rsi
movq 0x1380(%rbx), %rdx
movq %rbx, %rdi
callq 0x89ff
cmpq 0x128(%rbx), %rax
je 0xf25ec
movq %rax, %r15
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xf258f
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0x200001, (%rdx)       # imm = 0x200001
movq %r12, 0x8(%rdx)
movq %r13, 0x10(%rdx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xaee6
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jle 0xf2c22
movq 0x8(%r14), %rcx
movq 0x48(%rcx), %rcx
movq 0x10(%rcx), %r8
movq 0x10(%rax), %rsi
movq %rbx, %rdi
movq %r14, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r8
cmpl $0x2, %ebp
jne 0xf263d
movq 0x10(%r12), %r15
cmpq $0x0, 0x6a0(%rbx)
jle 0xf2659
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38d93
testb %al, %al
je 0xf2659
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
leaq 0x28488(%rip), %rsi     # 0x11aaaa
movl $0x20, %edx
movq %rbx, %rdi
movq %r14, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf544d
movq %r15, 0x18(%rsp)
movq %r12, 0x10(%rsp)
movq 0x8(%r12), %r12
cmpb $0xa, (%r12)
jne 0xf26bc
movq %r13, %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xf2698
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, %r12
movq %rbp, %r13
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
movq 0x110(%rbx), %r8
cmpq $0x0, 0x108(%rbx)
movq %r13, 0x20(%rsp)
js 0xf26eb
movq 0xe8(%rbx), %rax
jmp 0xf27b3
movq 0xd0(%rbx), %rax
movq 0xf0(%rbx), %rbp
leaq (,%rbp,2), %r15
movq 0x18(%rax), %rsi
movq %rbp, %r13
shlq $0x4, %r13
movq %rbx, %rdi
movq %r13, %rdx
movq %r8, 0x8(%rsp)
callq 0x9fd6
movq $0x0, 0x20(%rax)
movq 0xd0(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq (%rax), %rax
movq 0xd0(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0xd0(%rbx), %rax
movq %r15, 0x8(%rax)
movq %r15, 0xf0(%rbx)
movq 0xe8(%rbx), %rdi
movq %r13, %rsi
movq 0x20(%rsp), %r13
callq 0x8510
movq 0x8(%rsp), %r8
movq %rax, 0xe8(%rbx)
cmpq %r15, %rbp
jge 0xf27b3
movq 0x140(%rbx), %rcx
movq %rbp, %rdx
movq 0xd0(%rbx), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax,%rdx,8)
movq 0xe8(%rbx), %rax
movq 0x108(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%rbx)
movq %rdx, 0x8(%rax,%rsi,8)
incq %rdx
decq %rbp
jne 0xf277e
movq 0xd0(%rbx), %rcx
movq 0x108(%rbx), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, 0x108(%rbx)
movq (%rax,%rdx,8), %r15
movq 0x10(%rcx), %rax
movq %r8, (%rax,%r15,8)
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq (%rsp), %rbp
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0xf574d
movq 0x16c8(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0xf5947
movq 0x16d0(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0xf5947
movq 0x16c0(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0xf5947
movq 0x16d8(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0xf5947
movq 0x10(%rsp), %r12
movzbl (%r12), %eax
leal -0x28(%rax), %ecx
cmpl $0x6, %ecx
jb 0xf287b
leal -0x2f(%rax), %ecx
cmpl $0x5, %ecx
jae 0xf292f
movq 0x8(%r12), %rax
addq $0x30, %rax
jmp 0xf2880
leaq 0x20(%r12), %rax
movq (%rax), %rax
cmpb $0x28, (%rax)
jb 0xf2938
movq 0x20(%r12), %rdx
movzbl (%rdx), %eax
leaq 0x54075(%rip), %rcx     # 0x146910
cmpb $0x1, (%rax,%rcx)
jne 0xf293a
movq %r15, %r12
movq 0x8(%rdx), %r15
cmpb $0xa, (%r15)
jne 0xf2909
movq %r13, %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xf28e5
movq %rbx, %rdi
movq %rdx, 0x8(%rsp)
callq 0xa550
movq 0x8(%rsp), %rdx
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r15, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, %r15
movq %rbp, %r13
movq %rdx, %rbp
movq 0x10(%rdx), %rsi
movq %rbx, %rdi
movq (%rsp), %rdx
movq %r15, %rcx
movq %r12, %r15
movq %r12, %r8
callq 0xf574d
movq %rbp, %rdx
movq 0x10(%rsp), %r12
jmp 0xf293a
cmpl $0x2e, %eax
je 0xf2870
xorl %edx, %edx
movq 0xd0(%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax,%r15,8), %rax
movq %rax, (%rsp)
cmpq 0x110(%rbx), %rax
je 0xf2aba
movq %rdx, 0x8(%rsp)
movq %r15, %r12
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
leaq 0x241bd(%rip), %rsi     # 0x116b2e
movl $0x6, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq *0x10(%rax)
movq (%rsp), %rax
cmpb $0x1, (%rax)
jne 0xf2a8b
leaq 0x6024d(%rip), %r13     # 0x152be0
movq (%rsp), %r15
movq 0x8(%r15), %rbp
movq 0x10(%rbp), %rax
movzbl (%rax), %ecx
cmpb $0x0, (%rcx,%r13)
jne 0xf2a7d
leaq 0x5f98c(%rip), %rdx     # 0x152340
cmpb $0x1, (%rcx,%rdx)
jne 0xf29d6
cmpl $0x15, %ecx
jne 0xf29c5
testb $0x1, 0x7(%rax)
jne 0xf29d6
movq 0x8(%rbp), %rax
cmpq 0x16c8(%rbx), %rax
jne 0xf2a7d
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movl $0x28, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq 0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdx
movq 0x10(%rcx), %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq *0x10(%rax)
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq 0x10(%rbp), %rsi
movzbl (%rsi), %eax
movq %rbx, %rdi
movq %r14, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
leaq 0x5f941(%rip), %r9      # 0x152380
callq *(%r9,%rax,8)
movq 0x10(%r15), %rcx
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
cmpq 0x110(%rbx), %rcx
je 0xf2a6f
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x27d4e(%rip), %rsi     # 0x11a7b5
movq %r14, %rcx
callq *0x10(%rax)
jmp 0xf2a7d
movq %rbx, %rdi
movl $0x29, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
je 0xf2997
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
leaq 0x27d1b(%rip), %rsi     # 0x11a7b5
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq *0x10(%rax)
movq 0x20(%rsp), %r13
movq %r12, %r15
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0xf2b36
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rdx, %rbp
leaq 0x27ffa(%rip), %rsi     # 0x11aacb
movl $0xa, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq *0x10(%rax)
movq 0x8(%r12), %rdx
movl (%r12), %esi
movq %rbx, %rdi
movq 0x18(%rsp), %rcx
movq %r14, %r8
callq 0xf57b8
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq *0x8(%rax)
movzbl (%rbp), %eax
leaq 0x53df7(%rip), %rcx     # 0x146910
cmpb $0x1, (%rax,%rcx)
jne 0xf2b51
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %r8
callq 0xf57b8
jmp 0xf2ba2
movq 0x8(%r12), %rdx
movl (%r12), %esi
movq %rbx, %rdi
movq 0x18(%rsp), %rcx
movq %r14, %r8
callq 0xf57b8
jmp 0xf2bb8
testq %r13, %r13
je 0xf2b86
leaq 0x5f7e3(%rip), %rcx     # 0x152340
cmpb $0x1, (%rax,%rcx)
jne 0xf2b86
cmpl $0x15, %eax
jne 0xf2b6e
testb $0x1, 0x7(%rbp)
jne 0xf2b86
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movq %r13, %r8
callq 0x9596b
jmp 0xf2ba2
leaq 0x5f7f3(%rip), %r9      # 0x152380
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movq %r13, %r8
callq *(%r9,%rax,8)
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movl $0x29, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq (%rsp), %rax
cmpq 0x110(%rbx), %rax
je 0xf2bdb
movq 0x8(%r14), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movl $0x29, %esi
movq %r14, %rdx
callq *0x8(%rax)
cmpq %r15, 0xf0(%rbx)
jle 0xf2c22
movq 0xd0(%rbx), %rcx
movq 0x140(%rbx), %rax
movq 0x10(%rcx), %rdx
cmpq %rax, (%rdx,%r15,8)
je 0xf2c1e
movq 0xe8(%rbx), %rdx
movq 0x108(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%rbx)
movq %r15, 0x8(%rdx,%rsi,8)
movq 0x10(%rcx), %rdx
movq %rax, (%rdx,%r15,8)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq