// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/includes/load-service.h
// Function: dinit_load::parse_unum_param(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&, unsigned long long)
inline unsigned long long parse_unum_param(file_pos_ref input_pos, const std::string &param,
        const std::string &service_name,
        unsigned long long max = std::numeric_limits<unsigned long long>::max())
{
    const char * num_err_msg = "specified value contains invalid numeric characters or is outside "
            "allowed range.";

    std::size_t ind = 0;
    try {
        unsigned long long v = std::stoull(param, &ind, 0);
        if (v > max || ind != param.length()) {
            throw service_description_exc(service_name, num_err_msg, input_pos);
        }
        return v;
    }
    catch (std::out_of_range &exc) {
        throw service_description_exc(service_name, num_err_msg, input_pos);
    }
    catch (std::invalid_argument &exc) {
        throw service_description_exc(service_name, num_err_msg, input_pos);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r12
movq %rcx, (%rsp)
movq %rdx, %r14
movl %edi, 0x28(%rsp)
movq %rsi, 0x30(%rsp)
movq (%rdx), %r13
callq 0x4060
movq %rax, %r15
movl (%rax), %ebx
movl $0x0, (%rax)
leaq 0x8(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x44e0
movq (%rbp), %rcx
subq %r13, %rcx
je 0x1871f
movl (%r15), %edx
cmpl $0x22, %edx
je 0x1872b
testl %edx, %edx
jne 0x18705
movl %ebx, (%r15)
cmpq %r12, %rax
ja 0x18737
cmpq 0x8(%r14), %rcx
jne 0x18737
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e2c(%rip), %rdi      # 0x1d552
callq 0x4270
leaq 0x4e20(%rip), %rdi      # 0x1d552
callq 0x4550
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4cec(%rip), %rsi      # 0x1d440
leaq 0x4d35(%rip), %rdx      # 0x1d490
leaq 0x8(%rsp), %rdi
callq 0x129da
movb $0x1, %bl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16d7c
xorl %ebx, %ebx
leaq 0xd49a(%rip), %rsi      # 0x25c20
leaq -0x1be7(%rip), %rdx     # 0x16ba6
movq %r15, %rdi
callq 0x4620
jmp 0x188bc
movq %rdx, %r12
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x187b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bl, %bl
jne 0x187c3
jmp 0x187dc
movq %rdx, %r12
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
jmp 0x187dc
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x187dc
movl %ebx, (%r15)
cmpl $0x2, %r12d
jne 0x1884b
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4c39(%rip), %rsi      # 0x1d440
leaq 0x4c82(%rip), %rdx      # 0x1d490
leaq 0x8(%rsp), %rdi
callq 0x129da
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16d7c
xorl %ebp, %ebp
leaq 0xd3e6(%rip), %rsi      # 0x25c20
leaq -0x1c9b(%rip), %rdx     # 0x16ba6
movq %r15, %rdi
callq 0x4620
jmp 0x188bc
cmpl $0x1, %r12d
jne 0x18920
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4bc6(%rip), %rsi      # 0x1d440
leaq 0x4c0f(%rip), %rdx      # 0x1d490
leaq 0x8(%rsp), %rdi
callq 0x129da
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16d7c
xorl %ebp, %ebp
leaq 0xd373(%rip), %rsi      # 0x25c20
leaq -0x1d0e(%rip), %rdx     # 0x16ba6
movq %r15, %rdi
callq 0x4620
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x188d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x188e0
jmp 0x188e8
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
jmp 0x18920
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x18909
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x18913
jmp 0x1891b
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
movq %r14, %rdi
callq 0x4630
movq %rax, %rdi
callq 0x1002f