// File: /workspace/github_cpp_makefile_star2_O2/davmac314[P]dinit/src/baseproc-service.cc
// Function: base_process_service::base_process_service(service_set*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, service_type_t, ha_string&&, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>> const&, std::__cxx11::list<prelim_dep, std::allocator<prelim_dep>> const&)
base_process_service::base_process_service(service_set *sset, string name,
        service_type_t service_type_p, ha_string &&command,
        const std::list<std::pair<unsigned,unsigned>> &command_offsets,
        const std::list<prelim_dep> &deplist_p)
     : service_record(sset, name, service_type_p, deplist_p), child_listener(this),
       child_status_listener(this), process_timer(this), log_output_listener(this)
{
    program_name = std::move(command);
    exec_arg_parts = separate_args(program_name, command_offsets);

    restart_interval_count = 0;
    restart_interval_time = {0, 0};
    process_timer.service = this;
    process_timer.add_timer(event_loop);

    // By default, allow a maximum of 3 restarts within 10.0 seconds:
    restart_interval.seconds() = 10;
    restart_interval.nseconds() = 0;
    max_restart_interval_count = 3;

    waiting_restart_timer = false;
    waiting_stopstart_timer = false;
    reserved_child_watch = false;
    tracking_child = false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rdi, %rbx
movq 0x80(%rsp), %r8
callq 0x1735c
leaq 0x2204b(%rip), %rax     # 0x44998
movq %rax, (%rbx)
leaq 0x268(%rbx), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x208(%rbx)
movups %xmm1, 0x218(%rbx)
movups %xmm1, 0x228(%rbx)
movups %xmm1, 0x238(%rbx)
movups %xmm1, 0x248(%rbx)
movq %rax, 0x258(%rbx)
andq $0x0, 0x260(%rbx)
xorl %eax, %eax
movb %al, 0x268(%rbx)
leaq 0x288(%rbx), %rcx
movq %rcx, 0x278(%rbx)
andq $0x0, 0x280(%rbx)
movb %al, 0x288(%rbx)
andl $0x0, 0x298(%rbx)
leaq 0x2b0(%rbx), %rcx
movq %rcx, 0x2a0(%rbx)
andq $0x0, 0x2a8(%rbx)
movb %al, 0x2b0(%rbx)
movdqa 0xbbf5(%rip), %xmm0     # 0x2e5d0
movdqu %xmm0, 0x2c0(%rbx)
andl $0x0, 0x2d0(%rbx)
movb %al, 0x2f8(%rbx)
andw $0x0, 0x2fa(%rbx)
movups %xmm1, 0x300(%rbx)
andq $0x0, 0x310(%rbx)
leaq 0x328(%rbx), %rcx
movups %xmm1, 0x2e1(%rbx)
movups %xmm1, 0x2d8(%rbx)
movq %rcx, 0x318(%rbx)
andq $0x0, 0x320(%rbx)
movb %al, 0x328(%rbx)
movl $0x2, 0x340(%rbx)
andq $0x0, 0x360(%rbx)
andq $0x0, 0x36c(%rbx)
leaq 0x22006(%rip), %rcx     # 0x44a58
movq %rcx, 0x338(%rbx)
movq %rbx, 0x378(%rbx)
pushq $0x1
popq %rcx
movl %ecx, 0x388(%rbx)
leaq 0x22050(%rip), %rdx     # 0x44ac0
movq %rdx, 0x380(%rbx)
movq %rbx, 0x3a8(%rbx)
movl $0x4, 0x3b8(%rbx)
leaq 0x22099(%rip), %rdx     # 0x44b28
movq %rdx, 0x3b0(%rbx)
movq %rbx, 0x400(%rbx)
movl %ecx, 0x410(%rbx)
leaq 0x220e6(%rip), %rcx     # 0x44b90
movq %rcx, 0x408(%rbx)
movq %rbx, 0x430(%rbx)
movq $0xa, 0x488(%rbx)
andq $0x0, 0x490(%rbx)
movq $0x3c, 0x498(%rbx)
andq $0x0, 0x4a0(%rbx)
orq $-0x1, 0x4a8(%rbx)
orl $-0x1, 0x4b0(%rbx)
leaq 0x4c8(%rbx), %rcx
movq %rcx, 0x4b8(%rbx)
andq $0x0, 0x4c0(%rbx)
movb %al, 0x4c8(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x4d8(%rbx)
andl $0x0, 0x4e0(%rbx)
leaq 0x208(%rbx), %r14
leaq 0x218(%rbx), %r15
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x4e4(%rbx)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1b2c8
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1f79c
leaq 0x3b0(%rbx), %r12
leaq 0x30(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x19e16
movq %r13, %rdi
callq 0xcefc
pxor %xmm0, %xmm0
movdqu %xmm0, 0x448(%rbx)
andl $0x0, 0x458(%rbx)
movq %rbx, 0x400(%rbx)
leaq 0x22e9f(%rip), %rsi     # 0x45a30
pushq $0x1
popq %rdx
pushq $0x32
popq %rcx
movq %r12, %rdi
callq 0xad6e
movq $0xa, 0x460(%rbx)
andq $0x0, 0x468(%rbx)
movl $0x3, 0x470(%rbx)
andb $-0x10, 0x4f4(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22bd4
movq %rax, (%rsp)
leaq 0x258(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x278(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2a0(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x2d8(%rbx), %r12
leaq 0x300(%rbx), %r13
leaq 0x318(%rbx), %rbp
leaq 0x4b8(%rbx), %rdi
leaq 0x240(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x230(%rbx), %rax
movq %rax, 0x20(%rsp)
callq 0x8b98
movq %rbp, %rdi
callq 0x8b98
movq %r13, %rdi
callq 0x1b352
movq %r12, %rdi
callq 0xd5d0
movq 0x8(%rsp), %rdi
callq 0x8b98
movq 0x10(%rsp), %rdi
callq 0x8b98
movq 0x28(%rsp), %rdi
callq 0x8b98
movq 0x18(%rsp), %rdi
callq 0xcefc
movq 0x20(%rsp), %rdi
callq 0x17d3e
movq %r15, %rdi
callq 0xcefc
movq %r14, %rdi
callq 0x17d3e
movq %rbx, %rdi
callq 0x1a176
movq (%rsp), %rdi
callq 0x8a90