// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: c_object_to_port
static void c_object_to_port(s7_scheme *sc, s7_pointer obj, s7_pointer port, use_write_t use_write, shared_info *ci)
    {
#if (!DISABLE_DEPRECATED)
        if (c_object_print(sc, obj))
        {
            char *str;
            str = ((*(c_object_print(sc, obj)))(sc, c_object_value(obj)));
            port_display(port)(sc, str, port);
            free(str);
            return;
        }
#endif
        if (c_object_to_string(sc, obj))
            port_display(port)(sc, s7_string((*(c_object_to_string(sc, obj)))(sc, set_plist_2(sc, obj, (use_write == P_READABLE) ? sc->key_readable_symbol : sc->T))), port);
        else
        {
            if ((use_write == P_READABLE) &&
                    (c_object_to_list(sc, obj)) &&  /* to_list and (implicit) set are needed to reconstruct a cyclic c-object, as well as the maker (via type name) */
                    (c_object_set(sc, obj)))
            {
                s7_pointer obj_list, old_w, p;
                int32_t href;

                obj_list = ((*(c_object_to_list(sc, obj)))(sc, set_plist_1(sc, obj)));
                old_w = sc->w;
                sc->w = obj_list;

                if ((ci) &&
                        (is_cyclic(obj)) &&
                        ((href = peek_shared_ref(ci, obj)) != 0))
                {
                    int32_t i;
                    if (href < 0) href = -href;
                    if ((ci->defined[href]) || (port == ci->cycle_port))
                    {
                        int32_t nlen;
                        char buf[128];
                        nlen = catstrs_direct(buf, "<", pos_int_to_str_direct(sc, href), ">", NULL);
                        port_write_string(port)(sc, buf, nlen, port);
                        return;
                    }

                    port_write_character(port)(sc, '(', port);
                    c_object_name_to_port(sc, obj, port);
                    for (i = 0, p = obj_list; is_pair(p); i++, p = cdr(p))
                    {
                        s7_pointer val;
                        val = car(p);
                        if (has_structure(val))
                        {
                            char buf[128];
                            int32_t symref, len;

                            port_write_string(port)(sc, " #f", 3, port);
                            len = catstrs_direct(buf, "  (set! (<", pos_int_to_str_direct(sc, href), "> ", pos_int_to_str_direct_1(sc, i), ") ", NULL);
                            port_write_string(ci->cycle_port)(sc, buf, len, ci->cycle_port);

                            symref = peek_shared_ref(ci, val);
                            if (symref != 0)
                            {
                                if (symref < 0) symref = -symref;
                                len = catstrs_direct(buf, "<", pos_int_to_str_direct(sc, symref), ">)\n", NULL);
                                port_write_string(ci->cycle_port)(sc, buf, len, ci->cycle_port);
                            }
                            else
                            {
                                object_to_port_with_circle_check(sc, val, ci->cycle_port, P_READABLE, ci);
                                port_write_string(ci->cycle_port)(sc, ")\n", 2, ci->cycle_port);
                            }
                        }
                        else
                        {
                            port_write_character(port)(sc, ' ', port);
                            object_to_port_with_circle_check(sc, val, port, P_READABLE, ci);
                        }
                    }
                }
                else
                {
                    port_write_character(port)(sc, '(', port);
                    c_object_name_to_port(sc, obj, port);
                    for (p = obj_list; is_pair(p); p = cdr(p))
                    {
                        s7_pointer val;
                        val = car(p);
                        port_write_character(port)(sc, ' ', port);
                        object_to_port_with_circle_check(sc, val, port, P_READABLE, ci);
                    }
                }
                port_write_character(port)(sc, ')', port);
                sc->w = old_w;
            }
            else
            {
                char buf[128];
                int32_t nlen;
                port_write_string(port)(sc, "#<", 2, port);
                c_object_name_to_port(sc, obj, port);
                nlen = snprintf(buf, 128, " %p>", obj);
                port_write_string(port)(sc, buf, nlen, port);
            }
        }
    }

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x290(%rsp)
movq %rsi, 0x288(%rsp)
movq %rdx, 0x280(%rsp)
movl %ecx, 0x27c(%rsp)
movq %r8, 0x270(%rsp)
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x40(%rax)
je 0x1aaf59
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x40(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x288(%rsp), %rcx
movq 0x10(%rcx), %rsi
callq *%rax
movq %rax, 0x268(%rsp)
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x268(%rsp), %rsi
movq 0x280(%rsp), %rdx
callq *%rax
movq 0x268(%rsp), %rdi
callq 0x9050
jmp 0x1ab9ce
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x80(%rax)
je 0x1ab079
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpl $0x2, 0x27c(%rsp)
jne 0x1ab01e
movq 0x290(%rsp), %rax
movq 0x18a0(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x1ab032
movq 0x290(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rdx
callq 0x36f70
movq 0x60(%rsp), %rdi
movq %rax, %rsi
movq 0x58(%rsp), %rax
callq *%rax
movq %rax, %rdi
callq 0x14480
movq 0x50(%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq 0x280(%rsp), %rdx
callq *%rax
jmp 0x1ab9ce
cmpl $0x2, 0x27c(%rsp)
jne 0x1ab923
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x78(%rax)
je 0x1ab923
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x50(%rax)
je 0x1ab923
movq 0x290(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x288(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x290(%rsp), %rdi
movq 0x288(%rsp), %rsi
callq 0x35ea0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rax
callq *%rax
movq %rax, 0x260(%rsp)
movq 0x290(%rsp), %rax
movq 0x4d8(%rax), %rax
movq %rax, 0x258(%rsp)
movq 0x260(%rsp), %rcx
movq 0x290(%rsp), %rax
movq %rcx, 0x4d8(%rax)
cmpq $0x0, 0x270(%rsp)
je 0x1ab74c
movq 0x288(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1ab74c
movq 0x270(%rsp), %rdi
movq 0x288(%rsp), %rsi
callq 0xd2740
movl %eax, 0x24c(%rsp)
cmpl $0x0, %eax
je 0x1ab74c
cmpl $0x0, 0x24c(%rsp)
jge 0x1ab1d0
xorl %eax, %eax
subl 0x24c(%rsp), %eax
movl %eax, 0x24c(%rsp)
movq 0x270(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x24c(%rsp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x1ab204
movq 0x280(%rsp), %rax
movq 0x270(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x1ab28a
leaq 0x1c0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x290(%rsp), %rdi
movslq 0x24c(%rsp), %rsi
callq 0xae30
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x4755c(%rip), %rsi     # 0x1f2791
leaq 0x4782b(%rip), %rcx     # 0x1f2a67
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0x244(%rsp)
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
movslq 0x244(%rsp), %rdx
movq 0x280(%rsp), %rcx
callq *%rax
jmp 0x1ab9ce
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rdx
movl $0x28, %esi
callq *%rax
movq 0x290(%rsp), %rdi
movq 0x288(%rsp), %rsi
movq 0x280(%rsp), %rdx
callq 0x1b1ac0
movl $0x0, 0x248(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x250(%rsp)
movq 0x250(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x1ab747
movq 0x250(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x76b67(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1ab626
movq 0x1b8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1ab35d
movq 0x1b8(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1ab626
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rcx
leaq 0x38407(%rip), %rsi     # 0x1e378f
movl $0x3, %edx
callq *%rax
leaq 0x130(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x290(%rsp), %rdi
movslq 0x24c(%rsp), %rsi
callq 0xae30
movq %rax, 0x20(%rsp)
movq 0x290(%rsp), %rdi
movslq 0x248(%rsp), %rsi
callq 0x1ae700
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq %rax, %r8
leaq 0x470eb(%rip), %rsi     # 0x1f24ca
leaq 0x43219(%rip), %rcx     # 0x1ee5ff
leaq 0x472ee(%rip), %r9      # 0x1f26db
xorl %eax, %eax
movq $0x0, (%rsp)
movb $0x0, %al
callq 0x10540
movl %eax, 0x128(%rsp)
movq 0x270(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movslq 0x128(%rsp), %rdx
movq 0x270(%rsp), %rcx
movq 0x28(%rcx), %rcx
callq *%rax
movq 0x270(%rsp), %rdi
movq 0x1b8(%rsp), %rsi
callq 0xd2740
movl %eax, 0x12c(%rsp)
cmpl $0x0, 0x12c(%rsp)
je 0x1ab515
cmpl $0x0, 0x12c(%rsp)
jge 0x1ab487
xorl %eax, %eax
subl 0x12c(%rsp), %eax
movl %eax, 0x12c(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x290(%rsp), %rdi
movslq 0x12c(%rsp), %rsi
callq 0xae30
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x472d9(%rip), %rsi     # 0x1f2791
leaq 0x4701f(%rip), %rcx     # 0x1f24de
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0x128(%rsp)
movq 0x270(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movslq 0x128(%rsp), %rdx
movq 0x270(%rsp), %rcx
movq 0x28(%rcx), %rcx
callq *%rax
jmp 0x1ab621
jmp 0x1ab517
movq 0x1b8(%rsp), %rax
movq %rax, 0x120(%rsp)
cmpq $0x0, 0x270(%rsp)
je 0x1ab5a2
movq 0x120(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7694a(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1ab5a2
movq 0x120(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1ab572
movq 0x120(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1ab5a2
movq 0x290(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x270(%rsp), %rax
movq 0x28(%rax), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq 0xd0220
jmp 0x1ab5e5
movq 0x120(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7691a(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0x290(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x270(%rsp), %rcx
movq 0x28(%rcx), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0x1ab5e7
movq 0x270(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x270(%rsp), %rcx
movq 0x28(%rcx), %rcx
leaq 0x46ee5(%rip), %rsi     # 0x1f24ff
movl $0x2, %edx
callq *%rax
jmp 0x1ab71b
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rdx
movl $0x20, %esi
callq *%rax
movq 0x1b8(%rsp), %rax
movq %rax, 0x118(%rsp)
cmpq $0x0, 0x270(%rsp)
je 0x1ab6d8
movq 0x118(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x76810(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1ab6d8
movq 0x118(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1ab6ac
movq 0x118(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1ab6d8
movq 0x290(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x280(%rsp), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq 0xd0220
jmp 0x1ab717
movq 0x118(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x767e4(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0x290(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x280(%rsp), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0x1ab719
jmp 0x1ab71b
jmp 0x1ab71d
movl 0x248(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x248(%rsp)
movq 0x250(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x250(%rsp)
jmp 0x1ab2ed
jmp 0x1ab8dc
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rdx
movl $0x28, %esi
callq *%rax
movq 0x290(%rsp), %rdi
movq 0x288(%rsp), %rsi
movq 0x280(%rsp), %rdx
callq 0x1b1ac0
movq 0x260(%rsp), %rax
movq %rax, 0x250(%rsp)
movq 0x250(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x1ab8da
movq 0x250(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rdx
movl $0x20, %esi
callq *%rax
movq 0x110(%rsp), %rax
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x270(%rsp)
je 0x1ab87e
movq 0x108(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7666a(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1ab87e
movq 0x108(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1ab852
movq 0x108(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1ab87e
movq 0x290(%rsp), %rdi
movq 0x108(%rsp), %rsi
movq 0x280(%rsp), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq 0xd0220
jmp 0x1ab8bd
movq 0x108(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7663e(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0x290(%rsp), %rdi
movq 0x108(%rsp), %rsi
movq 0x280(%rsp), %rdx
movq 0x270(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0x1ab8bf
jmp 0x1ab8c1
movq 0x250(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x250(%rsp)
jmp 0x1ab7a4
jmp 0x1ab8dc
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rdx
movl $0x29, %esi
callq *%rax
movq 0x258(%rsp), %rcx
movq 0x290(%rsp), %rax
movq %rcx, 0x4d8(%rax)
jmp 0x1ab9cc
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
movq 0x280(%rsp), %rcx
leaq 0x471e9(%rip), %rsi     # 0x1f2b37
movl $0x2, %edx
callq *%rax
movq 0x290(%rsp), %rdi
movq 0x288(%rsp), %rsi
movq 0x280(%rsp), %rdx
callq 0x1b1ac0
leaq 0x80(%rsp), %rdi
movq 0x288(%rsp), %rcx
movl $0x80, %esi
leaq 0x4714d(%rip), %rdx     # 0x1f2adb
movb $0x0, %al
callq 0x9210
movl %eax, 0x7c(%rsp)
movq 0x280(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0x290(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movslq 0x7c(%rsp), %rdx
movq 0x280(%rsp), %rcx
callq *%rax
jmp 0x1ab9ce
addq $0x298, %rsp            # imm = 0x298
retq
nopw %cs:(%rax,%rax)