// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: c_pointer_to_port
static void c_pointer_to_port(s7_scheme *sc, s7_pointer obj, s7_pointer port, use_write_t use_write, shared_info *ci)
    {
        int32_t nlen;
        char buf[128];
        /* c-pointer is special because we can't set the type or info fields from scheme except via the c-pointer function */

        if (use_write == P_READABLE)
        {
            int32_t ref;
            if ((ci) &&
                    (is_cyclic(obj)) &&
                    ((ref = peek_shared_ref(ci, obj)) != 0))
            {
                port_write_string(port)(sc, "#f", 2, port);

                if (!is_cyclic_set(obj))
                {
                    if (ci->init_port == sc->F)
                    {
                        ci->init_port = s7_open_output_string(sc);
                        ci->init_loc = s7_gc_protect_1(sc, ci->init_port);
                    }
                    nlen = snprintf(buf, 128, "  (set! <%d> (c-pointer %" print_pointer, -ref, (intptr_t)c_pointer(obj));
                    port_write_string(ci->init_port)(sc, buf, nlen, ci->init_port);

                    if ((c_pointer_type(obj) != sc->F) ||
                            (c_pointer_info(obj) != sc->F))
                    {
                        flip_ref(ci, c_pointer_type(obj));

                        port_write_character(ci->init_port)(sc, ' ', ci->init_port);
                        object_to_port_with_circle_check(sc, c_pointer_type(obj), ci->init_port, use_write, ci);

                        flip_ref(ci, c_pointer_type(obj));
                        flip_ref(ci, c_pointer_info(obj));

                        port_write_character(ci->init_port)(sc, ' ', ci->init_port);
                        object_to_port_with_circle_check(sc, c_pointer_info(obj), ci->init_port, use_write, ci);

                        flip_ref(ci, c_pointer_info(obj));
                    }
                    port_write_string(ci->init_port)(sc, "))\n", 3, ci->init_port);
                    set_cyclic_set(obj);
                }
            }
            else
            {
                nlen = snprintf(buf, 128, "(c-pointer %" print_pointer, (intptr_t)c_pointer(obj));
                port_write_string(port)(sc, buf, nlen, port);
                if ((c_pointer_type(obj) != sc->F) ||
                        (c_pointer_info(obj) != sc->F))
                {
                    port_write_character(port)(sc, ' ', port);
                    object_to_port_with_circle_check(sc, c_pointer_type(obj), port, use_write, ci);
                    port_write_character(port)(sc, ' ', port);
                    object_to_port_with_circle_check(sc, c_pointer_info(obj), port, use_write, ci);
                }
                port_write_character(port)(sc, ')', port);
            }
        }
        else
        {
            if (is_symbol(c_pointer_type(obj)))
                nlen = snprintf(buf, 128, "#<%s %p>", symbol_name(c_pointer_type(obj)), c_pointer(obj));
            else nlen = snprintf(buf, 128, "#<c_pointer %p>", c_pointer(obj));
            port_write_string(port)(sc, buf, nlen, port);
        }
    }

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movl %ecx, 0xcc(%rsp)
movq %r8, 0xc0(%rsp)
cmpl $0x2, 0xcc(%rsp)
jne 0x1aab96
cmpq $0x0, 0xc0(%rsp)
je 0x1aa8fc
movq 0xd8(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1aa8fc
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0xd2740
movl %eax, 0x2c(%rsp)
cmpl $0x0, %eax
je 0x1aa8fc
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %rcx
leaq 0x39260(%rip), %rsi     # 0x1e3790
movl $0x2, %edx
callq *%rax
movq 0xd8(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1aa8f7
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
jne 0x1aa5b0
movq 0xe0(%rsp), %rdi
callq 0x15890
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xe0(%rsp), %rdi
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0x9cb0
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x40(%rax)
leaq 0x30(%rsp), %rdi
xorl %ecx, %ecx
subl 0x2c(%rsp), %ecx
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %r8
movl $0x80, %esi
leaq 0x484d8(%rip), %rdx     # 0x1f2aab
movb $0x0, %al
callq 0x9210
movl %eax, 0xbc(%rsp)
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movslq 0xbc(%rsp), %rdx
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rcx
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
jne 0x1aa65a
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0x1aa8aa
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xd1390
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rdx
movl $0x20, %esi
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x1aa728
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x777bd(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1aa728
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1aa6f9
movq 0x20(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1aa728
movq 0xe0(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq 0xd0220
jmp 0x1aa767
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x77797(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xe0(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq *%rax
jmp 0x1aa769
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xd1390
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xd1390
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rdx
movl $0x20, %esi
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x1aa850
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x77695(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1aa850
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1aa821
movq 0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1aa850
movq 0xe0(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq 0xd0220
jmp 0x1aa88f
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7766f(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xe0(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq *%rax
jmp 0x1aa891
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xd1390
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xc0(%rsp), %rcx
movq 0x30(%rcx), %rcx
leaq 0x47c21(%rip), %rsi     # 0x1f24fe
movl $0x3, %edx
callq *%rax
movq 0xd8(%rsp), %rax
movzwl 0x6(%rax), %ecx
orl $0x40, %ecx
movw %cx, 0x6(%rax)
jmp 0x1aab91
leaq 0x30(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x80, %esi
leaq 0x4819f(%rip), %rdx     # 0x1f2ab8
movb $0x0, %al
callq 0x9210
movl %eax, 0xbc(%rsp)
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movslq 0xbc(%rsp), %rdx
movq 0xd0(%rsp), %rcx
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
jne 0x1aa998
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0x1aab66
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %rdx
movl $0x20, %esi
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x1aaa41
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x774a0(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1aaa41
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1aaa16
movq 0x10(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1aaa41
movq 0xe0(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq 0xd0220
jmp 0x1aaa7c
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x7747e(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xe0(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq *%rax
jmp 0x1aaa7e
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %rdx
movl $0x20, %esi
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x1aab27
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x773ba(%rip), %rax     # 0x221e90
testb $0x1, (%rax,%rcx)
je 0x1aab27
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0x1aaafc
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x1aab27
movq 0xe0(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq 0xd0220
jmp 0x1aab62
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x77398(%rip), %rax     # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xe0(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl 0xcc(%rsp), %ecx
movq 0xc0(%rsp), %r8
callq *%rax
jmp 0x1aab64
jmp 0x1aab66
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %rdx
movl $0x29, %esi
callq *%rax
jmp 0x1aac49
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x1aabeb
leaq 0x30(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %r8
movl $0x80, %esi
leaq 0x47eec(%rip), %rdx     # 0x1f2ac7
movb $0x0, %al
callq 0x9210
movl %eax, 0xbc(%rsp)
jmp 0x1aac16
leaq 0x30(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x80, %esi
leaq 0x47ec8(%rip), %rdx     # 0x1f2ad0
movb $0x0, %al
callq 0x9210
movl %eax, 0xbc(%rsp)
movq 0xd0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movslq 0xbc(%rsp), %rdx
movq 0xd0(%rsp), %rcx
callq *%rax
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)