// File: /workspace/github_cpp_makefile_star2_O3/dtsaras[P]GCW/rwgraph.cpp
// Function: HyperGraph::pollingIC2(Graph&, std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int, std::vector<bool, std::allocator<bool>>&, std::vector<int, std::allocator<int>>&, sampler<int>&, int)
bool HyperGraph::pollingIC2(Graph &g, vector<unsigned int> & link, unsigned int k, vector<bool> &visit, vector<int> &visit_mark, sampler<int> &samp, int p)
{
    int i, v;
    unsigned cur = samp();
	int curPos=0;
    int num_marked=1;
	visit[cur] = true;
	visit_mark[0] = cur;
	bool t = false;
    // cout << "Starting Cur Node: " << cur << endl; // del
    while(curPos < num_marked){
		cur = visit_mark[curPos];
		curPos++;
		if (link[cur] < k)
            t=true;
		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)){
                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;
	}
	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %r15
movq %r8, %r14
movl %ecx, 0x1c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, %r13
movq %rdi, %r12
movslq 0xb8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
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 %r15, 0x8(%rsp)
movq (%r15), %rcx
movl %eax, (%rcx)
leaq 0x40(%r12), %rax
movq %rax, 0x50(%rsp)
movq 0xa70(%r13), %rax
movl $0x1, %r15d
xorl %edx, %edx
movsd 0x78eb(%rip), %xmm2     # 0x17720
leaq 0x3f(%rbx), %r8
xorl %r14d, %r14d
movq %r8, 0x28(%rsp)
movq %r13, 0x48(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x40(%rsp)
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq %rdx, 0x38(%rsp)
movl (%rcx,%rdx,4), %r10d
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movl 0x1c(%rsp), %edx
cmpl %edx, (%rcx,%r10,4)
setb 0x6(%rsp)
cmpl $0x0, (%rax,%r10,4)
jle 0xffc1
movslq %r10d, %rax
leaq (%r10,%r10,2), %r15
leaq (%rax,%rax,2), %r11
xorl %ebx, %ebx
movq 0xa88(%r13), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%rbx,4), %ebp
movl 0xa00(%r12), %eax
cmpl $0x270, %eax            # imm = 0x270
jl 0xfedb
movq 0x50(%rsp), %rdi
movq %r10, %r13
movq %r12, %r14
movq %r11, %r12
callq 0x16088
movq %r12, %r11
movq %r14, %r12
movq %r13, %r10
movq 0x48(%rsp), %r13
movsd 0x784c(%rip), %xmm2     # 0x17720
movq 0x28(%rsp), %r8
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xa00(%r12)
cltq
movl 0x40(%r12,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm2, %xmm0
movq 0xaa0(%r13), %rax
movq (%rax,%r11,8), %rax
movss (%rax,%rbx,4), %xmm1
cmpb $0x1, 0xb20(%r13)
jne 0xff30
movq 0xae0(%r13), %rax
movq (%rax,%r11,8), %rax
cvtss2sd %xmm1, %xmm1
movq 0x58(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xffaa
movslq %ebp, %rcx
leal 0x3f(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ebp, %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 0xffaa
leaq -0x8(,%rdx,8), %rcx
orq %rsi, %rdi
movq %rdi, (%rax,%rcx)
movq 0x10(%rsp), %rcx
movslq %ecx, %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movl %ebp, (%rax,%rcx,4)
incl %ecx
movq %rcx, 0x10(%rsp)
incq %rbx
movq 0xa70(%r13), %rax
movslq (%rax,%r10,4), %rcx
cmpq %rcx, %rbx
jl 0xfe8e
movq 0x38(%rsp), %rdx
incq %rdx
movq 0x40(%rsp), %r14
orb 0x6(%rsp), %r14b
movq 0x10(%rsp), %r15
movslq %r15d, %rcx
cmpq %rcx, %rdx
jl 0xfe46
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq (%rsi,%rcx,4), %rdx
leaq 0x60(%rsp), %r13
leaq 0x7(%rsp), %rcx
movq %r13, %rdi
callq 0x12a94
addq $0x18, %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x14038
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
je 0x1002a
callq 0x3340
testl %r15d, %r15d
movq 0x28(%rsp), %r11
jle 0x1008a
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rcx), %rdx
movl %r15d, %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 0x10049
andb $0x1, %r14b
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x100b2
callq 0x3340
movq %rbx, %rdi
callq 0x35c0