// File: /workspace/github_cpp_makefile_star2_O1/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
testq %rdx, %rdx
je 0x17beaf
xorl %r8d, %r8d
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movq 0x18(%rcx), %rdx
movl (%rdx,%r8,8), %ebx
movq %rbx, %r11
andq %r9, %r11
cmpq %r9, %r11
je 0x17be9f
orl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl %ebx, (%rdx,%r8,8)
movq 0x10(%rdi), %rdx
leaq (%r11,%r11,4), %r11
leaq (%rdx,%r11,8), %rdx
addq $0x8, %rdx
movl 0x10(%rdx), %r11d
movq (%rdx), %rbx
cmpq %r11, %rbx
jbe 0x17be96
movq 0x18(%rdx), %r14
leal 0x1(%r11), %ebp
movl (%r14,%r11,8), %r15d
movl %r15d, %r12d
andl %r10d, %r12d
cmpl %esi, %r12d
setne %r13b
cmpl %r10d, %r12d
sete %r12b
orb %r13b, %r12b
je 0x17be8b
movl %ebp, %r11d
incl %ebp
cmpq %r11, %rbx
ja 0x17be62
jmp 0x17be96
orl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %r15d, (%r14,%r11,8)
cmpq %r11, (%rdx)
jbe 0x17bf8e
incl %r8d
movq 0x10(%rcx), %rdx
cmpq %r8, %rdx
ja 0x17be21
movl %edx, %r10d
cmpq %r10, (%rcx)
jbe 0x17bf53
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq 0x18(%rcx), %r11
movl (%r11,%r10,8), %r14d
movq %r14, %rbx
andq %r8, %rbx
cmpq %r8, %rbx
je 0x17bf45
orl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl %r14d, (%r11,%r10,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 0x17bf31
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 0x17bf35
movl %ebp, %ebx
incl %ebp
cmpq %rbx, %r11
ja 0x17bf09
jmp 0x17bf40
xorl %ebx, %ebx
jmp 0x17bf40
orl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %r15d, (%r14,%rbx,8)
cmpq %rbx, (%r10)
jbe 0x17bfad
incl %edx
movq %rdx, %r10
cmpq %rdx, (%rcx)
ja 0x17bec7
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 0xb5fc9(%rip), %rdi     # 0x231f5e
leaq 0xb5e4f(%rip), %rsi     # 0x231deb
leaq 0xb5fca(%rip), %rcx     # 0x231f6d
movl $0x4fd, %edx            # imm = 0x4FD
callq 0x2110
leaq 0xb5faa(%rip), %rdi     # 0x231f5e
leaq 0xb5e30(%rip), %rsi     # 0x231deb
leaq 0xb5fab(%rip), %rcx     # 0x231f6d
movl $0x509, %edx            # imm = 0x509
callq 0x2110