// File: /workspace/github_cpp_makefile_star2_O1/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, 0x20(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, %rbp
movq %rdi, %r12
movslq 0xb8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
callq 0x12bb8
movq %r14, 0x28(%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, 0x10(%rsp)
movq (%r15), %rcx
movl %eax, (%rcx)
leaq 0x40(%r12), %rax
movq %rax, 0x50(%rsp)
xorl %ecx, %ecx
movsd 0x8724(%rip), %xmm2     # 0x18720
leaq 0x3f(%rbx), %r8
xorl %r14d, %r14d
movl $0x1, %r15d
movq %r8, 0x30(%rsp)
movq %r12, 0x48(%rsp)
movq %r15, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x40(%rsp)
movl (%rax,%rcx,4), %r10d
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x20(%rsp), %ecx
cmpl %ecx, (%rax,%r10,4)
movzbl %r14b, %r14d
movl $0x1, %eax
cmovbl %eax, %r14d
movl %r14d, 0x24(%rsp)
movq 0xa70(%rbp), %rax
cmpl $0x0, (%rax,%r10,4)
jle 0x101b0
movslq %r10d, %rax
leaq (%r10,%r10,2), %r9
leaq (%rax,%rax,2), %r14
xorl %r15d, %r15d
movq 0xa88(%rbp), %rax
movq (%rax,%r9,8), %rax
movl (%rax,%r15,4), %ebx
cmpl $0x270, 0xa00(%r12) # imm = 0x270
jl 0x100c2
movq 0x50(%rsp), %rdi
movl %ebx, %r12d
movq %r9, %rbx
movq %r10, %r13
callq 0x16314
movq %r13, %r10
movq %rbx, %r9
movl %r12d, %ebx
movq 0x48(%rsp), %r12
movsd 0x866f(%rip), %xmm2     # 0x18720
movq 0x30(%rsp), %r8
movl $0x0, 0xa00(%r12)
movslq 0xa00(%r12), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0xa00(%r12)
movl 0x40(%r12,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm2, %xmm0
movq 0xaa0(%rbp), %rax
movq (%rax,%r14,8), %rax
movss (%rax,%r15,4), %xmm1
cmpb $0x1, 0xb20(%rbp)
jne 0x1011d
movq 0xae0(%rbp), %rax
movq (%rax,%r14,8), %rax
cvtss2sd %xmm1, %xmm1
movq 0x58(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x10199
movslq %ebx, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
movq 0x28(%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 0x10199
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 %r15
movq 0xa70(%rbp), %rax
movslq (%rax,%r10,4), %rax
cmpq %rax, %r15
jl 0x1006b
movq 0x40(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %r15
movslq %r15d, %rax
cmpq %rax, %rcx
movl 0x24(%rsp), %r14d
jl 0x10013
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
leaq (%rsi,%rax,4), %rdx
leaq 0x60(%rsp), %r13
leaq 0xf(%rsp), %rcx
movq %r13, %rdi
callq 0x12cc4
addq $0x18, %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x1426c
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
je 0x10214
callq 0x3340
testl %r15d, %r15d
movq 0x30(%rsp), %r11
jle 0x10271
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rcx), %rdx
movl %r15d, %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 0x10233
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 0x10299
callq 0x3340
movq %rbx, %rdi
callq 0x35c0
nop