// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x2423
testl %eax, %eax
je 0x507c
movq 0x10(%rbx), %rdi
leaq 0x1047(%rip), %r14      # 0x6022
leaq 0xc(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2170
movq 0x18(%rbx), %rdi
leaq 0x3270(%rip), %rdx      # 0x8268
movq %r14, %rsi
xorl %eax, %eax
callq 0x2170
movq 0x20(%rbx), %rdi
leaq 0x3133(%rip), %rdx      # 0x8140
movq %r14, %rsi
xorl %eax, %eax
callq 0x2170
movl (%r15), %eax
movabsq $-0x4f5c17a566d501a6, %rcx # imm = 0xB0A3E85A992AFE5A
imulq %rax, %rcx
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
addq %rcx, %rax
movq %rax, 0x30fc(%rip)      # 0x8138
movq 0x2f95(%rip), %r14      # 0x7fd8
leaq 0x1187(%rip), %rsi      # 0x61d1
movl $0x8, %edx
movq %r14, %rdi
callq 0x2180
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x50c8
movq %r15, %rdi
callq 0x20d0
movq 0x2f69(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x50e0
movq 0x2f55(%rip), %rbx      # 0x7fd8
leaq 0x112e(%rip), %rsi      # 0x61b8
movl $0x18, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x54cc
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x2ef1(%rip), %r14      # 0x7fd8
leaq 0x10ea(%rip), %rsi      # 0x61d8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x5120
movq %r15, %rdi
callq 0x20d0
movq 0x2ec5(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x5138
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x2e99(%rip), %r14      # 0x7fd8
leaq 0x1092(%rip), %rsi      # 0x61d8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x5178
movq %r15, %rdi
callq 0x20d0
movq 0x2e6d(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x5190
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x2e41(%rip), %r14      # 0x7fd8
leaq 0x103a(%rip), %rsi      # 0x61d8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x51d0
movq %rbx, %rdi
callq 0x20d0
movq 0x2e15(%rip), %rdi      # 0x7fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x51e8
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
leaq 0x305a(%rip), %rdi      # 0x8270
callq 0x21d0
movl 0x3057(%rip), %eax      # 0x8278
addl 0x3049(%rip), %eax      # 0x8270
movl %eax, 0x302b(%rip)      # 0x8258
movl 0x3035(%rip), %ebx      # 0x8268
movl $0x2, %edi
callq 0x20f0
imulq %rbx, %rax
movq %rax, 0x3018(%rip)      # 0x8260
callq 0x294d
cmpl $0x0, 0x2fb8(%rip)      # 0x820c
je 0x5276
callq 0x3492
movl 0x2fb7(%rip), %ebx      # 0x8218
callq 0x4d9f
movq 0x2fdb(%rip), %rax      # 0x8248
movq %rax, 0x2f44(%rip)      # 0x81b8
jmp 0x52b3
leaq 0xf5d(%rip), %rsi       # 0x61da
movl $0x27, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
xorl %ebx, %ebx
callq 0x4be4
testl %eax, %eax
je 0x54c5
movsd 0x2fc8(%rip), %xmm0     # 0x8290
movsd %xmm0, (%rsp)
movl $0x2, %edi
callq 0x20f0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x2fa0(%rip)     # 0x8290
leaq 0x2f29(%rip), %rdi      # 0x8220
callq 0x21d0
movq 0x2f1d(%rip), %rax      # 0x8220
movq 0x2f66(%rip), %rcx      # 0x8270
addq 0x2f17(%rip), %rax      # 0x8228
addq 0x2f60(%rip), %rcx      # 0x8278
subq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movl $0x2, %edi
callq 0x20f0
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x2f40(%rip), %xmm0     # 0x8290
mulsd 0xcb0(%rip), %xmm0      # 0x6008
callq 0x20c0
divsd 0xca3(%rip), %xmm0      # 0x6008
movsd %xmm0, 0x2f23(%rip)     # 0x8290
movq 0x2c64(%rip), %r14      # 0x7fd8
leaq 0xe87(%rip), %rsi       # 0x6202
movl $0xe, %edx
movq %r14, %rdi
callq 0x2180
movl 0x2ec6(%rip), %esi      # 0x8254
movq %r14, %rdi
callq 0x2100
movq %rax, %r15
movq (%rax), %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
leaq 0xe4a(%rip), %rsi       # 0x6211
movl $0xe, %edx
movq %r14, %rdi
callq 0x2180
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x21c0
movq %rax, %r15
movq (%rax), %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
leaq 0xe0e(%rip), %rsi       # 0x6220
movl $0x1b, %edx
movq %r14, %rdi
callq 0x2180
movl 0x2df3(%rip), %esi      # 0x8218
movq %r14, %rdi
callq 0x2100
movq %rax, %r14
leaq 0xe05(%rip), %rsi       # 0x623c
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rax, %rbx
leaq 0xded(%rip), %rsi       # 0x6246
movl $0xa, %edx
movq %rax, %rdi
callq 0x2180
movl 0x2e2c(%rip), %esi      # 0x8298
movq %rbx, %rdi
callq 0x2100
movq %rax, %rbx
leaq 0xdd3(%rip), %rsi       # 0x6251
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movsd 0x2dfd(%rip), %xmm0     # 0x8290
movq %rbx, %rdi
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
callq 0x2110
callq 0x3048
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq