// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movl %edi, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
movq (%rdx), %rbp
callq 0x4060
movq %rax, %r15
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x0, (%r15)
leaq 0x18(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x40b0
movq (%rbx), %rcx
subq %rbp, %rcx
je 0x173c7
movl (%r15), %edx
cmpl $0x22, %edx
je 0x173d3
testl %edx, %edx
jne 0x173a8
movl 0xc(%rsp), %edx
movl %edx, (%r15)
cmpq %r13, %rax
jl 0x173df
cmpq %r12, %rax
jg 0x173df
cmpq 0x8(%r14), %rcx
jne 0x173df
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60c3(%rip), %rdi      # 0x1d491
callq 0x4270
leaq 0x60b7(%rip), %rdi      # 0x1d491
callq 0x4550
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x6044(%rip), %rsi      # 0x1d440
leaq 0x608d(%rip), %rdx      # 0x1d490
leaq 0x18(%rsp), %rdi
callq 0x129da
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16d7c
xorl %ebp, %ebp
leaq 0xe7f0(%rip), %rsi      # 0x25c20
leaq -0x891(%rip), %rdx      # 0x16ba6
movq %r15, %rdi
callq 0x4620
jmp 0x1756d
movq %rdx, %r12
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17461
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x1746e
jmp 0x1748b
movq %rdx, %r12
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
jmp 0x1748b
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x1748b
movl 0xc(%rsp), %eax
movl %eax, (%r15)
cmpl $0x2, %r12d
jne 0x174fb
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x5f8a(%rip), %rsi      # 0x1d440
leaq 0x5fd3(%rip), %rdx      # 0x1d490
leaq 0x18(%rsp), %rdi
callq 0x129da
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16d7c
xorl %ebp, %ebp
leaq 0xe736(%rip), %rsi      # 0x25c20
leaq -0x94b(%rip), %rdx      # 0x16ba6
movq %r15, %rdi
callq 0x4620
jmp 0x1756d
cmpl $0x1, %r12d
jne 0x175d1
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x5f16(%rip), %rsi      # 0x1d440
leaq 0x5f5f(%rip), %rdx      # 0x1d490
leaq 0x18(%rsp), %rdi
callq 0x129da
movb $0x1, %bpl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16d7c
xorl %ebp, %ebp
leaq 0xe6c2(%rip), %rsi      # 0x25c20
leaq -0x9bf(%rip), %rdx      # 0x16ba6
movq %r15, %rdi
callq 0x4620
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17587
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x17591
jmp 0x17599
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
jmp 0x175d1
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x175ba
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
jne 0x175c4
jmp 0x175cc
movq %rax, %r14
movq %r15, %rdi
callq 0x42d0
callq 0x4600
movq %r14, %rdi
callq 0x4630
movq %rax, %rdi
callq 0x1002f