// File: chhylp123[P]hifiasm/hic.cpp
// Function: select_large_node(ma_ug_t const*, min_cut_t*, unsigned long, unsigned long, unsigned long, int)
int select_large_node(const ma_ug_t *ug, min_cut_t* x, 
uint64_t src, uint64_t dest, uint64_t utg_thres, int weight_thres)
{
    if(src >= ug->u.n || dest >= ug->u.n) return 0;
    if(ug->u.a[src].n < utg_thres || ug->u.a[dest].n < utg_thres) return 0;

    uint64_t k;
    for (k = 0; k < x->rGraph.a[src].n; k++)
    {
        if(x->rGraph.a[src].a[k].del) continue;
        if(x->rGraph.a[src].a[k].weight >= weight_thres) break;
    }
    if(k == x->rGraph.a[src].n) return 0;

    src = dest;
    for (k = 0; k < x->rGraph.a[src].n; k++)
    {
        if(x->rGraph.a[src].a[k].del) continue;
        if(x->rGraph.a[src].a[k].weight >= weight_thres) break;
    }
    if(k == x->rGraph.a[src].n) return 0;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1d8c86
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jb 0x1d8c92
movl $0x0, -0x4(%rbp)
jmp 0x1d8e32
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpq -0x30(%rbp), %rax
jb 0x1d8cc4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpq -0x30(%rbp), %rax
jae 0x1d8cd0
movl $0x0, -0x4(%rbp)
jmp 0x1d8e32
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x1d8d56
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1d8d19
jmp 0x1d8d48
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x1d8d46
jmp 0x1d8d56
jmp 0x1d8d48
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d8cd8
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1d8d7b
movl $0x0, -0x4(%rbp)
jmp 0x1d8e32
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x1d8e09
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1d8dcc
jmp 0x1d8dfb
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
cvtsi2sdl -0x34(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x1d8df9
jmp 0x1d8e09
jmp 0x1d8dfb
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d8d8b
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1d8e2b
movl $0x0, -0x4(%rbp)
jmp 0x1d8e32
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)