// File: /workspace/github_cpp_makefile_star2_O2/JenTus[P]TCEM/src_TCEM/itemGraph.cc
// Function: Cide::itemGraph::BuildHypergraphNode(int, long long)
int itemGraph::BuildHypergraphNode(int uStart, int64 hyperiiid) {
        int n_visit_edge=1;
        
        hyperGT[hyperiiid].push_back(uStart);
        
        int n_visit_mark = 0;
        
        q.clear();
        q.push_back(uStart);
        visit_mark[n_visit_mark++] = uStart; // repeatedly use this, not not initialize again.
        visit[uStart] = true;
        
        while(!q.empty()) {
            int expand = q.front();
            q.pop_front();
            
            int i = expand;
            for(int j = 0; j < (int)graphT[i].size(); j++){
                int v = graphT[i][j]; //parent of u in the original graph G
                n_visit_edge++;
                double randDouble = sfmt_genrand_real1(&sfmtSeed);
                if(randDouble > probT[i][j])
                    continue;
                if(visit[v])
                    continue;
                if(!visit[v]) {
                    visit_mark[n_visit_mark++] = v;
                    visit[v]=true;
                }
                q.push_back(v);
                hyperGT[hyperiiid].push_back(v);
            }
        }
        
        for(int i = 0; i < n_visit_mark; i++)
            visit[visit_mark[i]]=false;
        
        return n_visit_edge; 
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x34(%rsp), %r14
movl %esi, (%r14)
imulq $0x18, %rdx, %rax
movq 0x18(%rdi), %rdi
movq %rax, 0x28(%rsp)
addq %rax, %rdi
movq %r14, %rsi
callq 0x854e
leaq 0xa38(%rbx), %r15
movq %r15, %rdi
callq 0xb8fe
movq %r15, 0x18(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xb91e
movslq (%r14), %rsi
movq 0xa20(%rbx), %rax
movl %esi, (%rax)
leaq 0x9f8(%rbx), %r14
movq %r14, %rdi
callq 0x8684
orq %rdx, (%rax)
leaq 0x30(%rbx), %r12
pushq $0x1
popq %rax
leaq 0x9c5a(%rip), %r13      # 0x15318
movq %rax, 0x8(%rsp)
movl %eax, %ebp
movq %r12, 0x20(%rsp)
movq 0xa48(%rbx), %rax
cmpq %rax, 0xa68(%rbx)
je 0xb7e9
movl %ebp, 0x14(%rsp)
movslq (%rax), %r15
movq 0x18(%rsp), %rdi
callq 0xb940
imulq $0x18, %r15, %rbp
xorl %r15d, %r15d
movq (%r13), %rcx
movq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0xb7dd
movl (%rax,%r15,4), %eax
movl %eax, 0x4(%rsp)
movl 0x9f0(%rbx), %eax
cmpl $0x270, %eax            # imm = 0x270
jl 0xb735
movq %r12, %rdi
callq 0xd710
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x9f0(%rbx)
cltq
movl 0x30(%rbx,%rax,4), %eax
cvtsi2sd %rax, %xmm0
mulsd 0x2f7f(%rip), %xmm0     # 0xe6d0
movq (%rbx), %rax
movq (%rax,%rbp), %rax
ucomisd (%rax,%r15,8), %xmm0
ja 0xb7d5
movslq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x8684
testq %rdx, (%rax)
jne 0xb7d5
movslq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x8684
testq %rdx, (%rax)
jne 0xb7ad
movslq 0x4(%rsp), %rsi
movq 0x8(%rsp), %rcx
movslq %ecx, %rax
incl %ecx
movq %rcx, 0x8(%rsp)
movq 0xa20(%rbx), %rcx
movl %esi, (%rcx,%rax,4)
movq %r14, %rdi
callq 0x8684
orq %rdx, (%rax)
movq 0x18(%rsp), %rdi
leaq 0x4(%rsp), %r12
movq %r12, %rsi
callq 0xb91e
movq 0x18(%rbx), %rdi
addq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x854e
movq 0x20(%rsp), %r12
incq %r15
jmp 0xb6f6
movl 0x14(%rsp), %ebp
addl %r15d, %ebp
jmp 0xb6ca
xorl %r15d, %r15d
movq 0x8(%rsp), %r12
testl %r12d, %r12d
cmovlel %r15d, %r12d
cmpq %r15, %r12
je 0xb81b
movq 0xa20(%rbx), %rax
movslq (%rax,%r15,4), %rsi
movq %r14, %rdi
callq 0x8684
notq %rdx
andq %rdx, (%rax)
incq %r15
jmp 0xb7f8
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq