// File: /workspace/github_cpp_makefile_star2_O2/davmac314[P]dinit/src/includes/load-service.h
// Function: dinit_load::parse_snum_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&, long long, long long)
inline long long parse_snum_param(file_pos_ref input_pos, const std::string &param,
        const std::string &service_name, long long min = std::numeric_limits<long long>::min(),
        long long max = std::numeric_limits<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 {
        long long v = std::stoll(param, &ind, 0);
        if (v < min || 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 %r12
pushq %rbx
subq $0x40, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movl %edi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x38(%rsp), %rsi
andq $0x0, (%rsi)
movq %rdx, %rdi
xorl %edx, %edx
callq 0x13f5f
cmpq %r12, %rax
jl 0x129b7
cmpq %r15, %rax
jg 0x129b7
movq 0x38(%rsp), %rcx
cmpq 0x8(%r14), %rcx
jne 0x129b7
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x70
popq %rdi
callq 0x41d0
movq %rax, %r15
leaq 0x5a77(%rip), %rsi      # 0x18440
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xb9ce
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1205c
xorl %ebp, %ebp
leaq 0x11207(%rip), %rsi     # 0x23c00
leaq -0xc24(%rip), %rdx      # 0x11ddc
movq %r15, %rdi
callq 0x4610
jmp 0x12afe
movq %rdx, %r12
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x41a0
testb %bpl, %bpl
jne 0x12a2a
jmp 0x12a3a
movq %rdx, %r12
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
jmp 0x12a3a
movq %rdx, %r12
movq %rax, %r14
cmpl $0x2, %r12d
jne 0x12a9b
movq %r14, %rdi
callq 0x4160
pushq $0x70
popq %rdi
callq 0x41d0
movq %rax, %r15
leaq 0x59e6(%rip), %rsi      # 0x18440
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xb9ce
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1205c
xorl %ebp, %ebp
leaq 0x11176(%rip), %rsi     # 0x23c00
leaq -0xcb5(%rip), %rdx      # 0x11ddc
movq %r15, %rdi
callq 0x4610
jmp 0x12afe
cmpl $0x1, %r12d
jne 0x12b48
movq %r14, %rdi
callq 0x4160
pushq $0x70
popq %rdi
callq 0x41d0
movq %rax, %r15
leaq 0x5981(%rip), %rsi      # 0x18440
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xb9ce
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1205c
xorl %ebp, %ebp
leaq 0x11111(%rip), %rsi     # 0x23c00
leaq -0xd1a(%rip), %rdx      # 0x11ddc
movq %r15, %rdi
callq 0x4610
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x41a0
testb %bpl, %bpl
jne 0x12b15
jmp 0x12b1d
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
jmp 0x12b48
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x41a0
testb %bpl, %bpl
jne 0x12b3b
jmp 0x12b43
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
movq %r14, %rdi
callq 0x4620
movq %rax, %rdi
callq 0xba09