// File: davmac314[P]dinit/src/../dasynq/include/dasynq/daryheap.h
// Function: dasynq::dary_heap<dasynq::v2::dprivate::empty_node, dasynq::stable_prio<int>, dasynq::compare_stable_prio<int, std::less<int>>, 4>::bubble_up(unsigned long, dasynq::dary_heap<dasynq::v2::dprivate::empty_node, dasynq::stable_prio<int>, dasynq::compare_stable_prio<int, std::less<int>>, 4>::handle_t&, dasynq::stable_prio<int> const&)
void bubble_up(hindex_t pos, handle_t &h, const P &p) noexcept
    {
        hindex_t rmax = hvec.size() - 1;
        if (rmax == 0) {
            return;
        }

        Compare lt;
        hindex_t max = (rmax - 1) / N;

        while (pos <= max) {
            // Find (select) the smallest child node
            hindex_t lchild = pos * N + 1;
            hindex_t selchild = lchild;
            hindex_t rchild = std::min(lchild + N, rmax);
            for (hindex_t i = lchild + 1; i < rchild; i++) {
                if (lt(hvec[i].prio, hvec[selchild].prio)) {
                    selchild = i;
                }
            }

            if (! lt(hvec[selchild].prio, p)) {
                break;
            }

            hvec[pos] = std::move(hvec[selchild]);
            hvec[pos].hnd->heap_index = pos;
            pos = selchild;
        }

        hvec[pos].hnd = &h;
        hvec[pos].prio = std::move(p);
        h.heap_index = pos;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x6d30
subq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x7eec
jmp 0x80b5
movq -0x28(%rbp), %rax
subq $0x1, %rax
shrq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x805a
movq -0x10(%rbp), %rax
leaq 0x1(,%rax,4), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x8110
movq %rax, -0x70(%rbp)
jmp 0x7f41
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x7fb6
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x7120
movq -0x68(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rsi
callq 0x7120
movq -0x80(%rbp), %rsi
movq %rax, %rdx
leaq -0x29(%rbp), %rdi
callq 0x70a0
movb %al, -0x71(%rbp)
jmp 0x7f95
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x7f9e
jmp 0x7fa6
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7fa8
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x7f58
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x7120
movq %rax, %rsi
movq -0x20(%rbp), %rdx
leaq -0x29(%rbp), %rdi
callq 0x70a0
movb %al, -0x81(%rbp)
jmp 0x7fdb
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x7fe9
jmp 0x7fe7
jmp 0x805a
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x7120
movq -0x68(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7120
movq -0x98(%rbp), %rcx
movq -0x68(%rbp), %rdi
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7120
movq -0x90(%rbp), %rcx
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x7efc
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7120
movq -0xa8(%rbp), %rcx
movq -0x68(%rbp), %rdi
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7120
movq -0xa0(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nopw %cs:(%rax,%rax)