// File: /workspace/github_cpp_makefile_star2_O2/JenTus[P]TCEM/src_TCEM/allocator.cc
// Function: Cide::allocator::readGraphNodes()
void allocator::readGraphNodes() {

        //string probGraphFile = opt->getValue("probGraphFile");
        ifstream myfile (probGraphFile.c_str(), ios::in);

        //double *itemProbs; //item-specific influence probabilities

        int nrEdges = 0;
        int nrNodes = 0;

        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]);
            
                if (u1 == u2)
                    continue;

                nrEdges++;
                // for control

                if(u1>nrNodes){
                    nrNodes = u1;
                }
                if(u2>nrNodes){
                    nrNodes = u2;
                }

            }

            myfile.close();
        }

        n = nrNodes +1;
        m = nrEdges;
        cout << "total number of nodes " << n << endl;
        cout << "total number of edges " << nrEdges << endl;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %r14
movq 0x20(%rdi), %rsi
leaq 0x90(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x3580
leaq 0x108(%rsp), %rdi
callq 0x30a0
xorl %r13d, %r13d
movl $0x0, %ebx
testb %al, %al
je 0x42dd
movq %r14, 0x28(%rsp)
xorl %r13d, %r13d
leaq 0x30(%rsp), %r12
leaq 0x70(%rsp), %rbp
leaq 0x50(%rsp), %r14
movl $0x0, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0xb0(%rsp,%rax)
jne 0x42c7
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x3080
cmpq $0x0, 0x38(%rsp)
je 0x42ba
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x88a0
movq 0x10(%rsp), %rsi
movq %rbp, %rdi
callq 0x3410
movq %rbp, %rdi
callq 0x8951
movl %eax, %r15d
movq %rbp, %rdi
callq 0x3130
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
movq %r14, %rdi
callq 0x3410
movq %r14, %rdi
callq 0x8951
movl %eax, %ebx
movq %r14, %rdi
callq 0x3130
cmpl %ebx, %r15d
je 0x42b0
incl 0xc(%rsp)
cmpl %r13d, %r15d
cmovgl %r15d, %r13d
cmpl %r13d, %ebx
cmovgl %ebx, %r13d
leaq 0x10(%rsp), %rdi
callq 0x89fe
movq %r12, %rdi
callq 0x3130
jmp 0x41f4
leaq 0x90(%rsp), %rdi
callq 0x3090
movl 0xc(%rsp), %ebx
movq 0x28(%rsp), %r14
incl %r13d
movl %r13d, 0x68(%r14)
movl %ebx, 0x6c(%r14)
movq 0x10ce9(%rip), %rdi     # 0x14fd8
leaq 0xa087(%rip), %rsi      # 0xe37d
callq 0x32c0
movl 0x68(%r14), %esi
movq %rax, %rdi
callq 0x3530
movq %rax, %rdi
callq 0x3150
movq 0x10cc2(%rip), %rdi     # 0x14fd8
leaq 0xa077(%rip), %rsi      # 0xe394
callq 0x32c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x3530
movq %rax, %rdi
callq 0x3150
leaq 0x90(%rsp), %rdi
callq 0x30c0
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4391
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x436e
jmp 0x4375
jmp 0x4375
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3130
jmp 0x4378
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x89fe
jmp 0x4387
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3130
leaq 0x90(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3560