// File: /workspace/github_cpp_makefile_star2_O3/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 0xa1d6
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3bc4(%rip), %rsi      # 0xdd50
leaq 0x3bc1(%rip), %rdx      # 0xdd54
movq %rsp, %r14
movq %r14, %rdi
callq 0xa6dc
movq 0x38(%r15), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x40d0
testl %eax, %eax
je 0xa1db
movq 0x28(%r15), %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0xa22e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa164
testq %rax, %rax
cmovneq %rax, %r14
movq 0x48(%r15), %r15
jmp 0xa1b9
xorl %r14d, %r14d
jmp 0xa244
movq (%r15), %rax
movq %r15, %rdi
callq *0x58(%rax)
movq %rax, %rsi
callq 0x9e0c
movq %rax, %r14
movq 0x28(%r15), %r15
testq %r15, %r15
je 0xa22e
movq %rsp, %r12
movq 0x38(%r15), %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0x40d0
testl %eax, %eax
jne 0xa225
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa096
movq %r14, %rdi
movq %rax, %rsi
callq 0xb3e2
movq 0x48(%r15), %r15
testq %r15, %r15
jne 0xa1fb
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xa244
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 0xa259
jmp 0xa259
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xa272
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4410