// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark_fiber
static void janet_mark_fiber(JanetFiber *fiber) {
    int32_t i, j;
    JanetStackFrame *frame;
recur:
    if (janet_gc_reachable(fiber))
        return;
    janet_gc_mark(fiber);

    janet_mark(fiber->last_value);

    /* Mark values on the argument stack */
    janet_mark_many(fiber->data + fiber->stackstart,
                    fiber->stacktop - fiber->stackstart);

    i = fiber->frame;
    j = fiber->stackstart - JANET_FRAME_SIZE;
    while (i > 0) {
        frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
        if (NULL != frame->func)
            janet_mark_function(frame->func);
        if (NULL != frame->env)
            janet_mark_funcenv(frame->env);
        /* Mark all values in the stack frame */
        janet_mark_many(fiber->data + i, j - i);
        j = i - JANET_FRAME_SIZE;
        i = frame->prevframe;
    }

    if (fiber->env)
        janet_mark_table(fiber->env);

#ifdef JANET_EV
    if (fiber->supervisor_channel) {
        janet_mark_abstract(fiber->supervisor_channel);
    }
    if (fiber->ev_stream) {
        janet_mark_abstract(fiber->ev_stream);
    }
    if (fiber->ev_callback) {
        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_MARK);
    }
#endif

    /* Explicit tail recursion */
    if (fiber->child) {
        fiber = fiber->child;
        goto recur;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x38fc1
jmp 0x3912a
movq -0x8(%rbp), %rax
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x38b90
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x18(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x8(%rbp), %rax
subl 0x18(%rax), %esi
callq 0x3ae50
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
subl $0x4, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x390a8
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $-0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x39059
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x38d20
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rcx), %rax
je 0x39072
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3afb0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movl -0x10(%rbp), %esi
subl -0xc(%rbp), %esi
callq 0x3ae50
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0x3901d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x390c0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x38e10
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x390d8
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x39130
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x390f0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x39130
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x3910e
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x3912a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x38fac
addq $0x20, %rsp
popq %rbp
retq