// File: /workspace/github_cpp_makefile_star2_O2/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, 0x24(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r8, %rdi
callq 0xecc6
movl %eax, %ebx
movl %eax, %esi
movq %r15, 0x28(%rsp)
movq %r15, %rdi
callq 0x85d6
orq %rdx, (%rax)
movq %r14, 0x10(%rsp)
movq (%r14), %rax
movl %ebx, (%rax)
movq %r13, 0x38(%rsp)
addq $0x40, %r13
pushq $0x1
popq %r15
xorl %ecx, %ecx
movslq %r15d, %rax
cmpq %rax, %rcx
jge 0xd00e
movq %r15, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x40(%rsp)
movl (%rax,%rcx,4), %r15d
imulq $0x18, %r15, %rbp
xorl %ebx, %ebx
movq %rbp, 0x30(%rsp)
movq 0xa70(%r12), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %rbx
jge 0xcffc
movq 0xa88(%r12), %rax
movq (%rax,%rbp), %rax
movl (%rax,%rbx,4), %r14d
movq %r13, %rdi
callq 0xd09d
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
movl %r15d, %esi
movl %ebx, %ecx
movl 0x24(%rsp), %r8d
callq 0xc282
cvtss2sd %xmm0, %xmm0
ucomisd 0x48(%rsp), %xmm0
jbe 0xcff4
movq %r13, %rbp
movslq %r14d, %r14
movq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x85d6
testq %rdx, (%rax)
jne 0xcfec
movq %r13, %rdi
movq %r14, %rsi
callq 0x85d6
orq %rdx, (%rax)
movq 0x18(%rsp), %rcx
movslq %ecx, %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %r14d, (%rax,%rcx,4)
incl %ecx
movq %rcx, 0x18(%rsp)
movq %rbp, %r13
movq 0x30(%rsp), %rbp
incq %rbx
jmp 0xcf57
movq 0x40(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %r15
jmp 0xcf2a
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
leaq (%rsi,%rax,4), %rdx
leaq 0x50(%rsp), %rbx
leaq 0xf(%rsp), %rcx
movq %rbx, %rdi
callq 0xee22
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
callq 0x103fa
leaq 0x50(%rsp), %rdi
callq 0x90a0
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
movq 0x28(%rsp), %r14
cmpq %rbx, %r15
je 0xd079
movq 0x10(%rsp), %rax
movq (%rax), %rax
movslq (%rax,%rbx,4), %rsi
movq %r14, %rdi
callq 0x85d6
notq %rdx
andq %rdx, (%rax)
incq %rbx
jmp 0xd055
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x90a0
movq %rbx, %rdi
callq 0x3590