// File: muk343[P]pmml/GraphGenerator.cpp
// Function: GraphGenerator::populatePredicate(Node*, TiXmlElement*)
void GraphGenerator::populatePredicate(Node* node, TiXmlElement* pElement) 
    {
        //Just for doubleCheck
        string nodeTag = "SimplePredicate";
        string trueTag = "True";
        if(!pElement || (nodeTag.compare(pElement->Value()) != 0 && trueTag.compare(pElement->Value()) !=0 )) 
        {
            cout<<"Expected predicate but didn't get it"<<endl;
            exit(-1);
            //nodeToReturn = getNodeDataFromThisNode
            //Add to the vector here
        }

        if (nodeTag.compare(pElement->Value()) == 0) {
            string field = pElement->Attribute("field");
            string currOperator = pElement->Attribute("operator");
            string value = pElement->Attribute("value");

            node->predicate_feature = field;
            node->predicate_operator = currOperator;
            node->predicate_value = stod(value);
            //cout<<"The loaded predicate values are field: "<<field<<" "<<" operator: "<<currOperator<<" value:  "<<value;    
        } else {
            node->predicate_feature = "true";
            node->predicate_operator = "true";
            node->predicate_value = 0.0;
        }

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x44b0
movq -0xf8(%rbp), %rdx
leaq 0x9f7b(%rip), %rsi      # 0x16dc0
leaq -0x38(%rbp), %rdi
callq 0xdea0
jmp 0xce50
leaq -0x39(%rbp), %rdi
callq 0x42f0
leaq -0x71(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x44b0
movq -0x100(%rbp), %rdx
leaq 0x9f59(%rip), %rsi      # 0x16dd0
leaq -0x70(%rbp), %rdi
callq 0xdea0
jmp 0xce82
leaq -0x71(%rbp), %rdi
callq 0x42f0
cmpq $0x0, -0x18(%rbp)
je 0xcee8
movq -0x18(%rbp), %rdi
callq 0x8ca0
movq %rax, -0x108(%rbp)
jmp 0xcea4
movq -0x108(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x40f0
cmpl $0x0, %eax
je 0xcf68
movq -0x18(%rbp), %rdi
callq 0x8ca0
movq %rax, -0x110(%rbp)
jmp 0xcecf
movq -0x110(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x40f0
cmpl $0x0, %eax
je 0xcf68
movq 0x130d9(%rip), %rdi     # 0x1ffc8
leaq 0x9edf(%rip), %rsi      # 0x16dd5
callq 0x4270
movq %rax, -0x118(%rbp)
jmp 0xcf04
movq -0x118(%rbp), %rdi
movq 0x1309e(%rip), %rsi     # 0x1ffb0
callq 0x42d0
jmp 0xcf19
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4340
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x42f0
jmp 0xd213
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x42f0
jmp 0xd20a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xd201
movq -0x18(%rbp), %rdi
callq 0x8ca0
movq %rax, -0x120(%rbp)
jmp 0xcf7a
movq -0x120(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x40f0
cmpl $0x0, %eax
jne 0xd1ae
movq -0x18(%rbp), %rdi
leaq 0x9e5c(%rip), %rsi      # 0x16dfa
callq 0x5cc0
movq %rax, -0x128(%rbp)
jmp 0xcfac
leaq -0x99(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x44b0
movq -0x128(%rbp), %rsi
movq -0x130(%rbp), %rdx
leaq -0x98(%rbp), %rdi
callq 0xdea0
jmp 0xcfdb
leaq -0x99(%rbp), %rdi
callq 0x42f0
movq -0x18(%rbp), %rdi
leaq 0x9e0e(%rip), %rsi      # 0x16e00
callq 0x5cc0
movq %rax, -0x138(%rbp)
jmp 0xd000
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x44b0
movq -0x138(%rbp), %rsi
movq -0x140(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0xdea0
jmp 0xd02f
leaq -0xc1(%rbp), %rdi
callq 0x42f0
movq -0x18(%rbp), %rdi
leaq 0x9dc3(%rip), %rsi      # 0x16e09
callq 0x5cc0
movq %rax, -0x148(%rbp)
jmp 0xd054
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x44b0
movq -0x148(%rbp), %rsi
movq -0x150(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xdea0
jmp 0xd083
leaq -0xe9(%rbp), %rdi
callq 0x42f0
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq -0x98(%rbp), %rsi
callq 0x4060
jmp 0xd0a5
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4060
jmp 0xd0bb
xorl %eax, %eax
movl %eax, %esi
leaq -0xe8(%rbp), %rdi
callq 0xdf50
movsd %xmm0, -0x158(%rbp)
jmp 0xd0d5
movsd -0x158(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x68(%rax)
leaq -0xe8(%rbp), %rdi
callq 0x41c0
leaq -0xc0(%rbp), %rdi
callq 0x41c0
leaq -0x98(%rbp), %rdi
callq 0x41c0
jmp 0xd1e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x42f0
jmp 0xd201
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xd1a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x42f0
jmp 0xd1a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xd194
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe9(%rbp), %rdi
callq 0x42f0
jmp 0xd194
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x41c0
leaq -0xc0(%rbp), %rdi
callq 0x41c0
leaq -0x98(%rbp), %rdi
callq 0x41c0
jmp 0xd201
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq 0x9098(%rip), %rsi      # 0x16255
callq 0x43a0
jmp 0xd1c4
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
leaq 0x9082(%rip), %rsi      # 0x16255
callq 0x43a0
jmp 0xd1da
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x68(%rax)
leaq -0x70(%rbp), %rdi
callq 0x41c0
leaq -0x38(%rbp), %rdi
callq 0x41c0
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
leaq -0x70(%rbp), %rdi
callq 0x41c0
leaq -0x38(%rbp), %rdi
callq 0x41c0
movq -0x48(%rbp), %rdi
callq 0x44a0
nopl (%rax)