LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::timer_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, dasynq::v2::dprivate::timer<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>* dasynq::v2::dprivate::timer<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::add_timer<do_system_shutdown(shutdown_type_t)::$_0>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, dasynq::clock_type, bool, timespec const&, timespec const&, do_system_shutdown(shutdown_type_t)::$_0)::lambda_timer>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        loop_access::get_base_lock(loop).unlock();

        auto intervals_report = this->intervals;
        this->intervals = 0;
        auto rearm_type = static_cast<Derived *>(this)->timer_expiry(loop, intervals_report);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {

            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            loop_access::process_timer_rearm(loop, this, rearm_type);

            post_dispatch(loop, this, rearm_type);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x48(%rdi)
movq 0x50(%rdi), %rax
movb $0x1, (%rax)
andb $-0x2, 0xc(%rdi)
movq %rsi, %r14
leaq 0x20(%rdi), %rsi
movl 0x4c(%rdi), %edx
movq %r14, %rdi
callq 0x6d72
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4e34
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x20(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/includes/dinit-client.h
// Function: wait_for_reply(cpbuffer<1024u>&, int)
inline void wait_for_reply(cpbuffer_t &rbuffer, int fd)
{
    fill_buffer_to(rbuffer, fd, 1);

    while (rbuffer[0] >= 100) {
        // Information packet; discard.
        fill_buffer_to(rbuffer, fd, 2);
        int pktlen = (unsigned char) rbuffer[1];

        rbuffer.consume(1);  // Consume one byte so we'll read one byte of the next packet
        fill_buffer_to(rbuffer, fd, pktlen);
        rbuffer.consume(pktlen - 1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x0, 0x404(%r14)
jne 0x4697
movq %r14, %rdi
movl %ebx, %esi
callq 0x4980
testl %eax, %eax
jg 0x4663
cmpl $-0x1, %eax
jne 0x468f
callq 0x3040
cmpl $0x4, (%rax)
je 0x4663
jmp 0x47a2
testl %eax, %eax
je 0x47c5
movl 0x400(%r14), %eax
leal -0x400(%rax), %ecx
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %ecx
cmpb $0x64, (%r14,%rcx)
jl 0x47b6
movl $0xfffffc00, %r12d      # imm = 0xFFFFFC00
movl $0x400, %ebp            # imm = 0x400
movl 0x404(%r14), %eax
cmpl $0x1, %eax
ja 0x46f4
movq %r14, %rdi
movl %ebx, %esi
callq 0x4980
testl %eax, %eax
jg 0x46c2
cmpl $-0x1, %eax
je 0x4794
testl %eax, %eax
je 0x47c5
movl 0x404(%r14), %eax
movl 0x400(%r14), %ecx
leal 0x1(%rcx), %edx
addl $0xfffffc01, %ecx       # imm = 0xFFFFFC01
cmpl $0x400, %edx            # imm = 0x400
cmovbl %edx, %ecx
movzbl (%r14,%rcx), %r13d
movl %ecx, 0x400(%r14)
decl %eax
movl %eax, 0x404(%r14)
movl 0x404(%r14), %eax
cmpl %r13d, %eax
jae 0x4758
movq %r14, %rdi
movl %ebx, %esi
callq 0x4980
testl %eax, %eax
jg 0x4722
cmpl $-0x1, %eax
jne 0x474d
callq 0x3040
cmpl $0x4, (%rax)
je 0x4722
jmp 0x47a2
testl %eax, %eax
je 0x47c5
movl 0x404(%r14), %eax
decl %r13d
subl %r13d, %eax
addl 0x400(%r14), %r13d
leal (%r12,%r13), %ecx
cmpl %ebp, %r13d
cmovbl %r13d, %ecx
movl %ecx, 0x400(%r14)
movl %eax, 0x404(%r14)
leal (%rcx,%r12), %eax
cmpl %ebp, %ecx
cmovbl %ecx, %eax
cmpb $0x63, (%r14,%rax)
jg 0x46c2
jmp 0x47b6
callq 0x3040
cmpl $0x4, (%rax)
je 0x46c2
movq %rax, %r15
movl $0x4, %edi
callq 0x3130
movl (%r15), %ecx
movl %ecx, (%rax)
jmp 0x47d5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x3130
movl $0x0, (%rax)
leaq 0x72b4(%rip), %rsi      # 0xba90
movq %rax, %rdi
xorl %edx, %edx
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/shutdown.cc
// Function: subproc_buffer::append(char const*)
void append(const char *msg)
    {
        out_watch->set_enabled(loop, true);
        unsigned len = strlen(msg);
        if (subproc_bufsize - get_length() >= len) {
            base::append(msg, len);
        }
        else {
            mark_overflow();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1018(%rdi), %rsi
movq 0x1020(%rdi), %rdi
movl $0x1, %edx
callq 0x536e
movq %rbx, %rdi
callq 0x30f0
movq %rax, %r15
movl 0x1004(%r14), %eax
movl $0x1000, %ebp           # imm = 0x1000
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
cmpl %r15d, %ecx
jae 0x484c
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5408
movl 0x1000(%r14), %ecx
leal (%rcx,%rax), %edx
cmpl %ebp, %edx
leal -0x1000(%rcx,%rax), %edi
cmovbl %edx, %edi
addl %r15d, %eax
movl %eax, 0x1004(%r14)
subl %edi, %ebp
addq %r14, %rdi
cmpl %r15d, %ebp
movl %r15d, %edx
cmovbl %ebp, %edx
movq %rbx, %rsi
callq 0x31f0
subl %ebp, %r15d
jbe 0x48a4
movl %ebp, %eax
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::run(int)
void run(int limit = -1) noexcept
    {
        // Poll the mechanism first, in case high-priority events are pending:
        waitqueue_node<T_Mutex> qnode;
        get_pollwait_lock(qnode);
        loop_mech.pull_events(false);
        release_lock(qnode);

        while (! process_events(limit)) {
            // Pull events from the AEN mechanism and insert them in our internal queue:
            get_pollwait_lock(qnode);
            loop_mech.pull_events(true);
            release_lock(qnode);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xf(%rsp), %rsi
callq 0x74b6
movq %r14, %rdi
xorl %esi, %esi
callq 0x74e6
leaq 0xf(%rsp), %rsi
movq %r14, %rdi
callq 0x57b0
movq %r14, %rdi
movl %ebx, %esi
callq 0x7546
testb %al, %al
jne 0x4923
leaq 0xf(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x74b6
movq %r14, %rdi
movl $0x1, %esi
callq 0x74e6
movq %r14, %rdi
movq %r15, %rsi
callq 0x57b0
movq %r14, %rdi
movl %ebx, %esi
callq 0x7546
testb %al, %al
je 0x48f2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x492f
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::poll(int)
void poll(int limit = -1) noexcept
    {
        waitqueue_node<T_Mutex> qnode;
        if (poll_attn_lock(qnode)) {
            loop_mech.pull_events(false);
            release_lock(qnode);
        }

        process_events(limit);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x7(%rsp), %rsi
callq 0x7df6
testb %al, %al
je 0x4966
movq %r14, %rdi
xorl %esi, %esi
callq 0x74e6
leaq 0x7(%rsp), %rsi
movq %r14, %rdi
callq 0x57b0
movq %r14, %rdi
movl %ebx, %esi
callq 0x7546
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x47e6
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/includes/cpbuffer.h
// Function: cpbuffer<1024u>::fill(int)
int fill(int fd) noexcept
    {
        unsigned pos = cur_idx + length;
        if (pos >= SIZE) pos -= SIZE;
        unsigned max_count = std::min(SIZE - pos, SIZE - length);
        ssize_t r = bp_sys::read(fd, buf + pos, max_count);
        if (r >= 0) {
            length += r;
        }
        return r;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x400(%rdi), %eax
movl 0x404(%rdi), %ecx
leal (%rcx,%rax), %edi
movl $0x400, %edx            # imm = 0x400
cmpl %edx, %edi
leal -0x400(%rcx,%rax), %eax
cmovbl %edi, %eax
movl %esi, %edi
movl $0x400, %esi            # imm = 0x400
subl %eax, %esi
subl %ecx, %edx
cmpl %esi, %edx
cmovael %esi, %edx
addq %rbx, %rax
movq %rax, %rsi
callq 0x33a0
testq %rax, %rax
js 0x49ca
addl %eax, 0x404(%rbx)
popq %rbx
retq
movq %rax, %rdi
callq 0x47e6
// File: /workspace/github_cpp_makefile_star2_O3/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>>>* dasynq::v2::dprivate::fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::add_watch<subproc_buffer::subproc_buffer(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int)::'lambda'(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int)>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int, subproc_buffer::subproc_buffer(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int)::'lambda'(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int))
static fd_watcher<EventLoop> *add_watch(event_loop_t &eloop, int fd, int flags, T watchHndlr)
    {
        class lambda_fd_watcher : public fd_watcher_impl<event_loop_t, lambda_fd_watcher>
        {
            private:
            T watchHndlr;

            public:
            lambda_fd_watcher(T watchHandlr_a) : watchHndlr(watchHandlr_a)
            {
                //
            }

            rearm fd_event(event_loop_t &eloop, int fd, int flags)
            {
                return watchHndlr(eloop, fd, flags);
            }

            void watch_removed() noexcept override
            {
                delete this;
            }
        };
        
        lambda_fd_watcher * lfd = new lambda_fd_watcher(watchHndlr);
        lfd->add_watch(eloop, fd, flags);
        return lfd;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x30, %edi
callq 0x32a0
movq %rax, %r12
movl $0x1, 0x8(%rax)
leaq 0x71de(%rip), %rax      # 0xbbe0
movq %rax, (%r12)
movq %rbx, 0x28(%r12)
movb $0x0, 0xc(%r12)
movl $0x32, 0x18(%r12)
movl %r14d, 0x1c(%r12)
movl %ebp, 0x20(%r12)
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x5022
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::fd_watcher_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, subproc_out_watch>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);

        // In case emulating, clear enabled here; REARM or explicit set_enabled will re-enable.
        this->emulate_enabled = false;

        loop_access::get_base_lock(loop).unlock();

        auto rearm_type = static_cast<Derived *>(this)->fd_event(loop, this->watch_fd, this->event_flags);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {
            this->event_flags = 0;
            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            rearm_type = loop_access::process_fd_rearm(loop, this, rearm_type);

            post_dispatch(loop, this, rearm_type);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andb $-0x9, 0xc(%rdi)
movq %rsi, %r14
movl 0x1c(%rdi), %edx
movl 0x24(%rdi), %ecx
callq 0x5f38
cmpl $0x4, %eax
jne 0x5eea
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x0, 0x24(%rbx)
movb 0xc(%rbx), %cl
movl %ecx, %edx
andb $-0x2, %dl
movb %dl, 0xc(%rbx)
testb $0x2, %cl
movl $0x3, %edx
cmovel %eax, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4cfc
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4ac7
movq %rax, %rdi
callq 0x47e6
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: void dasynq::v2::dprivate::post_dispatch<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, dasynq::v2::dprivate::base_watcher*, dasynq::rearm)
void post_dispatch(Loop &loop, base_watcher *watcher, rearm rearm_type)
    {
        if (rearm_type == rearm::REMOVE) {
            loop_access::get_base_lock(loop).unlock();
            loop_access::release_watcher(loop, watcher);
            watcher->watch_removed();
            loop_access::get_base_lock(loop).lock();
        }
        else if (rearm_type == rearm::REQUEUE) {
            loop_access::requeue_watcher(loop, watcher);
        }
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
cmpl $0x5, %edx
je 0x4af0
cmpl $0x3, %edx
jne 0x4b14
leaq 0x10(%rbx), %rsi
callq 0x4e34
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmpq *0x20(%rax)
movl 0x18(%rbx), %eax
addq $0x10, %rbx
movq 0x20(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%rdi)
movq %rsp, %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %rbx, %rsi
callq 0x4ed0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::process_fd_rearm(dasynq::v2::dprivate::base_fd_watcher*, dasynq::rearm)
rearm process_fd_rearm(base_fd_watcher * bfw, rearm rearm_type) noexcept
    {
        bool emulatedfd = static_cast<base_watcher *>(bfw)->emulatefd;

        if (emulatedfd) {
            if (rearm_type == rearm::REARM) {
                bfw->emulate_enabled = true;
                rearm_type = rearm::REQUEUE;
            }
            else if (rearm_type == rearm::DISARM) {
                bfw->emulate_enabled = false;
            }
            else if (rearm_type == rearm::NOOP) {
                if (bfw->emulate_enabled) {
                    rearm_type = rearm::REQUEUE;
                }
            }
        }
        else  if (rearm_type == rearm::REARM) {
            set_fd_enabled_nolock(bfw, bfw->watch_fd,
                    bfw->watch_flags & (IN_EVENTS | OUT_EVENTS), true);
        }
        else if (rearm_type == rearm::DISARM) {
            loop_mech.disable_fd_watch_nolock(bfw->watch_fd, bfw->watch_flags);
        }
        else if (rearm_type == rearm::REMOVE) {
            loop_mech.remove_fd_watch_nolock(bfw->watch_fd, bfw->watch_flags);
        }
        return rearm_type;
    }

// Assembly:
subq $0x18, %rsp
movl %edx, %eax
movb 0xc(%rsi), %cl
testb $0x4, %cl
jne 0x4d55
cmpl $0x3, %eax
je 0x4da5
cmpl $0x1, %eax
je 0x4d70
testl %eax, %eax
jne 0x4dd0
movl 0x1c(%rsi), %edx
movl 0x20(%rsi), %eax
leaq 0xc(%rsp), %rcx
movq %rsi, 0x4(%rcx)
movl %eax, %esi
andl $0x1, %esi
andl $0x2, %eax
leal (%rsi,%rax,2), %eax
addl $0x40000000, %eax       # imm = 0x40000000
movl %eax, (%rcx)
movl 0xa0(%rdi), %edi
movl $0x3, %esi
callq 0x3360
xorl %eax, %eax
jmp 0x4dd0
cmpl $0x2, %eax
je 0x4dc1
cmpl $0x1, %eax
je 0x4d98
testl %eax, %eax
jne 0x4dd0
orb $0x8, %cl
movb %cl, 0xc(%rsi)
movl $0x5, %eax
jmp 0x4dd0
movl 0x1c(%rsi), %edx
leaq 0xc(%rsp), %rcx
movq $0x0, 0x4(%rcx)
movl $0x0, (%rcx)
movl 0xa0(%rdi), %edi
movl $0x3, %esi
callq 0x3360
jmp 0x4d9e
andb $-0x9, %cl
movb %cl, 0xc(%rsi)
movl $0x1, %eax
jmp 0x4dd0
movl 0x1c(%rsi), %edx
movl 0xa0(%rdi), %edi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x3360
movl $0x3, %eax
jmp 0x4dd0
andb $0x8, %cl
shrb $0x3, %cl
movzbl %cl, %eax
leal (%rax,%rax,2), %eax
addl $0x2, %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::set_fd_enabled_nolock(dasynq::v2::dprivate::base_watcher*, int, int, bool)
void set_fd_enabled_nolock(base_watcher *watcher, int fd, int watch_flags, bool enabled) noexcept
    {
        if (enabled) {
            loop_mech.enable_fd_watch_nolock(fd, watcher, watch_flags | ONE_SHOT);
            if (backend_traits_t::interrupt_after_fd_add) {
                interrupt_if_necessary();
            }
        }
        else {
            loop_mech.disable_fd_watch_nolock(fd, watch_flags);
        }
    }

// Assembly:
subq $0x18, %rsp
testl %r8d, %r8d
je 0x4e0b
leaq 0xc(%rsp), %rax
movq %rsi, 0x4(%rax)
movl %ecx, %esi
andl $0x1, %esi
andl $0x2, %ecx
leal (%rsi,%rcx,2), %ecx
addl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, (%rax)
movl 0xa0(%rdi), %edi
movl $0x3, %esi
movq %rax, %rcx
jmp 0x4e29
leaq 0xc(%rsp), %rcx
movq $0x0, 0x4(%rcx)
movl $0x0, (%rcx)
movl 0xa0(%rdi), %edi
movl $0x3, %esi
callq 0x3360
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq/svec.h
// Function: dasynq::svector<dasynq::dary_heap<dasynq::v2::dprivate::empty_node, dasynq::stable_prio<int>, dasynq::compare_stable_prio<int, std::less<int>>, 4>::heap_node>::change_capacity(unsigned long)
bool change_capacity(size_type c)
            noexcept(std::is_nothrow_move_constructible<T>::value || std::is_nothrow_copy_constructible<T>::value)
    {
        _Pragma ("GCC diagnostic push")
        _Pragma ("GCC diagnostic ignored \"-Walloc-size-larger-than=\"")

        T *new_storage = (T *)(new (std::nothrow) char[c * sizeof(T)]);
        if (new_storage == nullptr) return false;

        _Pragma ("GCC diagnostic pop")

        // To transfer, we prefer move unless it is throwing and copy exists
        svec_helper::move_helper<T>::move(array, new_storage, size_v);

        delete[] (char *)array;
        array = new_storage;
        capacity_v = c;

        return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,8), %rax
leaq (%rax,%rax,2), %rdi
movq 0x7106(%rip), %rsi      # 0xbf80
callq 0x3410
movq %rax, %r15
testq %rax, %rax
je 0x4ec4
movq (%r14), %rdi
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x4eb3
xorl %ecx, %ecx
movq 0x10(%rdi,%rcx), %rdx
movq %rdx, 0x10(%r15,%rcx)
movups (%rdi,%rcx), %xmm0
movups %xmm0, (%r15,%rcx)
addq $0x18, %rcx
decq %rax
jne 0x4e95
jmp 0x4eb8
testq %rdi, %rdi
je 0x4ebd
callq 0x3330
movq %r15, (%r14)
movq %rbx, 0x10(%r14)
testq %r15, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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>::insert(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&)
bool insert(handle_t & hnd, const P &pval) noexcept
    {
        hnd.heap_index = hvec.size();
        // emplace an empty node; data/prio will be stored via bubble_down.
        hvec.emplace_back();
        return bubble_down(hvec.size() - 1, &hnd, pval);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
movq %rax, (%rsi)
callq 0x4f0c
movq 0x8(%r15), %rsi
decq %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x4f98
movq %rax, %rdi
callq 0x47e6
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq/svec.h
// Function: void dasynq::svector<dasynq::dary_heap<dasynq::v2::dprivate::empty_node, dasynq::stable_prio<int>, dasynq::compare_stable_prio<int, std::less<int>>, 4>::heap_node>::emplace_back<>()
void emplace_back(U... args)
    {
        if (!ensure_capacity(size_v + 1)) {
            throw std::bad_alloc();
        }
        new (&array[size_v]) T(args...);
        size_v++;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
incq %rax
cmpq %rax, %rcx
jae 0x4f63
movabsq $0xaaaaaaaaaaaaaaa, %rsi # imm = 0xAAAAAAAAAAAAAAA
cmpq %rsi, %rax
ja 0x4f69
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x4, %edx
cmovneq %rax, %rdx
movabsq $0x555555555555555, %rax # imm = 0x555555555555555
cmpq %rax, %rcx
cmovbq %rdx, %rsi
movq %rbx, %rdi
callq 0x4e5c
testb %al, %al
je 0x4f69
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
popq %rbx
retq
movl $0x8, %edi
callq 0x3130
movq 0x702e(%rip), %rcx      # 0xbfa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x7038(%rip), %rsi      # 0xbfc0
movq 0x7009(%rip), %rdx      # 0xbf98
movq %rax, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movabsq $0xaaaaaaaaaaaaaaa, %rsi # imm = 0xAAAAAAAAAAAAAAA
movq 0x18(%rdi), %rax
cmpq %rsi, %rax
je 0x7071
movq %rdx, %r14
movq %rdi, %r15
incq %rax
movq %rax, 0x18(%rdi)
cmpq %rax, 0x10(%rdi)
jb 0x7052
movq (%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x0, 0x10(%rbx)
movb $0x1, 0x14(%rbx)
movq %rax, 0x18(%rbx)
movq $-0x1, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq (%rax,%rax), %rcx
movabsq $0x555555555555555, %rdx # imm = 0x555555555555555
cmpq %rdx, %rax
cmovbq %rcx, %rsi
movq %r15, %rdi
callq 0x70ec
jmp 0x702c
movl $0x8, %edi
callq 0x3130
movq 0x4f26(%rip), %rcx      # 0xbfa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x4f30(%rip), %rsi      # 0xbfc0
movq 0x4f01(%rip), %rdx      # 0xbf98
movq %rax, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x30e0
movq 0x18(%r15), %rsi
movq %r15, %rdi
callq 0x70ec
callq 0x3400
jmp 0x702c
movq %rax, %rdi
callq 0x30e0
decq 0x18(%r15)
callq 0x33b0
movq %rax, %rbx
callq 0x3400
callq 0x3400
movq %rbx, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::register_fd(dasynq::v2::dprivate::base_fd_watcher*, int, int, bool, bool)
void register_fd(base_fd_watcher *callback, int fd, int eventmask, bool enabled, bool emulate = false)
    {
        std::lock_guard<mutex_t> guard(loop_mech.lock);

        loop_mech.prepare_watcher(callback);

        try {
            if (! loop_mech.add_fd_watch(fd, callback, eventmask | ONE_SHOT, enabled, emulate)) {
                callback->emulatefd = true;
                callback->emulate_enabled = enabled;
                if (enabled) {
                    callback->event_flags = eventmask & IO_EVENTS;
                    if (eventmask & IO_EVENTS) {
                        requeue_watcher(callback);
                    }
                }
            }
            else if (enabled && backend_traits_t::interrupt_after_fd_add) {
                interrupt_if_necessary();
            }
        }
        catch (...) {
            loop_mech.release_watcher(callback);
            throw;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
addq $0x10, %rsi
movq %rsi, (%rsp)
callq 0x51bc
movl %ebp, %ecx
orl $0x8, %ecx
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x50f6
testb %al, %al
jne 0x50b5
movb 0xc(%r15), %al
andb $-0xd, %al
leal (,%r12,8), %ecx
orb %al, %cl
orb $0x4, %cl
movb %cl, 0xc(%r15)
testb %r12b, %r12b
je 0x50b5
andl $0x3, %ebp
movl %ebp, 0x24(%r15)
je 0x50b5
movl 0x18(%r15), %eax
movq 0x20(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r14)
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x4ed0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x30e0
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x4e34
callq 0x33b0
movq %rax, %rbx
callq 0x3400
movq %rbx, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/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>>::add_fd_watch(int, void*, int, bool, bool)
bool add_fd_watch(int fd, void *userdata, int flags, bool enabled = true, bool soft_fail = false)
    {
        struct epoll_event epevent;
        // epevent.data.fd = fd;
        epevent.data.ptr = userdata;
        epevent.events = 0;
        
        if (flags & ONE_SHOT) {
            epevent.events = EPOLLONESHOT;
        }
        if ((flags & IN_EVENTS) && enabled) {
            epevent.events |= EPOLLIN;
        }
        if ((flags & OUT_EVENTS) && enabled) {
            epevent.events |= EPOLLOUT;
        }

        if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &epevent) == -1) {
            if (soft_fail && errno == EPERM) {
                return false;
            }
            throw std::system_error(errno, std::system_category());
        }
        return true;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %ebx
movl %esi, %eax
leaq 0x4(%rsp), %r9
movq %rdx, 0x4(%r9)
movl %ecx, %edx
andl $0x8, %edx
shll $0x1b, %edx
movl %ecx, %esi
andl %r8d, %esi
leal (%rdx,%rsi), %r10d
addl %esi, %edx
addl $0x4, %edx
testl %r8d, %r8d
cmovel %r10d, %edx
testb $0x2, %cl
cmovel %r10d, %edx
movl %edx, (%r9)
movl 0xa0(%rdi), %edi
movl $0x1, %esi
movl %eax, %edx
movq %r9, %rcx
callq 0x3360
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x515d
testb %bl, %bl
je 0x516c
callq 0x3040
cmpl $0x1, (%rax)
jne 0x516c
cmpl $-0x1, %ebp
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x3130
movq %rax, %rbx
callq 0x3040
movl (%rax), %ebp
callq 0x3160
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x52dc
movq 0x6def(%rip), %rsi      # 0xbf88
movq 0x6e10(%rip), %rdx      # 0xbfb0
movq %rbx, %rdi
callq 0x3430
movq %rax, %r14
movq %rbx, %rdi
callq 0x31b0
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq/svec.h
// Function: dasynq::svector<dasynq::dary_heap<dasynq::v2::dprivate::empty_node, dasynq::stable_prio<int>, dasynq::compare_stable_prio<int, std::less<int>>, 4>::heap_node>::reserve(unsigned long)
void reserve(size_t amount)
    {
        // Note that std::vector would throw length_error if amount > max_size(). We don't bother;
        // allocation will certainly fail in that case, so we'll throw bad_alloc instead.
        if (!ensure_capacity(amount, true)) {
            throw std::bad_alloc();
        }
    }

// Assembly:
pushq %rax
cmpq %rsi, 0x10(%rdi)
jae 0x52ab
movabsq $0xaaaaaaaaaaaaaaa, %rax # imm = 0xAAAAAAAAAAAAAAA
cmpq %rax, %rsi
ja 0x52ad
callq 0x4e5c
testb %al, %al
je 0x52ad
popq %rax
retq
movl $0x8, %edi
callq 0x3130
movq 0x6cea(%rip), %rcx      # 0xbfa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x6cf4(%rip), %rsi      # 0xbfc0
movq 0x6cc5(%rip), %rdx      # 0xbf98
movq %rax, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movb 0xc(%rdi), %al
testb $0x4, %al
jne 0x53a0
movl 0x1c(%r14), %edx
movl 0x20(%r14), %ecx
movzbl %bpl, %r8d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4dd6
jmp 0x53e5
testb %bpl, %bpl
je 0x53d9
movb $0x8, %r15b
testb $0x8, %al
jne 0x53dc
leaq 0x10(%r14), %rsi
movl 0x18(%r14), %eax
movq 0x20(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%rbx)
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %rbx, %rdi
callq 0x4ed0
movb 0xc(%r14), %al
jmp 0x53dc
xorl %r15d, %r15d
andb $-0x9, %al
orb %r15b, %al
movb %al, 0xc(%r14)
testb %bpl, %bpl
jne 0x53fc
movq 0x10(%r14), %rsi
cmpq $-0x1, %rsi
je 0x53fc
movq %rbx, %rdi
callq 0x5578
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
leaq (%rsi,%rsi,2), %rax
movq 0x10(%rcx,%rax,8), %rax
movq $-0x1, (%rax)
movq 0x8(%rdi), %rax
leaq 0x1(%rsi), %rdx
cmpq %rdx, %rax
je 0x55b8
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rcx
addq $-0x18, %rcx
movq 0x10(%rcx), %rdx
movq %rbx, %rdi
callq 0x55c2
movq 0x8(%rbx), %rax
decq %rax
movq %rax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testb $0x4, 0xc(%rsi)
jne 0x5723
movl 0xa0(%rbx), %edi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x3360
leaq 0xf(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5784
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5738
movq %rbx, %rdi
movq %r15, %rsi
callq 0x57b0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5738
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb 0xc(%rsi), %al
testb $0x1, %al
jne 0x5779
movq %rdi, %r14
leaq 0x10(%rbx), %r15
movq 0x10(%rbx), %rsi
cmpq $-0x1, %rsi
je 0x5760
movq %r14, %rdi
callq 0x5578
movq %r14, %rdi
movq %r15, %rsi
callq 0x4e34
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x20(%rax)
orb $0x2, %al
movb %al, 0xc(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
cmpl $-0x1, 0xa0(%rdi)
je 0x5838
movq %rbx, %rdi
callq 0x5882
movl 0xa0(%rbx), %edi
callq 0x3470
movl 0xa4(%rbx), %edi
cmpl $-0x1, %edi
je 0x5838
callq 0x3470
leaq 0x128(%rbx), %rdi
callq 0x58e0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x5852
callq 0x3330
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x5860
callq 0x3330
leaq 0x28(%rbx), %rdi
callq 0x5950
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5877
popq %rbx
jmp 0x3330
popq %rbx
retq
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x5972
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x59a0
movq 0x8(%rbx), %rax
jmp 0x595b
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5998
movq 0xa8(%rdi), %r14
movl $0xb0, %esi
callq 0x32b0
movq %r14, 0x10(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x597b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
je 0x5f6a
movq 0x28(%r14), %rdi
movl %ebx, %esi
callq 0x6034
cmpl $0x1, %eax
je 0x5f7b
cmpl $0x2, %eax
jne 0x5f82
movq 0x28(%r14), %rdi
callq 0x5408
movb $0x1, 0x30(%r14)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5f8c
movl $0x2, %eax
jmp 0x5f84
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %esi, %eax
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x80, %edx
movl %eax, %edi
callq 0x33a0
testl %eax, %eax
je 0x5fca
cmpl $-0x1, %eax
jne 0x5fd1
callq 0x3040
xorl %ebp, %ebp
cmpl $0xb, (%rax)
setne %bpl
addl %ebp, %ebp
jmp 0x6021
movl $0x2, %ebp
jmp 0x6021
movq 0x28(%rbx), %rcx
movl $0x1000, %r14d          # imm = 0x1000
subl 0x1004(%rcx), %r14d
cmpl %eax, %r14d
cmovgel %eax, %r14d
xorl %ebp, %ebp
testl %r14d, %r14d
jle 0x6021
movl %eax, %ecx
subl %r14d, %ecx
movslq %ecx, %r15
movslq %eax, %r12
cmpb $0xa, (%rsp,%r15)
jne 0x6016
leaq (%rsp,%r15), %rsi
movq 0x28(%rbx), %rdi
movl %r14d, %edx
callq 0x6092
movb $0x0, 0x30(%rbx)
incq %r15
decl %r14d
cmpq %r12, %r15
jl 0x5ffb
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movl %esi, %eax
movq %rdi, %rbx
movl 0x1000(%rdi), %ecx
movl 0x1004(%rdi), %edi
leal (%rdi,%rcx), %r8d
movl $0x1000, %r9d           # imm = 0x1000
cmpl %r9d, %r8d
leal -0x1000(%rdi,%rcx), %esi
cmovbl %r8d, %esi
movl $0x1000, %ecx           # imm = 0x1000
subl %esi, %ecx
subl %edi, %r9d
cmpl %ecx, %r9d
cmovael %ecx, %r9d
cmpl %edx, %r9d
cmovbl %r9d, %edx
addq %rbx, %rsi
movl %eax, %edi
callq 0x33a0
testq %rax, %rax
js 0x617b
addl %eax, 0x1004(%rbx)
popq %rbx
retq
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsi), %rbx
movq %rbx, %rsi
callq 0x51bc
leaq 0x28(%r14), %rdi
callq 0x61e4
movq $0x0, 0x20(%r15)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x30e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e34
callq 0x33b0
movq %rax, %rbx
callq 0x3400
movq %rbx, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rdi)
movl 0x28(%rdi), %r14d
cmpq %r14, %rcx
je 0x6202
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %rbx
movl 0x20(%rdi), %ebp
movl 0x24(%rdi), %ecx
incl %ecx
movl %ecx, 0x24(%rdi)
cmpl %ebp, %ecx
jbe 0x6234
movl $0xb0, %edi
callq 0x32a0
movq 0x10(%rbx), %rcx
movq %rcx, 0xa8(%rax)
movq %rax, 0x10(%rbx)
incl %ebp
movl %ebp, 0x20(%rbx)
jmp 0x6238
testl %ecx, %ecx
je 0x6242
addl $0x4, %r14d
movl %r14d, 0x28(%rbx)
jmp 0x61fd
movl $0xffffffff, 0x24(%rbx) # imm = 0xFFFFFFFF
movq %rax, 0x18(%rbx)
movl $0x8, %edi
callq 0x3130
movq 0x5d4a(%rip), %rcx      # 0xbfa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x5d54(%rip), %rsi      # 0xbfc0
movq 0x5d25(%rip), %rdx      # 0xbf98
movq %rax, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x30e0
decl 0x24(%rbx)
decq 0x18(%rbx)
callq 0x33b0
movq %rax, %rbx
callq 0x3400
movq %rbx, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x80000, %edi          # imm = 0x80000
callq 0x3340
movl %eax, 0xa0(%rbx)
cmpl $-0x1, %eax
je 0x6740
leaq 0xa8(%rbx), %rdi
callq 0x32f0
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x67ba
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x3130
movq %rax, %rbx
callq 0x3040
movl (%rax), %ebp
callq 0x3160
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x52dc
movq 0x581b(%rip), %rsi      # 0xbf88
movq 0x583c(%rip), %rdx      # 0xbfb0
movq %rbx, %rdi
callq 0x3430
movq %rax, %r14
movq %rbx, %rdi
callq 0x31b0
jmp 0x67a9
movq %rax, %rdi
callq 0x30e0
movl 0xa0(%rbx), %edi
callq 0x3470
callq 0x33b0
movq %rax, %r14
callq 0x3400
movq %r14, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/../dasynq/include/dasynq/timerfd.h
// Function: void 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>>>>::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)
    {
        timerfd_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
        if (timerfd_fd == -1) {
            throw std::system_error(errno, std::system_category());
        }
        systemtime_fd = timerfd_create(CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
        if (systemtime_fd == -1) {
            close (timerfd_fd);
            throw std::system_error(errno, std::system_category());
        }

        try {
            loop_mech->add_fd_watch(timerfd_fd, &timerfd_fd, IN_EVENTS);
            loop_mech->add_fd_watch(systemtime_fd, &systemtime_fd, IN_EVENTS);
            Base::init(loop_mech);
        }
        catch (...) {
            close(timerfd_fd);
            close(systemtime_fd);
            throw;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x3450
movl %eax, 0x98(%r14)
cmpl $-0x1, %eax
je 0x6859
xorl %edi, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x3450
movl %eax, 0x9c(%r14)
movl 0x98(%r14), %esi
cmpl $-0x1, %eax
je 0x6881
leaq 0x98(%r14), %r12
leaq 0x9c(%r14), %r15
movq %rbx, %rdi
movq %r12, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x50f6
movl (%r15), %esi
movq %rbx, %rdi
movq %r15, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x50f6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x690a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3130
movq %rax, %rbx
callq 0x3040
movl (%rax), %ebp
callq 0x3160
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x52dc
jmp 0x68ae
movl %esi, %edi
callq 0x3470
movl $0x20, %edi
callq 0x3130
movq %rax, %rbx
callq 0x3040
movl (%rax), %ebp
callq 0x3160
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x52dc
movq 0x56d3(%rip), %rsi      # 0xbf88
movq 0x56f4(%rip), %rdx      # 0xbfb0
movq %rbx, %rdi
callq 0x3430
jmp 0x68c6
movq %rax, %r14
movq %rbx, %rdi
callq 0x31b0
jmp 0x68f9
movq %rax, %rdi
callq 0x30e0
movl (%r12), %edi
callq 0x3470
movl (%r15), %edi
callq 0x3470
callq 0x33b0
movq %rax, %r14
callq 0x3400
movq %r14, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x47e6
nop