// File: EmbeddedPaul166[P]SNMP-Agent/src/parser.cpp
// Function: Parser::getNodeByOID(std::vector<unsigned int, std::allocator<unsigned int>>, bool&, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&, int&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Parser::getNodeByOID(std::vector<unsigned int> vectorOfOID,
                          bool & isNodeFound,
                          unsigned int & OID,
                          std::string & name,
                          std::string & baseType,
                          std::string & complexity,
                          std::string & encodingType,
                          std::string & visibility,
                          int & lengthLimit,
                          int & rangeLimitLower,
                          int & rangeLimitUpper,
                          std::string & description,
                          std::string & accessType,
                          std::string & statusType)
{
    m_pNode = m_pTree -> findNodeByObjectIdentifier(vectorOfOID);
    
    if (m_pNode == nullptr)
    {
        isNodeFound = false;
    }
    else
    {
        isNodeFound = true;
        OID = m_pNode -> m_objectIdentifier;
        name = m_pNode -> m_name;
        
        DataType & dataType = m_pNode -> m_dataType;
        if (dataType.m_baseType == BaseDataType::INTEGER)
        {
            baseType = "Integer";
        }
        else if (dataType.m_baseType == BaseDataType::OCTET_STRING)
        {
            baseType = "Octet string";
        }
        else if (dataType.m_baseType == BaseDataType::OBJECT_IDENTIFIER)
        {
            baseType = "Object identifier";
        }
        else if (dataType.m_baseType == BaseDataType::NULL_D)
        {
            baseType = "Null";
        }
        else if (dataType.m_baseType == BaseDataType::SEQUENCE)
        {
            baseType = "Sequence";
        }
        else if (dataType.m_baseType == BaseDataType::CHOICE)
        {
            baseType = "Choice";
        }
        else
        {
            baseType = "Error";
        }

        
        if (dataType.m_complexity == EncodingComplexity::PRIMITIVE)
        {
            complexity = "Primitive";
        }
        else if (dataType.m_complexity == EncodingComplexity::CONSTRUCTED)
        {
            complexity = "Constructed";
        }
        else
        {
            complexity = "Error";
        }
        
        if (dataType.m_encodingType == EncodingType::UNIVERSAL)
        {
            encodingType = "Universal";
        }
        else if (dataType.m_encodingType == EncodingType::IMPLICIT)
        {
            encodingType = "Implicit";
        }
        else if (dataType.m_encodingType == EncodingType::EXPLICIT)
        {
            encodingType = "Explicit";
        }
        else
        {
            encodingType = "Error";
        }
        
        if (dataType.m_visibility == DataVisibility::UNIVERSAL)
        {
            visibility = "Universal";
        }
        else if (dataType.m_visibility == DataVisibility::APPLICATION)
        {
            visibility = "Application";
        }
        else if (dataType.m_visibility == DataVisibility::CONTEXT_SPECIFIC)
        {
            visibility = "Context specific";
        }
        else if (dataType.m_visibility == DataVisibility::PRIVATE)
        {
            visibility = "Private";
        }
        else
        {
            visibility = "Error";
        }
        
        lengthLimit = dataType.m_lengthLimit;
        
        rangeLimitLower = dataType.m_rangeLimitLower;
        rangeLimitUpper = dataType.m_rangeLimitUpper;
        
        description = m_pNode -> m_description;
        if (description == "")
        {
            description = "None";
        }
        
        if (m_pNode -> m_accessType == AccessType::READ_ONLY)
        {
            accessType = "Read only";
        }
        else if (m_pNode -> m_accessType == AccessType::WRITE_ONLY)
        {
            accessType = "Write Only";
        }
        else if (m_pNode -> m_accessType == AccessType::READ_WRITE)
        {
            accessType = "Read write";
        }
        else if (m_pNode -> m_accessType == AccessType::NOT_ACCESSIBLE)
        {
            accessType = "Not accessible";
        }
        else
        {
            accessType = "Error";
        }
        
        if (m_pNode -> m_statusType == StatusType::MANDATORY)
        {
            statusType = "Mandatory";  
        }
        else if (m_pNode -> m_statusType == StatusType::OPTIONAL)
        {
            statusType = "Optional";
        }
        else if (m_pNode -> m_statusType == StatusType::OBSOLETE)
        {
            statusType = "Obsolete";  
        }
        else
        {
            statusType = "Error";
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x80(%rbp)
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
addq $0x60, %rdi
callq 0x18e90
movq -0x80(%rbp), %rsi
movq %rax, -0x78(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xba40
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x45440
movq %rax, -0x68(%rbp)
jmp 0x13657
movq -0x88(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, 0x68(%rax)
leaq -0x48(%rbp), %rdi
callq 0x8510
movq -0x88(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x136a3
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x13a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8510
jmp 0x13a82
movq -0x88(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x1, (%rcx)
movq 0x68(%rax), %rcx
movl (%rcx), %edx
movq -0x20(%rbp), %rcx
movl %edx, (%rcx)
movq 0x68(%rax), %rsi
addq $0x8, %rsi
movq -0x28(%rbp), %rdi
callq 0x6070
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
addq $0x28, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x136ff
movq -0x30(%rbp), %rdi
leaq 0x34d13(%rip), %rsi     # 0x48408
callq 0x65f0
jmp 0x137a3
movq -0x60(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1371d
movq -0x30(%rbp), %rdi
leaq 0x34cfd(%rip), %rsi     # 0x48410
callq 0x65f0
jmp 0x137a1
movq -0x60(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x13738
movq -0x30(%rbp), %rdi
leaq 0x34cec(%rip), %rsi     # 0x4841d
callq 0x65f0
jmp 0x1379f
movq -0x60(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x13753
movq -0x30(%rbp), %rdi
leaq 0x34ce3(%rip), %rsi     # 0x4842f
callq 0x65f0
jmp 0x1379d
movq -0x60(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x1376e
movq -0x30(%rbp), %rdi
leaq 0x34ccd(%rip), %rsi     # 0x48434
callq 0x65f0
jmp 0x1379b
movq -0x60(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x13789
movq -0x30(%rbp), %rdi
leaq 0x34cbb(%rip), %rsi     # 0x4843d
callq 0x65f0
jmp 0x13799
movq -0x30(%rbp), %rdi
leaq 0x34cb0(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x1379b
jmp 0x1379d
jmp 0x1379f
jmp 0x137a1
jmp 0x137a3
movq -0x60(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x137bf
movq 0x10(%rbp), %rdi
leaq 0x34c92(%rip), %rsi     # 0x4844a
callq 0x65f0
jmp 0x137ed
movq -0x60(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x137db
movq 0x10(%rbp), %rdi
leaq 0x34c80(%rip), %rsi     # 0x48454
callq 0x65f0
jmp 0x137eb
movq 0x10(%rbp), %rdi
leaq 0x34c5e(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x137ed
movq -0x60(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x13809
movq 0x18(%rbp), %rdi
leaq 0x34c5e(%rip), %rsi     # 0x48460
callq 0x65f0
jmp 0x13855
movq -0x60(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x13825
movq 0x18(%rbp), %rdi
leaq 0x34c4c(%rip), %rsi     # 0x4846a
callq 0x65f0
jmp 0x13853
movq -0x60(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x13841
movq 0x18(%rbp), %rdi
leaq 0x34c39(%rip), %rsi     # 0x48473
callq 0x65f0
jmp 0x13851
movq 0x18(%rbp), %rdi
leaq 0x34bf8(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x13853
jmp 0x13855
movq -0x60(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x13871
movq 0x20(%rbp), %rdi
leaq 0x34bf6(%rip), %rsi     # 0x48460
callq 0x65f0
jmp 0x138db
movq -0x60(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x1388d
movq 0x20(%rbp), %rdi
leaq 0x34bf6(%rip), %rsi     # 0x4847c
callq 0x65f0
jmp 0x138d9
movq -0x60(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x138a9
movq 0x20(%rbp), %rdi
leaq 0x34be6(%rip), %rsi     # 0x48488
callq 0x65f0
jmp 0x138d7
movq -0x60(%rbp), %rax
cmpl $0x3, 0xc(%rax)
jne 0x138c5
movq 0x20(%rbp), %rdi
leaq 0x34bdb(%rip), %rsi     # 0x48499
callq 0x65f0
jmp 0x138d5
movq 0x20(%rbp), %rdi
leaq 0x34b74(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x138d7
jmp 0x138d9
jmp 0x138db
movq -0x88(%rbp), %rax
movq -0x60(%rbp), %rcx
movl 0x10(%rcx), %edx
movq 0x28(%rbp), %rcx
movl %edx, (%rcx)
movq -0x60(%rbp), %rcx
movl 0x14(%rcx), %edx
movq 0x30(%rbp), %rcx
movl %edx, (%rcx)
movq -0x60(%rbp), %rcx
movl 0x18(%rcx), %edx
movq 0x38(%rbp), %rcx
movl %edx, (%rcx)
movq 0x68(%rax), %rsi
addq $0x78, %rsi
movq 0x40(%rbp), %rdi
callq 0x6070
movq 0x40(%rbp), %rdi
leaq 0x34f1f(%rip), %rsi     # 0x48844
callq 0xeb60
testb $0x1, %al
jne 0x13930
jmp 0x13940
movq 0x40(%rbp), %rdi
leaq 0x34b66(%rip), %rsi     # 0x484a1
callq 0x65f0
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x0, 0x98(%rax)
jne 0x13969
movq 0x48(%rbp), %rdi
leaq 0x34b47(%rip), %rsi     # 0x484a6
callq 0x65f0
jmp 0x139f1
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x1, 0x98(%rax)
jne 0x1398f
movq 0x48(%rbp), %rdi
leaq 0x34b28(%rip), %rsi     # 0x484b0
callq 0x65f0
jmp 0x139ef
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x2, 0x98(%rax)
jne 0x139b5
movq 0x48(%rbp), %rdi
leaq 0x34b0d(%rip), %rsi     # 0x484bb
callq 0x65f0
jmp 0x139ed
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x3, 0x98(%rax)
jne 0x139db
movq 0x48(%rbp), %rdi
leaq 0x34af2(%rip), %rsi     # 0x484c6
callq 0x65f0
jmp 0x139eb
movq 0x48(%rbp), %rdi
leaq 0x34a5e(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x139ed
jmp 0x139ef
jmp 0x139f1
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x0, 0x9c(%rax)
jne 0x13a17
movq 0x50(%rbp), %rdi
leaq 0x34ac5(%rip), %rsi     # 0x484d5
callq 0x65f0
jmp 0x13a77
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x1, 0x9c(%rax)
jne 0x13a3d
movq 0x50(%rbp), %rdi
leaq 0x34aa9(%rip), %rsi     # 0x484df
callq 0x65f0
jmp 0x13a75
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x2, 0x9c(%rax)
jne 0x13a63
movq 0x50(%rbp), %rdi
leaq 0x34a8c(%rip), %rsi     # 0x484e8
callq 0x65f0
jmp 0x13a73
movq 0x50(%rbp), %rdi
leaq 0x349d6(%rip), %rsi     # 0x48444
callq 0x65f0
jmp 0x13a75
jmp 0x13a77
jmp 0x13a79
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x6790
nopl (%rax,%rax)