// File: /workspace/github_cpp_makefile_star2_O3/EmbeddedPaul166[P]SNMP-Agent/src/main.cpp
// Function: main
int main() 
{
    char * pPath =  getenv("PROJECT_PATH");
    if (pPath == nullptr)
    {
        std::cout << "Error: Source set-env file first" << std::endl;
        return 0;
    }
    std::string filePath(pPath);
    filePath += "/mibs/RFC1213-MIB.txt";
    Manager manager;
    manager.parse(filePath);
    encodeASequence(manager);
    encodeASequenceInsideASequence(manager);
    
    while (1)
    {
        std::string input;
        std::cout << std::endl;
        std::cout << "Input OID string:" << std::endl;
        std::cin >> input;
        std::cout << std::endl;
        if (std::cin.fail())
        {
            std::cout << "Bad input!" << std::endl;
            continue;
        }
        else
        {
            manager.getNodeByOID(input);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq 0x18523(%rip), %rdi     # 0x1e0eb
callq 0x43c0
testq %rax, %rax
jne 0x5c28
movq 0x243df(%rip), %rbx     # 0x29fb8
leaq 0x18518(%rip), %rsi     # 0x1e0f8
movl $0x20, %edx
movq %rbx, %rdi
callq 0x4390
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4260
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbx, %rdi
callq 0x4160
movq %rbx, %rdx
addq %rax, %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6006
leaq 0x184c0(%rip), %rsi     # 0x1e119
movq %r14, %rdi
callq 0x45b0
leaq 0x60(%rsp), %rdi
callq 0x622c
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x5f70
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x65ae
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5cb1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4320
leaq 0x60(%rsp), %rdi
callq 0x49cc
leaq 0x60(%rsp), %rdi
callq 0x574e
leaq 0x10(%rsp), %r13
movq 0x242e7(%rip), %rbx     # 0x29fb8
leaq 0x18457(%rip), %r14     # 0x1e12f
movq 0x24301(%rip), %r15     # 0x29fe0
movq %rsp, %r12
leaq 0x18458(%rip), %rbp     # 0x1e141
movq %r13, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x4180
movl $0x11, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x4180
movq %r15, %rdi
movq %r12, %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4180
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
je 0x5d57
movl $0xa, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x4180
jmp 0x5d64
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x6ab8
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5ce9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4320
jmp 0x5ce9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5db5
movq 0x10(%rsp), %rsi
jmp 0x5da8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5db5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4320
jmp 0x5db5
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x63f0
jmp 0x5dc6
jmp 0x5dc3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x5de2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4320
movq %rbx, %rdi
callq 0x4550