// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: janet_ev_mark
void janet_ev_mark(void) {

    /* Pending tasks */
    JanetTask *tasks = janet_vm.spawn.data;
    if (janet_vm.spawn.head <= janet_vm.spawn.tail) {
        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.tail; i++) {
            janet_mark(janet_wrap_fiber(tasks[i].fiber));
            janet_mark(tasks[i].value);
        }
    } else {
        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.capacity; i++) {
            janet_mark(janet_wrap_fiber(tasks[i].fiber));
            janet_mark(tasks[i].value);
        }
        for (int32_t i = 0; i < janet_vm.spawn.tail; i++) {
            janet_mark(janet_wrap_fiber(tasks[i].fiber));
            janet_mark(tasks[i].value);
        }
    }

    /* Pending timeouts */
    for (size_t i = 0; i < janet_vm.tq_count; i++) {
        janet_mark(janet_wrap_fiber(janet_vm.tq[i].fiber));
        if (janet_vm.tq[i].curr_fiber != NULL) {
            janet_mark(janet_wrap_fiber(janet_vm.tq[i].curr_fiber));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x240(%rax), %rax
movq %rax, -0x8(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl 0x234(%rax), %eax
movl %eax, -0x54(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movl -0x54(%rbp), %eax
cmpl 0x238(%rcx), %eax
jg 0x2b281
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl 0x234(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x58(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movl -0x58(%rbp), %eax
cmpl 0x238(%rcx), %eax
jge 0x2b27c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38b90
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x38b90
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b207
jmp 0x2b38d
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl 0x234(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movl -0x5c(%rbp), %eax
cmpl 0x230(%rcx), %eax
jge 0x2b30f
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x38b90
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x38b90
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2b29a
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x60(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movl -0x60(%rbp), %eax
cmpl 0x238(%rcx), %eax
jge 0x2b38b
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38b90
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x38b90
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2b316
jmp 0x2b38d
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq 0x220(%rcx), %rax
jae 0x2b478
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x38b90
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x2b465
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x7b610
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x38b90
jmp 0x2b467
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2b395
addq $0x70, %rsp
popq %rbp
retq
nop