// File: /workspace/github_cpp_makefile_star2_O3/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 0x12988
movq %r14, 0x20(%rsp)
movq (%r14), %rdx
movl %eax, %esi
shrl $0x6, %esi
movl $0x1, %edi
movl %eax, %ecx
shlq %cl, %rdi
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)
movq 0xa70(%r12), %rax
movl $0x1, %r14d
xorl %edx, %edx
movsd 0x7be2(%rip), %xmm2     # 0x17720
leaq 0x3f(%rbx), %r8
movq %r8, 0x28(%rsp)
movq %r12, 0x38(%rsp)
movq %r14, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq %rdx, 0x30(%rsp)
movl (%rcx,%rdx,4), %r13d
cmpl $0x0, (%rax,%r13,4)
jle 0xfcc0
movslq %r13d, %rax
leaq (,%r13,2), %r9
addq %r13, %r9
leaq (%rax,%rax,2), %r11
xorl %r14d, %r14d
movq 0xa88(%r12), %rax
movq (%rax,%r9,8), %rax
movl (%rax,%r14,4), %ebx
movl 0xa00(%r15), %eax
cmpl $0x270, %eax            # imm = 0x270
jl 0xfbd6
movq 0x48(%rsp), %rdi
movl %ebx, %r12d
movq %r9, %rbx
movq %r15, %rbp
movq %r11, %r15
callq 0x16088
movq %r15, %r11
movq %rbp, %r15
movq %rbx, %r9
movl %r12d, %ebx
movq 0x38(%rsp), %r12
movsd 0x7b51(%rip), %xmm2     # 0x17720
movq 0x28(%rsp), %r8
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xa00(%r15)
cltq
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 0xfc2e
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 0xfca8
movslq %ebx, %rcx
leal 0x3f(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ebx, %eax
sarl $0x6, %eax
cltq
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 0xfca8
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), %rcx
cmpq %rcx, %r14
jl 0xfb82
movq 0x30(%rsp), %rdx
incq %rdx
movq 0x18(%rsp), %r14
movslq %r14d, %rcx
cmpq %rcx, %rdx
jl 0xfb4c
movq 0x10(%rsp), %rax
movq (%rax), %rsi
leaq (%rsi,%rcx,4), %rdx
leaq 0x50(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
callq 0x12a94
addq $0x18, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x14038
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
je 0xfd1f
callq 0x3340
testl %r14d, %r14d
movq 0x28(%rsp), %r11
jle 0xfd7f
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
leal 0x3f(%rcx), %r8d
testq %rcx, %rcx
cmovnsl %ecx, %r8d
sarl $0x6, %r8d
movslq %r8d, %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 0xfd3e
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 0xfda0
callq 0x3340
movq %rbx, %rdi
callq 0x35c0