// File: /workspace/github_cpp_makefile_star2_O1/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 0x18532(%rip), %rdi     # 0x1f0eb
callq 0x53c0
testq %rax, %rax
jne 0x6c19
movq 0x243ee(%rip), %rbx     # 0x2afb8
leaq 0x18527(%rip), %rsi     # 0x1f0f8
movl $0x20, %edx
movq %rbx, %rdi
callq 0x5390
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5260
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 0x5160
movq %rbx, %rdx
addq %rax, %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6fee
leaq 0x184cf(%rip), %rsi     # 0x1f119
movq %r14, %rdi
callq 0x55b0
leaq 0x60(%rsp), %rdi
callq 0x7210
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x6f5e
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7592
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6ca2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x60(%rsp), %rdi
callq 0x59cc
leaq 0x60(%rsp), %rdi
callq 0x673f
leaq 0x10(%rsp), %r13
movq 0x242f6(%rip), %rbx     # 0x2afb8
leaq 0x18466(%rip), %r14     # 0x1f12f
movq 0x24310(%rip), %r15     # 0x2afe0
movq %rsp, %r12
leaq 0x18467(%rip), %rbp     # 0x1f141
movq %r13, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x5180
movl $0x11, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5390
movq %rbx, %rdi
callq 0x5180
movq %r15, %rdi
movq %r12, %rsi
callq 0x53f0
movq %rbx, %rdi
callq 0x5180
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
je 0x6d48
movl $0xa, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5390
movq %rbx, %rdi
callq 0x5180
jmp 0x6d55
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x7a9a
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6cda
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x6cda
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6da6
movq 0x10(%rsp), %rsi
jmp 0x6d99
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6da6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x6da6
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x73d4
jmp 0x6db7
jmp 0x6db4
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6dd3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5320
movq %rbx, %rdi
callq 0x5550