// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rcx
movl %esi, %eax
leaq (%rax,%rax,4), %rdx
leaq (%rcx,%rdx,8), %rcx
addq $0x8, %rcx
movq 0x10(%rcx), %rdx
xorl %r8d, %r8d
testq %rdx, %rdx
je 0x182b8e
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movq 0x18(%rcx), %r11
movl (%r11,%r8,8), %r14d
movq %r14, %rbx
andq %r9, %rbx
cmpq %r9, %rbx
je 0x182b80
orl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl %r14d, (%r11,%r8,8)
movq 0x10(%rdi), %r14
leaq (%rbx,%rbx,4), %rbx
movl 0x18(%r14,%rbx,8), %edx
movq 0x8(%r14,%rbx,8), %r11
cmpq %rdx, %r11
jbe 0x182b73
leaq (%r14,%rbx,8), %rbx
addq $0x8, %rbx
movq 0x18(%rbx), %r14
leal 0x1(%rdx), %ebp
movl (%r14,%rdx,8), %r15d
movl %r15d, %r12d
andl %r10d, %r12d
cmpl %esi, %r12d
setne %r13b
cmpl %r10d, %r12d
sete %r12b
orb %r13b, %r12b
je 0x182b65
movl %ebp, %edx
incl %ebp
cmpq %rdx, %r11
ja 0x182b3d
jmp 0x182b73
orl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %r15d, (%r14,%rdx,8)
movq (%rbx), %r11
cmpq %rdx, %r11
jbe 0x182c6f
movq 0x10(%rcx), %rdx
incl %r8d
cmpq %r8, %rdx
ja 0x182af9
jmp 0x182b90
xorl %edx, %edx
movq (%rcx), %r10
cmpq %rdx, %r10
jbe 0x182c34
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq 0x18(%rcx), %r11
movl (%r11,%rdx,8), %r14d
movq %r14, %rbx
andq %r8, %rbx
cmpq %r8, %rbx
je 0x182c29
orl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl %r14d, (%r11,%rdx,8)
movq 0x10(%rdi), %r10
leaq (%rbx,%rbx,4), %r11
leaq (%r10,%r11,8), %r10
addq $0x8, %r10
movq 0x10(%r10), %r11
testq %r11, %r11
je 0x182c12
movq 0x18(%r10), %r14
movl $0x1, %ebp
xorl %ebx, %ebx
movl (%r14,%rbx,8), %r15d
movl %r15d, %r12d
andl %r9d, %r12d
cmpl %esi, %r12d
setne %r13b
cmpl %r9d, %r12d
sete %r12b
orb %r13b, %r12b
je 0x182c16
movl %ebp, %ebx
incl %ebp
cmpq %rbx, %r11
ja 0x182bea
jmp 0x182c21
xorl %ebx, %ebx
jmp 0x182c21
orl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %r15d, (%r14,%rbx,8)
cmpq %rbx, (%r10)
jbe 0x182c8e
movq (%rcx), %r10
incl %edx
cmpq %rdx, %r10
ja 0x182ba8
movq 0x10(%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
movq %rdx, 0x18(%rcx,%rax)
movq %rdx, 0x8(%rcx,%rax)
andb $-0x5, (%rcx,%rax)
movq 0x10(%rdi), %rcx
andl $-0x4, (%rcx,%rax)
movq 0x10(%rdi), %rcx
orl $-0x8, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbb538(%rip), %rdi     # 0x23e1ae
leaq 0xbb3be(%rip), %rsi     # 0x23e03b
leaq 0xbb539(%rip), %rcx     # 0x23e1bd
movl $0x4fd, %edx            # imm = 0x4FD
callq 0x2110
leaq 0xbb519(%rip), %rdi     # 0x23e1ae
leaq 0xbb39f(%rip), %rsi     # 0x23e03b
leaq 0xbb51a(%rip), %rcx     # 0x23e1bd
movl $0x509, %edx            # imm = 0x509
callq 0x2110