// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/service.cc
// Function: service_record::do_propagation()
void service_record::do_propagation() noexcept
{
    if (prop_require) {
        // Need to require all our dependencies
        for (auto & dep : depends_on) {
            if (!dep.is_only_ordering()) {
                dep.get_to()->require();
                dep.holding_acq = true;
            }
        }
        prop_require = false;
    }

    if (prop_release) {
        release_dependencies();
        prop_release = false;
    }

    if (prop_failure) {
        prop_failure = false;
        stop_reason = stopped_reason_t::DEPFAILED;
        service_state = service_state_t::STOPPED;
        failed_to_start(true);
    }

    if (prop_start) {
        prop_start = false;
        do_start();
    }

    if (prop_stop) {
        prop_stop = false;
        do_stop(in_user_restart);
    }

    if (prop_pin_dpt) {
        bool dept_pin = false;
        for (auto *dept : dependents) {
            if (dept->is_hard() && dept->get_from()->is_start_pinned()) {
                dept_pin = true;
                break;
            }
        }
        if (dept_pin != dept_pinned_started) {
            dept_pinned_started = dept_pin;
            for (auto &dep : depends_on) {
                if (dep.is_hard() && dep.get_to()->dept_pinned_started != dept_pin) {
                    dep.get_to()->prop_pin_dpt = true;
                    services->add_prop_queue(dep.get_to());
                }
            }

            if (!dept_pinned_started && !pinned_started) {
                // No longer pinned at all
                if ((desired_state == service_state_t::STOPPED || force_stop)
                        && service_state == service_state_t::STARTED) {
                    do_stop();
                }
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x10c(%rdi), %esi
btl $0x9, %esi
jae 0x23153
leaq 0x118(%rbx), %r14
movq 0x118(%rbx), %r15
cmpq %r14, %r15
je 0x23147
movl 0x24(%r15), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
je 0x23139
movq 0x18(%r15), %rdi
callq 0x22c46
movb $0x1, 0x21(%r15)
movq (%r15), %r15
cmpq %r14, %r15
jne 0x2311f
movl 0x10c(%rbx), %esi
andl $0xfffffdff, %esi       # imm = 0xFFFFFDFF
movl %esi, 0x10c(%rbx)
btl $0xa, %esi
jae 0x23172
movq %rbx, %rdi
callq 0x22f00
movl $0xfffffbff, %esi       # imm = 0xFFFFFBFF
andl 0x10c(%rbx), %esi
movl %esi, 0x10c(%rbx)
btl $0xb, %esi
jae 0x231aa
andl $0xfffff7ff, %esi       # imm = 0xFFFFF7FF
movl %esi, 0x10c(%rbx)
movl $0x2, 0x1c4(%rbx)
movb $0x0, 0x2c(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x23316
movl 0x10c(%rbx), %esi
btl $0xc, %esi
jae 0x231ca
andl $0xffffefff, %esi       # imm = 0xFFFFEFFF
movl %esi, 0x10c(%rbx)
movq %rbx, %rdi
callq 0x22f42
movl 0x10c(%rbx), %esi
btl $0xd, %esi
jae 0x231f1
movl %esi, %eax
andl $0xffffdfff, %eax       # imm = 0xFFFFDFFF
movl %eax, 0x10c(%rbx)
shrl $0x12, %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x22c98
movl 0x10c(%rbx), %esi
btl $0xe, %esi
jae 0x232ec
leaq 0x130(%rbx), %rcx
movq 0x130(%rbx), %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
je 0x2323f
movq 0x10(%rdx), %rdi
movl 0x14(%rdi), %r8d
testl %r8d, %r8d
je 0x23229
cmpl $0x3, %r8d
jne 0x23235
cmpb $0x1, 0x10(%rdi)
jne 0x23235
movq (%rdi), %rdi
testb $0xc, 0x10c(%rdi)
jne 0x2323a
movq (%rdx), %rdx
jmp 0x2320b
movl $0x1, %eax
movl %esi, %ecx
shrl $0x3, %ecx
andl $0x1, %ecx
cmpl %eax, %ecx
je 0x232ec
andl $-0x9, %esi
leal (%rsi,%rax,8), %esi
movl %esi, 0x10c(%rbx)
leaq 0x118(%rbx), %rcx
movq 0x118(%rbx), %rdx
cmpq %rcx, %rdx
je 0x232e6
movl 0x24(%rdx), %esi
testl %esi, %esi
je 0x23280
cmpl $0x3, %esi
jne 0x232d8
cmpb $0x1, 0x20(%rdx)
jne 0x232d8
movq 0x18(%rdx), %rsi
movl 0x10c(%rsi), %edi
movl %edi, %r8d
shrl $0x3, %r8d
andl $0x1, %r8d
cmpl %eax, %r8d
je 0x232d8
orl $0x4000, %edi           # imm = 0x4000
movl %edi, 0x10c(%rsi)
movq 0x148(%rbx), %rsi
movq 0x18(%rdx), %rdi
cmpq $0x0, 0x1f8(%rdi)
setne %r9b
movq 0x38(%rsi), %r8
cmpq %rdi, %r8
sete %r10b
orb %r9b, %r10b
jne 0x232d8
movq %r8, 0x1f8(%rdi)
movq %rdi, 0x38(%rsi)
movq (%rdx), %rdx
cmpq %rcx, %rdx
jne 0x2326e
movl 0x10c(%rbx), %esi
testb $0xc, %sil
je 0x232f2
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0x2d(%rbx)
je 0x23301
cmpb $0x1, 0x190(%rbx)
jne 0x232ec
cmpb $0x2, 0x2c(%rbx)
jne 0x232ec
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x22c98