// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rdi, %rbx
movq 0x70(%rsp), %r8
callq 0x1bad0
leaq 0x1e6ba(%rip), %rax     # 0x459a8
movq %rax, (%rbx)
leaq 0x208(%rbx), %rax
movq %rax, 0x18(%rsp)
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, 0x10(%rsp)
movq %rax, 0x258(%rbx)
xorl %eax, %eax
movq %rax, 0x260(%rbx)
movb %al, 0x268(%rbx)
leaq 0x288(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x278(%rbx)
movq %rax, 0x280(%rbx)
movb %al, 0x288(%rbx)
movl %eax, 0x298(%rbx)
leaq 0x2b0(%rbx), %r14
movq %r14, 0x2a0(%rbx)
movq %rax, 0x2a8(%rbx)
movb %al, 0x2b0(%rbx)
movdqa 0xd1d2(%rip), %xmm0     # 0x34560
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), %r13
movups %xmm1, 0x2d8(%rbx)
movups %xmm1, 0x2e1(%rbx)
movq %r13, 0x318(%rbx)
movq %rax, 0x320(%rbx)
movb %al, 0x328(%rbx)
movl $0x2, 0x340(%rbx)
movq %rax, 0x360(%rbx)
movq %rax, 0x36c(%rbx)
leaq 0x1e667(%rip), %rcx     # 0x45a68
movq %rcx, 0x338(%rbx)
movq %rbx, 0x378(%rbx)
movl $0x1, %ecx
movl %ecx, 0x388(%rbx)
leaq 0x1e6af(%rip), %rdx     # 0x45ad0
movq %rdx, 0x380(%rbx)
movq %rbx, 0x3a8(%rbx)
movl $0x4, 0x3b8(%rbx)
leaq 0x1e6f8(%rip), %rdx     # 0x45b38
movq %rdx, 0x3b0(%rbx)
movq %rbx, 0x400(%rbx)
movl %ecx, 0x410(%rbx)
leaq 0x1e745(%rip), %rcx     # 0x45ba0
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 0x274ef
callq 0x87c0
xorps %xmm1, %xmm1
movq (%r12), %rax
movq %rax, 0x208(%rbx)
movq 0x8(%r12), %rax
movq %rax, 0x210(%rbx)
movups %xmm1, (%r12)
leaq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r15, %rdx
callq 0x23d74
leaq 0x3b0(%rbx), %r15
leaq 0x448(%rbx), %r12
movq 0x218(%rbx), %rdi
movq 0x228(%rbx), %rsi
movdqa 0x20(%rsp), %xmm0
movdqu %xmm0, 0x218(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x228(%rbx)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x2758a
subq %rdi, %rsi
callq 0x8620
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2758a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8620
pxor %xmm0, %xmm0
movdqu %xmm0, (%r12)
movl $0x0, 0x10(%r12)
movq %rbx, 0x400(%rbx)
andb $-0x20, 0x3bc(%rbx)
movl $0x32, 0x3c8(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x3f8(%rbx)
leaq 0x1f463(%rip), %rdi     # 0x46a30
movq %r15, %rsi
movl $0x1, %edx
callq 0xe26c
movq $0xa, 0x460(%rbx)
movq $0x0, 0x468(%rbx)
movl $0x3, 0x470(%rbx)
andb $-0x10, 0x4f4(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27612
movq %rax, %r15
movq 0x4b8(%rbx), %rdi
cmpq %rbp, %rdi
je 0x2762d
movq (%rbp), %rsi
incq %rsi
callq 0x8620
leaq 0x300(%rbx), %r12
movq 0x318(%rbx), %rdi
cmpq %r13, %rdi
je 0x2764c
movq (%r13), %rsi
incq %rsi
callq 0x8620
leaq 0x2d8(%rbx), %r13
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2766b
movq 0x310(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq (%r13), %rdi
testq %rdi, %rdi
je 0x27683
movq 0x2e8(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x2a0(%rbx), %rdi
cmpq %r14, %rdi
je 0x2769a
movq (%r14), %rsi
incq %rsi
callq 0x8620
movq 0x278(%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x276b8
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
movq 0x258(%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x276d6
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8620
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x276f1
movq 0x250(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x230(%rbx), %rdi
testq %rdi, %rdi
je 0x27702
callq 0x87c0
movq 0x218(%rbx), %rdi
testq %rdi, %rdi
je 0x2771d
movq 0x228(%rbx), %rsi
subq %rdi, %rsi
callq 0x8620
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2772f
callq 0x87c0
movq %rbx, %rdi
callq 0x1e78a
movq %r15, %rdi
callq 0x8ab0
nop