// File: chhylp123[P]hifiasm/hic.cpp
// Function: check_connective(min_cut_t*, hc_links*)
void check_connective(min_cut_t* x, hc_links* link)
{
    double index_time = yak_realtime();
    kvec_t_u64_warp buff;
    kv_init(buff.a);
    uint64_t i, k, uID;
    for (i = 0; i < x->n; i++)
    {
        uID = x->order.a[i] & x->uID_mode;
        if(link->a.a[uID].f.n == 0) continue;
        for (k = 0; k < link->a.a[uID].f.n; k++)
        {
            if(link->a.a[uID].f.a[k].del) continue;
            if(x->utgVis.a[link->a.a[uID].f.a[k].uID] == 0) break;
        }
        if(k == link->a.a[uID].f.n) continue;
        reset_min_cut_t(x, link);
        get_s_t(x, link, uID, &(x->src), &(x->dest), &buff);

        bfs_flow(x->src, x->dest, x, NULL);

        x->utgVis.a[uID] = 1;
    }

    //reset x.utgVis
    memset(x->utgVis.a, 0, x->utgVis.n);
    kv_destroy(buff.a);
    fprintf(stderr, "[M::%s::%.3f] \n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x1b7ca0
movsd %xmm0, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x148(%rcx), %rax
jae 0x1d8887
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
andq 0x138(%rcx), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
jne 0x1d875a
jmp 0x1d8876
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x50(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x18(%rcx), %rax
jae 0x1d87ec
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
imulq $0x28, -0x48(%rbp), %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1d87a4
jmp 0x1d87db
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x50(%rbp), %rdx
addq %rdx, %rcx
movq 0x28(%rcx), %rcx
imulq $0x28, -0x48(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x1d87d9
jmp 0x1d87ec
jmp 0x1d87db
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1d8762
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x50(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x18(%rcx), %rax
jne 0x1d8808
jmp 0x1d8876
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1d6c50
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x150, %rcx            # imm = 0x150
movq -0x8(%rbp), %r8
addq $0x158, %r8             # imm = 0x158
leaq -0x38(%rbp), %r9
callq 0x1d7750
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rsi
movq -0x8(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1d7940
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x50(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d870a
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdx
xorl %esi, %esi
callq 0x2100
movq -0x28(%rbp), %rdi
callq 0x2210
movq 0x1eb72c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
callq 0x1b7ca0
movq -0x58(%rbp), %rdi
subsd -0x18(%rbp), %xmm0
leaq 0x1b3de7(%rip), %rsi    # 0x38c6b7
leaq 0x1b3df0(%rip), %rdx    # 0x38c6c7
movb $0x1, %al
callq 0x22a0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)