// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/gc.c
// Function: janet_mark
void janet_mark(Janet x) {
    if (depth) {
        depth--;
        switch (janet_type(x)) {
            default:
                break;
            case JANET_STRING:
            case JANET_KEYWORD:
            case JANET_SYMBOL:
                janet_mark_string(janet_unwrap_string(x));
                break;
            case JANET_FUNCTION:
                janet_mark_function(janet_unwrap_function(x));
                break;
            case JANET_ARRAY:
                janet_mark_array(janet_unwrap_array(x));
                break;
            case JANET_TABLE:
                janet_mark_table(janet_unwrap_table(x));
                break;
            case JANET_STRUCT:
                janet_mark_struct(janet_unwrap_struct(x));
                break;
            case JANET_TUPLE:
                janet_mark_tuple(janet_unwrap_tuple(x));
                break;
            case JANET_BUFFER:
                janet_mark_buffer(janet_unwrap_buffer(x));
                break;
            case JANET_FIBER:
                janet_mark_fiber(janet_unwrap_fiber(x));
                break;
            case JANET_ABSTRACT:
                janet_mark_abstract(janet_unwrap_abstract(x));
                break;
        }
        depth++;
    } else {
        janet_gcroot(x);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %fs:0x0, %rax
movl -0x358(%rax), %ecx
testl %ecx, %ecx
je 0x2b1cf
leaq -0x358(%rax), %r14
decl %ecx
movl %ecx, (%r14)
movq %rbx, %xmm0
movq %rbx, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
cmovpl %ecx, %eax
addl $-0x3, %eax
cmpl $0xb, %eax
ja 0x2b30f
leaq 0x33adb(%rip), %rcx     # 0x5ec90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x4f838
orb $0x1, -0x17(%rax)
jmp 0x2b30f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2b5e5
movq %rbx, %rdi
callq 0x4f838
orb $0x1, 0x1(%rax)
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rdi
callq 0x2b37e
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rdi
callq 0x2b55a
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rdi
callq 0x2b425
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movl (%rax), %ecx
btl $0x8, %ecx
jb 0x2b30f
movl %ecx, %edx
orl $0x100, %edx            # imm = 0x100
movl %edx, (%rax)
cmpb $0x3, %cl
jne 0x2b30f
movq 0x18(%rax), %rbx
testq %rbx, %rbx
je 0x2b30f
movslq 0x10(%rax), %rax
testq %rax, %rax
jle 0x2b30f
leaq (%rbx,%rax,8), %r15
movq (%rbx), %rdi
callq 0x2b15b
addq $0x8, %rbx
cmpq %r15, %rbx
jb 0x2b276
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rbx
movl -0x20(%rax), %eax
btl $0x8, %eax
jb 0x2b30f
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x20(%rbx)
testq %rbx, %rbx
je 0x2b30f
movslq -0x10(%rbx), %rax
testq %rax, %rax
jle 0x2b30f
leaq (%rbx,%rax,8), %r15
movq (%rbx), %rdi
callq 0x2b15b
addq $0x8, %rbx
cmpq %r15, %rbx
jb 0x2b2ba
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rbx
movl -0x28(%rbx), %eax
btl $0x8, %eax
jb 0x2b30f
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x28(%rbx)
movl -0x10(%rbx), %esi
movq %rbx, %rdi
callq 0x2c215
movq -0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2b2d8
jmp 0x2b30f
movq %rbx, %rdi
callq 0x4f838
movq %rax, %rdi
callq 0x2b31d
incl (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq