// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %r8, %r15
movl %ecx, 0x28(%rsp)
movq %rdx, 0x48(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq 0xb0(%rsp), %rdi
callq 0xecc6
movl %eax, %ebx
movl %eax, %esi
movq %r15, 0x30(%rsp)
movq %r15, %rdi
callq 0x85d6
orq %rdx, (%rax)
movq %r14, 0x10(%rsp)
movq (%r14), %rax
movl %ebx, (%rax)
movq %r13, 0x40(%rsp)
addq $0x40, %r13
pushq $0x1
popq %r15
xorl %edx, %edx
movq $0x0, 0x18(%rsp)
movslq %r15d, %rax
cmpq %rax, %rdx
jge 0xd248
movq %r15, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rdx, 0x50(%rsp)
movl (%rax,%rdx,4), %r15d
movq 0x48(%rsp), %rax
movq (%rax), %rax
movl (%rax,%r15,4), %eax
movl %eax, 0x2c(%rsp)
imulq $0x18, %r15, %r14
xorl %ebx, %ebx
movq %r14, 0x38(%rsp)
movq 0xa70(%r12), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %rbx
jge 0xd21f
movq 0xa88(%r12), %rax
movq (%rax,%r14), %rax
movl (%rax,%rbx,4), %ebp
movq %r13, %rdi
callq 0xd09d
movsd %xmm0, 0x58(%rsp)
movq %r12, %rdi
movl %r15d, %esi
movl %ebx, %ecx
movl 0xb8(%rsp), %r8d
callq 0xc282
cvtss2sd %xmm0, %xmm0
ucomisd 0x58(%rsp), %xmm0
jbe 0xd217
movq %r13, %r14
movslq %ebp, %rbp
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x85d6
testq %rdx, (%rax)
jne 0xd20f
movq %r13, %rdi
movq %rbp, %rsi
callq 0x85d6
orq %rdx, (%rax)
movq 0x20(%rsp), %rcx
movslq %ecx, %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %ebp, (%rax,%rcx,4)
incl %ecx
movq %rcx, 0x20(%rsp)
movq %r14, %r13
movq 0x38(%rsp), %r14
incq %rbx
jmp 0xd179
movl 0x2c(%rsp), %eax
cmpl 0x28(%rsp), %eax
setb %al
movq 0x50(%rsp), %rdx
incq %rdx
movq 0x18(%rsp), %rcx
orb %al, %cl
movq %rcx, 0x18(%rsp)
movq 0x20(%rsp), %r15
jmp 0xd13c
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
leaq (%rsi,%rax,4), %rdx
leaq 0x60(%rsp), %rbx
leaq 0xf(%rsp), %rcx
movq %rbx, %rdi
callq 0xee22
movq 0x40(%rsp), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
callq 0x103fa
leaq 0x60(%rsp), %rdi
callq 0x90a0
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
movq 0x30(%rsp), %r14
cmpq %rbx, %r15
je 0xd2b3
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 0xd28f
movq 0x18(%rsp), %rax
andb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x90a0
movq %rbx, %rdi
callq 0x3590