LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/daryheap.h
// Function: void dasynq::dary_heap<dasynq::timer_data, dasynq::time_val, dasynq::compare_timespec, 4>::allocate<void*&>(dasynq::dary_heap<dasynq::timer_data, dasynq::time_val, dasynq::compare_timespec, 4>::handle_t&, void*&)
void allocate(handle_t & hnd, U&&... u)
    {
        // Note: this can be constexpr in C++20
        const hindex_t max_allowed = hvec.max_size();

        if (num_nodes == max_allowed) {
            throw std::bad_alloc();
        }

        num_nodes++;

        if (DASYNQ_EXPECT(hvec.capacity() < num_nodes, 0)) {
            hindex_t half_point = max_allowed / 2;
            try {
                if (DASYNQ_EXPECT(num_nodes < half_point, 1)) {
                    hvec.reserve(num_nodes * 2);
                }
                else {
                    hvec.reserve(max_allowed);
                }
            }
            catch (...) {
                // try with just the needed number of nodes:
                try {
                    hvec.reserve(num_nodes);
                }
                catch (...) {
                    num_nodes--;
                    throw;
                }
            }
        }

        new (& hnd.hd_u.hd) T(std::forward<U>(u)...);
        hnd.heap_index = -1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xdb50
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0xda43
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x48(%rbp)
callq 0x6fe0
movq -0x48(%rbp), %rdi
movq 0xc589(%rip), %rsi      # 0x19fc0
movq 0xc552(%rip), %rdx      # 0x19f90
callq 0x3400
movq -0x40(%rbp), %rdi
movq 0x18(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x18(%rdi)
callq 0xd7a0
movq -0x40(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xdb1a
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
shrq %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rax
cmpq -0x28(%rbp), %rax
jae 0xdab9
movq -0x40(%rbp), %rdi
movq 0x18(%rdi), %rsi
addq %rsi, %rsi
callq 0xdb70
jmp 0xda91
jmp 0xdaca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x30d0
movq -0x40(%rbp), %rdi
movq 0x18(%rdi), %rsi
callq 0xdb70
jmp 0xdab7
jmp 0xdb11
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xdb70
jmp 0xdac8
jmp 0xdaca
jmp 0xdb16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x30d0
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
decq %rcx
movq %rcx, 0x18(%rax)
callq 0x3390
jmp 0xdb4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x33e0
jmp 0xdb0a
callq 0x33e0
jmp 0xdb18
callq 0x33e0
jmp 0xdb1a
jmp 0xdb3c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xdbd0
movq -0x10(%rbp), %rax
movq $-0x1, 0x20(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x52b0
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::set_enabled(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, bool)
void set_enabled(event_loop_t &eloop, bool enable) noexcept
    {
        std::lock_guard<mutex_t> guard(eloop.get_base_lock());
        if (this->emulatefd) {
            if (enable && ! this->emulate_enabled) {
                loop_access::requeue_watcher(eloop, this);
            }
            this->emulate_enabled = enable;
        }
        else {
            eloop.set_fd_enabled_nolock(this, this->watch_fd, this->watch_flags, enable);
        }

        if (! enable) {
            eloop.dequeue_watcher(this);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x60e0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x73c0
jmp 0x7946
movq -0x28(%rbp), %rax
movb 0xc(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x79a3
testb $0x1, -0x11(%rbp)
je 0x7981
movq -0x28(%rbp), %rax
movb 0xc(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x7981
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x68e0
movq -0x28(%rbp), %rax
movb -0x11(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
movb %cl, %dl
movb 0xc(%rax), %cl
andb $0x1, %dl
shlb $0x3, %dl
andb $-0x9, %cl
orb %dl, %cl
movb %cl, 0xc(%rax)
jmp 0x79bf
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
movl 0x1c(%rsi), %edx
movl 0x20(%rsi), %ecx
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x66a0
testb $0x1, -0x11(%rbp)
jne 0x79d2
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x7ce0
leaq -0x20(%rbp), %rdi
callq 0x7580
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nopl (%rax)
// File: davmac314[P]dinit/src/includes/cpbuffer.h
// Function: cpbuffer<4096u>::append(char const*, unsigned int)
void append(const char * s, unsigned len) noexcept
    {
        unsigned index = cur_idx + length;
        if (index >= SIZE) index -= SIZE;

        length += len; // (before we destroy len)
        
        unsigned max = SIZE - index;
        std::memcpy(buf + index, s, std::min(max, len));
        if (len > max) {
            // Wrapped around buffer: copy the rest
            s += max;
            len -= max;
            std::memcpy(buf, s, len);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movl 0x1000(%rcx), %eax
addl 0x1004(%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x1000, -0x18(%rbp)    # imm = 0x1000
jb 0x7a2e
movl -0x18(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
addl 0x1004(%rax), %ecx
movl %ecx, 0x1004(%rax)
movl $0x1000, %ecx           # imm = 0x1000
subl -0x18(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x5910
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl (%rax), %eax
movl %eax, %edx
callq 0x31d0
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x7ab1
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x31d0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// 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>::remove_h(unsigned long)
void remove_h(hindex_t hidx) noexcept
    {
        hvec[hidx].hnd->heap_index = -1;
        if (hvec.size() != hidx + 1) {
            bubble_up(hidx, *(hvec.back().hnd), hvec.back().prio);
            hvec.pop_back();
        }
        else {
            hvec.pop_back();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7120
movq -0x18(%rbp), %rdi
movq 0x10(%rax), %rax
movq $-0x1, (%rax)
callq 0x6d30
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x7e93
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x80d0
movq -0x18(%rbp), %rdi
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x80d0
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rdi
movq %rax, %rcx
callq 0x7eb0
movq -0x18(%rbp), %rdi
callq 0x80f0
jmp 0x7e9c
movq -0x18(%rbp), %rdi
callq 0x80f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::deregister(dasynq::v2::dprivate::base_fd_watcher*, int)
void deregister(base_fd_watcher *callback, int fd) noexcept
    {
        if (callback->emulatefd) {
            auto & ed = (dispatch_t &) loop_mech;
            ed.issue_delete(callback);
            return;
        }
        
        loop_mech.remove_fd_watch(fd, callback->watch_flags);

        waitqueue_node<T_Mutex> qnode;
        get_attn_lock(qnode);
        
        auto & ed = (dispatch_t &) loop_mech;
        ed.issue_delete(callback);
        
        release_lock(qnode);        
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movb 0xc(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x8226
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8270
jmp 0x8268
movq -0x38(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
callq 0x6870
movq -0x38(%rbp), %rdi
leaq -0x21(%rbp), %rsi
callq 0x8300
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8270
movq -0x38(%rbp), %rdi
leaq -0x21(%rbp), %rsi
callq 0x83f0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>::issue_delete(dasynq::v2::dprivate::base_watcher*)
void issue_delete(base_watcher *watcher) noexcept
        {
            // This is only called when the attention lock is held, so if the watcher is not
            // active/queued now, it cannot become active (and will not be reported with an event)
            // during execution of this function.
            
            lock.lock();
            
            if (watcher->active) {
                // If the watcher is active, set deleteme true; the watcher will be removed
                // at the end of current processing (i.e. when active is set false).
                watcher->deleteme = true;
                lock.unlock();
            }
            else {
                // Actually do the delete.
                dequeue_watcher(watcher);
                release_watcher(watcher);
                
                lock.unlock();
                watcher->watch_removed();
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x28, %rdi
callq 0x6030
movq -0x10(%rbp), %rax
movb 0xc(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x82c1
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0xc(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0xc(%rax)
addq $0x28, %rdi
callq 0x5fe0
jmp 0x82f2
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7d10
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6940
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x5fe0
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::get_attn_lock(dasynq::v2::dprivate::waitqueue_node<dasynq::null_mutex>&)
void get_attn_lock(waitqueue_node<T_Mutex> &qnode) noexcept
    {
        std::unique_lock<T_Mutex> ulock(wait_lock);
        attn_waitqueue.queue(&qnode);        
        if (! attn_waitqueue.check_head(qnode)) {
            if (long_poll_running) {
                // We want to interrupt any in-progress poll so that the attn queue will progress
                // but we don't want to do that unnecessarily. If we are 2nd in the queue then the
                // head must be doing the poll; interrupt it. Otherwise, we assume the 2nd has
                // already interrupted it.
                if (attn_waitqueue.get_second() == &qnode) {
                    loop_mech.interrupt_wait();
                }
            }
            while (! attn_waitqueue.check_head(qnode)) {
                qnode.wait(ulock);
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x28(%rbp)
addq $0x160, %rsi            # imm = 0x160
leaq -0x20(%rbp), %rdi
callq 0x84e0
jmp 0x832a
movq -0x28(%rbp), %rdi
addq $0x161, %rdi            # imm = 0x161
movq -0x10(%rbp), %rsi
callq 0x8520
jmp 0x8340
movq -0x28(%rbp), %rdi
addq $0x161, %rdi            # imm = 0x161
movq -0x10(%rbp), %rsi
callq 0x8530
movb %al, -0x29(%rbp)
jmp 0x8359
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x83d3
jmp 0x8362
movq -0x28(%rbp), %rax
testb $0x1, 0x160(%rax)
je 0x839a
movq -0x28(%rbp), %rdi
addq $0x161, %rdi            # imm = 0x161
callq 0x8550
movq %rax, -0x38(%rbp)
jmp 0x8385
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x8398
movq -0x28(%rbp), %rdi
callq 0x7180
jmp 0x839a
jmp 0x839c
movq -0x28(%rbp), %rdi
addq $0x161, %rdi            # imm = 0x161
movq -0x10(%rbp), %rsi
callq 0x8530
movb %al, -0x39(%rbp)
jmp 0x83b5
movb -0x39(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x83c0
jmp 0x83d1
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x8560
jmp 0x83cf
jmp 0x839c
jmp 0x83d3
leaq -0x20(%rbp), %rdi
callq 0x8570
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::release_lock(dasynq::v2::dprivate::waitqueue_node<dasynq::null_mutex>&)
void release_lock(waitqueue_node<T_Mutex> &qnode) noexcept
    {
        std::unique_lock<T_Mutex> ulock(wait_lock);
        long_poll_running = false;
        waitqueue_node<T_Mutex> * nhead = attn_waitqueue.unqueue();
        if (nhead != nullptr) {
            // Someone else now owns the lock, signal them to wake them up
            nhead->signal();
        }
        else {
            // Nobody is waiting in attn_waitqueue (the high-priority queue) so check in
            // wait_waitqueue (the low-priority queue)
            if (! wait_waitqueue.is_empty()) {
                auto nhead = wait_waitqueue.get_head();
                wait_waitqueue.unqueue();
                attn_waitqueue.queue(nhead);
                long_poll_running = true;
                nhead->signal();
            }
        }                
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x38(%rbp)
addq $0x160, %rsi            # imm = 0x160
leaq -0x20(%rbp), %rdi
callq 0x84e0
jmp 0x841a
movq -0x38(%rbp), %rdi
movb $0x0, 0x160(%rdi)
addq $0x161, %rdi            # imm = 0x161
callq 0x8660
movq %rax, -0x40(%rbp)
jmp 0x8437
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8453
movq -0x28(%rbp), %rdi
callq 0x8670
jmp 0x8451
jmp 0x84c5
movq -0x38(%rbp), %rdi
addq $0x162, %rdi            # imm = 0x162
callq 0x7170
testb $0x1, %al
jne 0x84c3
movq -0x38(%rbp), %rdi
addq $0x162, %rdi            # imm = 0x162
callq 0x8680
movq %rax, -0x48(%rbp)
jmp 0x847d
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
addq $0x162, %rdi            # imm = 0x162
callq 0x8660
jmp 0x8497
movq -0x38(%rbp), %rdi
addq $0x161, %rdi            # imm = 0x161
movq -0x30(%rbp), %rsi
callq 0x8520
movq -0x38(%rbp), %rax
movb $0x1, 0x160(%rax)
movq -0x30(%rbp), %rdi
callq 0x8670
jmp 0x84c1
jmp 0x84c3
jmp 0x84c5
leaq -0x20(%rbp), %rdi
callq 0x8570
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/epoll.h
// Function: dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>::~epoll_loop()
~epoll_loop() noexcept
    {
        if (epfd != -1) {
            Base::cleanup();
            close(epfd);
            if (sigfd != -1) {
                close(sigfd);
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $-0x1, 0xa0(%rax)
je 0x86e9
movq -0x10(%rbp), %rdi
callq 0x8710
movq -0x10(%rbp), %rax
movl 0xa0(%rax), %edi
callq 0x3440
jmp 0x86c7
movq -0x10(%rbp), %rax
cmpl $-0x1, 0xa4(%rax)
je 0x86e7
movq -0x10(%rbp), %rax
movl 0xa4(%rax), %edi
callq 0x3440
jmp 0x86e5
jmp 0x86e7
jmp 0x86e9
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x8760
movq -0x10(%rbp), %rdi
callq 0x8780
addq $0x10, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::~btree_set()
~btree_set()
    {
        while (left_sept != nullptr) {
            remove(*(left_sept->hn_p[0]));
        }

        while (sn_reserve != nullptr) {
            auto *next = sn_reserve->parent;
            delete sn_reserve;
            sn_reserve = next;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x8ec2
movq -0x18(%rbp), %rdi
movq 0x8(%rdi), %rax
movq 0x20(%rax), %rsi
callq 0x8f20
jmp 0x8ea4
jmp 0x8ec4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8f0c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq 0xa8(%rcx), %rcx
movq %rcx, -0x10(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x8efe
movq -0x20(%rbp), %rdi
movl $0xb0, %esi
callq 0x3290
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x8ec4
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::septnode::num_vals()
int num_vals() noexcept
        {
            // We expect to be >50% full, so count backwards:
            for (int i = N - 1; i >= 0; i--) {
                if (hn_p[i] != nullptr) {
                    return i + 1;
                }
            }
            return 0;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x7, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x94b5
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, 0x20(%rax,%rcx,8)
je 0x94a8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x94bc
jmp 0x94aa
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9487
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::septnode::shift_elems_left(int, int, int)
void shift_elems_left(int pos, int newpos, int num)
        {
            int diff = pos - newpos;
            int end = pos + num;

            for (int i = pos; i < end; i++) {
                prio[i - diff] = prio[i];
                hn_p[i - diff] = hn_p[i];
                children[i - diff] = children[i];
            }
            children[end - diff] = children[end];
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x97f9
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movl -0x20(%rbp), %ecx
subl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movslq -0x20(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movl -0x20(%rbp), %ecx
subl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movslq -0x20(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
movl -0x20(%rbp), %ecx
subl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x97a1
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
movl -0x1c(%rbp), %ecx
subl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x60(%rax,%rcx,8)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::septnode::shift_elems_right(int, int, int)
void shift_elems_right(int pos, int newpos, int num)
        {
            int diff = newpos - pos;
            int end = pos + num;

            children[end + diff] = children[end];
            for (int i = (end - 1); i >= pos; i--) {
                prio[i + diff] = prio[i];
                hn_p[i + diff] = hn_p[i];
                children[i + diff] = children[i];
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x10(%rbp), %ecx
subl -0xc(%rbp), %ecx
movl %ecx, -0x18(%rbp)
movl -0xc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
movl -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jl 0x98c3
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movl -0x20(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movslq -0x20(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movl -0x20(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movslq -0x20(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
movl -0x20(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x986b
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::deallocate(dasynq::btree_set<void*, int, std::less<int>, 8>::heapnode&)
void deallocate(handle_t & hn) noexcept
    {
        hn.nodedata.data.T::~T();
        num_alloced--;

        // Potentially release reserved sept node
        if (DASYNQ_EXPECT(num_alloced < next_sept - N/2, 0)) {
            next_sept -= N/2;
            num_septs_needed--;
            if (num_septs_needed < num_septs - 1) {
                // Note the "-1" margin is to alleviate bouncing allocation/deallocation
                septnode * r = sn_reserve;
                sn_reserve = r->parent;
                delete r;
                num_septs--;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rcx)
movq 0x18(%rcx), %rax
movl 0x28(%rcx), %ecx
subl $0x4, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x9e2e
movq -0x20(%rbp), %rcx
movl 0x28(%rcx), %eax
subl $0x4, %eax
movl %eax, 0x28(%rcx)
movl 0x24(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x24(%rcx)
movl 0x24(%rcx), %eax
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x9e2c
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq 0xa8(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x9e1f
movq -0x28(%rbp), %rdi
movl $0xb0, %esi
callq 0x3290
movq -0x20(%rbp), %rax
movl 0x20(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x20(%rax)
jmp 0x9e2e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/shutdown.cc
// Function: subproc_out_watch::fd_event(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int)
rearm fd_event(loop_t &, int fd, int flags)
    {
        // if current status is reading overflow, read and discard until newline
        if (in_overflow) {
            return read_overflow(fd);
        }

        auto r = sub_buf.fill(fd);
        if (r == subproc_buffer::fill_status::FULL) {
            sub_buf.mark_overflow();
            in_overflow = true;
            return read_overflow(fd);
        }
        else if (r == subproc_buffer::fill_status::ENDFILE) {
            return rearm::NOOP;
        }

        return rearm::REARM;  // re-enable watcher
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, 0x30(%rax)
je 0xa005
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xa070
movl %eax, -0x4(%rbp)
jmp 0xa058
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0xa1b0
movl %eax, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jne 0xa040
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x7ac0
movq -0x30(%rbp), %rdi
movb $0x1, 0x30(%rdi)
movl -0x1c(%rbp), %esi
callq 0xa070
movl %eax, -0x4(%rbp)
jmp 0xa058
cmpl $0x1, -0x24(%rbp)
jne 0xa04f
movl $0x2, -0x4(%rbp)
jmp 0xa058
jmp 0xa051
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/shutdown.cc
// Function: subproc_out_watch::read_overflow(int)
rearm read_overflow(int fd)
    {
        char buf[128];
        int r = read(fd, buf, 128);
        if (r == 0 || (r == -1 && errno != EAGAIN)) {
            return rearm::NOOP; // leave disarmed
        }
        if (r == -1) {
            return rearm::REARM;
        }

        // How much space is available?
        int fr = sub_buf.get_free();
        for (int b = r - std::min(r, fr); b < r; b++) {
            if (buf[b] == '\n') {
                // Copy the (partial) line into sub_buf and leave overflow mode
                sub_buf.append(buf + b, r - b);
                in_overflow = false;
            }
        }
        return rearm::REARM;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x14(%rbp), %edi
leaq -0xa0(%rbp), %rsi
movl $0x80, %edx
callq 0x3380
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0xa0c3
cmpl $-0x1, -0xa4(%rbp)
jne 0xa0cf
callq 0x3030
cmpl $0xb, (%rax)
je 0xa0cf
movl $0x2, -0x4(%rbp)
jmp 0xa19e
cmpl $-0x1, -0xa4(%rbp)
jne 0xa0e4
movl $0x0, -0x4(%rbp)
jmp 0xa19e
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xa250
movl %eax, -0xa8(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xbc(%rbp)
leaq -0xa4(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x6540
movq %rax, %rcx
movl -0xbc(%rbp), %eax
subl (%rcx), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0xa4(%rbp), %eax
jge 0xa197
movslq -0xac(%rbp), %rax
movsbl -0xa0(%rbp,%rax), %eax
cmpl $0xa, %eax
jne 0xa184
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rdi
leaq -0xa0(%rbp), %rsi
movslq -0xac(%rbp), %rax
addq %rax, %rsi
movl -0xa4(%rbp), %edx
subl -0xac(%rbp), %edx
callq 0xa270
movq -0xb8(%rbp), %rax
movb $0x0, 0x30(%rax)
jmp 0xa186
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0xa12a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/shutdown.cc
// Function: subproc_buffer::fill(int)
fill_status fill(int fd)
    {
        int rem = get_free();

        if (rem == 0) {
            return fill_status::FULL;
        }

        int read = base::fill(fd, rem);
        if (read <= 0) {
            if (read == -1 && errno == EAGAIN) {
                return fill_status::OK;
            }
            return fill_status::ENDFILE;
        }

        out_watch->set_enabled(loop, true);
        return fill_status::OK;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0xa250
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0xa1de
movl $0x2, -0x4(%rbp)
jmp 0xa23b
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0xa2e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0xa218
cmpl $-0x1, -0x1c(%rbp)
jne 0xa20f
callq 0x3030
cmpl $0xb, (%rax)
jne 0xa20f
movl $0x0, -0x4(%rbp)
jmp 0xa23b
movl $0x1, -0x4(%rbp)
jmp 0xa23b
movq -0x28(%rbp), %rax
movq 0x1020(%rax), %rdi
movq 0x1018(%rax), %rsi
movl $0x1, %edx
callq 0x7910
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/includes/cpbuffer.h
// Function: cpbuffer<4096u>::fill(int, unsigned int)
int fill(int fd, unsigned limit) noexcept
    {
        unsigned pos = cur_idx + length;
        if (pos >= SIZE) pos -= SIZE;
        unsigned max_count = std::min(SIZE - pos, SIZE - length);
        max_count = std::min(max_count, limit);
        ssize_t r = bp_sys::read(fd, buf + pos, max_count);
        if (r >= 0) {
            length += r;
        }
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x1000(%rcx), %eax
addl 0x1004(%rcx), %eax
movl %eax, -0x14(%rbp)
cmpl $0x1000, -0x14(%rbp)    # imm = 0x1000
jb 0xa31d
movl -0x14(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %esi
movl $0x1000, %eax           # imm = 0x1000
movl %eax, %edx
subl %esi, %edx
movl %edx, -0x1c(%rbp)
movl 0x1004(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x5910
movl (%rax), %eax
movl %eax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x5910
movq -0x30(%rbp), %rsi
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %edi
movl -0x14(%rbp), %eax
addq %rax, %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x3380
movq %rax, -0x38(%rbp)
jmp 0xa37c
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jl 0xa3a2
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
movl 0x1004(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x1004(%rax)
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::reserve_child_watch(dasynq::v2::dprivate::base_child_watcher<dasynq::v2::dprivate::proc_status>*)
void reserve_child_watch(base_child_watcher *callback)
    {
        std::lock_guard<mutex_t> guard(loop_mech.lock);

        loop_mech.prepare_watcher(callback);
        try {
            loop_mech.reserve_child_watch_nolock(callback->watch_handle);
        }
        catch (...) {
            loop_mech.release_watcher(callback);
            throw;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x30(%rbp)
addq $0x28, %rsi
leaq -0x18(%rbp), %rdi
callq 0x73c0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x73f0
jmp 0xa494
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0xa520
jmp 0xa4a7
jmp 0xa4f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa504
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30d0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6940
callq 0x3390
jmp 0xa51e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x33e0
jmp 0xa4f3
jmp 0xa504
leaq -0x18(%rbp), %rdi
callq 0x7580
addq $0x30, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x7580
movq -0x20(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x52b0
nop
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::alloc_slot()
void alloc_slot()
    {
        num_alloced++;
        // No need to be concerned for overflow in num_alloced: if we've maxed out size_t then
        // allocation would have failed much earlier on.

        if (DASYNQ_EXPECT(num_alloced == next_sept, 0)) {
            if (++num_septs_needed > num_septs) {
                try {
                    septnode *new_res = new septnode();
                    new_res->parent = sn_reserve;
                    sn_reserve = new_res;
                    num_septs++;
                }
                catch (...) {
                    num_septs_needed--;
                    num_alloced--;
                    throw;
                }
            }
            if (num_septs_needed == 0) {
                // wrapped around
                num_septs_needed--;
                num_alloced--;
                throw std::bad_alloc();
            }
            next_sept += N/2;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x18(%rcx)
movq 0x18(%rcx), %rax
movl 0x28(%rcx), %ecx
cmpq %rcx, %rax
jne 0xa705
movq -0x28(%rbp), %rcx
movl 0x24(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x24(%rcx)
cmpl 0x20(%rcx), %eax
jbe 0xa6a8
movl $0xb0, %edi
callq 0x3280
movq %rax, -0x30(%rbp)
jmp 0xa606
movq -0x30(%rbp), %rdi
callq 0xa720
jmp 0xa611
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0xa8(%rcx)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
jmp 0xa6a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xa667
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0xb0, %esi
callq 0x3290
movq -0x18(%rbp), %rdi
callq 0x30d0
movq -0x28(%rbp), %rax
movl 0x24(%rax), %ecx
decl %ecx
movl %ecx, 0x24(%rax)
movq 0x18(%rax), %rcx
decq %rcx
movq %rcx, 0x18(%rax)
callq 0x3390
jmp 0xa71c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x33e0
jmp 0xa6a4
jmp 0xa70b
jmp 0xa6a8
movq -0x28(%rbp), %rax
cmpl $0x0, 0x24(%rax)
jne 0xa6f8
movq -0x28(%rbp), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x38(%rbp)
callq 0x6fe0
movq -0x38(%rbp), %rdi
movq 0xf8d4(%rip), %rsi      # 0x19fc0
movq 0xf89d(%rip), %rdx      # 0x19f90
callq 0x3400
movq -0x28(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x28(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x52b0
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::alloc_sept()
septnode * alloc_sept()
    {
        septnode * r = sn_reserve;
        sn_reserve = r->parent;
        r->init();
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq 0xa8(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0xb090
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/btree_set.h
// Function: dasynq::btree_set<void*, int, std::less<int>, 8>::septnode::init()
void init()
        {
            for (int i = 0; i < N; i++) {
                hn_p[i] = nullptr;
                children[i] = nullptr;
            }
            children[N] = nullptr;
            parent = nullptr;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0xb0d6
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x20(%rax,%rcx,8)
movslq -0xc(%rbp), %rcx
movq $0x0, 0x60(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb0a7
movq -0x18(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq $0x0, 0xa8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/epoll.h
// Function: dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>::init()
void init()
    {
        epfd = epoll_create1(EPOLL_CLOEXEC);
        if (epfd == -1) {
            throw std::system_error(errno, std::system_category());
        }
        sigemptyset(&sigmask);
        try {
            Base::init(this);
        }
        catch (...) {
            close(epfd);
            throw;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x80000, %edi          # imm = 0x80000
callq 0x3320
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xa0(%rax)
cmpl $-0x1, 0xa0(%rax)
jne 0xb273
movl $0x20, %edi
callq 0x3110
movq %rax, -0x30(%rbp)
movq %rax, -0x38(%rbp)
callq 0x3030
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0x3140
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq %rax, %rdx
callq 0x77c0
jmp 0xb245
movq -0x38(%rbp), %rdi
movq 0xed28(%rip), %rsi      # 0x19f78
movq 0xed51(%rip), %rdx      # 0x19fa8
callq 0x3400
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x3190
jmp 0xb2db
movq -0x20(%rbp), %rdi
addq $0xa8, %rdi
callq 0x32d0
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
callq 0xb700
jmp 0xb291
jmp 0xb2d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30d0
movq -0x20(%rbp), %rax
movl 0xa0(%rax), %edi
callq 0x3440
jmp 0xb2b9
callq 0x3390
jmp 0xb2ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x33e0
jmp 0xb2d3
jmp 0xb2db
addq $0x40, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x52b0
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/childproc.h
// Function: void dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>::init<dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>>(dasynq::v2::epoll_loop<dasynq::interrupt_channel<dasynq::timer_fd_events<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>, dasynq::null_mutex>>*)
void init(T *loop_mech)
    {
        // Mask SIGCHLD:
        sigset_t sigmask;
        this->sigmaskf(SIG_UNBLOCK, nullptr, &sigmask);
        sigaddset(&sigmask, SIGCHLD);
        this->sigmaskf(SIG_SETMASK, &sigmask, nullptr);

        // On some systems a SIGCHLD handler must be established, or SIGCHLD will not be
        // generated:
        struct sigaction chld_action;
        chld_action.sa_handler = dasynq::dprivate::sigchld_handler;
        sigemptyset(&chld_action.sa_mask);
        chld_action.sa_flags = 0;
        sigaction(SIGCHLD, &chld_action, nullptr);

        // Specify a dummy user data value - sigchld_handler
        loop_mech->add_signal_watch(SIGCHLD, (void *) dasynq::dprivate::sigchld_handler);
        Base::init(loop_mech);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x90(%rbp), %rcx
callq 0xb9e0
leaq -0x90(%rbp), %rdi
movl $0x11, %esi
callq 0x33a0
movq -0x130(%rbp), %rdi
movl $0x2, %esi
leaq -0x90(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0xb9e0
leaq 0x99(%rip), %rax        # 0xba10
movq %rax, -0x128(%rbp)
leaq -0x128(%rbp), %rdi
addq $0x8, %rdi
callq 0x32d0
movl $0x0, -0xa0(%rbp)
movl $0x11, %edi
leaq -0x128(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x32f0
movq -0x10(%rbp), %rdi
movl $0x11, %esi
leaq 0x53(%rip), %rdx        # 0xba10
callq 0xba20
movq -0x130(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xba90
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::timer<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::add_timer(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, dasynq::clock_type, int)
void add_timer(event_loop_t &eloop, clock_type clock = clock_type::MONOTONIC, int prio = DEFAULT_PRIORITY)
    {
        base_watcher::init();
        this->priority = prio;
        this->clock = clock;
        this->intervals = 0;
        eloop.register_timer(this, clock);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x7190
movq -0x20(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, 0x18(%rsi)
movl -0x14(%rbp), %eax
movl %eax, 0x4c(%rsi)
movl $0x0, 0x48(%rsi)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
callq 0xd8f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::process_timer_rearm(dasynq::v2::dprivate::base_timer_watcher*, dasynq::rearm)
void process_timer_rearm(base_timer_watcher *btw, rearm rearm_type) noexcept
    {
        // Called with lock held
        if (rearm_type == rearm::REARM) {
            loop_mech.enable_timer_nolock(btw->timer_handle, true, btw->clock);
        }
        else if (rearm_type == rearm::REMOVE) {
            loop_mech.remove_timer_nolock(btw->timer_handle, btw->clock);
        }
        else if (rearm_type == rearm::DISARM) {
            loop_mech.enable_timer_nolock(btw->timer_handle, false, btw->clock);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xd0e0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
movl $0x1, %edx
callq 0xd130
jmp 0xd124
cmpl $0x3, -0x14(%rbp)
jne 0xd100
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %edx
callq 0xd1e0
jmp 0xd122
cmpl $0x1, -0x14(%rbp)
jne 0xd120
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
xorl %edx, %edx
callq 0xd130
jmp 0xd122
jmp 0xd124
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/timerbase.h
// Function: dasynq::timer_base<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>::enable_timer_nolock(dasynq::dary_heap<dasynq::timer_data, dasynq::time_val, dasynq::compare_timespec, 4>::handle_t&, bool, dasynq::clock_type)
void enable_timer_nolock(timer_handle_t &timer_id, bool enable, clock_type clock = clock_type::MONOTONIC) noexcept
    {
        auto &timer_queue = this->queue_for_clock(clock);
        auto &node_data = timer_queue.node_data(timer_id);
        auto expiry_count = node_data.expiry_count;
        if (expiry_count != 0 && enable) {
            node_data.expiry_count = 0;
            Base::receive_timer_expiry(timer_id, node_data.userdata, expiry_count);
        }
        else {
            timer_queue.node_data(timer_id).enabled = enable;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movl -0x18(%rbp), %esi
callq 0xd240
movq %rax, -0x38(%rbp)
jmp 0xd160
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd280
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xd1b4
testb $0x1, -0x11(%rbp)
je 0xd1b4
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdx
movl -0x2c(%rbp), %ecx
callq 0xd2a0
jmp 0xd1d0
movb -0x11(%rbp), %al
movb %al, -0x41(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd280
movb -0x41(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x14(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x52b0
nop
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/timerbase.h
// Function: dasynq::timer_base<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>::remove_timer_nolock(dasynq::dary_heap<dasynq::timer_data, dasynq::time_val, dasynq::compare_timespec, 4>::handle_t&, dasynq::clock_type)
void remove_timer_nolock(timer_handle_t &timer_id, clock_type clock = clock_type::MONOTONIC) noexcept
    {
        auto &timer_queue = this->queue_for_clock(clock);
        if (timer_queue.is_queued(timer_id)) {
            timer_queue.remove(timer_id);
        }
        timer_queue.deallocate(timer_id);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xd240
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd2e0
testb $0x1, %al
jne 0xd216
jmp 0xd223
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd300
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd330
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/../dasynq/include/dasynq/timerbase.h
// Function: dasynq::compare_timespec::operator()(timespec const&, timespec const&)
bool operator()(const struct timespec &a, const struct timespec &b) noexcept
    {
        if (a.tv_sec < b.tv_sec) {
            return true;
        }

        if (a.tv_sec == b.tv_sec) {
            return a.tv_nsec < b.tv_nsec;
        }

        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jge 0xd746
movb $0x1, -0x1(%rbp)
jmp 0xd774
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xd770
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setl %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xd774
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)