// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::merge(dasynq::btree_set<void*, int, std::less<int>, 8>::septnode*, dasynq::btree_set<void*, int, std::less<int>, 8>::septnode*, int)
void merge(septnode *lsibling, septnode *rsibling, int index) noexcept
    {
        int lchildren = lsibling->num_vals();
        lsibling->hn_p[lchildren] = lsibling->parent->hn_p[index];
        lsibling->prio[lchildren] = lsibling->parent->prio[index];
        lsibling->hn_p[lchildren]->parent = lsibling;
        lchildren++;

        // bool leaf = lsibling->is_leaf();

        int ri = 0;
        for (ri = 0; rsibling->hn_p[ri] != nullptr; ri++) {
            lsibling->hn_p[lchildren] = rsibling->hn_p[ri];
            lsibling->prio[lchildren] = rsibling->prio[ri];
            lsibling->children[lchildren] = rsibling->children[ri];
            if (lsibling->children[lchildren]) lsibling->children[lchildren]->parent = lsibling;
            lsibling->hn_p[lchildren]->parent = lsibling;
            lchildren++;
        }
        lsibling->children[lchildren] = rsibling->children[ri];
        if (lsibling->children[lchildren]) lsibling->children[lchildren]->parent = lsibling;
        release_sept(rsibling);

        // Now delete in the parent:
        for (int i = index; i < (N-1); i++) {
            lsibling->parent->hn_p[i] = lsibling->parent->hn_p[i + 1];
            lsibling->parent->prio[i] = lsibling->parent->prio[i + 1];
            lsibling->parent->children[i + 1] = lsibling->parent->children[i + 2];
        }
        lsibling->parent->hn_p[N-1] = nullptr;

        if (lsibling->parent->hn_p[0] == nullptr) {
            // parent is now empty; it must be root. Make us the new root.
            release_sept(lsibling->parent);
            root_sept = lsibling;
            lsibling->parent = nullptr;
        }
    }

// Assembly:
movl $0x8, %r8d
leal -0x1(%r8), %eax
cmpq $0x0, 0x20(%rsi,%rax,8)
jne 0x5e92
decl %r8d
jne 0x5e7e
xorl %r8d, %r8d
pushq %rbx
movq 0xa8(%rsi), %r9
movslq %ecx, %rax
movq 0x20(%r9,%rax,8), %r9
movslq %r8d, %r10
movq %r9, 0x20(%rsi,%r10,8)
movq 0xa8(%rsi), %r11
movl (%r11,%rax,4), %r11d
movl %r11d, (%rsi,%r10,4)
movq %rsi, 0x8(%r9)
movq 0x20(%rdx), %rbx
testq %rbx, %rbx
je 0x5f1c
movl %r8d, %r9d
leaq 0x1(%r9), %r8
leaq (%rsi,%r9,8), %r10
addq $0x28, %r10
leaq (%rsi,%r9,4), %r11
addq $0x4, %r11
xorl %r9d, %r9d
movq %rbx, (%r10,%r9,8)
movl (%rdx,%r9,4), %ebx
movl %ebx, (%r11,%r9,4)
movq 0x60(%rdx,%r9,8), %rbx
movq %rbx, 0x40(%r10,%r9,8)
testq %rbx, %rbx
je 0x5f02
movq %rsi, 0xa8(%rbx)
movq (%r10,%r9,8), %rbx
movq %rsi, 0x8(%rbx)
movq 0x28(%rdx,%r9,8), %rbx
incq %r9
testq %rbx, %rbx
jne 0x5ee0
addl %r9d, %r8d
jmp 0x5f22
incl %r8d
xorl %r9d, %r9d
movq 0x60(%rdx,%r9,8), %r9
movslq %r8d, %r8
movq %r9, 0x60(%rsi,%r8,8)
testq %r9, %r9
je 0x5f3b
movq %rsi, 0xa8(%r9)
movq 0x10(%rdi), %r8
movq %r8, 0xa8(%rdx)
movq %rdx, 0x10(%rdi)
cmpl $0x6, %ecx
jg 0x5f85
addq $0xe, %rax
movq 0xa8(%rsi), %rcx
movq -0x48(%rcx,%rax,8), %rdx
movq %rdx, -0x50(%rcx,%rax,8)
movq 0xa8(%rsi), %rcx
movl -0x34(%rcx,%rax,4), %edx
movl %edx, -0x38(%rcx,%rax,4)
movq (%rcx,%rax,8), %rdx
movq %rdx, -0x8(%rcx,%rax,8)
incq %rax
cmpq $0x15, %rax
jne 0x5f53
movq 0xa8(%rsi), %rax
movq $0x0, 0x58(%rax)
movq 0xa8(%rsi), %rax
cmpq $0x0, 0x20(%rax)
jne 0x5fbf
movq 0x10(%rdi), %rcx
movq %rcx, 0xa8(%rax)
movq %rax, 0x10(%rdi)
movq %rsi, (%rdi)
movq $0x0, 0xa8(%rsi)
popq %rbx
retq
nop