// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/ev.c
// Function: janet_ev_default_threaded_callback
void janet_ev_default_threaded_callback(JanetEVGenericMessage return_value) {
    if (return_value.fiber == NULL) {
        return;
    }
    if (janet_fiber_can_resume(return_value.fiber)) {
        switch (return_value.tag) {
            default:
            case JANET_EV_TCTAG_NIL:
                janet_schedule(return_value.fiber, janet_wrap_nil());
                break;
            case JANET_EV_TCTAG_INTEGER:
                janet_schedule(return_value.fiber, janet_wrap_integer(return_value.argi));
                break;
            case JANET_EV_TCTAG_STRING:
            case JANET_EV_TCTAG_STRINGF:
                janet_schedule(return_value.fiber, janet_cstringv((const char *) return_value.argp));
                if (return_value.tag == JANET_EV_TCTAG_STRINGF) janet_free(return_value.argp);
                break;
            case JANET_EV_TCTAG_KEYWORD:
                janet_schedule(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
                break;
            case JANET_EV_TCTAG_ERR_STRING:
            case JANET_EV_TCTAG_ERR_STRINGF:
                janet_cancel(return_value.fiber, janet_cstringv((const char *) return_value.argp));
                if (return_value.tag == JANET_EV_TCTAG_STRINGF) janet_free(return_value.argp);
                break;
            case JANET_EV_TCTAG_ERR_KEYWORD:
                janet_cancel(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
                break;
            case JANET_EV_TCTAG_BOOLEAN:
                janet_schedule(return_value.fiber, janet_wrap_boolean(return_value.argi));
                break;
        }
    }
    janet_gcunroot(janet_wrap_fiber(return_value.fiber));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rbp), %rbx
testq %rbx, %rbx
je 0x25338
movq %rbx, %rdi
callq 0x2a1ca
testl %eax, %eax
je 0x253db
leaq 0x10(%rbp), %rax
movl (%rax), %r15d
leal -0x1(%r15), %ecx
cmpl $0x7, %ecx
ja 0x253bd
leaq 0x33cd5(%rip), %rdx     # 0x58fc0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x4482c
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2283b
cmpl $0x3, %r15d
jne 0x253db
movq %r14, %rdi
callq 0x120b0
jmp 0x253db
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rax), %rdi
callq 0x4482c
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
jmp 0x253a8
cvtsi2sdl 0x4(%rax), %xmm0
callq 0x4ee44
jmp 0x253cc
cmpl $0x1, 0x4(%rax)
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
sbbq $-0x1, %rdi
jmp 0x253c7
movq 0x8(%rax), %rdi
callq 0x47261
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4ed39
jmp 0x253cc
movq 0x8(%rax), %rdi
callq 0x47261
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
jmp 0x253d4
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4ece6
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2283b
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
movq %rbx, %rdi
callq 0x4ed7e
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2b88a