// File: /workspace/github_cpp_makefile_star2_O3/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 0xe010
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xe01a
leaq 0x8(%rsp), %rdx
callq 0xbd60
leaq 0xa38(%rbx), %rbp
movq %rbp, %rdi
callq 0xe40a
movq 0xa68(%rbx), %rax
movq 0xa78(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xe053
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xa68(%rbx)
jmp 0xe06d
leaq 0x8(%rsp), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0xe662
movl (%r15), %ecx
movq 0xa68(%rbx), %rax
movq 0xa20(%rbx), %rdx
movl %ecx, (%rdx)
movslq 0x8(%rsp), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x9f8(%rbx), %rdx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq 0x3f(%r15), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %r15, %rsi
setbe %dil
movl $0x1, %esi
shlq %cl, %rsi
orq %rsi, -0x8(%rdx,%rdi,8)
movq 0xa48(%rbx), %rcx
cmpq %rcx, %rax
je 0xe2b9
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rsp)
movl $0x1, 0xc(%rsp)
leaq 0xa264(%rip), %r14      # 0x18348
leaq 0x3f(%r15), %r13
movl $0x1, %r12d
movq %rbp, 0x10(%rsp)
movslq (%rcx), %r15
movq %rbp, %rdi
callq 0xe466
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 0xe28b
xorl %r15d, %r15d
movl (%rax,%r15,4), %eax
movl %eax, 0x4(%rsp)
movl 0x9f0(%rbx), %eax
cmpl $0x270, %eax            # imm = 0x270
jl 0xe141
movq 0x20(%rsp), %rdi
callq 0x104e4
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x9f0(%rbx)
cltq
movl 0x30(%rbx,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x45d0(%rip), %xmm0     # 0x12730
movq (%rbx), %rax
movq (%rax,%rbp,8), %rax
ucomisd (%rax,%r15,8), %xmm0
ja 0xe264
movslq 0x4(%rsp), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
movq 0x9f8(%rbx), %rax
sarl $0x6, %edx
movslq %edx, %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 0xe264
movslq %r12d, %rdx
movq 0xa20(%rbx), %rsi
movl %ecx, (%rsi,%rdx,4)
movslq 0x4(%rsp), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %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), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0xe221
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xa68(%rbx)
jmp 0xe230
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0xe662
incl %r12d
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xe25a
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xe264
leaq 0x4(%rsp), %rdx
callq 0xbd60
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 0xe120
addl %r15d, 0xc(%rsp)
movq 0xa48(%rbx), %rcx
cmpq %rcx, 0xa68(%rbx)
movq 0x10(%rsp), %rbp
jne 0xe0f3
testl %r12d, %r12d
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
movl 0xc(%rsp), %eax
jg 0xe2c4
jmp 0xe31c
movl $0x1, %eax
movl $0x1, %r12d
movq 0x9f8(%rbx), %r14
movq 0xa20(%rbx), %rdx
movl %r12d, %esi
xorl %edi, %edi
leaq 0x3f(%r15), %r8
movslq (%rdx,%rdi,4), %rcx
leal 0x3f(%rcx), %r9d
testq %rcx, %rcx
cmovnsl %ecx, %r9d
sarl $0x6, %r9d
movslq %r9d, %r9
movq %rcx, %r10
andq %r8, %r10
xorl %r11d, %r11d
cmpq %r15, %r10
setbe %r11b
movq $-0x2, %r10
rolq %cl, %r10
leaq (%r14,%r9,8), %rcx
andq %r10, -0x8(%rcx,%r11,8)
incq %rdi
cmpq %rdi, %rsi
jne 0xe2db
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop