// File: /workspace/github_cpp_makefile_star2_O2/quancs[P]EAVC/eavc.cpp
// Function: main
int main(int argc, char *argv[]) {
    unsigned int seed, i;
    if (build_instance(argv[1]) != 1) {
        cout << "can't open instance file" << endl;
        return -1;
    }

    //optimal_size=0;
    i = 2;

    sscanf(argv[i++], "%d", &seed);
    sscanf(argv[i++], "%d", &cutoffTime);
    sscanf(argv[i++], "%d", &eaSelTimes);

    pcg32_fast_init(seed);

    cout << "c EAVC: " << argv[1] << " " << argv[2] << " " << argv[3] << " " << argv[4] << endl;

#ifdef WIN32
    gstart = clock();
    clocksTotal = static_cast<int>(cutoffTime) * CLOCKS_PER_SEC;
#else
    times(&gstart);
    startTime = gstart.tms_utime + gstart.tms_stime;
    clocksTotal = cutoffTime * sysconf(_SC_CLK_TCK);
#endif
    preprocess();
    unsigned initSize = 0;
    if (ueSize > 0) {
        init_sol();
        initSize = bestSize;
        eavc_search();
        cVertexes = cAllVertexes;
    } else
        cout << "c no uncovered edge after preprocessing" << endl;
    //check solution
    if (check_solution() == 1) {
        //print_solution();
        //compute times
#ifdef WIN32
        bestTime = bestTime / CLOCKS_PER_SEC;
        finish = clock();
        double totalTime = (static_cast<double>(finish - gstart)) / CLOCKS_PER_SEC;
#else
        bestTime = bestTime / sysconf(_SC_CLK_TCK);
        times(&finish);
        double totalTime = double(finish.tms_utime - gstart.tms_utime + finish.tms_stime - gstart.tms_stime) / sysconf(_SC_CLK_TCK);
#endif
        bestTime = round(bestTime * 100) / 100.0;

        cout << "c steps total:" << step << endl;
        cout << "c time  total:" << totalTime << endl;
        cout << "c Best vertex cover size = " << bestSize << ", init = " << initSize <<  ", steps = " << bestStep <<  ", time = " << bestTime << endl;
    }

    free_memory();
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x23ca
testl %eax, %eax
je 0x454c
movq 0x10(%rbx), %rdi
leaq 0xbf2(%rip), %r14       # 0x5022
leaq 0x14(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2140
movq 0x18(%rbx), %rdi
leaq 0x2dfb(%rip), %rdx      # 0x7248
movq %r14, %rsi
xorl %eax, %eax
callq 0x2140
movq 0x20(%rbx), %rdi
leaq 0x2cbe(%rip), %rdx      # 0x7120
movq %r14, %rsi
xorl %eax, %eax
callq 0x2140
movl (%r15), %edi
callq 0x23b6
movq 0x2b5d(%rip), %rdi      # 0x6fd8
leaq 0xd4f(%rip), %rsi       # 0x51d1
callq 0x2150
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xd3e(%rip), %r14       # 0x51d8
movq %rax, %rdi
movq %r14, %rsi
callq 0x2150
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r14, %rsi
callq 0x2150
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r14, %rsi
callq 0x2150
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x2d62(%rip), %rdi      # 0x7250
callq 0x21b0
movl 0x2d5f(%rip), %eax      # 0x7258
addl 0x2d51(%rip), %eax      # 0x7250
movl %eax, 0x2d33(%rip)      # 0x7238
movl 0x2d3d(%rip), %ebx      # 0x7248
pushq $0x2
popq %rdi
callq 0x20e0
imulq %rbx, %rax
movq %rax, 0x2d22(%rip)      # 0x7240
callq 0x2831
cmpl $0x0, 0x2cc2(%rip)      # 0x71ec
je 0x456f
callq 0x2f89
movl 0x2cc1(%rip), %ebx      # 0x71f8
callq 0x4297
movq 0x2ce5(%rip), %rax      # 0x7228
movq %rax, 0x2c4e(%rip)      # 0x7198
jmp 0x458c
movq 0x2a85(%rip), %rdi      # 0x6fd8
leaq 0xc5e(%rip), %rsi       # 0x51b8
callq 0x2150
movq %rax, %rdi
callq 0x20c0
pushq $-0x1
popq %rax
jmp 0x4712
movq 0x2a62(%rip), %rdi      # 0x6fd8
leaq 0xc5d(%rip), %rsi       # 0x51da
callq 0x2150
movq %rax, %rdi
callq 0x20c0
xorl %ebx, %ebx
callq 0x41aa
testl %eax, %eax
je 0x470b
movsd 0x2ccf(%rip), %xmm0     # 0x7270
movsd %xmm0, 0x8(%rsp)
pushq $0x2
popq %rbp
movl %ebp, %edi
callq 0x20e0
cvtsi2sd %rax, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x2ca8(%rip)     # 0x7270
leaq 0x2c31(%rip), %rdi      # 0x7200
callq 0x21b0
movq 0x2c25(%rip), %rax      # 0x7200
movq 0x2c6e(%rip), %rcx      # 0x7250
addq 0x2c1f(%rip), %rax      # 0x7208
addq 0x2c68(%rip), %rcx      # 0x7258
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x8(%rsp)
movl %ebp, %edi
callq 0x20e0
cvtsi2sd %rax, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x2c4e(%rip), %xmm0     # 0x7270
mulsd 0x9de(%rip), %xmm0      # 0x5008
callq 0x20b0
divsd 0x9d1(%rip), %xmm0      # 0x5008
movsd %xmm0, 0x2c31(%rip)     # 0x7270
movq 0x2992(%rip), %r14      # 0x6fd8
leaq 0xbb5(%rip), %rsi       # 0x5202
movq %r14, %rdi
callq 0x2150
movl 0x2bd9(%rip), %esi      # 0x7234
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20c0
leaq 0xb9f(%rip), %rsi       # 0x5211
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
leaq 0xb89(%rip), %rsi       # 0x5220
movq %r14, %rdi
callq 0x2150
movl 0x2b53(%rip), %esi      # 0x71f8
movq %rax, %rdi
callq 0x20f0
leaq 0xb88(%rip), %rsi       # 0x523c
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20f0
leaq 0xb78(%rip), %rsi       # 0x5246
movq %rax, %rdi
callq 0x2150
movl 0x2b9c(%rip), %esi      # 0x7278
movq %rax, %rdi
callq 0x20f0
leaq 0xb66(%rip), %rsi       # 0x5251
movq %rax, %rdi
callq 0x2150
movsd 0x2b75(%rip), %xmm0     # 0x7270
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20c0
callq 0x2c34
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop