// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: mark_vector_possibly_shared
static void mark_vector_possibly_shared(s7_pointer p)
    {
        /* If a subvector (an inner dimension) of a vector is the only remaining reference
         *    to the main vector, we want to make sure the main vector is not GC'd until
         *    the subvector is also GC-able.  The subvector field either points to the
         *    parent vector, or it is sc->F, so we need to check for a vector parent if
         *    the current is multidimensional (this will include 1-dim slices).  We need
         *    to keep the parent case separate (i.e. sc->F means the current is the original)
         *    so that we only free once (or remove_from_heap once).
         *
         * If we have a subvector of a subvector, and the middle and original are not otherwise
         *   in use, we mark the middle one, but (since it itself is not in use anywhere else)
         *   we don't mark the original!  So we need to follow the share-vector chain marking every one.
         *
         * To remove a cell from the heap, we need its current heap location so that we can replace it.
         *   The heap is allocated as needed in monolithic blocks of (say) 1/2M s7_cells. When a cell
         *   is replaced, the new cell (at heap[x] say) is no longer from the original block. Since the
         *   GC clears all type bits when it frees a cell, we can't use a type bit to distinguish the
         *   replacements from the originals, but we need that info because in the base case, we use
         *   the distance of the cell from the base cell to get "x", its location.  In the replacement
         *   case, we add the location at the end of the s7_cell (s7_big_cell).  We track the current
         *   heap blocks via the sc->heap_blocks list.  To get the location of "p" above, we run through
         *   that list looking for a block it fits in.  If none is found, we assume it is an s7_big_cell
         *   and use the saved location.
         */
        if (is_subvector(p))
            mark_vector_possibly_shared(subvector_vector(p));

        /* mark_vector_1 does not check the marked bit, so if subvector below is in a cycle involving
         *   the calling vector, we get infinite recursion unless we check the mark bit here.
         */
        if (!is_marked(p))
            mark_vector_1(p, vector_length(p));
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
andq $0x20000000, %rax       # imm = 0x20000000
cmpq $0x0, %rax
je 0x16d471
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x16d455
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x16d467
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x16d410
movq 0x10(%rsp), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx), %rax
cmpq $0x0, %rax
jne 0x16d49c
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x626b0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)