// File: /workspace/github_cpp_makefile_star2_O3/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 0x18a18
movq (%rdx), %rax
movq %rcx, %r10
negq %r10
movl $0x1, %r8d
xorl %edi, %edi
movabsq $0xccccccccccccccc, %r11 # imm = 0xCCCCCCCCCCCCCCC
xorl %esi, %esi
movb -0x1(%rax,%r8), %bl
movl %ebx, %ebp
andb $-0x3, %bpl
cmpb $0x2c, %bpl
je 0x18a1d
leal -0x3a(%rbx), %ebp
cmpb $-0xb, %bpl
jbe 0x18b40
cmpq %r11, %rsi
jge 0x18ae0
leaq (%rsi,%rsi,4), %rsi
addb $-0x30, %bl
movzbl %bl, %ebx
leaq (%rbx,%rsi,2), %rsi
leaq (%r10,%r8), %rbx
incq %rbx
incq %r8
cmpq $0x1, %rbx
jne 0x189d1
jmp 0x18a6c
xorl %esi, %esi
xorl %r8d, %r8d
cmpq %rcx, %r8
jae 0x18a6a
movq (%rdx), %r10
movl $0x5f5e100, %edx        # imm = 0x5F5E100
xorl %edi, %edi
movabsq $0x6666666666666667, %r11 # imm = 0x6666666666666667
movzbl (%r10,%r8), %ebx
leal -0x3a(%rbx), %eax
cmpb $-0xb, %al
jbe 0x18a80
andl $0xf, %ebx
imulq %rdx, %rbx
movq %rdx, %rax
imulq %r11
addq %rbx, %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incq %r8
cmpq %r8, %rcx
jne 0x18a36
jmp 0x18a6c
xorl %edi, %edi
movq %rsi, (%r9)
movq %rdi, 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 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4ba2(%rip), %rsi      # 0x1d640
leaq 0x4ba9(%rip), %rdx      # 0x1d64e
movq %rsp, %rdi
callq 0x129da
movq %rsp, %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18ba0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18bad
movl $0x70, %edi
callq 0x41c0
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4b51(%rip), %rsi      # 0x1d64f
leaq 0x4b5e(%rip), %rdx      # 0x1d663
movq %rsp, %rdi
callq 0x129da
movq %rsp, %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18bf9
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18c06
movl $0x70, %edi
callq 0x41c0
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4ae2(%rip), %rsi      # 0x1d640
leaq 0x4ae9(%rip), %rdx      # 0x1d64e
movq %rsp, %rdi
callq 0x129da
movq %rsp, %rdi
movq %r15, %rsi
callq 0x46a0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18c4f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x18c5c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rsi
leaq 0x20(%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 0x16d7c
xorl %ebp, %ebp
leaq 0xd03b(%rip), %rsi      # 0x25c20
leaq -0x2046(%rip), %rdx     # 0x16ba6
movq %rbx, %rdi
callq 0x4620
jmp 0x18ca3
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rsi
leaq 0x20(%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 0x16d7c
xorl %ebp, %ebp
leaq 0xcfe2(%rip), %rsi      # 0x25c20
leaq -0x209f(%rip), %rdx     # 0x16ba6
movq %rbx, %rdi
callq 0x4620
jmp 0x18ca3
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rsi
leaq 0x20(%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 0x16d7c
xorl %ebp, %ebp
leaq 0xcf8c(%rip), %rsi      # 0x25c20
leaq -0x20f5(%rip), %rdx     # 0x16ba6
movq %rbx, %rdi
callq 0x4620
jmp 0x18cab
jmp 0x18ce2
jmp 0x18cab
jmp 0x18ce2
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18cc5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18cdb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x18d04
jmp 0x18d0c
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18d04
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x18d04
jmp 0x18d01
jmp 0x18d01
movq %rax, %r14
movq %rbx, %rdi
callq 0x42d0
movq %r14, %rdi
callq 0x4630