// File: /workspace/github_cpp_makefile_star2_O1/dtsaras[P]GCW/rwgraph.cpp
// Function: HyperGraph::pollingIC1(Graph&, std::vector<bool, std::allocator<bool>>&, std::vector<int, std::allocator<int>>&, sampler<int>&, int)
void HyperGraph::pollingIC1(Graph &g, vector<bool> &visit, vector<int> &visit_mark, sampler<int> &samp, int p)
{
    int i, v;
    unsigned cur = samp();
    int num_marked=1;
    int curPos=0;
    visit[cur] = true;
    visit_mark[0] = cur;
    float prob;
    while(curPos < num_marked){
        cur = visit_mark[curPos];
        curPos++;
        for (i = 0; i < g.inv_node_deg[cur]; ++i){
            v = g.invAdjList[cur][i];
            if (sfmt_genrand_real1(&sfmtSeed) <  g.get_inv_AP_IC(cur, v, i, p)){ //Check here is it supposed to be g.similarities[cur][p] or g.similarities[g[cur][i]][p]
                if (!visit[v]){
                    visit[v] = true;
                    visit_mark[num_marked]=v;
                    num_marked++;
                }
            }
        }
    }
    edge_node.push_back(vector<int>(visit_mark.begin(),visit_mark.begin()+num_marked));
    for(i = 0; i < num_marked;++i){
        visit[visit_mark[i]]=false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %ebp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %r8, %rdi
callq 0x12bb8
movq %r14, 0x20(%rsp)
movq (%r14), %rdx
movl %eax, %esi
movl $0x1, %edi
movl %eax, %ecx
shlq %cl, %rdi
shrl $0x6, %esi
orq %rdi, (%rdx,%rsi,8)
movq %r13, 0x10(%rsp)
movq (%r13), %rcx
movl %eax, (%rcx)
leaq 0x40(%r15), %rax
movq %rax, 0x48(%rsp)
movslq %ebp, %rax
movq %rax, 0x40(%rsp)
movl $0x1, %r14d
xorl %ecx, %ecx
movsd 0x8a1c(%rip), %xmm2     # 0x18720
leaq 0x3f(%rbx), %r8
movq %r8, 0x28(%rsp)
movq %r12, 0x38(%rsp)
movq %r14, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x30(%rsp)
movl (%rax,%rcx,4), %r13d
movq 0xa70(%r12), %rax
cmpl $0x0, (%rax,%r13,4)
jle 0xfe97
movslq %r13d, %rax
leaq (,%r13,2), %rbp
addq %r13, %rbp
leaq (%rax,%rax,2), %r11
xorl %r14d, %r14d
movq 0xa88(%r12), %rax
movq (%rax,%rbp,8), %rax
movl (%rax,%r14,4), %ebx
cmpl $0x270, 0xa00(%r15) # imm = 0x270
jl 0xfda6
movq 0x48(%rsp), %rdi
movq %r15, %r12
movl %ebx, %r15d
movq %r11, %rbx
callq 0x16314
movq %rbx, %r11
movl %r15d, %ebx
movq %r12, %r15
movq 0x38(%rsp), %r12
movsd 0x898a(%rip), %xmm2     # 0x18720
movq 0x28(%rsp), %r8
movl $0x0, 0xa00(%r15)
movslq 0xa00(%r15), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0xa00(%r15)
movl 0x40(%r15,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm2, %xmm0
movq 0xaa0(%r12), %rax
movq (%rax,%r11,8), %rax
movss (%rax,%r14,4), %xmm1
cmpb $0x1, 0xb20(%r12)
jne 0xfe03
movq 0xae0(%r12), %rax
movq (%rax,%r11,8), %rax
cvtss2sd %xmm1, %xmm1
movq 0x40(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xfe7f
movslq %ebx, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
movq 0x20(%rsp), %rdx
addq (%rdx), %rax
movq %rcx, %rsi
andq %r8, %rsi
xorl %edx, %edx
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rsi
setbe %dl
movl $0x1, %esi
shlq %cl, %rsi
movq -0x8(%rax,%rdx,8), %rdi
btq %rcx, %rdi
jb 0xfe7f
leaq -0x8(,%rdx,8), %rcx
orq %rsi, %rdi
movq %rdi, (%rax,%rcx)
movq 0x18(%rsp), %rcx
movslq %ecx, %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %ebx, (%rax,%rcx,4)
incl %ecx
movq %rcx, 0x18(%rsp)
incq %r14
movq 0xa70(%r12), %rax
movslq (%rax,%r13,4), %rax
cmpq %rax, %r14
jl 0xfd50
movq 0x30(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %r14
movslq %r14d, %rax
cmpq %rax, %rcx
jl 0xfd12
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
leaq (%rsi,%rax,4), %rdx
leaq 0x50(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
callq 0x12cc4
addq $0x18, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x1426c
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
je 0xfef6
callq 0x3340
testl %r14d, %r14d
movq 0x28(%rsp), %r11
jle 0xff53
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rcx), %rdx
movl %r14d, %esi
xorl %edi, %edi
movslq (%rax,%rdi,4), %rcx
leaq 0x3f(%rcx), %r8
testq %rcx, %rcx
cmovnsq %rcx, %r8
sarq $0x6, %r8
movq %rcx, %r9
andq %r11, %r9
xorl %r10d, %r10d
cmpq %rbx, %r9
setbe %r10b
movq $-0x2, %r9
rolq %cl, %r9
leaq (%rdx,%r8,8), %rcx
andq %r9, -0x8(%rcx,%r10,8)
incq %rdi
cmpq %rdi, %rsi
jne 0xff15
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xff74
callq 0x3340
movq %rbx, %rdi
callq 0x35c0