// File: /workspace/github_cpp_makefile_star2_O1/muk343[P]pmml/GraphGenerator.cpp
// Function: GraphGenerator::dump_to_stdout(TiXmlNode*)
Node* GraphGenerator::dump_to_stdout( TiXmlNode* pParent)
    {
        if ( !pParent ) return NULL;

        TiXmlNode* pChild;
        TiXmlText* pText;
        int t = pParent->Type();
        //printf( "%s", getIndent(indent));
        int num;
    /*
        switch ( t )
        {
        case TiXmlNode::TINYXML_DOCUMENT:
            printf( "Document" );
            break;

        case TiXmlNode::TINYXML_ELEMENT:
            printf( "Element [%s]", pParent->Value() );
            num=dump_attribs_to_stdout(pParent->ToElement(), indent+1);
            switch(num)
            {
                case 0:  printf( " (No attributes)"); break;
                case 1:  printf( "%s1 attribute", getIndentAlt(indent)); break;
                default: printf( "%s%d attributes", getIndentAlt(indent), num); break;
            }
            break;

        case TiXmlNode::TINYXML_COMMENT:
            printf( "Comment: [%s]", pParent->Value());
            break;

        case TiXmlNode::TINYXML_UNKNOWN:
            printf( "Unknown" );
            break;

        case TiXmlNode::TINYXML_TEXT:
            pText = pParent->ToText();
            printf( "Text: [%s]", pText->Value() );
            break;

        case TiXmlNode::TINYXML_DECLARATION:
            printf( "Declaration" );
            break;
        default:
            break;
        }
        
        */
        
        string node = "Node";
        if(node.compare(pParent->Value()) == 0) 
        {
            //getNodeDataFromThisNode(pParent);
            Node* rootNode = getNodeDataFromThisNode(pParent->ToElement()); 
            //nodeToReturn = getNodeDataFromThisNode
            //Add to the vector here
            for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling()) 
            {
                
                if(node.compare(pChild->Value()) == 0) {
                    rootNode->addChildNode(subGenerateGraph(pChild));
                }
                
            }

            return rootNode;
        } else {

            Node* deepInsertedRootToReturn = NULL;
            for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling()) 
            {

                Node* tempReturnValue = dump_to_stdout(pChild);
                if (tempReturnValue != NULL)
                {
                    deepInsertedRootToReturn = tempReturnValue;
                }
                
            }

            return deepInsertedRootToReturn;    
        }

        
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
testq %rsi, %rsi
je 0xa3a2
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x39e3(%rip), %rsi      # 0xdd3b
leaq 0x39e0(%rip), %rdx      # 0xdd3f
movq %rsp, %r14
movq %r14, %rdi
callq 0xa888
movq 0x38(%r15), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x40d0
testl %eax, %eax
je 0xa3a7
movq 0x28(%r15), %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0xa3fa
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa330
testq %rax, %rax
cmovneq %rax, %r14
movq 0x48(%r15), %r15
jmp 0xa385
xorl %r14d, %r14d
jmp 0xa410
movq (%r15), %rax
movq %r15, %rdi
callq *0x58(%rax)
movq %rax, %rsi
callq 0x9fd8
movq %rax, %r14
movq 0x28(%r15), %r15
testq %r15, %r15
je 0xa3fa
movq %rsp, %r12
movq 0x38(%r15), %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0x40d0
testl %eax, %eax
jne 0xa3f1
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa262
movq %r14, %rdi
movq %rax, %rsi
callq 0xb33e
movq 0x48(%r15), %r15
testq %r15, %r15
jne 0xa3c7
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xa410
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xa425
jmp 0xa425
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xa43e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4410