// File: /workspace/github_cpp_makefile_star2_O2/JenTus[P]TCEM/src_TCEM/allocator.cc
// Function: Cide::allocator::readTICGraph()
void allocator::readTICGraph() {
        
        //string probGraphFile = opt->getValue("probGraphFile");
        cout << "Reading file " << probGraphFile << endl;
        ifstream myfile (probGraphFile.c_str(), ios::in);
        //double *itemProbs; //item-specific influence probabilities

        int nrEdges = 0;
        set<int> nodes; // for control
        
        if (myfile.is_open()) {
            while (! myfile.eof() )	{
                std::string line;
                getline (myfile,line);
                if (line.empty()) continue;

                std::vector<std::string> nodeids;
                split1(line, nodeids);
                 int u1 = strToInt(nodeids[0]);
                 int u2 = strToInt(nodeids[1]);
                double u3 = strToDouble(nodeids[2]); // the probability
                double u4 = strToDouble(nodeids[3]);
                
                if (u1 == u2)
                    continue;

                nodeDegree[u1] = nodeDegree[u1] + 1.0;

                nrEdges++;
                
                graphT[u2].push_back(u1); //insert to the transposed graph
                
                // for control
                nodes.insert(u1);
                nodes.insert(u2);

                rcList->at(0)->probT[u2].push_back(u3); // insert the probabilty
                rcList->at(1)->probT[u2].push_back(u4);

            }


            myfile.close();
        }
        
        else
            cout << "Can't open input graph file " << probGraphFile << endl;
        
        cout << "graph import complete " << endl;
        
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rdi, %rbx
movq 0x10825(%rip), %rdi     # 0x14fd8
leaq 0x9c28(%rip), %rsi      # 0xe3e2
callq 0x32c0
leaq 0x20(%rbx), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq 0x20(%rbx), %rsi
leaq 0x110(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x3580
leaq 0x68(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x188(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x4a1b
leaq 0x40(%rsp), %r15
leaq 0xf0(%rsp), %rbp
leaq 0xb0(%rsp), %r14
leaq 0x90(%rsp), %r12
movq 0x110(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x130(%rsp,%rax)
jne 0x4a43
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x3080
cmpq $0x0, 0x48(%rsp)
je 0x4a0e
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x88a0
movq 0x10(%rsp), %rsi
movq %rbp, %rdi
callq 0x3410
movq %rbp, %rdi
callq 0x8951
movq %rbp, %rdi
movl %eax, %r13d
callq 0x3130
movl %r13d, 0x4(%rsp)
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0xd0(%rsp), %r13
movq %r13, %rdi
callq 0x3410
movq %r13, %rdi
callq 0x8951
movq %r13, %rdi
movl %eax, %r13d
callq 0x3130
movl %r13d, (%rsp)
movq 0x10(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq 0x3410
movq %r14, %rdi
callq 0x82b5
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x3130
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x10(%rsp), %rsi
addq $0x60, %rsi
movq %r12, %rdi
callq 0x3410
movq %r12, %rdi
callq 0x82b5
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x3130
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movslq 0x4(%rsp), %rax
movslq (%rsp), %rcx
cmpl %ecx, %eax
je 0x4a04
movq 0xd8(%rbx), %rdx
movsd (%rdx,%rax,8), %xmm0
addsd 0x97a2(%rip), %xmm0     # 0xe120
movsd %xmm0, (%rdx,%rax,8)
imulq $0x18, %rcx, %rdi
leaq 0x1098a(%rip), %rax     # 0x15318
addq (%rax), %rdi
leaq 0x4(%rsp), %rsi
callq 0x854e
leaq 0x60(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x98b4
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x98b4
movq 0xae8(%rbx), %rdi
xorl %esi, %esi
callq 0x856c
movq (%rax), %rax
movslq (%rsp), %rcx
imulq $0x18, %rcx, %rdi
addq (%rax), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8648
movq 0xae8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x856c
movq (%rax), %rax
movslq (%rsp), %rcx
imulq $0x18, %rcx, %rdi
addq (%rax), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8648
leaq 0x10(%rsp), %rdi
callq 0x89fe
movq %r15, %rdi
callq 0x3130
jmp 0x4836
movq 0x105b6(%rip), %rdi     # 0x14fd8
leaq 0x99c7(%rip), %rsi      # 0xe3f0
callq 0x32c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
jmp 0x4a50
leaq 0x110(%rsp), %rdi
callq 0x3090
movq 0x10581(%rip), %rdi     # 0x14fd8
leaq 0x99af(%rip), %rsi      # 0xe40d
callq 0x32c0
movq %rax, %rdi
callq 0x3150
leaq 0x60(%rsp), %rdi
callq 0x8d86
leaq 0x110(%rsp), %rdi
callq 0x30c0
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4af6
jmp 0x4adf
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x4acf
jmp 0x4adf
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0x4acf
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x4acf
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x3130
jmp 0x4ae2
jmp 0x4adf
jmp 0x4adf
movq %rax, %rbx
jmp 0x4aec
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x89fe
leaq 0x40(%rsp), %rdi
callq 0x3130
leaq 0x60(%rsp), %rdi
callq 0x8d86
leaq 0x110(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3560
nop