// File: /workspace/github_c_makefile_star2_O3/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 0x2ad1b
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 0x2ae53
leaq 0x32f8f(%rip), %rcx     # 0x5dc90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x4ebc4
orb $0x1, -0x17(%rax)
jmp 0x2ae53
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2b13a
movq %rbx, %rdi
callq 0x4ebc4
orb $0x1, 0x1(%rax)
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rdi
callq 0x2aec2
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rdi
callq 0x2b0af
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rdi
callq 0x2af69
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movl (%rax), %ecx
btl $0x8, %ecx
jb 0x2ae53
movl %ecx, %edx
orl $0x100, %edx            # imm = 0x100
movl %edx, (%rax)
cmpb $0x3, %cl
jne 0x2ae53
movq 0x18(%rax), %rbx
testq %rbx, %rbx
je 0x2ae53
movslq 0x10(%rax), %rax
testq %rax, %rax
jle 0x2ae53
leaq (%rbx,%rax,8), %r15
movq (%rbx), %rdi
callq 0x2aca7
addq $0x8, %rbx
cmpq %r15, %rbx
jb 0x2adc2
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rbx
movl -0x20(%rax), %eax
btl $0x8, %eax
jb 0x2ae53
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x20(%rbx)
movslq -0x10(%rbx), %rax
testq %rax, %rax
jle 0x2ae53
leaq (%rbx,%rax,8), %r15
movq (%rbx), %rdi
callq 0x2aca7
addq $0x8, %rbx
cmpq %r15, %rbx
jb 0x2adfe
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rbx
movl -0x28(%rbx), %eax
btl $0x8, %eax
jb 0x2ae53
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x28(%rbx)
movl -0x10(%rbx), %esi
movq %rbx, %rdi
callq 0x2bd5b
movq -0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2ae1c
jmp 0x2ae53
movq %rbx, %rdi
callq 0x4ebc4
movq %rax, %rdi
callq 0x2ae61
incl (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq