// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: del_cns_g_nn(cns_gfa*, unsigned int)
void del_cns_g_nn(cns_gfa *cns, uint32_t v)
{
    uint32_t w, vk, wk; cns_t *av = &((*cns).a[v]), *aw = NULL;

    for (vk = 0; vk < av->arc.nou; vk++) {///out-edge of src
        if(del_cns_arc((*av), vk)) continue;
        w = av->arc.a[vk].v; av->arc.a[vk].v = CNS_DEL_E;

        aw = &((*cns).a[w]);
        for (wk = aw->arc.nou; wk < aw->arc.n; wk++) {///in-edge of des
            if((aw->arc.a[wk].v != v) || (del_cns_arc((*aw), wk))) continue;
            aw->arc.a[wk].v = CNS_DEL_E; break;
        }
        assert(wk < aw->arc.n);
    }

    for (vk = av->arc.nou; vk < av->arc.n; vk++) {///in-edge of src
        if(del_cns_arc((*av), vk)) continue;
        w = av->arc.a[vk].v; av->arc.a[vk].v = CNS_DEL_E;

        aw = &((*cns).a[w]);
        for (wk = 0; wk < aw->arc.nou; wk++) {///out-edge of des
            if((aw->arc.a[wk].v != v) || (del_cns_arc((*aw), wk))) continue;
            aw->arc.a[wk].v = CNS_DEL_E; break;
        }
        assert(wk < aw->arc.n);
    }


    cns->a[v].arc.n = cns->a[v].arc.nou = 0;
    cns->a[v].c = cns->a[v].f = 0; cns->a[v].sc = CNS_DEL_V;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x24f571
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x24f474
jmp 0x24f563
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x80000000, %edx       # imm = 0x80000000
orl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24f533
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl -0xc(%rbp), %eax
jne 0x24f507
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x24f509
jmp 0x24f528
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x80000000, %edx       # imm = 0x80000000
orl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rax,%rcx,8)
jmp 0x24f533
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x24f4c8
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24f542
jmp 0x24f561
leaq 0x13f835(%rip), %rdi    # 0x38ed7e
leaq 0x13f6bb(%rip), %rsi    # 0x38ec0b
movl $0x4fd, %edx            # imm = 0x4FD
leaq 0x13f831(%rip), %rcx    # 0x38ed8d
callq 0x2130
jmp 0x24f563
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24f444
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24f6a5
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x24f5ac
jmp 0x24f697
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x80000000, %edx       # imm = 0x80000000
orl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x24f667
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl -0xc(%rbp), %eax
jne 0x24f63b
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x24f63d
jmp 0x24f65c
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x80000000, %edx       # imm = 0x80000000
orl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rax,%rcx,8)
jmp 0x24f667
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x24f5fc
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24f676
jmp 0x24f695
leaq 0x13f701(%rip), %rdi    # 0x38ed7e
leaq 0x13f587(%rip), %rsi    # 0x38ec0b
movl $0x509, %edx            # imm = 0x509
leaq 0x13f6fd(%rip), %rcx    # 0x38ed8d
callq 0x2130
jmp 0x24f697
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24f57c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $-0x5, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $-0x4, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7, %ecx
orl $-0x8, %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)