// File: /workspace/github_cpp_makefile_star2_O1/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 0x12ee1(%rip), %rsi     # 0x1f5e2
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0xf4b6
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 0x1ab53
testb %al, %al
je 0xc779
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
leaq 0x58(%rsp), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x53d0
movq (%r15), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xc779
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x12e74(%rip), %rsi     # 0x1f5f4
leaq 0x12e75(%rip), %rdx     # 0x1f5fc
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xc861
movq %r12, %rax
movq %rbx, %r12
movq %rax, 0xa8(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
movq 0x58(%rsp), %r15
callq 0x5060
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 0x5430
cmpq %r15, (%rbx)
je 0xcc52
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xcc5e
movl (%rbp), %ecx
cmpl $0x22, %ecx
je 0xcc5e
testl %ecx, %ecx
jne 0xc83a
movl 0xc(%rsp), %ecx
movl %ecx, (%rbp)
movl %eax, (%r12)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc859
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0xa8(%rsp), %r12
leaq 0x12d95(%rip), %rsi     # 0x1f5fd
leaq 0x12daa(%rip), %rdx     # 0x1f619
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xc92d
leaq 0xb8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
movq %r12, %rsi
callq 0xce7a
leaq 0x78(%rsp), %rsi
movups -0x20(%rsi), %xmm0
movups -0x10(%rsi), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
leaq 0x20(%r13), %rdi
callq 0x8552
addq $0x38, %r13
leaq 0x90(%rsp), %rsi
movq %r13, %rdi
callq 0xf988
leaq 0x58(%rsp), %rdi
callq 0x1dc56
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc92d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x12ce6(%rip), %rsi     # 0x1f61a
leaq 0x12ceb(%rip), %rdx     # 0x1f626
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xca12
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
leaq 0x12c9e(%rip), %rsi     # 0x1f627
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
je 0xc9dd
leaq 0x12c93(%rip), %rsi     # 0x1f631
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
je 0xc9e1
leaq 0x12c89(%rip), %rsi     # 0x1f63c
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
je 0xc9e8
leaq 0x12c7f(%rip), %rsi     # 0x1f647
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
jne 0xc9f7
movl $0x3, %eax
jmp 0xc9ed
xorl %eax, %eax
jmp 0xc9ed
movl $0x1, %eax
jmp 0xc9ed
movl $0x2, %eax
movq 0x110(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca12
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x12c3d(%rip), %rsi     # 0x1f656
leaq 0x12c42(%rip), %rdx     # 0x1f662
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xcadb
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
leaq 0x12bf5(%rip), %rsi     # 0x1f663
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
je 0xcaad
leaq 0x12bea(%rip), %rsi     # 0x1f66d
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
je 0xcab1
leaq 0x12bde(%rip), %rsi     # 0x1f676
leaq 0x58(%rsp), %rdi
callq 0x50d0
testl %eax, %eax
jne 0xcac0
movl $0x2, %eax
jmp 0xcab6
xorl %eax, %eax
jmp 0xcab6
movl $0x1, %eax
movq 0x118(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcadb
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x12b9d(%rip), %rsi     # 0x1f67f
leaq 0x12bab(%rip), %rdx     # 0x1f694
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xcb5b
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
leaq 0x58(%rsp), %rbx
movq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x53d0
movq (%rbx), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xcb5b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x12b33(%rip), %rsi     # 0x1f695
leaq 0x12b39(%rip), %rdx     # 0x1f6a2
leaq 0x38(%rsp), %rdi
movl $0x10, %ecx
callq 0xfc7a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1ab53
testb %al, %al
je 0xcc1f
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xf51e
movq 0x60(%r12), %r15
movq 0x8(%r15), %r14
addq $0x8, %r15
cmpq %r15, %r14
je 0xcc04
movq 0x120(%rsp), %r12
movq 0x58(%rsp), %rbx
movq 0x60(%rsp), %r13
movq 0x20(%r14), %rdx
cmpq %r13, %rdx
jne 0xcbf2
testq %rdx, %rdx
je 0xcbfc
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x5340
testl %eax, %eax
je 0xcbfc
movq (%r14), %r14
cmpq %r15, %r14
jne 0xcbd4
jmp 0xcc04
addq $0x10, %r14
movq %r14, (%r12)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcc1f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcc36
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5320
leaq 0x38(%rsp), %rdi
callq 0xf700
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12b70(%rip), %rdi     # 0x1f7c9
callq 0x5200
leaq 0x12b64(%rip), %rdi     # 0x1f7c9
callq 0x5460
jmp 0xccd2
jmp 0xccd2
jmp 0xccd2
jmp 0xccd2
movq %rax, %rbx
jmp 0xcc8a
jmp 0xccd2
jmp 0xccd2
jmp 0xccd2
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1dc56
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xccd5
movq 0xc8(%rsp), %rsi
jmp 0xccc8
movq %rax, %rbx
cmpl $0x0, (%rbp)
jne 0xccb5
movl 0xc(%rsp), %eax
movl %eax, (%rbp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xccd5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0xccd5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xccec
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5320
leaq 0x38(%rsp), %rdi
callq 0xf700
movq %rbx, %rdi
callq 0x5550