// File: /workspace/github_cpp_makefile_star2_O1/quancs[P]EAVC/./eavc.h
// Function: check_solution(VerticeStatus*, unsigned int, int*)
bool check_solution(VerticeStatus *vInCTest, unsigned int cvSizeTest, int *scoreTest) {
    bool passAll = true;
    //test if cover all edges
    for (unsigned int e = 0, c = 0; e < eNum && c < 5; ++e) {
        if (not_in(vInCTest, edges[e].v1) && not_in(vInCTest, edges[e].v2)) {
            cout << "c error: uncovered edge " << e << endl;
            passAll = false;
            c++;
        }
    }

    //test if the claimed size is right
    unsigned int verified_vc_size = 0;
    for (unsigned int i = 0; i < vNum; i++) {
        if (in(vInCTest, i))
            verified_vc_size++;
    }
    if (cvSizeTest != verified_vc_size) {
        cout << "c error: claimed vc size(" << cvSizeTest << ") != " <<
             "verified vc size(" << verified_vc_size << ")" << endl;
        passAll = false;
    }

    //test if score is right
    if (scoreTest != nullptr) {
        int *scoreReal = new int[vNum];
        //calculate dscores
        for (unsigned int v = 0; v < vNum; v++) {
            if (vInCTest[v] == IN_ABS || vInCTest[v] == NIN_ABS)
                scoreReal[v] = 0;
            else {
                int factor = in(vInCTest, v) ? -1 : 1;

                scoreReal[v] = 0;
                unsigned int edgeCount = vDegree[v];
                for (unsigned int i = 0; i < edgeCount; i++) {
                    unsigned int adj = vAdj[v][i];
                    if (not_in(vInCTest, adj))
                        scoreReal[v]++;
                }
                scoreReal[v] = scoreReal[v] * factor;
            }
        }

        //compare
        for (unsigned int v = 0; v < vNum; v++) {
            if (scoreReal[v] != scoreTest[v]) {
                cout << "c error: for vertex " << v << ": real score(" << scoreReal[v] << ") != claimed score(" << scoreTest[v] << ")" << "   degree=" << vDegree[v] << endl;
                passAll = false;
                break;
            }
        }

        delete [] scoreReal;
    }

    return passAll;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r14
cmpl $0x0, 0x3f7a(%rip)      # 0x8160
je 0x427e
xorl %r12d, %r12d
movb $0x1, %bpl
movq 0x3ddf(%rip), %r13      # 0x7fd8
leaq 0x1ec1(%rip), %r15      # 0x60c1
xorl %ebx, %ebx
movq 0x3f67(%rip), %rax      # 0x8170
movl (%rax,%r12,8), %ecx
cmpb $0x1, (%r14,%rcx)
ja 0x4269
movl 0x4(%rax,%r12,8), %eax
cmpb $0x1, (%r14,%rax)
ja 0x4269
movl $0x18, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x2180
movq %r13, %rdi
movq %r12, %rsi
callq 0x2100
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
incl %ebx
xorl %ebp, %ebp
incq %r12
movl 0x3eee(%rip), %eax      # 0x8160
cmpq %rax, %r12
jae 0x4281
cmpl $0x5, %ebx
jb 0x4202
jmp 0x4281
movb $0x1, %bpl
movl 0x3ed5(%rip), %eax      # 0x815c
testq %rax, %rax
je 0x42ac
xorl %ecx, %ecx
xorl %ebx, %ebx
movq 0x10(%rsp), %r13
movl 0xc(%rsp), %r12d
cmpb $0x3, (%r14,%rcx)
sbbl $-0x1, %ebx
incq %rcx
cmpq %rcx, %rax
jne 0x429a
jmp 0x42b8
xorl %ebx, %ebx
movq 0x10(%rsp), %r13
movl 0xc(%rsp), %r12d
cmpl %r12d, %ebx
je 0x435c
movq 0x3d10(%rip), %r15      # 0x7fd8
leaq 0x1e73(%rip), %rsi      # 0x6142
movl $0x19, %edx
movq %r15, %rdi
callq 0x2180
movl %r12d, %esi
movq %r15, %rdi
callq 0x2100
movq %rax, %r15
leaq 0x1e6b(%rip), %rsi      # 0x615c
movl $0x5, %edx
movq %rax, %rdi
callq 0x2180
leaq 0x1e5d(%rip), %rsi      # 0x6162
movl $0x11, %edx
movq %r15, %rdi
callq 0x2180
movl %ebx, %esi
movq %r15, %rdi
callq 0x2100
movq %rax, %r15
leaq 0x1e4e(%rip), %rsi      # 0x6174
movl $0x1, %edx
movq %rax, %rdi
callq 0x2180
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
xorl %ebp, %ebp
testq %r13, %r13
je 0x44f4
movl 0x3df0(%rip), %r12d     # 0x815c
leaq (,%r12,4), %rdi
callq 0x2030
movq %rax, %r15
testq %r12, %r12
je 0x44ec
movq 0x3e1c(%rip), %rax      # 0x81a8
movq 0x3e0d(%rip), %rcx      # 0x81a0
xorl %edx, %edx
movzbl (%r14,%rdx), %esi
cmpl $0x4, %esi
je 0x43a4
cmpl $0x1, %esi
jne 0x43ae
movl $0x0, (%r15,%rdx,4)
jmp 0x43f2
movl $0x0, (%r15,%rdx,4)
movl (%rax,%rdx,4), %edi
testq %rdi, %rdi
je 0x43dc
movq (%rcx,%rdx,8), %r8
xorl %r9d, %r9d
movl (%r8,%r9,4), %r10d
cmpb $0x1, (%r14,%r10)
ja 0x43d4
incl (%r15,%rdx,4)
incq %r9
cmpq %r9, %rdi
jne 0x43c5
movl (%r15,%rdx,4), %edi
movl %edi, %r8d
negl %r8d
cmpb $0x3, %sil
cmovbl %edi, %r8d
movl %r8d, (%r15,%rdx,4)
incq %rdx
cmpq %r12, %rdx
jne 0x4395
xorl %r14d, %r14d
movl (%r15,%r14,4), %eax
cmpl (%r13,%r14,4), %eax
jne 0x4415
incq %r14
cmpl %r14d, %r12d
jne 0x43fd
jmp 0x44ec
movq 0x3bbc(%rip), %r12      # 0x7fd8
leaq 0x1d53(%rip), %rsi      # 0x6176
movl $0x14, %edx
movq %r12, %rdi
callq 0x2180
movq %r12, %rdi
movq %r14, %rsi
callq 0x2100
movq %rax, %r12
leaq 0x1d46(%rip), %rsi      # 0x618b
movl $0xd, %edx
movq %rax, %rdi
callq 0x2180
movl (%r15,%r14,4), %esi
movq %r12, %rdi
callq 0x21f0
movq %rax, %r12
leaq 0x1d31(%rip), %rsi      # 0x6199
movl $0x13, %edx
movq %rax, %rdi
callq 0x2180
movl (%r13,%r14,4), %esi
movq %r12, %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x1ce8(%rip), %rsi      # 0x6174
movl $0x1, %edx
movq %rax, %rdi
callq 0x2180
leaq 0x1d0d(%rip), %rsi      # 0x61ad
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2180
movq 0x3cf4(%rip), %rax      # 0x81a8
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
callq 0x2100
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x2190
andb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq