// File: /workspace/github_cpp_makefile_star2_O3/EmbeddedPaul166[P]SNMP-Agent/src/parser.cpp
// Function: Parser::parseNodeParameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int&, DataType&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, AccessType&, StatusType&, Node**)
void Parser::parseNodeParameters(std::string & nodeString, std::string & nodeName, unsigned int & OID, DataType & dataType, std::string & description, AccessType & accessType, StatusType & statusType, Node ** pParent)
{
    std::regex pattern("(\\w+) OBJECT-TYPE");
    std::smatch match;
    
    if (std::regex_search(nodeString, match, pattern))
    {
        nodeName = match.str(1);
    }
    
    pattern.assign("(\\d+) \\}");
    if (std::regex_search(nodeString, match, pattern))
    {
        OID = std::stoi(match.str(1));
    }
    
    pattern.assign("SYNTAX  ((.*\\n)*?)    ACCESS");
    if (std::regex_search(nodeString, match, pattern))
    {
        std::string matchString = match.str(1);
        dataType = parseDataType(matchString);
    }
    
    pattern.assign("ACCESS  (.+)");
    if (std::regex_search(nodeString, match, pattern))
    {
        std::string accessString = match.str(1);
        if (accessString == "read-only")
        {
            accessType = AccessType::READ_ONLY;
        }
        else if (accessString == "write-only")
        {
            accessType = AccessType::WRITE_ONLY;
        }
        else if (accessString == "read-write")
        {
            accessType = AccessType::READ_WRITE;    
        }
        else if (accessString == "not-accessible")
        {
            accessType = AccessType::NOT_ACCESSIBLE;
        }
    }
    
    pattern.assign("STATUS  (.+)");
    if (std::regex_search(nodeString, match, pattern))
    {
        
        std::string statusString = match.str(1);
        if (statusString == "mandatory")
        {
            statusType = StatusType::MANDATORY;
        }
        else if (statusString == "optional")
        {
            statusType = StatusType::OPTIONAL;
        }
        else if (statusString == "obsolete")
        {
            statusType = StatusType::OBSOLETE;    
        }
    }
    
    pattern.assign("\"(.+?((.*\\n)+).+?)\"\\n");
    if (std::regex_search(nodeString, match, pattern))
    {
        description = match.str(1);
    }
    
    pattern.assign("\\{ (.+) \\d \\}");
    if (std::regex_search(nodeString, match, pattern))
    {
        std::string parentName = match.str(1);
        for (std::list<Node>::iterator it = m_pTree -> m_nodeList.begin(); it != m_pTree -> m_nodeList.end(); it++)
        {
            if ((*it).m_name == parentName)
            {
                *pParent = &(*it);
                break;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0xb0(%rsp)
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x12ee7(%rip), %rsi     # 0x1e5e2
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0xe4b4
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xb773
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
leaq 0x58(%rsp), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x43d0
movq (%r15), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb773
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x12e7a(%rip), %rsi     # 0x1e5f4
leaq 0x12e7b(%rip), %rdx     # 0x1e5fc
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xb85b
movq %r12, %rax
movq %rbx, %r12
movq %rax, 0xa8(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
movq 0x58(%rsp), %r15
callq 0x4060
movq %rax, %rbp
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x0, (%rbp)
leaq 0xb8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x4430
cmpq %r15, (%rbx)
je 0xbc4c
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xbc58
movl (%rbp), %ecx
cmpl $0x22, %ecx
je 0xbc58
testl %ecx, %ecx
jne 0xb834
movl 0xc(%rsp), %ecx
movl %ecx, (%rbp)
movl %eax, (%r12)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb853
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
movq 0xa8(%rsp), %r12
leaq 0x12d9b(%rip), %rsi     # 0x1e5fd
leaq 0x12db0(%rip), %rdx     # 0x1e619
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xb927
leaq 0xb8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
movq %r12, %rsi
callq 0xbe74
leaq 0x78(%rsp), %rsi
movups -0x20(%rsi), %xmm0
movups -0x10(%rsi), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
leaq 0x20(%r13), %rdi
callq 0x7570
addq $0x38, %r13
leaq 0x90(%rsp), %rsi
movq %r13, %rdi
callq 0xe988
leaq 0x58(%rsp), %rdi
callq 0x1cc96
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb927
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x12cec(%rip), %rsi     # 0x1e61a
leaq 0x12cf1(%rip), %rdx     # 0x1e626
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xba0c
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
leaq 0x12ca4(%rip), %rsi     # 0x1e627
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0xb9d7
leaq 0x12c99(%rip), %rsi     # 0x1e631
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0xb9db
leaq 0x12c8f(%rip), %rsi     # 0x1e63c
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0xb9e2
leaq 0x12c85(%rip), %rsi     # 0x1e647
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
jne 0xb9f1
movl $0x3, %eax
jmp 0xb9e7
xorl %eax, %eax
jmp 0xb9e7
movl $0x1, %eax
jmp 0xb9e7
movl $0x2, %eax
movq 0x110(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba0c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x12c43(%rip), %rsi     # 0x1e656
leaq 0x12c48(%rip), %rdx     # 0x1e662
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xbad5
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
leaq 0x12bfb(%rip), %rsi     # 0x1e663
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0xbaa7
leaq 0x12bf0(%rip), %rsi     # 0x1e66d
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0xbaab
leaq 0x12be4(%rip), %rsi     # 0x1e676
leaq 0x58(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
jne 0xbaba
movl $0x2, %eax
jmp 0xbab0
xorl %eax, %eax
jmp 0xbab0
movl $0x1, %eax
movq 0x118(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbad5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x12ba3(%rip), %rsi     # 0x1e67f
leaq 0x12bb1(%rip), %rdx     # 0x1e694
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xbb55
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
leaq 0x58(%rsp), %rbx
movq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x43d0
movq (%rbx), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xbb55
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x12b39(%rip), %rsi     # 0x1e695
leaq 0x12b3f(%rip), %rdx     # 0x1e6a2
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xeca4
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x19bbf
testb %al, %al
je 0xbc19
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xe51c
movq 0x60(%r12), %r12
movq 0x8(%r12), %r15
addq $0x8, %r12
movq 0x58(%rsp), %rbx
cmpq %r12, %r15
je 0xbbff
movq 0x120(%rsp), %r13
movq 0x60(%rsp), %r14
cmpq %r14, 0x20(%r15)
jne 0xbbed
testq %r14, %r14
je 0xbbf7
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4340
testl %eax, %eax
je 0xbbf7
movq (%r15), %r15
cmpq %r12, %r15
jne 0xbbcf
jmp 0xbbff
addq $0x10, %r15
movq %r15, (%r13)
leaq 0x68(%rsp), %rax
cmpq %rax, %rbx
je 0xbc19
movq 0x68(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x4320
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbc30
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4320
leaq 0x38(%rsp), %rdi
callq 0xe6fa
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12b76(%rip), %rdi     # 0x1e7c9
callq 0x4200
leaq 0x12b6a(%rip), %rdi     # 0x1e7c9
callq 0x4460
jmp 0xbccc
jmp 0xbccc
jmp 0xbccc
jmp 0xbccc
movq %rax, %rbx
jmp 0xbc84
jmp 0xbccc
jmp 0xbccc
jmp 0xbccc
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1cc96
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbccf
movq 0xc8(%rsp), %rsi
jmp 0xbcc2
movq %rax, %rbx
cmpl $0x0, (%rbp)
jne 0xbcaf
movl 0xc(%rsp), %eax
movl %eax, (%rbp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbccf
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4320
jmp 0xbccf
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbce6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4320
leaq 0x38(%rsp), %rdi
callq 0xe6fa
movq %rbx, %rdi
callq 0x4550