// File: quancs[P]EAVC/./eavc.h
// Function: remove_one_vertex_from_c()
void remove_one_vertex_from_c() {
    //TODO to very large graph this function is too time-consuming
    unsigned int best_remove_v = cVertexes[0];
    int    best_dscore = dscore[best_remove_v];

    if (best_dscore != 0) {
        for (unsigned int i = 1; i < cvSize; ++i) {
            unsigned v = cVertexes[i];

            if (dscore[v] == 0) {
                vInBest[v] = NIN;
                bestSize = bestSize - 1;

                remove(v);
                unsigned int last_v_in_c = cVertexes[--cvSize];
                unsigned int index = cVertexIndexes[v];
                cVertexes[index] = last_v_in_c;
                cVertexIndexes[last_v_in_c] = index;
                break;
            } else if (dscore[v] == 1) {
                best_remove_v = v;
                break;
            }

            if (dscore[v] > best_dscore) {
                best_remove_v = v;
                best_dscore = dscore[best_remove_v];
            }
        }
    }

    remove(best_remove_v);

    //remove one vertex from c, and move the last vertex in c to the position
    unsigned int last_v_in_c = cVertexes[--cvSize];
    unsigned int index = cVertexIndexes[best_remove_v];
    cVertexes[index] = last_v_in_c;
    cVertexIndexes[last_v_in_c] = index;
}

// Assembly:
subq $0x28, %rsp
movq 0x7abd(%rip), %rax      # 0xb198
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x7a80(%rip), %rax      # 0xb168
movl 0x24(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x3816
movl $0x1, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x7ae0(%rip), %eax      # 0xb1f0
jae 0x3814
movq 0x7a7b(%rip), %rax      # 0xb198
movl 0x1c(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movq 0x7a39(%rip), %rax      # 0xb168
movl 0x18(%rsp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x37b7
movq 0x7a68(%rip), %rax      # 0xb1a8
movl 0x18(%rsp), %ecx
movb $0x0, (%rax,%rcx)
movl 0x7aaa(%rip), %eax      # 0xb1f8
subl $0x1, %eax
movl %eax, 0x7aa1(%rip)      # 0xb1f8
movl 0x18(%rsp), %edi
callq 0x3880
movq 0x7a31(%rip), %rax      # 0xb198
movl 0x7a83(%rip), %ecx      # 0xb1f0
addl $-0x1, %ecx
movl %ecx, 0x7a7a(%rip)      # 0xb1f0
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x14(%rsp)
movq 0x7a1a(%rip), %rax      # 0xb1a0
movl 0x18(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %edx
movq 0x79fc(%rip), %rax      # 0xb198
movl 0x10(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
movl 0x10(%rsp), %edx
movq 0x79f2(%rip), %rax      # 0xb1a0
movl 0x14(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x3814
movq 0x79aa(%rip), %rax      # 0xb168
movl 0x18(%rsp), %ecx
cmpl $0x1, (%rax,%rcx,4)
jne 0x37d2
movl 0x18(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x3814
jmp 0x37d4
movq 0x798d(%rip), %rax      # 0xb168
movl 0x18(%rsp), %ecx
movl (%rax,%rcx,4), %eax
cmpl 0x20(%rsp), %eax
jle 0x3802
movl 0x18(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x7971(%rip), %rax      # 0xb168
movl 0x24(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
jmp 0x3804
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x3706
jmp 0x3816
movl 0x24(%rsp), %edi
callq 0x3880
movq 0x7972(%rip), %rax      # 0xb198
movl 0x79c4(%rip), %ecx      # 0xb1f0
addl $-0x1, %ecx
movl %ecx, 0x79bb(%rip)      # 0xb1f0
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x795b(%rip), %rax      # 0xb1a0
movl 0x24(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %edx
movq 0x793d(%rip), %rax      # 0xb198
movl 0x8(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
movl 0x8(%rsp), %edx
movq 0x7933(%rip), %rax      # 0xb1a0
movl 0xc(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
addq $0x28, %rsp
retq
nopl (%rax)