// File: /workspace/github_cpp_makefile_star2_O1/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 0x185cf
movl (%r15), %edx
cmpl $0x22, %edx
je 0x185db
testl %edx, %edx
jne 0x185b5
movl %ebx, (%r15)
cmpq %r12, %rax
ja 0x185e7
cmpq 0x8(%r14), %rcx
jne 0x185e7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f7e(%rip), %rdi      # 0x1d554
callq 0x4270
leaq 0x4f72(%rip), %rdi      # 0x1d554
callq 0x4550
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4e3e(%rip), %rsi      # 0x1d442
leaq 0x4e87(%rip), %rdx      # 0x1d492
leaq 0x8(%rsp), %rdi
callq 0x127a8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd5e9(%rip), %rsi      # 0x25c20
leaq -0x1b76(%rip), %rdx     # 0x16ac8
movq %r15, %rdi
callq 0x4620
jmp 0x18771
movq %rdx, %r12
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x18673
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x18673
movq %rdx, %r12
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x18691
movq %r15, %rdi
callq 0x42d0
jmp 0x18691
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x18691
movl %ebx, (%r15)
cmpl $0x2, %r12d
jne 0x18700
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4d86(%rip), %rsi      # 0x1d442
leaq 0x4dcf(%rip), %rdx      # 0x1d492
leaq 0x8(%rsp), %rdi
callq 0x127a8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd531(%rip), %rsi      # 0x25c20
leaq -0x1c2e(%rip), %rdx     # 0x16ac8
movq %r15, %rdi
callq 0x4620
jmp 0x18771
cmpl $0x1, %r12d
jne 0x187db
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4d13(%rip), %rsi      # 0x1d442
leaq 0x4d5c(%rip), %rdx      # 0x1d492
leaq 0x8(%rsp), %rdi
callq 0x127a8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x16cc4
xorl %ebp, %ebp
leaq 0xd4be(%rip), %rsi      # 0x25c20
leaq -0x1ca1(%rip), %rdx     # 0x16ac8
movq %r15, %rdi
callq 0x4620
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x18793
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x18793
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x187a0
movq %r15, %rdi
callq 0x42d0
callq 0x4600
jmp 0x187db
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x187c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x187c9
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x187d6
movq %r15, %rdi
callq 0x42d0
callq 0x4600
movq %r14, %rdi
callq 0x4630
movq %rax, %rdi
callq 0xfd03