// File: /workspace/github_cpp_makefile_star2_O1/quancs[P]EAVC/./eavc.h
// Function: init_match_vc(int*, VerticeStatus*, unsigned int&)
void init_match_vc(int *dscore3, VerticeStatus *vInC3, unsigned int &cvSize3) {
#ifdef WIN32
    start = clock();
#else
    times(&start);
#endif

    unsigned int v, e;
    unsigned int v1, v2;

    memset(dscore3, 0, sizeof(int) * vNum);
    memcpy(vInC3, vInBest, vNum);

    cvSize3 = 0;
    for (unsigned i = 0; i < ueSize; i++) {
        e = uncovEdges[i];
        v1 = edges[e].v1;
        v2 = edges[e].v2;

        if (not_in(vInC3, v1) && not_in(vInC3, v2)) {
            vInC3[v1] = IN;
            vInC3[v2] = IN;
            cvSize3 = cvSize3 + 2;
        }
    }

    //calculate dscores
    for (unsigned i = 0; i < ueSize; i++) {
        e = uncovEdges[i];
        v1 = edges[e].v1;
        v2 = edges[e].v2;

        if (in(vInC3, v1) && not_in(vInC3, v2))
            dscore3[v1]--;
        else if (in(vInC3, v2) && not_in(vInC3, v1))
            dscore3[v2]--;
    }

    //remove redundent vertices
    for (unsigned i = 0; i < uvSize; i++) {
        v = uvSet[i];
        if (in(vInC3, v) && dscore3[v] == 0) {
            vInC3[v] = NIN;
            dscore3[v] = -1 * dscore3[v];
            unsigned int degree = dVDegree[v];
            for (unsigned int i = 0; i < degree; i++) {
                unsigned int vadj = vAdj[v][i];
                if (not_in(vInC3, vadj)) {
                    dscore3[vadj]++;
                } else
                    dscore3[vadj]--;
            }
            cvSize3--;
        }
    }

#ifdef WIN32
    finish = clock();
    double initTime = (static_cast<double>(finish - start)) / CLOCKS_PER_SEC;
#else
    times(&finish);
    double initTime = double(finish.tms_utime - start.tms_utime + finish.tms_stime - start.tms_stime) / sysconf(_SC_CLK_TCK);
#endif
    initTime = round(initTime * 100) / 100.0;

    cout << "c init match_vc=" << cvSize3 << "/" << uvSize << "/" << (cvSize3 + total_IN_ABS) << " time=" << initTime << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x39ff(%rip), %rdi      # 0x81d8
callq 0x21d0
movl 0x3978(%rip), %edx      # 0x815c
shlq $0x2, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movq 0x39cf(%rip), %rsi      # 0x81c8
movl 0x395d(%rip), %edx      # 0x815c
movq %r14, %rdi
callq 0x2140
movl $0x0, (%rbx)
movl 0x39f9(%rip), %eax      # 0x820c
testq %rax, %rax
je 0x48a9
movl (%rbx), %ecx
movq 0x3953(%rip), %rdx      # 0x8178
movq 0x3944(%rip), %rsi      # 0x8170
xorl %edi, %edi
movb $0x3, %r8b
movl (%rdx,%rdi,4), %r10d
movl (%rsi,%r10,8), %r9d
cmpb $0x1, (%r14,%r9)
ja 0x4859
movl 0x4(%rsi,%r10,8), %r10d
cmpb $0x1, (%r14,%r10)
ja 0x4859
movb %r8b, (%r14,%r9)
movb %r8b, (%r14,%r10)
addl $0x2, %ecx
movl %ecx, (%rbx)
incq %rdi
cmpq %rdi, %rax
jne 0x4831
movq 0x3910(%rip), %rcx      # 0x8178
movq 0x3901(%rip), %rdx      # 0x8170
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
movl (%rdx,%rdi,8), %r8d
movl 0x4(%rdx,%rdi,8), %edi
movb (%r14,%r8), %r9b
cmpb $0x3, %r9b
jb 0x488d
cmpb $0x2, (%r14,%rdi)
jb 0x489d
cmpb $0x1, %r9b
ja 0x48a1
cmpb $0x3, (%r14,%rdi)
movq %rdi, %r8
jb 0x48a1
decl (%r15,%r8,4)
incq %rsi
cmpq %rsi, %rax
jne 0x4871
movl 0x3959(%rip), %eax      # 0x8208
testq %rax, %rax
je 0x4924
movq 0x3945(%rip), %rcx      # 0x8200
movq 0x390e(%rip), %rdx      # 0x81d0
movq 0x38d7(%rip), %rsi      # 0x81a0
xorl %edi, %edi
movl (%rcx,%rdi,4), %r9d
cmpb $0x3, (%r14,%r9)
jb 0x491c
cmpl $0x0, (%r15,%r9,4)
jne 0x491c
movb $0x0, (%r14,%r9)
movl $0x0, (%r15,%r9,4)
movl (%rdx,%r9,4), %r8d
testq %r8, %r8
je 0x491a
movq (%rsi,%r9,8), %r9
xorl %r10d, %r10d
movl (%r9,%r10,4), %r11d
cmpb $0x2, (%r14,%r11)
movl $0x0, %ebp
adcl $-0x1, %ebp
orl $0x1, %ebp
addl %ebp, (%r15,%r11,4)
incq %r10
cmpq %r10, %r8
jne 0x48fa
decl (%rbx)
incq %rdi
cmpq %rax, %rdi
jne 0x48cb
leaq 0x38f5(%rip), %rdi      # 0x8220
callq 0x21d0
movq 0x38e9(%rip), %rax      # 0x8220
movq 0x389a(%rip), %rcx      # 0x81d8
addq 0x38e3(%rip), %rax      # 0x8228
addq 0x3894(%rip), %rcx      # 0x81e0
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movl $0x2, %edi
callq 0x20f0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
mulsd 0x168c(%rip), %xmm1     # 0x6008
movapd %xmm1, %xmm0
callq 0x20c0
divsd 0x167b(%rip), %xmm0     # 0x6008
movsd %xmm0, (%rsp)
movq 0x363f(%rip), %r14      # 0x7fd8
leaq 0x1710(%rip), %rsi      # 0x60b0
movl $0x10, %edx
movq %r14, %rdi
callq 0x2180
movl (%rbx), %esi
movq %r14, %rdi
callq 0x2100
movq %rax, %r14
leaq 0x16d6(%rip), %r15      # 0x6097
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2180
movl 0x3831(%rip), %esi      # 0x8208
movq %r14, %rdi
callq 0x2100
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2180
movl 0x381c(%rip), %esi      # 0x8214
addl (%rbx), %esi
movq %r14, %rdi
callq 0x2100
movq %rax, %rbx
leaq 0x1646(%rip), %rsi      # 0x6052
movl $0x6, %edx
movq %rax, %rdi
callq 0x2180
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x21c0
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
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2110