// File: /workspace/github_cpp_makefile_star2_O2/grmauri[P]pmm/pmm.cpp
// Function: testar_estruturas()
void testar_estruturas()
{
    const int repeticoes = 1000;

    //---
    clock_t h;
    double tempo;
    Solucao sol;
    SolucaoBIN solB;

    //---
    printf("\n\n>>> TESTE DE COMPARACAO DAS ESTRUTURAS DA SOLUCAO - PMM3 - %d REPETICOES\n\n", repeticoes);
    lerDados("pmm3.txt");

    //---
    h = clock();
    for(int r = 0; r < repeticoes; r++)
        heuConAle(sol);
    h = clock() - h;
    tempo = (double)h/CLOCKS_PER_SEC;
    printf("Heuristica construtiva aleatoria................: %.5f seg.\n",tempo);

    //---
    h = clock();
    for(int r = 0; r < repeticoes; r++)
        heuConAleBIN(solB);
    h = clock() - h;
    tempo = (double)h/CLOCKS_PER_SEC;
    printf("Heuristica construtiva aleatoria (BINARIA)......: %.5f seg.\n",tempo);

    //---
    h = clock();
    for(int r = 0; r < repeticoes; r++)
        calcFO(sol);
    h = clock() - h;
    tempo = (double)h/CLOCKS_PER_SEC;
    printf("\nCalculo da FO...................................: %.5f seg.\n",tempo);

    //---
    h = clock();
    for(int r = 0; r < repeticoes; r++)
        calcFOBIN(solB);
    h = clock() - h;
    tempo = (double)h/CLOCKS_PER_SEC;
    printf("Calculo da FO (BINARIA).........................: %.5f seg.\n",tempo);

    //---
    heuConAle(sol);
    heuConAleBIN(solB);
    printf("\nSolucao:");
    escreverSolucao(sol, 0);
    printf("\nSolucao BINARIA:");
    escreverSolucaoBIN(solB, 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x19800, %rsp          # imm = 0x19800
leaq 0xc20(%rip), %rdi       # 0x524f
movl $0x3e8, %ebp            # imm = 0x3E8
movl $0x3e8, %esi            # imm = 0x3E8
xorl %eax, %eax
callq 0x2050
leaq 0xafd(%rip), %rsi       # 0x5144
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x4bf6
movq %rbx, %rdi
callq 0x2a5b
leaq 0x8(%rsp), %rdi
callq 0x2080
callq 0x20b0
movq %rax, %rbx
leaq 0x28(%rsp), %r14
subl $0x1, %ebp
jb 0x4687
movq %r14, %rdi
callq 0x38af
jmp 0x4678
callq 0x20b0
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x99c(%rip), %xmm0      # 0x5038
leaq 0xbf9(%rip), %rdi       # 0x529c
movb $0x1, %al
callq 0x2050
movl $0x3e8, %ebp            # imm = 0x3E8
callq 0x20b0
movq %rax, %rbx
leaq 0x8c4(%rsp), %r14
subl $0x1, %ebp
jb 0x46ce
movq %r14, %rdi
callq 0x47ea
jmp 0x46bf
callq 0x20b0
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x955(%rip), %xmm0      # 0x5038
leaq 0xbef(%rip), %rdi       # 0x52d9
movb $0x1, %al
callq 0x2050
movl $0x3e8, %ebp            # imm = 0x3E8
callq 0x20b0
movq %rax, %rbx
leaq 0x28(%rsp), %r14
subl $0x1, %ebp
jb 0x4712
movq %r14, %rdi
callq 0x38ec
jmp 0x4703
callq 0x20b0
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x911(%rip), %xmm0      # 0x5038
leaq 0xbe8(%rip), %rdi       # 0x5316
movb $0x1, %al
callq 0x2050
movl $0x3e8, %ebp            # imm = 0x3E8
callq 0x20b0
movq %rax, %rbx
leaq 0x8c4(%rsp), %r14
subl $0x1, %ebp
jb 0x4759
movq %r14, %rdi
callq 0x4844
jmp 0x474a
callq 0x20b0
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x8ca(%rip), %xmm0      # 0x5038
leaq 0xbdf(%rip), %rdi       # 0x5354
movb $0x1, %al
callq 0x2050
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x38af
leaq 0x8c4(%rsp), %r14
movq %r14, %rdi
callq 0x47ea
leaq 0xbf1(%rip), %rdi       # 0x5391
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40eb
leaq 0xbe3(%rip), %rdi       # 0x539b
xorl %eax, %eax
callq 0x2050
movq %r14, %rdi
xorl %esi, %esi
callq 0x4952
addq $0x19800, %rsp          # imm = 0x19800
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21c0