// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ba3e
leaq 0x1e737(%rip), %rax     # 0x459c8
movq %rax, (%rbx)
leaq 0x208(%rbx), %r15
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, 0x18(%rsp)
movq %rax, 0x258(%rbx)
xorl %eax, %eax
movq %rax, 0x260(%rbx)
movb %al, 0x268(%rbx)
leaq 0x288(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0x278(%rbx)
movq %rax, 0x280(%rbx)
movb %al, 0x288(%rbx)
movl %eax, 0x298(%rbx)
leaq 0x2b0(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x2a0(%rbx)
movq %rax, 0x2a8(%rbx)
movb %al, 0x2b0(%rbx)
movdqa 0xd2cf(%rip), %xmm0     # 0x34600
movdqu %xmm0, 0x2c0(%rbx)
movl %eax, 0x2d0(%rbx)
movb %al, 0x2f8(%rbx)
movw $0x0, 0x2fa(%rbx)
movq %rax, 0x310(%rbx)
movups %xmm1, 0x300(%rbx)
leaq 0x328(%rbx), %rcx
movups %xmm1, 0x2d8(%rbx)
movups %xmm1, 0x2e1(%rbx)
movq %rcx, (%rsp)
movq %rcx, 0x318(%rbx)
movq %rax, 0x320(%rbx)
movb %al, 0x328(%rbx)
leaq 0x1dc90(%rip), %rcx     # 0x45020
movl $0x2, 0x340(%rbx)
movq %rax, 0x360(%rbx)
movq %rax, 0x36c(%rbx)
leaq 0x1e6d9(%rip), %rdx     # 0x45a88
movq %rdx, 0x338(%rbx)
movq %rbx, 0x378(%rbx)
movl $0x1, %edx
movl %edx, 0x388(%rbx)
leaq 0x1e721(%rip), %rsi     # 0x45af0
movq %rsi, 0x380(%rbx)
movq %rbx, 0x3a8(%rbx)
movl $0x4, 0x3b8(%rbx)
leaq 0x1e76a(%rip), %rsi     # 0x45b58
movq %rsi, 0x3b0(%rbx)
movq %rbx, 0x400(%rbx)
movq %rcx, 0x408(%rbx)
movl %edx, 0x410(%rbx)
leaq 0x1e7b0(%rip), %rcx     # 0x45bc0
movq %rcx, 0x408(%rbx)
movq %rbx, 0x430(%rbx)
movq $0xa, 0x488(%rbx)
movq %rax, 0x490(%rbx)
movq $0x3c, 0x498(%rbx)
movq %rax, 0x4a0(%rbx)
movq $-0x1, 0x4a8(%rbx)
movl $0xffffffff, 0x4b0(%rbx) # imm = 0xFFFFFFFF
leaq 0x4c8(%rbx), %rbp
movq %rbp, 0x4b8(%rbx)
movq %rax, 0x4c0(%rbx)
movb %al, 0x4c8(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x4d8(%rbx)
movl %eax, 0x4e0(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x4e4(%rbx)
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x274a4
callq 0x87c0
xorps %xmm1, %xmm1
leaq 0x218(%rbx), %r14
movq (%r13), %rax
movq %rax, 0x208(%rbx)
movq 0x8(%r13), %rax
movq %rax, 0x210(%rbx)
movups %xmm1, (%r13)
leaq 0x30(%rsp), %rdi
movq %r15, 0x28(%rsp)
movq %r15, %rsi
movq %r12, %rdx
movq %r14, 0x20(%rsp)
callq 0x23a88
leaq 0x3b0(%rbx), %r12
leaq 0x448(%rbx), %r15
leaq 0x30(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x1e438
movq (%r13), %rdi
testq %rdi, %rdi
je 0x27514
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x8620
pxor %xmm0, %xmm0
movdqu %xmm0, (%r15)
movl $0x0, 0x10(%r15)
movq %rbx, 0x400(%rbx)
andb $-0x20, 0x3bc(%rbx)
movl $0x32, 0x3c8(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x3f8(%rbx)
leaq 0x1f4db(%rip), %rdi     # 0x46a30
movq %r12, %rsi
movl $0x1, %edx
callq 0xe818
movq $0xa, 0x460(%rbx)
movq $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 0x2759a
movq %rax, %r12
movq 0x4b8(%rbx), %rdi
cmpq %rbp, %rdi
je 0x275b5
movq (%rbp), %rsi
incq %rsi
callq 0x8620
leaq 0x300(%rbx), %r15
movq 0x318(%rbx), %rdi
cmpq (%rsp), %rdi
je 0x275d8
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
leaq 0x2d8(%rbx), %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x275f6
movq 0x310(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2760d
movq 0x2e8(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x2a0(%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x2762b
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
movq 0x278(%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x27649
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
movq 0x258(%rbx), %rdi
cmpq 0x18(%rsp), %rdi
je 0x27667
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x27682
movq 0x250(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x230(%rbx), %rdi
testq %rdi, %rdi
je 0x27693
callq 0x87c0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x276af
movq 0x228(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x276c1
callq 0x87c0
movq %rbx, %rdi
callq 0x1e714
movq %r12, %rdi
callq 0x8ab0
nop