// File: dtsaras[P]GCW/rwgraph.cpp
// Function: Graph::BFS_IC(int, float**)
void Graph::BFS_IC(int p, float** APc){
    queue<int> myqueue;
    vector<bool> visited(getSize() + 1,false);
    for (int seed : seedSets[p]){
        myqueue.push(seed);
        APc[p][seed] += 1;
        visited[seed] = true;
    }
    // (u) ---> (v)
    int u; //current node
    int v; //current node's friend
    while (!myqueue.empty()){
        u = myqueue.front();
        myqueue.pop();
        for (int i = 0; i < node_deg[u]; ++i){
            v = adjList[u][i];
            if (!visited[v] and sfmt_genrand_real1(&sfmtSeed) <= get_AP_IC(u, v, i, p)){
            // if (!visited[v] and sfmt_genrand_real1(&sfmtSeed) < probabilities[u][i] * similarities[v][p]){
                myqueue.push(v);
                APc[p][v] += 1;
                visited[v] = true;
            }
        }
    }
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x170(%rsp)
movl %esi, 0x16c(%rsp)
movq %rdx, 0x160(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x250b0
movq 0x58(%rsp), %rdi
callq 0x1db70
incl %eax
cltq
movq %rax, 0x60(%rsp)
movb $0x0, 0xe7(%rsp)
leaq 0xe6(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0xe220
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rcx
leaq 0xe8(%rsp), %rdi
leaq 0xe7(%rsp), %rdx
callq 0xe230
jmp 0x21696
leaq 0xe6(%rsp), %rdi
callq 0xe2b0
movq 0x58(%rsp), %rax
movq 0xad0(%rax), %rax
movslq 0x16c(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rdi
callq 0xf1c0
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
callq 0xf1f0
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xf220
testb $0x1, %al
jne 0x2170e
jmp 0x21818
leaq 0xc0(%rsp), %rdi
callq 0xf240
movl (%rax), %eax
movl %eax, 0xb4(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0xb4(%rsp), %rsi
callq 0x250e0
jmp 0x2173b
movq 0x160(%rsp), %rax
movslq 0x16c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0xb4(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x108e8(%rip), %xmm1    # 0x3204c
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movslq 0xb4(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0xe790
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x2178e
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
leaq 0xa0(%rsp), %rdi
movl $0x1, %esi
callq 0xe7f0
leaq 0xc0(%rsp), %rdi
callq 0xf2d0
jmp 0x216f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0xe6(%rsp), %rdi
callq 0xe2b0
jmp 0x21a57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0xe3a0
jmp 0x21a57
jmp 0x2181a
leaq 0x110(%rsp), %rdi
callq 0x25110
movb %al, 0x47(%rsp)
jmp 0x2182d
movb 0x47(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2183c
jmp 0x21a35
leaq 0x110(%rsp), %rdi
callq 0x25130
movq %rax, 0x38(%rsp)
jmp 0x21850
movq 0x38(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x9c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x25140
jmp 0x2186d
movl $0x0, 0x94(%rsp)
movq 0x58(%rsp), %rdi
movl 0x94(%rsp), %eax
movl %eax, 0x34(%rsp)
addq $0xa20, %rdi            # imm = 0xA20
movslq 0x9c(%rsp), %rsi
callq 0xe3b0
movq %rax, %rcx
movl 0x34(%rsp), %eax
cmpl (%rcx), %eax
jge 0x21a30
movq 0x58(%rsp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
movslq 0x9c(%rsp), %rsi
callq 0x24850
movq %rax, %rdi
movslq 0x94(%rsp), %rsi
callq 0xe3b0
movl (%rax), %eax
movl %eax, 0x98(%rsp)
movslq 0x98(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0xe790
movq %rdx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x218fe
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xeb50
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1f(%rsp)
jne 0x21980
movq 0x58(%rsp), %rdi
callq 0x20880
movsd %xmm0, 0x10(%rsp)
jmp 0x21944
movq 0x58(%rsp), %rdi
movl 0x9c(%rsp), %esi
movl 0x98(%rsp), %edx
movl 0x94(%rsp), %ecx
movl 0x16c(%rsp), %r8d
callq 0x1ea10
movsd 0x10(%rsp), %xmm1
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x2198d
jmp 0x21a18
leaq 0x110(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x250e0
jmp 0x219a4
movq 0x160(%rsp), %rax
movslq 0x16c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x98(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x1067f(%rip), %xmm1    # 0x3204c
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movslq 0x98(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0xe790
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0x219f6
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x70(%rsp), %rdi
movl $0x1, %esi
callq 0xe7f0
jmp 0x21a1a
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x21878
jmp 0x2181a
leaq 0xe8(%rsp), %rdi
callq 0xe3a0
leaq 0x110(%rsp), %rdi
callq 0x25150
addq $0x178, %rsp            # imm = 0x178
retq
leaq 0x110(%rsp), %rdi
callq 0x25150
movq 0xd8(%rsp), %rdi
callq 0x4690
nopw %cs:(%rax,%rax)