// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: object_to_port_with_circle_check_1
static void object_to_port_with_circle_check_1(s7_scheme *sc, s7_pointer vr, s7_pointer port, use_write_t use_write, shared_info *ci)
    {
        int32_t ref;

#if CYCLE_DEBUGGING
        char x;
        if (!base) base = &x;
        else
        {
            if (&x > base) base = &x;
            else
            {
                if ((!min_char) || (&x < min_char))
                {
                    min_char = &x;
                    if ((base - min_char) > 1000000)
                    {
                        fprintf(stderr, "infinite recursion?\n");
                        if (port_data(port))
                        {
                            fprintf(stderr, "   port contents (%ld bytes): \n", port_position(port));
                            if (port_position(port) > 10000)
                                port_data(port)[10000] = '\0';
                            else port_data(port)[port_position(port)] = '\0';
                            fprintf(stderr, "%s\n", port_data(port));
                        }
                        abort();
                    }
                }
            }
        }
#endif

        ref = (is_collected(vr)) ? shared_ref(ci, vr) : 0;
        if (ref != 0)
        {
            char buf[32];
            int32_t nlen;
            char *p;
            s7_int len;

            if (ref > 0)
            {
                if (use_write == P_READABLE)
                {
                    if (ci->defined[ref])
                    {
                        flip_ref(ci, vr);
                        nlen = catstrs_direct(buf, "<", pos_int_to_str_direct(sc, ref), ">", NULL);
                        port_write_string(port)(sc, buf, nlen, port);
                        return;
                    }
                    object_to_port(sc, vr, port, P_READABLE, ci);
                }
                else
                {
                    /* "normal" printout involving #n= and #n# */
                    p = pos_int_to_str(sc, (s7_int)ref, &len, '=');
                    *--p = '#';
                    port_write_string(port)(sc, p, len, port);
                    object_to_port(sc, vr, port, NOT_P_DISPLAY(use_write), ci);
                }
            }
            else
            {
                if (use_write == P_READABLE)
                {
                    nlen = catstrs_direct(buf, "<", pos_int_to_str_direct(sc, -ref), ">", NULL);
                    port_write_string(port)(sc, buf, nlen, port);
                }
                else
                {
                    p = pos_int_to_str(sc, (s7_int)(-ref), &len, '#');
                    *--p = '#';
                    port_write_string(port)(sc, p, len, port);
                }
            }
        }
        else object_to_port(sc, vr, port, use_write, ci);
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq %r8, 0x90(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
andq $0x20000, %rax          # imm = 0x20000
cmpq $0x0, %rax
je 0xd0280
movq 0x90(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0xd12e0
movl %eax, 0x44(%rsp)
jmp 0xd0288
xorl %eax, %eax
movl %eax, 0x44(%rsp)
jmp 0xd0288
movl 0x44(%rsp), %eax
movl %eax, 0x8c(%rsp)
cmpl $0x0, 0x8c(%rsp)
je 0xd0598
cmpl $0x0, 0x8c(%rsp)
jle 0xd04a2
cmpl $0x2, 0x9c(%rsp)
jne 0xd03ae
movq 0x90(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x8c(%rsp), %rcx
testb $0x1, (%rax,%rcx)
je 0xd036a
movq 0x90(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0xd1390
leaq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb0(%rsp), %rdi
movslq 0x8c(%rsp), %rsi
callq 0xae30
movq 0x38(%rsp), %rdi
movq %rax, %rdx
leaq 0x122473(%rip), %rsi    # 0x1f2791
leaq 0x122742(%rip), %rcx    # 0x1f2a67
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0x5c(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xb0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movslq 0x5c(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq *%rax
jmp 0xd05d9
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x151b52(%rip), %rax    # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x90(%rsp), %r8
movl $0x2, %ecx
callq *%rax
jmp 0xd049d
movq 0xb0(%rsp), %rdi
movslq 0x8c(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movl $0x3d, %ecx
callq 0xd1410
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x50(%rsp)
movb $0x23, -0x1(%rax)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xb0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq *%rax
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x151aa5(%rip), %rax    # 0x221ed0
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl $0x0, 0x9c(%rsp)
jne 0xd0470
movl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xd047b
movl 0x9c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %ecx
movq 0x90(%rsp), %r8
callq *%rax
jmp 0xd0596
cmpl $0x2, 0x9c(%rsp)
jne 0xd0527
leaq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
xorl %eax, %eax
subl 0x8c(%rsp), %eax
movslq %eax, %rsi
callq 0xae30
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x1222b3(%rip), %rsi    # 0x1f2791
leaq 0x122582(%rip), %rcx    # 0x1f2a67
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x10540
movl %eax, 0x5c(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xb0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movslq 0x5c(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq *%rax
jmp 0xd0594
movq 0xb0(%rsp), %rdi
xorl %eax, %eax
subl 0x8c(%rsp), %eax
movslq %eax, %rsi
leaq 0x48(%rsp), %rdx
movl $0x23, %ecx
callq 0xd1410
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x50(%rsp)
movb $0x23, -0x1(%rax)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq 0xb0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq *%rax
jmp 0xd0596
jmp 0xd05d9
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x151924(%rip), %rax    # 0x221ed0
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movl 0x9c(%rsp), %ecx
movq 0x90(%rsp), %r8
callq *%rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)