// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: cyclic_out
static s7_pointer cyclic_out(s7_scheme *sc, s7_pointer obj, s7_pointer port, shared_info *ci)
    {
        int32_t i, ref, len;
        char buf[128];

        ci->cycle_port = s7_open_output_string(sc);
        ci->cycle_loc = s7_gc_protect_1(sc, ci->cycle_port);

        port_write_string(port)(sc, "(let (", 6, port);
        for (i = 0; i < ci->top; i++)
        {
            ref = peek_shared_ref(ci, ci->objs[i]); /* refs may be in any order */
            if (ref < 0) {ref = -ref; flip_ref(ci, ci->objs[i]);}
            len = catstrs_direct(buf, (i == 0) ? "(<" : "\n      (<", pos_int_to_str_direct(sc, ref), "> ", NULL);
            port_write_string(port)(sc, buf, len, port);
            ci->defined[ref] = false;
            object_to_port_with_circle_check(sc, ci->objs[i], port, P_READABLE, ci);
            port_write_character(port)(sc, ')', port);
            ci->defined[ref] = true;
            if (peek_shared_ref(ci, ci->objs[i]) > 0) flip_ref(ci, ci->objs[i]); /* ref < 0 -> use <%d> in object_to_port */
        }
        port_write_string(port)(sc, ")\n", 2, port);

        if (ci->init_port != sc->F)
        {
            port_write_string(port)(sc, (const char *)(port_data(ci->init_port)), port_position(ci->init_port), port);
            s7_close_output_port(sc, ci->init_port);
            s7_gc_unprotect_at(sc, ci->init_loc);
            ci->init_port = sc->F;
        }

        if (port_position(ci->cycle_port) > 0)     /* 0 if e.g. (object->string (object->let (rootlet)) :readable) */
            port_write_string(port)(sc, (const char *)(port_data(ci->cycle_port)), port_position(ci->cycle_port), port);
        s7_close_output_port(sc, ci->cycle_port);
        s7_gc_unprotect_at(sc, ci->cycle_loc);
        ci->cycle_port = sc->F;

        if ((is_immutable(obj)) && (!is_let(obj)))
            port_write_string(port)(sc, "  (immutable! ", 14, port);
        else port_write_string(port)(sc, "  ", 2, port);

        ref = peek_shared_ref(ci, obj);
        if (ref == 0)
            object_to_port_with_circle_check(sc, obj, port, P_READABLE, ci);
        else
        {
            len = catstrs_direct(buf, "<", pos_int_to_str_direct(sc, (ref < 0) ? -ref : ref), ">", NULL);
            port_write_string(port)(sc, buf, len, port);
        }

        if ((is_immutable(obj)) && (!is_let(obj)))
            port_write_string(port)(sc, "))\n", 3, port);
        else port_write_string(port)(sc, ")\n", 2, port);

        return(obj);
    }

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x15890
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9cb0
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x11da08(%rip), %rsi    # 0x1ee5ee
movl $0x6, %edx
callq *%rax
movl $0x0, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
movq 0xd8(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jge 0xd0e95
movq 0xd8(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movslq 0xd4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xd2740
movl %eax, 0xd0(%rsp)
cmpl $0x0, 0xd0(%rsp)
jge 0xd0c79
xorl %eax, %eax
subl 0xd0(%rsp), %eax
movl %eax, 0xd0(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movslq 0xd4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xd1390
leaq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0xd4(%rsp), %edx
leaq 0x11d964(%rip), %rax    # 0x1ee5f5
leaq 0x11d964(%rip), %rcx    # 0x1ee5fc
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0xf0(%rsp), %rdi
movslq 0xd0(%rsp), %rsi
callq 0xae30
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
leaq 0x11d932(%rip), %rcx    # 0x1ee5ff
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0xcc(%rsp)
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movslq 0xcc(%rsp), %rdx
movq 0xe0(%rsp), %rcx
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0xd0(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movslq 0xd4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0xd0db2
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x15112d(%rip), %rax    # 0x221e90
testb $0x1, (%rax,%rcx)
je 0xd0db2
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0xd0d89
movq 0x38(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0xd0db2
movq 0xf0(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xd8(%rsp), %r8
movl $0x2, %ecx
callq 0xd0220
jmp 0xd0deb
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x15110d(%rip), %rax    # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xf0(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xd8(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0xd0ded
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rdx
movl $0x29, %esi
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0xd0(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq 0xd8(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movslq 0xd4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xd2740
cmpl $0x0, %eax
jle 0xd0e7d
movq 0xd8(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movslq 0xd4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xd1390
jmp 0xd0e7f
movl 0xd4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd4(%rsp)
jmp 0xd0bf8
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x12163f(%rip), %rsi    # 0x1f24ff
movl $0x2, %edx
callq *%rax
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0xf0(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0xd0f7b
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x10(%rcx), %rsi
movq 0xd8(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x20(%rcx), %rdx
movq 0xe0(%rsp), %rcx
callq *%rax
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0x14f80
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x9f60
movq 0xf0(%rsp), %rax
movq 0x120(%rax), %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x20(%rax)
jle 0xd0fd4
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movq 0x10(%rcx), %rsi
movq 0xd8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movq 0x20(%rcx), %rdx
movq 0xe0(%rsp), %rcx
callq *%rax
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x14f80
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x9f60
movq 0xf0(%rsp), %rax
movq 0x120(%rax), %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0xe8(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0xd107c
movq 0xe8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1c, %eax
je 0xd107c
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x11d58f(%rip), %rsi    # 0x1ee602
movl $0xe, %edx
callq *%rax
jmp 0xd10ae
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x11dfb7(%rip), %rsi    # 0x1ef05e
movl $0x2, %edx
callq *%rax
movq 0xd8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xd2740
movl %eax, 0xd0(%rsp)
cmpl $0x0, 0xd0(%rsp)
jne 0xd1192
jmp 0xd10da
movq 0xe8(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0xd1152
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x150d8d(%rip), %rax    # 0x221e90
testb $0x1, (%rax,%rcx)
je 0xd1152
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x15, %eax
jne 0xd1129
movq 0x30(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0xd1152
movq 0xf0(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xd8(%rsp), %r8
movl $0x2, %ecx
callq 0xd0220
jmp 0xd118b
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x150d6d(%rip), %rax    # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xf0(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xd8(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0xd118d
jmp 0xd123a
leaq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0xd0(%rsp)
jge 0xd11c2
xorl %eax, %eax
subl 0xd0(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xd11cd
movl 0xd0(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %eax
movslq %eax, %rsi
callq 0xae30
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x1215a4(%rip), %rsi    # 0x1f2791
leaq 0x121873(%rip), %rcx    # 0x1f2a67
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0xcc(%rsp)
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movslq 0xcc(%rsp), %rdx
movq 0xe0(%rsp), %rcx
callq *%rax
movq 0xe8(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0xd1295
movq 0xe8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1c, %eax
je 0xd1295
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x121272(%rip), %rsi    # 0x1f24fe
movl $0x3, %edx
callq *%rax
jmp 0xd12c7
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rcx
leaq 0x12123f(%rip), %rsi    # 0x1f24ff
movl $0x2, %edx
callq *%rax
movq 0xe8(%rsp), %rax
addq $0xf8, %rsp
retq
nopw (%rax,%rax)