LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::bidi_fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::set_watch_enabled(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, bool, bool)
void set_watch_enabled(EventLoop &eloop, bool in, bool b)
    {
        int events = in ? IN_EVENTS : OUT_EVENTS;
        auto orig_flags = this->watch_flags;
        
        if (b) {
            this->watch_flags |= events;
        }
        else {
            this->watch_flags &= ~events;
        }

        dprivate::base_watcher * watcher = in ? this : &this->out_watcher;

        if (! watcher->emulatefd) {
            if (EventLoop::loop_traits_t::has_separate_rw_fd_watches) {
                eloop.set_fd_enabled_nolock(this, this->watch_fd, events | ONE_SHOT, b);
            }
            else {
                eloop.set_fd_enabled_nolock(this, this->watch_fd,
                        (this->watch_flags & IO_EVENTS) | ONE_SHOT,
                        (this->watch_flags & IO_EVENTS) != 0);
            }
        }
        else {
            // emulation: if enabling a previously disabled watcher, must queue now:
            if (b && (orig_flags != this->watch_flags)) {
                this->watch_flags = orig_flags;
                loop_access::requeue_watcher(eloop, watcher);
            }
        }

        if (! b) {
            eloop.dequeue_watcher(watcher);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %cl
movb %cl, -0x11(%rbp)
andb $0x1, %al
movb %al, -0x12(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movb -0x11(%rbp), %sil
movl $0x2, %ecx
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movl %ecx, -0x18(%rbp)
movl 0x20(%rax), %eax
movl %eax, -0x1c(%rbp)
testb $0x1, -0x12(%rbp)
je 0x11d9a
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
jmp 0x11daa
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
andl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
testb $0x1, -0x11(%rbp)
je 0x11dba
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x11dc6
movq -0x30(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb 0xc(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x11e11
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdi
movl 0x1c(%rsi), %edx
movl 0x20(%rsi), %ecx
andl $0x3, %ecx
orl $0x8, %ecx
movl 0x20(%rsi), %eax
andl $0x3, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %r8d
andl $0x1, %r8d
callq 0x11e60
jmp 0x11e3c
testb $0x1, -0x12(%rbp)
je 0x11e3a
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x20(%rcx), %eax
je 0x11e3a
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x11ee0
jmp 0x11e3c
testb $0x1, -0x12(%rbp)
jne 0x11e4f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x11f10
addq $0x40, %rsp
popq %rbp
retq
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>>::process_signal_rearm(dasynq::v2::dprivate::base_signal_watcher<dasynq::v2::epoll_traits::sigdata_t>*, dasynq::rearm)
void process_signal_rearm(base_signal_watcher * bsw, rearm rearm_type) noexcept
    {
        // Called with lock held
        if (rearm_type == rearm::REARM) {
            loop_mech.rearm_signal_watch_nolock(bsw->siginfo.get_signo(), bsw);
            if (backend_traits_t::interrupt_after_signal_add) {
                interrupt_if_necessary();
            }
        }
        else if (rearm_type == rearm::REMOVE) {
            loop_mech.remove_signal_watch_nolock(bsw->siginfo.get_signo());
        }
        // Note that signal watchers cannot (currently) be disarmed
    }

// 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 0x1654f
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x164d0
movq -0x20(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0x16580
jmp 0x1656f
cmpl $0x3, -0x14(%rbp)
jne 0x1656d
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x164d0
movq -0x20(%rbp), %rdi
movl %eax, %esi
callq 0x165d0
jmp 0x1656f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_set::load_service(char const*)
virtual service_record *load_service(const char *name)
    {
        auto r = find_service(name);
        if (r == nullptr) {
            throw service_not_found(name);
        }
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xace0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x16e00
jmp 0x1685c
movq -0x90(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x4b790
movq %rax, -0x98(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xade8
leaq -0x39(%rbp), %rdi
callq 0xa790
movq -0x98(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x16971
movb $0x1, -0x72(%rbp)
movl $0x40, %edi
callq 0xa320
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0xace0
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x16e00
jmp 0x168e6
movq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x16eb0
jmp 0x168f8
movq -0xb0(%rbp), %rdi
movb $0x0, -0x72(%rbp)
leaq 0x90026(%rip), %rsi     # 0xa6930
leaq 0x64f(%rip), %rdx       # 0x16f60
callq 0xac90
jmp 0x16987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0xa790
jmp 0x1697e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x16952
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xade8
leaq -0x71(%rbp), %rdi
callq 0xa790
testb $0x1, -0x72(%rbp)
jne 0x16963
jmp 0x1696f
movq -0xb0(%rbp), %rdi
callq 0xa510
jmp 0x1697e
movq -0x18(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xacc0
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_set::process_queues()
void process_queues() noexcept
    {
        while (! stop_queue.is_empty() || ! prop_queue.is_empty()) {
            while (! prop_queue.is_empty()) {
                auto next = prop_queue.pop_front();
                next->do_propagation();
            }
            if (! stop_queue.is_empty()) {
                auto next = stop_queue.pop_front();
                next->execute_transition();
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x40, %rdi
callq 0x17480
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x21(%rbp)
jne 0x173ef
jmp 0x17401
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x174a0
xorb $-0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1740a
jmp 0x1746d
jmp 0x1740c
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x174a0
xorb $-0x1, %al
testb $0x1, %al
jne 0x17421
jmp 0x1743d
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x174c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4cb80
jmp 0x1740c
movq -0x20(%rbp), %rdi
addq $0x40, %rdi
callq 0x17480
testb $0x1, %al
jne 0x17468
movq -0x20(%rbp), %rdi
addq $0x40, %rdi
callq 0x17510
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4d1e0
jmp 0x173d4
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: davmac314[P]dinit/src/includes/dinit-ll.h
// Function: slist<service_record, &extract_prop_queue(service_record*)>::pop_front()
T * pop_front() noexcept
    {
        T * r = first;
        auto &node = E(r);
        first = node.next;
        node.next = nullptr;
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16a60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_set::stop_all_services(shutdown_type_t)
void stop_all_services(shutdown_type_t type = shutdown_type_t::HALT) noexcept
    {
        restart_enabled = false;
        shutdown_type = type;
        for (std::list<service_record *>::iterator i = records.begin(); i != records.end(); ++i) {
            (*i)->stop(false);
            (*i)->unpin();
        }
        process_queues();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movb $0x0, 0x28(%rdi)
movb -0x9(%rbp), %al
movb %al, 0x29(%rdi)
addq $0x10, %rdi
callq 0x16aa0
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
callq 0x16ad0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x16b00
testb $0x1, %al
jne 0x17bb5
jmp 0x17be4
leaq -0x18(%rbp), %rdi
callq 0x16b30
movq (%rax), %rdi
xorl %esi, %esi
callq 0x4d7d0
leaq -0x18(%rbp), %rdi
callq 0x16b30
movq (%rax), %rdi
callq 0x4dd20
leaq -0x18(%rbp), %rdi
callq 0x16b60
jmp 0x17b91
movq -0x28(%rbp), %rdi
callq 0x173c0
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>>::register_signal(dasynq::v2::dprivate::base_signal_watcher<dasynq::v2::epoll_traits::sigdata_t>*, int)
void register_signal(base_signal_watcher *callBack, int signo)
    {
        std::lock_guard<mutex_t> guard(loop_mech.lock);

        loop_mech.prepare_watcher(callBack);
        try {
            loop_mech.add_signal_watch_nolock(signo, callBack);
            if (backend_traits_t::interrupt_after_signal_add) {
                interrupt_if_necessary();
            }
        }
        catch (...) {
            loop_mech.release_watcher(callBack);
            throw;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x38(%rbp)
addq $0x28, %rsi
leaq -0x20(%rbp), %rdi
callq 0x11d10
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x13850
jmp 0x1bbc7
movq -0x38(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x1a770
jmp 0x1bbd9
jmp 0x1bc27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1bc36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xa240
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x12ea0
callq 0xaaf0
jmp 0x1bc50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xac30
jmp 0x1bc25
jmp 0x1bc36
leaq -0x20(%rbp), %rdi
callq 0x11ec0
addq $0x40, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x11ec0
movq -0x28(%rbp), %rdi
callq 0xacc0
movq %rax, %rdi
callq 0xfa30
// File: davmac314[P]dinit/src/includes/load-service.h
// Function: void dinit_load::service_settings_wrapper<prelim_dep>::finalise<true, dirload_service_set::load_reload_service(char const*, service_record*, service_record const*)::$_2, void (char const*), char const* (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, environment::env_map const&), false>(dirload_service_set::load_reload_service(char const*, service_record*, service_record const*)::$_2&, environment::env_map const&, char const*, void (&)(char const*), char const* (&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, environment::env_map const&))
void finalise(T &report_error, environment::env_map const &envmap, const char *argval,
            U &report_lint = dummy_lint, V &var_subst = resolve_env_var)
    {
        auto do_var_subst = [&](const std::string &name) {
            return var_subst(name, envmap);
        };
        finalise<propagate_sde, T, U, decltype(do_var_subst), do_report_lint>(report_error,
                argval, report_lint, do_var_subst);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %r8
callq 0x2bc80
addq $0x40, %rsp
popq %rbp
retq
nop
// File: davmac314[P]dinit/src/load-service.cc
// Function: do_env_subst(char const*, ha_string&, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&, environment::env_map const&, char const*)
static void do_env_subst(const char *setting_name, ha_string &line,
        std::list<std::pair<unsigned,unsigned>> &offsets,
        environment::env_map const &envmap, const char *arg)
{
    using namespace dinit_load;
    std::string line_s = std::string(line.c_str(), line.length());
    value_var_subst(setting_name, line_s, offsets, [&](const std::string &name) {
        return resolve_env_var(name, envmap);
    }, arg);
    line = line_s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40720
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40740
movq %rax, -0x78(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xace0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
leaq -0x48(%rbp), %rdi
callq 0xa800
jmp 0x2384d
leaq -0x49(%rbp), %rdi
callq 0xa790
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %r8
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rcx
callq 0x24260
jmp 0x23879
movq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x40760
jmp 0x23888
leaq -0x48(%rbp), %rdi
callq 0xade8
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0xa790
jmp 0x238c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xade8
movq -0x58(%rbp), %rdi
callq 0xacc0
nop
// File: davmac314[P]dinit/src/load-service.cc
// Function: update_command_and_dependencies(base_process_service*, dinit_load::service_settings_wrapper<prelim_dep>&, std::__cxx11::list<service_dep, std::allocator<service_dep>>&)
static void update_command_and_dependencies(base_process_service *service,
        dinit_load::service_settings_wrapper<prelim_dep> &settings,
        std::list<service_dep> &before_deps)
{
    // Get the current command parts
    ha_string orig_cmd; std::vector<const char *> orig_arg_parts;
    service->get_command(orig_cmd, orig_arg_parts);

    // Separate the new command parts and set
    std::vector<const char *> cmd_arg_parts = separate_args(settings.command, settings.command_offsets);
    service->set_command(std::move(settings.command), std::move(cmd_arg_parts));

    try {
        update_depenencies(service, settings, before_deps);
    }
    catch (...) {
        // restore original command
        service->set_command(std::move(orig_cmd), std::move(orig_arg_parts));

        // re-throw the exception
        throw;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x32f90
leaq -0x40(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x15570
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x8(%rbp), %rdi
callq 0x41ff0
jmp 0x23954
movq -0x10(%rbp), %rsi
movq %rsi, %rdx
addq $0x10, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4f230
jmp 0x2396a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x42040
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x23a30
jmp 0x2398e
jmp 0x239e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x23a0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa240
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x42040
callq 0xaaf0
jmp 0x23a30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0xac30
jmp 0x239de
leaq -0x68(%rbp), %rdi
callq 0x177c0
jmp 0x23a0d
leaq -0x68(%rbp), %rdi
callq 0x177c0
leaq -0x40(%rbp), %rdi
callq 0x177c0
leaq -0x28(%rbp), %rdi
callq 0x33120
addq $0x80, %rsp
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x177c0
leaq -0x28(%rbp), %rdi
callq 0x33120
movq -0x48(%rbp), %rdi
callq 0xacc0
movq %rax, %rdi
callq 0xfa30
// File: davmac314[P]dinit/src/includes/proc-service.h
// Function: base_process_service::set_logfile_details(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, int, unsigned int, unsigned int)
void set_logfile_details(string &&logfile, int logfile_perms, uid_t logfile_uid, gid_t logfile_gid)
            noexcept
    {
        this->logfile = std::move(logfile);
        this->logfile_perms = logfile_perms;
        this->logfile_uid = logfile_uid;
        this->logfile_gid = logfile_gid;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
addq $0x2a0, %rdi            # imm = 0x2A0
callq 0xa8b0
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x2c0(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x2c4(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x2c8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/includes/proc-service.h
// Function: base_process_service::set_log_mode(log_type_id)
void set_log_mode(log_type_id log_type) noexcept
    {
        if (this->log_type == log_type) {
            return;
        }
        if (log_output_fd != -1) {
            if (this->log_type == log_type_id::BUFFER) {
                log_output_listener.deregister(event_loop);
            }
            if (!value(log_type).is_in(log_type_id::BUFFER, log_type_id::PIPE)) {
                bp_sys::close(log_output_fd);
                bp_sys::close(log_input_fd);
                log_output_fd = log_input_fd = -1;
            }
        }
        this->log_type = log_type;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl 0x298(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x2fb27
jmp 0x2fbeb
movq -0x28(%rbp), %rax
cmpl $-0x1, 0x4ec(%rax)
je 0x2fbde
movq -0x28(%rbp), %rax
cmpl $0x2, 0x298(%rax)
jne 0x2fb5c
movq -0x28(%rbp), %rdi
addq $0x408, %rdi            # imm = 0x408
leaq 0x79009(%rip), %rsi     # 0xa8b60
callq 0x17d20
leaq -0xc(%rbp), %rdi
callq 0x430d0
movq %rax, -0x30(%rbp)
jmp 0x2fb6b
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x2, -0x1c(%rbp)
movl $0x3, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x43100
movb %al, -0x31(%rbp)
jmp 0x2fb97
movb -0x31(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2fba2
jmp 0x2fbdc
movq -0x28(%rbp), %rax
movl 0x4ec(%rax), %edi
callq 0xad80
jmp 0x2fbb3
movq -0x28(%rbp), %rax
movl 0x4f0(%rax), %edi
callq 0xad80
jmp 0x2fbc4
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4f0(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x4ec(%rax) # imm = 0xFFFFFFFF
jmp 0x2fbde
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x298(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xfa30
nopl (%rax)
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_record::set_socket_details(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, int, unsigned int, unsigned int)
void set_socket_details(string &&socket_path, int socket_perms, uid_t socket_uid, uid_t socket_gid)
            noexcept
    {
        this->socket_path = std::move(socket_path);
        this->socket_perms = socket_perms;
        this->socket_uid = socket_uid;
        this->socket_gid = socket_gid;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
addq $0x198, %rdi            # imm = 0x198
callq 0xa8b0
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x1b8(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x1bc(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x1c0(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_record::rm_dep(service_dep&)
void rm_dep(service_dep &dep) noexcept
    {
        for (auto i = depends_on.begin(); i != depends_on.end(); ++i) {
            if (&(*i) == &dep) {
                rm_dep(i);
                return;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x118, %rdi            # imm = 0x118
callq 0x30240
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
callq 0x30270
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x302a0
testb $0x1, %al
jne 0x305ff
jmp 0x30636
leaq -0x18(%rbp), %rdi
callq 0x302d0
cmpq -0x10(%rbp), %rax
jne 0x30629
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x43500
movq %rax, -0x30(%rbp)
jmp 0x30636
jmp 0x3062b
leaq -0x18(%rbp), %rdi
callq 0x30330
jmp 0x305d8
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/includes/service.h
// Function: placeholder_service::get_output_pipe_fd()
int get_output_pipe_fd() noexcept override
    {
        if (log_input_fd != -1) {
            return log_input_fd;
        }

        int pipefds[2];
        if (bp_sys::pipe2(pipefds, O_CLOEXEC) == -1) {
            log(loglevel_t::ERROR, get_name(), " (placeholder): Can't open output pipe: ", std::strerror(errno));
            return -1;
        }
        log_input_fd = pipefds[0];
        log_output_fd = pipefds[1];
        return log_input_fd;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $-0x1, 0x20c(%rax)
je 0x3caec
movq -0x28(%rbp), %rax
movl 0x20c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3cb5d
leaq -0x18(%rbp), %rdi
movl $0x80000, %esi          # imm = 0x80000
callq 0xa490
cmpl $-0x1, %eax
jne 0x3cb3e
movq -0x28(%rbp), %rdi
callq 0x2d420
movq %rax, -0x30(%rbp)
callq 0xa060
movl (%rax), %edi
callq 0xa1f0
movq -0x30(%rbp), %rsi
movq %rax, -0x20(%rbp)
movl $0x3, %edi
leaq 0x3b06b(%rip), %rdx     # 0x77b97
leaq -0x20(%rbp), %rcx
callq 0x241a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3cb5d
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, 0x20c(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, 0x208(%rax)
movl 0x20c(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/includes/dinit-util.h
// Function: linked_uo_set<service_record*, std::hash<service_record*>, std::equal_to<service_record*>>::add_back(service_record* const&)
bool add_back(const value_type &value)
    {
        auto it_b = backing.insert({value, nullptr});
        if (it_b.second) {
            auto *new_ent = &(*it_b.first);
            if (last != nullptr) {
                last->next = new_ent;
            }
            last = new_ent;
            if (first == nullptr) {
                first = new_ent;
            }
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x3e210
testb $0x1, -0x20(%rbp)
je 0x3dfee
leaq -0x38(%rbp), %rdi
callq 0x3e240
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x50(%rbp)
cmpq $0x0, 0x38(%rax)
je 0x3dfc9
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x38(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x38(%rax)
cmpq $0x0, 0x30(%rax)
jne 0x3dfe8
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x30(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x3dff2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/includes/dinit-util.h
// Function: ha_string::operator=(ha_string const&)
ha_string &operator=(const ha_string &other)
    {
        char *new_str_data = new char[other.str_len + 1];
        delete[] str_data;
        memcpy(new_str_data, other.str_data, other.str_len + 1);
        str_data = new_str_data;
        str_len = other.str_len;
        return *this;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x1, %rdi
callq 0xa030
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x420da
movq -0x20(%rbp), %rdi
callq 0xa960
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
addq $0x1, %rdx
callq 0xa5b0
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: davmac314[P]dinit/src/includes/dinit-util.h
// Function: ha_string::operator=(ha_string&&)
ha_string &operator=(ha_string &&other) noexcept
    {
        delete[] str_data;
        str_data = other.str_data;
        str_len = other.str_len;
        other.str_data = nullptr;
        other.str_len = 0;
        return *this;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x42bae
movq -0x18(%rbp), %rdi
callq 0xa960
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq $0x0, (%rcx)
movq -0x10(%rbp), %rcx
movq $0x0, 0x8(%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_record::add_dep(service_record*, dependency_type, std::_List_iterator<service_dep>)
service_dep &add_dep(service_record *to, dependency_type dep_type, dep_list::iterator i)
    {
        auto pre_i = depends_on.emplace(i, this, to, dep_type);
        try {
            to->dependents.push_back(&(*pre_i));
        }
        catch (...) {
            depends_on.erase(pre_i);
            throw;
        }

        if (dep_type != dependency_type::BEFORE && dep_type != dependency_type::AFTER) {
            if (dep_type == dependency_type::REGULAR
                    || to->get_state() == service_state_t::STARTED
                    || to->get_state() == service_state_t::STARTING) {
                if (service_state == service_state_t::STARTING
                        || service_state == service_state_t::STARTED) {
                    to->require();
                    pre_i->holding_acq = true;
                }
            }
        }

        return *pre_i;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rcx, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x304b0
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x18(%rbp), %rcx
leaq -0x1c(%rbp), %r8
callq 0x43930
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x302d0
movq -0x68(%rbp), %rdi
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x302f0
jmp 0x433a8
jmp 0x4340a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa240
movq -0x78(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x80(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x304b0
movq -0x80(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x439b0
movq %rax, -0x60(%rbp)
callq 0xaaf0
jmp 0x43487
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0xac30
jmp 0x43408
jmp 0x43476
cmpl $0x4, -0x1c(%rbp)
je 0x43464
cmpl $0x5, -0x1c(%rbp)
je 0x43464
cmpl $0x0, -0x1c(%rbp)
je 0x43436
movq -0x18(%rbp), %rdi
callq 0x2f0d0
cmpb $0x2, %al
je 0x43436
movq -0x18(%rbp), %rdi
callq 0x2f0d0
cmpb $0x1, %al
jne 0x43462
movq -0x78(%rbp), %rax
cmpb $0x1, 0x2c(%rax)
je 0x4344a
movq -0x78(%rbp), %rax
cmpb $0x2, 0x2c(%rax)
jne 0x43460
movq -0x18(%rbp), %rdi
callq 0x4c3d0
leaq -0x28(%rbp), %rdi
callq 0x303e0
movb $0x1, 0x11(%rax)
jmp 0x43462
jmp 0x43464
leaq -0x28(%rbp), %rdi
callq 0x302d0
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xacc0
movq %rax, %rdi
callq 0xfa30
nopw (%rax,%rax)
// File: davmac314[P]dinit/src/includes/service.h
// Function: service_record::rm_dep(std::_List_iterator<service_dep>)
dep_list::iterator rm_dep(dep_list::iterator i) noexcept
    {
        auto to = i->get_to();
        for (auto j = to->dependents.begin(); ; ++j) {
            if (*j == &(*i)) {
                to->dependents.erase(j);
                break;
            }
        }
        if (i->holding_acq) {
            to->release();
        }
        return depends_on.erase(i);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x303e0
movq %rax, %rdi
callq 0x3cda0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x304d0
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x30590
movq (%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x302d0
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jne 0x43594
movq -0x20(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x30680
movq -0x58(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x43c00
movq %rax, -0x38(%rbp)
jmp 0x435a1
jmp 0x43596
leaq -0x28(%rbp), %rdi
callq 0x306a0
jmp 0x43541
leaq -0x10(%rbp), %rdi
callq 0x303e0
testb $0x1, 0x11(%rax)
je 0x435be
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x4c070
movq -0x48(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x304b0
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x439b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davmac314[P]dinit/src/service.cc
// Function: service_set::find_service(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
service_record * service_set::find_service(const std::string &name, bool find_placeholders) noexcept
{
    service_record *r = ::find_service(records, name.c_str());
    if (r != nullptr && !find_placeholders && r->get_type() == service_type_t::PLACEHOLDER) {
        return nullptr;
    }
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa250
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x4b810
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4b7f1
testb $0x1, -0x19(%rbp)
jne 0x4b7f1
movq -0x28(%rbp), %rdi
callq 0x2d5a0
cmpl $0x0, %eax
jne 0x4b7f1
movq $0x0, -0x8(%rbp)
jmp 0x4b7f9
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: find_service(std::__cxx11::list<service_record*, std::allocator<service_record*>> const&, char const*)
static service_record * find_service(const std::list<service_record *> & records,
                                    const char *name) noexcept
{
    using std::list;
    list<service_record *>::const_iterator i = records.begin();
    for ( ; i != records.end(); ++i ) {
        if (strcmp((*i)->get_name().c_str(), name) == 0) {
            return *i;
        }
    }
    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4e790
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4e7f0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4e7c0
testb $0x1, %al
jne 0x4b84d
jmp 0x4b896
leaq -0x20(%rbp), %rdi
callq 0x4e820
movq (%rax), %rdi
callq 0x2d420
movq %rax, %rdi
callq 0xa250
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xaa50
cmpl $0x0, %eax
jne 0x4b889
leaq -0x20(%rbp), %rdi
callq 0x4e820
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x4b89e
jmp 0x4b88b
leaq -0x20(%rbp), %rdi
callq 0x4e850
jmp 0x4b82d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::dependency_started()
void service_record::dependency_started() noexcept
{
    // Note that we check for STARTED state here in case the service is in smooth recovery while pinned.
    // In that case it will wait for dependencies to start before restarting the process.
    if ((service_state == service_state_t::STARTING || service_state == service_state_t::STARTED)
            && waiting_for_deps) {
        services->add_transition_queue(this);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpb $0x1, 0x2c(%rax)
je 0x4c034
movq -0x10(%rbp), %rax
cmpb $0x2, 0x2c(%rax)
jne 0x4c05b
movq -0x10(%rbp), %rax
movl 0x10c(%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
testl $0x1, %eax
je 0x4c05b
movq -0x10(%rbp), %rsi
movq 0x148(%rsi), %rdi
callq 0x4e3b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::release(bool)
void service_record::release(bool issue_stop) noexcept
{
    if (--required_by == 0) {
        if (service_state == service_state_t::STOPPING) {
            // If we are stopping but would have restarted, we now need to notify that the restart
            // has been cancelled. Other start-cancelled cases are handled by do_stop() (called
            // below).
            if (desired_state == service_state_t::STARTED && !is_start_pinned()) {
                notify_listeners(service_event_t::STARTCANCELLED);
            }
        }
        desired_state = service_state_t::STOPPED;

        if (is_start_pinned()) return;

        // Can stop, and can release dependencies now. We don't need to issue a release if
        // a require was pending though:
        prop_release = !prop_require;
        prop_require = false;
        if (prop_release) {
            services->add_prop_queue(this);
        }

        if (service_state != service_state_t::STOPPED && service_state != service_state_t::STOPPING
                && issue_stop) {
            stop_reason = stopped_reason_t::NORMAL;
            do_stop();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x110(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x110(%rcx)
cmpl $0x0, %eax
jne 0x4c186
movq -0x18(%rbp), %rax
cmpb $0x3, 0x2c(%rax)
jne 0x4c0d5
movq -0x18(%rbp), %rax
cmpb $0x2, 0x2d(%rax)
jne 0x4c0d3
movq -0x18(%rbp), %rdi
callq 0x4e360
testb $0x1, %al
jne 0x4c0d3
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x4e2a0
jmp 0x4c0d5
movq -0x18(%rbp), %rdi
movb $0x0, 0x2d(%rdi)
callq 0x4e360
testb $0x1, %al
jne 0x4c0e8
jmp 0x4c0ed
jmp 0x4c186
movq -0x18(%rbp), %rax
movl 0x10c(%rax), %ecx
shrl $0x9, %ecx
andl $0x1, %ecx
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %edx
movl 0x10c(%rax), %ecx
shll $0xa, %edx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
orl %edx, %ecx
movl %ecx, 0x10c(%rax)
movl 0x10c(%rax), %ecx
andl $0xfffffdff, %ecx       # imm = 0xFFFFFDFF
orl $0x0, %ecx
movl %ecx, 0x10c(%rax)
movl 0x10c(%rax), %eax
shrl $0xa, %eax
andl $0x1, %eax
testl $0x1, %eax
je 0x4c155
movq -0x18(%rbp), %rsi
movq 0x148(%rsi), %rdi
callq 0x4e320
movq -0x18(%rbp), %rax
cmpb $0x0, 0x2c(%rax)
je 0x4c184
movq -0x18(%rbp), %rax
cmpb $0x3, 0x2c(%rax)
je 0x4c184
testb $0x1, -0x9(%rbp)
je 0x4c184
movq -0x18(%rbp), %rdi
movl $0x0, 0x1c4(%rdi)
xorl %esi, %esi
callq 0x4c440
jmp 0x4c186
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::initiate_start()
void service_record::initiate_start() noexcept
{
    start_failed = false;
    start_skipped = false;
    service_state = service_state_t::STARTING;
    waiting_for_deps = true;

    if (start_check_dependencies()) {
        // Note: we can't set waiting_for_deps false here since ordering dependencies might still kick in
        services->add_transition_queue(this);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movl 0x10c(%rdi), %eax
andl $0xffff7fff, %eax       # imm = 0xFFFF7FFF
orl $0x0, %eax
movl %eax, 0x10c(%rdi)
movl 0x10c(%rdi), %eax
andl $0xfffeffff, %eax       # imm = 0xFFFEFFFF
orl $0x0, %eax
movl %eax, 0x10c(%rdi)
movb $0x1, 0x2c(%rdi)
movl 0x10c(%rdi), %eax
andl $-0x11, %eax
orl $0x10, %eax
movl %eax, 0x10c(%rdi)
callq 0x4ca20
testb $0x1, %al
jne 0x4c23d
jmp 0x4c24d
movq -0x10(%rbp), %rsi
movq 0x148(%rsi), %rdi
callq 0x4e3b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::start()
void service_record::start() noexcept
{
    if (pinned_stopped) {
        // bail out early for this case, we don't want to set start_explicit
        return;
    }

    if (!start_explicit) {
        ++required_by;
        start_explicit = true;
    }

    do_start();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x10c(%rax), %eax
shrl %eax
andl $0x1, %eax
testl $0x1, %eax
je 0x4c2d8
jmp 0x4c323
movq -0x10(%rbp), %rax
movl 0x10c(%rax), %eax
shrl $0x8, %eax
andl $0x1, %eax
testl $0x1, %eax
jne 0x4c31a
movq -0x10(%rbp), %rax
movl 0x110(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x110(%rax)
movl 0x10c(%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x10c(%rax)
movq -0x10(%rbp), %rdi
callq 0x4c840
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::require()
void service_record::require() noexcept
{
    if (required_by++ == 0) {
        if (service_state != service_state_t::STARTING && service_state != service_state_t::STARTED) {
            prop_start = true;
            services->add_prop_queue(this);
            // Note: pin is checked in start().
            // Require will be propagated to dependencies if/when the service actually starts.
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movl 0x110(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x110(%rcx)
cmpl $0x0, %eax
jne 0x4c436
movq -0x10(%rbp), %rax
cmpb $0x1, 0x2c(%rax)
je 0x4c434
movq -0x10(%rbp), %rax
cmpb $0x2, 0x2c(%rax)
je 0x4c434
movq -0x10(%rbp), %rsi
movl 0x10c(%rsi), %eax
andl $0xffffefff, %eax       # imm = 0xFFFFEFFF
orl $0x1000, %eax           # imm = 0x1000
movl %eax, 0x10c(%rsi)
movq 0x148(%rsi), %rdi
callq 0x4e320
jmp 0x4c436
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::release_dependencies()
void service_record::release_dependencies() noexcept
{
    for (auto & dependency : depends_on) {
        service_record * dep_to = dependency.get_to();
        if (dependency.holding_acq) {
            // We must clear holding_acq before calling release, otherwise the dependency
            // may decide to stop, check this link and release itself a second time.
            dependency.holding_acq = false;
            dep_to->release();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30240
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30270
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x302a0
testb $0x1, %al
jne 0x4c7e7
jmp 0x4c82e
leaq -0x18(%rbp), %rdi
callq 0x302d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3cda0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x11(%rax)
je 0x4c821
movq -0x28(%rbp), %rax
movb $0x0, 0x11(%rax)
movq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x4c070
jmp 0x4c823
leaq -0x18(%rbp), %rdi
callq 0x30330
jmp 0x4c7d4
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::start_check_dependencies()
bool service_record::start_check_dependencies() noexcept
{
    bool all_deps_started = true;

    for (auto & dep : depends_on) {
        service_record * to = dep.get_to();
        if (dep.is_only_ordering()
                && to->service_state != service_state_t::STARTING) continue;
        if (to->service_state != service_state_t::STARTED) {
            dep.waiting_on = true;
            all_deps_started = false;
        }
    }

    for (auto * dept : dependents) {
        if (!dept->waiting_on && dept->is_only_ordering()) {
            service_record *from = dept->get_from();
            if (from->get_state() == service_state_t::STARTING) {
                dept->waiting_on = true;
            }
        }
    }

    return all_deps_started;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x1, -0x9(%rbp)
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30240
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30270
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x302a0
testb $0x1, %al
jne 0x4ca6f
jmp 0x4cacf
leaq -0x20(%rbp), %rdi
callq 0x302d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3cda0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4e3f0
movb %al, -0x69(%rbp)
jmp 0x4ca97
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x4caa0
jmp 0x4caac
movq -0x38(%rbp), %rax
cmpb $0x1, 0x2c(%rax)
je 0x4caac
jmp 0x4cac4
movq -0x38(%rbp), %rax
cmpb $0x2, 0x2c(%rax)
je 0x4cac2
movq -0x30(%rbp), %rax
movb $0x1, 0x10(%rax)
movb $0x0, -0x9(%rbp)
jmp 0x4cac4
leaq -0x20(%rbp), %rdi
callq 0x30330
jmp 0x4ca5c
movq -0x68(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x304d0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x30530
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x30500
testb $0x1, %al
jne 0x4cb0a
jmp 0x4cb6c
leaq -0x48(%rbp), %rdi
callq 0x30590
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x4cb5f
movq -0x58(%rbp), %rdi
callq 0x4e3f0
movb %al, -0x6a(%rbp)
jmp 0x4cb32
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x4cb3b
jmp 0x4cb5f
movq -0x58(%rbp), %rdi
callq 0x30420
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x2f0d0
cmpb $0x1, %al
jne 0x4cb5d
movq -0x58(%rbp), %rax
movb $0x1, 0x10(%rax)
jmp 0x4cb5f
jmp 0x4cb61
leaq -0x48(%rbp), %rdi
callq 0x306a0
jmp 0x4caf7
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xfa30
nop
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::execute_transition()
void service_record::execute_transition() noexcept
{
    if (service_state == service_state_t::STARTING) {
        if (check_deps_started()) {
            waiting_for_deps = false;
            all_deps_started();
        }
    }
    else if (service_state == service_state_t::STOPPING) {
        if (stop_check_dependents()) {
            waiting_for_deps = false;
            if (onstart_flags.kill_all_on_stop) {
                log(loglevel_t::NOTICE, true, "Sending TERM/KILL to all processes...\n");
                kill(-1, SIGTERM);
                sleep(1);
                kill(-1, SIGKILL);
            }
            bring_down();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpb $0x1, 0x2c(%rax)
jne 0x4d229
movq -0x10(%rbp), %rdi
callq 0x4d2d0
testb $0x1, %al
jne 0x4d209
jmp 0x4d224
movq -0x10(%rbp), %rdi
movl 0x10c(%rdi), %eax
andl $-0x11, %eax
orl $0x0, %eax
movl %eax, 0x10c(%rdi)
callq 0x4d350
jmp 0x4d2ba
movq -0x10(%rbp), %rax
cmpb $0x3, 0x2c(%rax)
jne 0x4d2b8
movq -0x10(%rbp), %rdi
callq 0x4d3e0
testb $0x1, %al
jne 0x4d246
jmp 0x4d2b6
movq -0x10(%rbp), %rax
movl 0x10c(%rax), %ecx
andl $-0x11, %ecx
orl $0x0, %ecx
movl %ecx, 0x10c(%rax)
movw 0x2e(%rax), %ax
shrw $0xb, %ax
andw $0x1, %ax
testw $0x1, %ax
je 0x4d2ac
leaq 0x2b74e(%rip), %rdx     # 0x789c3
movl $0x1, %esi
movl %esi, -0x14(%rbp)
movl %esi, %edi
callq 0x6b660
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xf, %esi
callq 0xaa90
movl -0x14(%rbp), %edi
callq 0xa540
jmp 0x4d29d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x9, %esi
callq 0xaa90
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4d2b8
jmp 0x4d2ba
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xfa30
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/service.cc
// Function: service_record::check_deps_started()
bool service_record::check_deps_started() noexcept
{
    for (auto & dep : depends_on) {
        if (dep.waiting_on) {
            return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30240
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30270
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x302a0
testb $0x1, %al
jne 0x4d317
jmp 0x4d341
leaq -0x20(%rbp), %rdi
callq 0x302d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0x4d334
movb $0x0, -0x1(%rbp)
jmp 0x4d345
jmp 0x4d336
leaq -0x20(%rbp), %rdi
callq 0x30330
jmp 0x4d304
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq