// File: 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
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl %edi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x8d1c(%rip), %rax      # 0x3a451
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x331b0
movq %rax, -0xe0(%rbp)
jmp 0x31759
movq -0xe0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x31795
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5770
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
je 0x31a05
movb $0x1, -0x72(%rbp)
movl $0x70, %edi
callq 0x5220
movq %rax, -0x108(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x5880
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x13710
jmp 0x317e9
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x2e2d0
jmp 0x31806
movq -0x108(%rbp), %rdi
movb $0x0, -0x72(%rbp)
leaq 0x1f3d8(%rip), %rsi     # 0x50bf0
leaq -0x3acf(%rip), %rdx     # 0x2dd50
callq 0x5840
jmp 0x31ac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x31879
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3185a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5320
leaq -0x71(%rbp), %rdi
callq 0x5520
testb $0x1, -0x72(%rbp)
jne 0x3186b
jmp 0x31877
movq -0x108(%rbp), %rdi
callq 0x53a0
jmp 0x31879
movl -0x4c(%rbp), %eax
movl %eax, -0x10c(%rbp)
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x31942
movq -0x48(%rbp), %rdi
callq 0x51a0
movq %rax, -0xb0(%rbp)
movb $0x1, -0xd2(%rbp)
movl $0x70, %edi
callq 0x5220
movq %rax, -0x130(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x5880
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x13710
jmp 0x318fc
movq -0x128(%rbp), %rsi
movq -0x130(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x2e2d0
jmp 0x3191c
movq -0x130(%rbp), %rdi
movb $0x0, -0xd2(%rbp)
leaq 0x1f2bf(%rip), %rsi     # 0x50bf0
leaq -0x3be8(%rip), %rdx     # 0x2dd50
callq 0x5840
jmp 0x31ac7
movl -0x10c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x31ab6
movq -0x48(%rbp), %rdi
callq 0x51a0
movq %rax, -0x80(%rbp)
movb $0x1, -0xa2(%rbp)
movl $0x70, %edi
callq 0x5220
movq %rax, -0x150(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x5880
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x13710
jmp 0x319bf
movq -0x148(%rbp), %rsi
movq -0x150(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x2e2d0
jmp 0x319df
movq -0x150(%rbp), %rdi
movb $0x0, -0xa2(%rbp)
leaq 0x1f1fc(%rip), %rsi     # 0x50bf0
leaq -0x3cab(%rip), %rdx     # 0x2dd50
callq 0x5840
jmp 0x31ac7
movq -0x40(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x31a38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5320
leaq -0xa1(%rbp), %rdi
callq 0x5520
testb $0x1, -0xa2(%rbp)
jne 0x31a4f
jmp 0x31a5b
movq -0x150(%rbp), %rdi
callq 0x53a0
callq 0x5810
jmp 0x31a62
jmp 0x31ab6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x31a8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5320
leaq -0xd1(%rbp), %rdi
callq 0x5520
testb $0x1, -0xd2(%rbp)
jne 0x31aa1
jmp 0x31aad
movq -0x130(%rbp), %rdi
callq 0x53a0
callq 0x5810
jmp 0x31ab4
jmp 0x31ab6
movq -0x48(%rbp), %rdi
callq 0x5870
movq %rax, %rdi
callq 0x138d0
nopw (%rax,%rax)