// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/ev.c
// Function: pop_timeout
static void pop_timeout(size_t index) {
    if (janet_vm.tq_count <= index) return;
    janet_vm.tq[index] = janet_vm.tq[--janet_vm.tq_count];
    for (;;) {
        size_t left = (index << 1) + 1;
        size_t right = left + 1;
        size_t smallest = index;
        if (left < janet_vm.tq_count &&
                (janet_vm.tq[left].when < janet_vm.tq[smallest].when))
            smallest = left;
        if (right < janet_vm.tq_count &&
                (janet_vm.tq[right].when < janet_vm.tq[smallest].when))
            smallest = right;
        if (smallest == index) return;
        JanetTimeout temp = janet_vm.tq[index];
        janet_vm.tq[index] = janet_vm.tq[smallest];
        janet_vm.tq[smallest] = temp;
        index = smallest;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x220(%rax), %rax
cmpq -0x8(%rbp), %rax
ja 0x2b881
jmp 0x2baee
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
movq %rax, -0x58(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq %rax, %rcx
movq 0x220(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x220(%rcx)
imulq $0x30, %rax, %rax
addq %rax, %rsi
movl $0x30, %edx
callq 0x12680
movq -0x8(%rbp), %rax
shlq %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%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 0x2b9a1
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x10(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq 0x248(%rcx), %rcx
imulq $0x30, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jge 0x2b9a1
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq 0x220(%rcx), %rax
jae 0x2ba22
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq 0x248(%rcx), %rcx
imulq $0x30, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jge 0x2ba22
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x2ba31
jmp 0x2baee
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rsi
imulq $0x30, -0x8(%rbp), %rax
addq %rax, %rsi
leaq -0x50(%rbp), %rdi
movl $0x30, %edx
callq 0x12680
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rax
imulq $0x30, -0x8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x88(%rbp), %rdi
movq 0x248(%rax), %rsi
imulq $0x30, -0x20(%rbp), %rax
addq %rax, %rsi
movl $0x30, %edx
callq 0x12680
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x248(%rax), %rdi
imulq $0x30, -0x20(%rbp), %rax
addq %rax, %rdi
leaq -0x50(%rbp), %rsi
movl $0x30, %edx
callq 0x12680
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2b8fd
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)