// File: 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
movq %rsp, %rbp
subq $0x19840, %rsp          # imm = 0x19840
movl $0x3e8, -0x4(%rbp)      # imm = 0x3E8
leaq 0x1620(%rip), %rdi      # 0x72f9
xorl %eax, %eax
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x2050
leaq -0x19811(%rbp), %rdi
movq %rdi, -0x19840(%rbp)
callq 0x22a0
movq -0x19840(%rbp), %rdx
leaq 0x14c5(%rip), %rsi      # 0x71cb
leaq -0x19810(%rbp), %rdi
callq 0x6770
jmp 0x5d14
leaq -0x19810(%rbp), %rdi
callq 0x32b0
jmp 0x5d22
leaq -0x19810(%rbp), %rdi
callq 0x20f0
leaq -0x19811(%rbp), %rdi
callq 0x21a0
callq 0x2100
movq %rax, -0x10(%rbp)
movl $0x0, -0x19828(%rbp)
cmpl $0x3e8, -0x19828(%rbp)  # imm = 0x3E8
jge 0x5db9
leaq -0x8b4(%rbp), %rdi
callq 0x4690
movl -0x19828(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19828(%rbp)
jmp 0x5d4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x19820(%rbp)
movl %eax, -0x19824(%rbp)
jmp 0x5da8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x19820(%rbp)
movl %eax, -0x19824(%rbp)
leaq -0x19810(%rbp), %rdi
callq 0x20f0
leaq -0x19811(%rbp), %rdi
callq 0x21a0
jmp 0x5fa2
callq 0x2100
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x125c(%rip), %xmm1     # 0x7030
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x155d(%rip), %rdi      # 0x7346
movb $0x1, %al
callq 0x2050
callq 0x2100
movq %rax, -0x10(%rbp)
movl $0x0, -0x1982c(%rbp)
cmpl $0x3e8, -0x1982c(%rbp)  # imm = 0x3E8
jge 0x5e2c
leaq -0x197f0(%rbp), %rdi
callq 0x5fb0
movl -0x1982c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1982c(%rbp)
jmp 0x5e03
callq 0x2100
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x11e9(%rip), %xmm1     # 0x7030
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x1527(%rip), %rdi      # 0x7383
movb $0x1, %al
callq 0x2050
callq 0x2100
movq %rax, -0x10(%rbp)
movl $0x0, -0x19830(%rbp)
cmpl $0x3e8, -0x19830(%rbp)  # imm = 0x3E8
jge 0x5e9f
leaq -0x8b4(%rbp), %rdi
callq 0x46f0
movl -0x19830(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19830(%rbp)
jmp 0x5e76
callq 0x2100
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x1176(%rip), %xmm1     # 0x7030
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x14f1(%rip), %rdi      # 0x73c0
movb $0x1, %al
callq 0x2050
callq 0x2100
movq %rax, -0x10(%rbp)
movl $0x0, -0x19834(%rbp)
cmpl $0x3e8, -0x19834(%rbp)  # imm = 0x3E8
jge 0x5f12
leaq -0x197f0(%rbp), %rdi
callq 0x6030
movl -0x19834(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19834(%rbp)
jmp 0x5ee9
callq 0x2100
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x1103(%rip), %xmm1     # 0x7030
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x14bc(%rip), %rdi      # 0x73fe
movb $0x1, %al
callq 0x2050
leaq -0x8b4(%rbp), %rdi
callq 0x4690
leaq -0x197f0(%rbp), %rdi
callq 0x5fb0
leaq 0x14d3(%rip), %rdi      # 0x743b
movb $0x0, %al
callq 0x2050
leaq -0x8b4(%rbp), %rdi
xorl %esi, %esi
callq 0x5550
leaq 0x14c1(%rip), %rdi      # 0x7445
movb $0x0, %al
callq 0x2050
leaq -0x197f0(%rbp), %rdi
xorl %esi, %esi
callq 0x6250
addq $0x19840, %rsp          # imm = 0x19840
popq %rbp
retq
movq -0x19820(%rbp), %rdi
callq 0x2290
nop