// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/load-service.h
// Function: dinit_load::parse_timespec(file_pos_ref, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, timespec&)
inline void parse_timespec(file_pos_ref input_pos, const std::string &paramval,
        const std::string &servicename, const char * paramname, timespec &ts)
{
    decltype(ts.tv_sec) isec = 0;
    decltype(ts.tv_nsec) insec = 0;
    auto max_secs = std::numeric_limits<decltype(isec)>::max() / 10;
    auto len = paramval.length();
    decltype(len) i;
    for (i = 0; i < len; i++) {
        char ch = paramval[i];
        if (ch == '.' || ch == ',') {
            i++;
            break;
        }
        if (ch < '0' || ch > '9') {
            throw service_description_exc(servicename, std::string("bad value for ") + paramname, input_pos);
        }
        // check for overflow
        if (isec >= max_secs) {
           throw service_description_exc(servicename, std::string("too-large value for ") + paramname, input_pos);
        }
        isec *= 10;
        isec += ch - '0';
    }
    decltype(insec) insec_m = 100000000; // 10^8
    for ( ; i < len; i++) {
        char ch = paramval[i];
        if (ch < '0' || ch > '9') {
            throw service_description_exc(servicename, std::string("bad value for ") + paramname, input_pos);
        }
        insec += (ch - '0') * insec_m;
        insec_m /= 10;
    }
    ts.tv_sec = isec;
    ts.tv_nsec = insec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %r8, %r15
movq %rcx, %r14
movl %edi, 0x40(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x188cc
movq (%rdx), %rax
xorl %esi, %esi
movabsq $0xccccccccccccccc, %r8 # imm = 0xCCCCCCCCCCCCCCC
xorl %edi, %edi
movb (%rax,%rdi), %r11b
movl %r11d, %r10d
andb $-0x3, %r10b
cmpb $0x2c, %r10b
jne 0x18896
incq %rdi
jmp 0x188bc
leal -0x3a(%r11), %ebx
cmpb $-0xb, %bl
jbe 0x189fd
cmpq %r8, %rsi
jge 0x18999
leaq (%rsi,%rsi,4), %rsi
addb $-0x30, %r11b
movzbl %r11b, %r11d
leaq (%r11,%rsi,2), %rsi
cmpb $0x2c, %r10b
je 0x188d0
incq %rdi
cmpq %rcx, %rdi
jb 0x18880
jmp 0x188d0
xorl %edi, %edi
xorl %esi, %esi
cmpq %rcx, %rdi
jae 0x1891e
movq (%rdx), %r10
movl $0x5f5e100, %edx        # imm = 0x5F5E100
xorl %r8d, %r8d
movabsq $0x6666666666666667, %r11 # imm = 0x6666666666666667
movzbl (%r10,%rdi), %ebx
leal -0x3a(%rbx), %eax
cmpb $-0xb, %al
jbe 0x18935
andl $0xf, %ebx
imulq %rdx, %rbx
movq %rdx, %rax
imulq %r11
addq %rbx, %r8
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incq %rdi
cmpq %rdi, %rcx
jne 0x188ea
jmp 0x18921
xorl %r8d, %r8d
movq %rsi, (%r9)
movq %r8, 0x8(%r9)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x70, %edi
callq 0x41c0
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4cef(%rip), %rsi      # 0x1d642
leaq 0x4cf6(%rip), %rdx      # 0x1d650
leaq 0x20(%rsp), %rdi
callq 0x127a8
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18a61
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18a6d
movl $0x70, %edi
callq 0x41c0
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4c9a(%rip), %rsi      # 0x1d651
leaq 0x4ca7(%rip), %rdx      # 0x1d665
leaq 0x20(%rsp), %rdi
callq 0x127a8
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18ab7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18ac3
movl $0x70, %edi
callq 0x41c0
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4c27(%rip), %rsi      # 0x1d642
leaq 0x4c2e(%rip), %rdx      # 0x1d650
leaq 0x20(%rsp), %rdi
callq 0x127a8
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18b0a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18b16
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd17d(%rip), %rsi      # 0x25c20
leaq -0x1fe2(%rip), %rdx     # 0x16ac8
movq %rbx, %rdi
callq 0x4620
jmp 0x18b5b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd127(%rip), %rsi      # 0x25c20
leaq -0x2038(%rip), %rdx     # 0x16ac8
movq %rbx, %rdi
callq 0x4620
jmp 0x18b5b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd0d4(%rip), %rsi      # 0x25c20
leaq -0x208b(%rip), %rdx     # 0x16ac8
movq %rbx, %rdi
callq 0x4620
jmp 0x18b67
jmp 0x18b82
jmp 0x18b67
jmp 0x18b82
jmp 0x18ba1
jmp 0x18ba1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x18b88
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x18b88
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x18ba7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x18ba7
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x18bb4
movq %rbx, %rdi
callq 0x42d0
movq %r14, %rdi
callq 0x4630