// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinitctl.cc
// Function: print_failure_details(stopped_reason_t, unsigned short, int, int, int)
static void print_failure_details(stopped_reason_t stop_reason, uint16_t launch_stage,
        int exit_status, int exit_si_code, int exit_si_status)
{
    using std::cout;

    switch (stop_reason) {
        case stopped_reason_t::DEPFAILED:
            cout << "Reason: a dependency of the service failed to start. "
                    "Check dinit log.\n";
            break;
        case stopped_reason_t::TIMEDOUT:
            cout << "Reason: start timed out.\n";
            break;
        case stopped_reason_t::EXECFAILED:
            cout << "Reason: execution of service process failed:\n";
            cout << "        Stage: " << exec_stage_descriptions[launch_stage] << "\n";
            cout << "        Error: " << strerror(exit_status) << "\n";
            break;
        case stopped_reason_t::FAILED:
            cout << "Reason: service process terminated before ready: ";
            if (exit_si_code != 0 || exit_si_status != 0) {
                print_termination_details(exit_si_code, exit_si_status);
            }
            else {
                print_termination_details(exit_status);
            }
            cout << "\n";
            break;
        default:
            cout << "Reason unknown/unrecognised. Check dinit log.\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
addl $-0x2, %edi
cmpl $0x3, %edi
ja 0xd4c2
movl %ecx, %r15d
movl %edx, %ebx
leaq 0x7c95(%rip), %rax      # 0x15088
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0xfba5(%rip), %rdi      # 0x1cfa8
leaq 0x8f5d(%rip), %rsi      # 0x16367
movl $0x46, %edx
jmp 0xd58d
movl %esi, %ebp
movq 0xfb8b(%rip), %r14      # 0x1cfa8
leaq 0x8fa4(%rip), %rsi      # 0x163c8
movl $0x2d, %edx
movq %r14, %rdi
callq 0x4330
leaq 0x8fbe(%rip), %rsi      # 0x163f6
movl $0xf, %edx
movq %r14, %rdi
callq 0x4330
movzwl %bp, %eax
leaq -0xd(%rax), %rcx
cmpq $0x4, %rcx
ja 0xd4da
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x44c0
jmp 0xd4ff
movq 0xfb2e(%rip), %rdi      # 0x1cfa8
leaq 0x8f2d(%rip), %rsi      # 0x163ae
movl $0x19, %edx
jmp 0xd58d
movl %r8d, %r14d
movq 0xfb13(%rip), %rdi      # 0x1cfa8
leaq 0x8f7a(%rip), %rsi      # 0x16416
movl $0x31, %edx
callq 0x4330
movl %r14d, %eax
orl %r15d, %eax
je 0xd573
movl %r15d, %edi
movl %r14d, %esi
callq 0xdd76
jmp 0xd57a
movq 0xfadf(%rip), %rdi      # 0x1cfa8
leaq 0x8f78(%rip), %rsi      # 0x16448
movl $0x2e, %edx
jmp 0xd58d
leaq 0xf75f(%rip), %rcx      # 0x1cc40
movq (%rcx,%rax,8), %r14
movq %r14, %rdi
callq 0x4150
movq 0xfab4(%rip), %rdi      # 0x1cfa8
movq %r14, %rsi
movq %rax, %rdx
callq 0x4330
movq 0xfaa2(%rip), %r14      # 0x1cfa8
leaq 0x9608(%rip), %rsi      # 0x16b15
movl $0x1, %edx
movq %r14, %rdi
callq 0x4330
leaq 0x8ee5(%rip), %rsi      # 0x16406
movl $0xf, %edx
movq %r14, %rdi
callq 0x4330
movl %ebx, %edi
callq 0x40f0
testq %rax, %rax
je 0xd559
movq %rax, %rbx
movq %rax, %rdi
callq 0x4150
movq 0xfa5c(%rip), %rdi      # 0x1cfa8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4330
jmp 0xd57a
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x44c0
jmp 0xd57a
movl %ebx, %edi
callq 0xdde6
movq 0xfa27(%rip), %rdi      # 0x1cfa8
leaq 0x958d(%rip), %rsi      # 0x16b15
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4330