// File: /workspace/github_cpp_makefile_star2_O1/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 0x172ff
movl (%r15), %edx
cmpl $0x22, %edx
je 0x1730b
testl %edx, %edx
jne 0x172e0
movl 0xc(%rsp), %edx
movl %edx, (%r15)
cmpq %r13, %rax
jl 0x17317
cmpq %r12, %rax
jg 0x17317
cmpq 0x8(%r14), %rcx
jne 0x17317
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x618d(%rip), %rdi      # 0x1d493
callq 0x4270
leaq 0x6181(%rip), %rdi      # 0x1d493
callq 0x4550
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x610e(%rip), %rsi      # 0x1d442
leaq 0x6157(%rip), %rdx      # 0x1d492
leaq 0x18(%rsp), %rdi
callq 0x127a8
movb $0x1, %bl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16cc4
xorl %ebx, %ebx
leaq 0xe8b9(%rip), %rsi      # 0x25c20
leaq -0x8a6(%rip), %rdx      # 0x16ac8
movq %r15, %rdi
callq 0x4620
jmp 0x174a5
movq %rdx, %r12
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x173a2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x173a2
movq %rdx, %r12
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x173c3
movq %r15, %rdi
callq 0x42d0
jmp 0x173c3
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x173c3
movl 0xc(%rsp), %eax
movl %eax, (%r15)
cmpl $0x2, %r12d
jne 0x17433
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6053(%rip), %rsi      # 0x1d442
leaq 0x609c(%rip), %rdx      # 0x1d492
leaq 0x18(%rsp), %rdi
callq 0x127a8
movb $0x1, %bl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16cc4
xorl %ebx, %ebx
leaq 0xe7fe(%rip), %rsi      # 0x25c20
leaq -0x961(%rip), %rdx      # 0x16ac8
movq %r15, %rdi
callq 0x4620
jmp 0x174a5
cmpl $0x1, %r12d
jne 0x1750b
movq %r14, %rdi
callq 0x4170
movl $0x70, %edi
callq 0x41c0
movq %rax, %r15
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5fdf(%rip), %rsi      # 0x1d442
leaq 0x6028(%rip), %rdx      # 0x1d492
leaq 0x18(%rsp), %rdi
callq 0x127a8
movb $0x1, %bl
leaq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x16cc4
xorl %ebx, %ebx
leaq 0xe78a(%rip), %rsi      # 0x25c20
leaq -0x9d5(%rip), %rdx      # 0x16ac8
movq %r15, %rdi
callq 0x4620
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x174c6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x174c6
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x174d2
movq %r15, %rdi
callq 0x42d0
callq 0x4600
jmp 0x1750b
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x174fa
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x174fa
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x17506
movq %r15, %rdi
callq 0x42d0
callq 0x4600
movq %r14, %rdi
callq 0x4630
movq %rax, %rdi
callq 0xfd03