// File: /workspace/github_cpp_makefile_star2_O3/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 0x4e30
movq 0x10(%rbx), %rdi
leaq 0x12a3(%rip), %r14      # 0x6032
leaq 0xc(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2170
movq 0x18(%rbx), %rdi
leaq 0x34bc(%rip), %rdx      # 0x8268
movq %r14, %rsi
xorl %eax, %eax
callq 0x2170
movq 0x20(%rbx), %rdi
leaq 0x337f(%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, 0x3348(%rip)      # 0x8138
movq 0x31e1(%rip), %r14      # 0x7fd8
leaq 0x13e3(%rip), %rsi      # 0x61e1
movl $0x8, %edx
movq %r14, %rdi
callq 0x2180
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x4e7c
movq %r15, %rdi
callq 0x20d0
movq 0x31b5(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x4e94
movq 0x31a1(%rip), %rbx      # 0x7fd8
leaq 0x138a(%rip), %rsi      # 0x61c8
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 0x5280
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x313d(%rip), %r14      # 0x7fd8
leaq 0x1346(%rip), %rsi      # 0x61e8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x4ed4
movq %r15, %rdi
callq 0x20d0
movq 0x3111(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x4eec
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x30e5(%rip), %r14      # 0x7fd8
leaq 0x12ee(%rip), %rsi      # 0x61e8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x4f2c
movq %r15, %rdi
callq 0x20d0
movq 0x30b9(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x4f44
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21e0
movq 0x308d(%rip), %r14      # 0x7fd8
leaq 0x1296(%rip), %rsi      # 0x61e8
movl $0x1, %edx
movq %r14, %rdi
callq 0x2180
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x4f84
movq %rbx, %rdi
callq 0x20d0
movq 0x3061(%rip), %rdi      # 0x7fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x4f9c
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 0x32a6(%rip), %rdi      # 0x8270
callq 0x21d0
movl 0x32a3(%rip), %eax      # 0x8278
addl 0x3295(%rip), %eax      # 0x8270
movl %eax, 0x3277(%rip)      # 0x8258
movl 0x3281(%rip), %ebx      # 0x8268
movl $0x2, %edi
callq 0x20f0
imulq %rbx, %rax
movq %rax, 0x3264(%rip)      # 0x8260
callq 0x2943
cmpl $0x0, 0x3204(%rip)      # 0x820c
je 0x502a
callq 0x3393
movl 0x3203(%rip), %ebx      # 0x8218
callq 0x4b51
movq 0x3227(%rip), %rax      # 0x8248
movq %rax, 0x3190(%rip)      # 0x81b8
jmp 0x5067
leaq 0x11b9(%rip), %rsi      # 0x61ea
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 0x49db
testl %eax, %eax
je 0x5279
movsd 0x3214(%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, 0x31ec(%rip)     # 0x8290
leaq 0x3175(%rip), %rdi      # 0x8220
callq 0x21d0
movq 0x3169(%rip), %rax      # 0x8220
movq 0x31b2(%rip), %rcx      # 0x8270
addq 0x3163(%rip), %rax      # 0x8228
addq 0x31ac(%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 0x318c(%rip), %xmm0     # 0x8290
mulsd 0xefc(%rip), %xmm0      # 0x6008
callq 0x20c0
divsd 0xeef(%rip), %xmm0      # 0x6008
movsd %xmm0, 0x316f(%rip)     # 0x8290
movq 0x2eb0(%rip), %r14      # 0x7fd8
leaq 0x10e3(%rip), %rsi      # 0x6212
movl $0xe, %edx
movq %r14, %rdi
callq 0x2180
movl 0x3112(%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 0x10a6(%rip), %rsi      # 0x6221
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 0x106a(%rip), %rsi      # 0x6230
movl $0x1b, %edx
movq %r14, %rdi
callq 0x2180
movl 0x303f(%rip), %esi      # 0x8218
movq %r14, %rdi
callq 0x2100
movq %rax, %r14
leaq 0x1061(%rip), %rsi      # 0x624c
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rax, %rbx
leaq 0x1049(%rip), %rsi      # 0x6256
movl $0xa, %edx
movq %rax, %rdi
callq 0x2180
movl 0x3078(%rip), %esi      # 0x8298
movq %rbx, %rdi
callq 0x2100
movq %rax, %rbx
leaq 0x102f(%rip), %rsi      # 0x6261
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movsd 0x3049(%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 0x2f7d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq