// File: /workspace/github_cpp_makefile_star2_O3/muk343[P]pmml/GraphGenerator.cpp
// Function: GraphGenerator::traverse(Node*)
void GraphGenerator::traverse(Node* rootNode) {
        
        stack<Node *> node_stack;
        Node *curr = rootNode;

        node_stack.push(curr);

        while(!node_stack.empty()) {

            Node* temp = node_stack.top();
            node_stack.pop();
            cout<<"Score is: "<<temp->score<<" recordCount is: "<<temp->node_record_count<<endl;
            if (temp->childNodes.size() == 1) {
                cout<<"This has only one child";
                exit(-1);
            }

            if (temp->childNodes.size() == 2) {
                node_stack.push(temp->childNodes[0]);
                node_stack.push(temp->childNodes[1]);
            }
        }

    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0xac06
movq %rbx, 0x50(%rsp)
movq 0x30(%r14), %rax
movq 0x40(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0xa350
movq %rbx, (%rax)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
jmp 0xa362
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0xad7c
movq 0x30(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0xa4dc
movq 0x9c54(%rip), %rbx      # 0x13fc8
leaq 0x3a26(%rip), %r14      # 0xdda1
leaq 0x3a2a(%rip), %r15      # 0xddac
movq %rsp, %r12
movq 0x38(%rsp), %rdi
cmpq %rdi, %rax
je 0xa399
movq -0x8(%rax), %rbp
addq $-0x8, %rax
jmp 0xa3de
movq 0x48(%rsp), %rax
movq -0x8(%rax), %rax
movq 0x1f8(%rax), %rbp
movl $0x200, %esi            # imm = 0x200
callq 0x4250
movq 0x48(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x40(%rsp)
movl $0x1f8, %ecx            # imm = 0x1F8
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movl $0xa, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42a0
movsd (%rbp), %xmm0
movq %rbx, %rdi
callq 0x43d0
movq %rax, %r13
movl $0x11, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42a0
movsd 0x20(%rbp), %xmm0
movq %r13, %rdi
callq 0x43d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4200
movsbl %al, %esi
movq %r13, %rdi
callq 0x4050
movq %rax, %rdi
callq 0x4190
movq 0x70(%rbp), %rsi
movq 0x78(%rbp), %rax
subq %rsi, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
je 0xa46a
cmpq $0x1, %rax
jne 0xa4cc
jmp 0xa4f3
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0xa493
movq (%rsi), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
jmp 0xa4a0
movq %r12, %rdi
callq 0xad7c
movq 0x30(%rsp), %rax
movq 0x70(%rbp), %rsi
addq $0x8, %rsi
movq 0x40(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0xa4c4
movq (%rsi), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%rsp)
jmp 0xa4cc
movq %r12, %rdi
callq 0xad7c
movq 0x30(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0xa385
movq %rsp, %rdi
callq 0xa684
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9ace(%rip), %rdi      # 0x13fc8
leaq 0x38bd(%rip), %rsi      # 0xddbe
callq 0x4220
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42c0
jmp 0xa514
jmp 0xa514
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa684
movq %rbx, %rdi
callq 0x4410
nop