// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movl %esi, %eax
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
movq 0x18(%rdi), %rcx
leaq (%rdx,%rdx,2), %rdx
movq %rdx, 0x18(%rsp)
leaq (%rcx,%rdx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xe108
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xe112
leaq 0x8(%rsp), %rdx
callq 0xbdaa
leaq 0xa38(%rbx), %rbp
movq %rbp, %rdi
callq 0xe506
movq 0xa68(%rbx), %rax
movq 0xa78(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xe14b
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xa68(%rbx)
jmp 0xe158
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0xe758
movl 0x8(%rsp), %eax
movq 0xa20(%rbx), %rcx
movl %eax, (%rcx)
movslq 0x8(%rsp), %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x9f8(%rbx), %rax
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %rdx
andq %rcx, %rdx
xorl %esi, %esi
cmpq %rdi, %rdx
setbe %sil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rsi,8)
movq 0xa48(%rbx), %rax
cmpq %rax, 0xa68(%rbx)
je 0xe3a9
leaq 0x30(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movl $0x1, 0xc(%rsp)
leaq 0xa171(%rip), %r14      # 0x18348
leaq 0x3f(%rdi), %r13
movl $0x1, %r12d
movq %rbp, 0x10(%rsp)
movslq (%rax), %r15
movq %rbp, %rdi
callq 0xe562
movq (%r14), %rcx
leaq (%r15,%r15,2), %rbp
movq (%rcx,%rbp,8), %rax
movq 0x8(%rcx,%rbp,8), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0xe38e
xorl %r15d, %r15d
movl (%rax,%r15,4), %eax
movl %eax, 0x4(%rsp)
cmpl $0x270, 0x9f0(%rbx)     # imm = 0x270
jl 0xe23b
movq 0x20(%rsp), %rdi
callq 0x1083c
movl $0x0, 0x9f0(%rbx)
movslq 0x9f0(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x9f0(%rbx)
movl 0x30(%rbx,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x44d1(%rip), %xmm0     # 0x12730
movq (%rbx), %rax
movq (%rax,%rbp,8), %rax
ucomisd (%rax,%r15,8), %xmm0
ja 0xe367
movslq 0x4(%rsp), %rcx
movq 0x9f8(%rbx), %rax
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdx
movq %rcx, %rsi
andq %r13, %rsi
xorl %edi, %edi
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
cmpq %r8, %rsi
setbe %dil
movq -0x8(%rdx,%rdi,8), %rdx
btq %rcx, %rdx
jb 0xe367
movslq %r12d, %rdx
movq 0xa20(%rbx), %rsi
movl %ecx, (%rsi,%rdx,4)
movslq 0x4(%rsp), %rcx
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
movq %rcx, %rsi
andq %r13, %rsi
xorl %edi, %edi
cmpq %r8, %rsi
setbe %dil
movl $0x1, %esi
shlq %cl, %rsi
leaq (%rax,%rdx,8), %rax
orq %rsi, -0x8(%rax,%rdi,8)
movq 0xa68(%rbx), %rax
movq 0xa78(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xe324
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xa68(%rbx)
jmp 0xe333
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0xe758
incl %r12d
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xe35d
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xe367
leaq 0x4(%rsp), %rdx
callq 0xbdaa
incq %r15
movq (%r14), %rcx
movq (%rcx,%rbp,8), %rax
movq 0x8(%rcx,%rbp,8), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0xe213
addl %r15d, 0xc(%rsp)
movq 0xa48(%rbx), %rax
cmpq %rax, 0xa68(%rbx)
movq 0x10(%rsp), %rbp
jne 0xe1e6
jmp 0xe3b7
movl $0x1, %r12d
movl $0x1, 0xc(%rsp)
testl %r12d, %r12d
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
jle 0xe41b
movq 0x9f8(%rbx), %rax
movq 0xa20(%rbx), %rdx
movl %r12d, %esi
xorl %edi, %edi
leaq 0x3f(%r14), %r8
movslq (%rdx,%rdi,4), %rcx
leaq 0x3f(%rcx), %r9
testq %rcx, %rcx
cmovnsq %rcx, %r9
sarq $0x6, %r9
movq %rcx, %r10
andq %r8, %r10
xorl %r11d, %r11d
cmpq %r14, %r10
setbe %r11b
movq $-0x2, %r10
rolq %cl, %r10
leaq (%rax,%r9,8), %rcx
andq %r10, -0x8(%rcx,%r11,8)
incq %rdi
cmpq %rdi, %rsi
jne 0xe3dd
movl 0xc(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq