// File: travisdowns[P]avx-turbo/avx-turbo.cpp
// Function: report_results(std::vector<result_holder, std::allocator<result_holder>> const&, bool)
void report_results(const std::vector<result_holder>& results_list, bool use_aperf) {
    // report
    table::Table table;
    table.setColColumnSeparator(" | ");

    auto& header = table.newRow();

    using table::ColInfo;

    auto adder = [&header, &table](const char* s, ColInfo::Justification just = ColInfo::LEFT) {
        header.add(s);
        table.colInfo(header.size() - 1).justify = just;
    };

    adder("Cores");
    adder("ID");
    adder("Description");
    // adder("OVRLP1", ColInfo::RIGHT);
    // adder("OVRLP2", ColInfo::RIGHT);
    adder("OVRLP3", ColInfo::RIGHT);
    adder("Mops", ColInfo::RIGHT);

    if (use_aperf) {
        adder("A/M-ratio", ColInfo::RIGHT);
        adder("A/M-MHz", ColInfo::RIGHT);
        adder("M/tsc-ratio", ColInfo::RIGHT);
    }

    for (const result_holder& holder : results_list) {
        auto spec = holder.spec;
        auto &row = table.newRow()
                                .add(spec->count())
                                .add(spec->name)
                                .add(spec->description)
                                // .addf("%5.3f", holder.get_overlap1())
                                // .addf("%5.3f", holder.get_overlap2())
                                .addf("%5.3f", holder.get_overlap3());

        auto& results = holder.results;
        row.add(result_string(results, "%5.0f", [](const result& r){ return r.inner.mops * 1000; }));
        if (use_aperf) {
            row.add(result_string(results, "%4.2f", [](const result& r){ return r.aperf_am; }));
            row.add(result_string(results, "%.0f",  [](const result& r){ return r.aperf_am / 1000000.0 * RdtscClock::tsc_freq(); }));
            row.add(result_string(results, "%4.2f", [](const result& r){ return r.aperf_mt; }));
        }
    }

    printf("%s\n", table.str().c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x119a0
leaq -0x81(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x77c0
movq -0x1b8(%rbp), %rdx
leaq 0x34dd6(%rip), %rsi     # 0x40757
leaq -0x80(%rbp), %rdi
callq 0x7630
jmp 0xb98c
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x11a40
jmp 0xb99b
leaq -0x80(%rbp), %rdi
callq 0x7290
leaq -0x81(%rbp), %rdi
callq 0x74d0
leaq -0x60(%rbp), %rdi
callq 0x11a70
movq %rax, -0x1c0(%rbp)
jmp 0xb9c2
movq -0x1c0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x34d6b(%rip), %rsi     # 0x4075b
leaq -0xb0(%rbp), %rdi
xorl %edx, %edx
callq 0xbed0
jmp 0xba00
leaq 0x349ee(%rip), %rsi     # 0x403f5
leaq -0xb0(%rbp), %rdi
xorl %edx, %edx
callq 0xbed0
jmp 0xba17
leaq 0x34d43(%rip), %rsi     # 0x40761
leaq -0xb0(%rbp), %rdi
xorl %edx, %edx
callq 0xbed0
jmp 0xba2e
leaq 0x34d38(%rip), %rsi     # 0x4076d
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
callq 0xbed0
jmp 0xba48
leaq 0x34d25(%rip), %rsi     # 0x40774
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
callq 0xbed0
jmp 0xba62
testb $0x1, -0x9(%rbp)
je 0xbb13
leaq 0x34d06(%rip), %rsi     # 0x40779
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
callq 0xbed0
jmp 0xba86
leaq 0x34cf6(%rip), %rsi     # 0x40783
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
callq 0xbed0
jmp 0xbaa0
leaq 0x34ce4(%rip), %rsi     # 0x4078b
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
callq 0xbed0
jmp 0xbaba
jmp 0xbb13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xbaeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x7290
leaq -0x81(%rbp), %rdi
callq 0x74d0
jmp 0xbeb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xbeb2
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x11ae0
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x11b10
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x11b40
testb $0x1, %al
jne 0xbb60
jmp 0xbe45
leaq -0xc0(%rbp), %rdi
callq 0x11b80
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x11a70
movq %rax, -0x1c8(%rbp)
jmp 0xbb96
movq -0xd8(%rbp), %rdi
callq 0x11690
movq %rax, -0x1d0(%rbp)
jmp 0xbbab
movq -0x1c8(%rbp), %rdi
movq -0x1d0(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rsi
callq 0x11ba0
movq %rax, -0x1d8(%rbp)
jmp 0xbbd5
movq -0x1d8(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x11c90
movq %rax, -0x1e0(%rbp)
jmp 0xbbf1
movq -0x1e0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
addq $0x20, %rsi
callq 0x11c90
movq %rax, -0x1e8(%rbp)
jmp 0xbc11
movq -0xd0(%rbp), %rdi
callq 0x11e80
movsd %xmm0, -0x1f0(%rbp)
jmp 0xbc27
movsd -0x1f0(%rbp), %xmm0
movq -0x1e8(%rbp), %rdi
leaq 0x34b5a(%rip), %rsi     # 0x40797
callq 0x11d80
movq %rax, -0x1f8(%rbp)
jmp 0xbc4b
movq -0x1f8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xf0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0xf0(%rbp), %rsi
leaq 0x34b16(%rip), %rdx     # 0x4079d
leaq -0x110(%rbp), %rdi
callq 0xbf30
jmp 0xbc95
movq -0x200(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x11c90
jmp 0xbcaa
leaq -0x110(%rbp), %rdi
callq 0x7290
testb $0x1, -0x9(%rbp)
je 0xbe32
movq -0xe0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0xf0(%rbp), %rsi
leaq 0x34ac7(%rip), %rdx     # 0x407a3
leaq -0x138(%rbp), %rdi
callq 0xc110
jmp 0xbcea
movq -0x208(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x11c90
jmp 0xbcff
leaq -0x138(%rbp), %rdi
callq 0x7290
movq -0xe0(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0xf0(%rbp), %rsi
leaq 0x34a82(%rip), %rdx     # 0x407a9
leaq -0x160(%rbp), %rdi
callq 0xc2f0
jmp 0xbd35
movq -0x210(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x11c90
jmp 0xbd4a
leaq -0x160(%rbp), %rdi
callq 0x7290
movq -0xe0(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0xf0(%rbp), %rsi
leaq 0x34a31(%rip), %rdx     # 0x407a3
leaq -0x188(%rbp), %rdi
callq 0xc4d0
jmp 0xbd80
movq -0x218(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x11c90
jmp 0xbd95
leaq -0x188(%rbp), %rdi
callq 0x7290
jmp 0xbe32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x7290
jmp 0xbeb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x7290
jmp 0xbeb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x7290
jmp 0xbeb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x7290
jmp 0xbeb2
jmp 0xbe34
leaq -0xc0(%rbp), %rdi
callq 0x11f80
jmp 0xbb44
leaq -0x1b0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x11fa0
jmp 0xbe57
leaq -0x1b0(%rbp), %rdi
callq 0x71a0
movq %rax, %rsi
leaq 0x34953(%rip), %rdi     # 0x407c0
xorl %eax, %eax
callq 0x7080
jmp 0xbe76
leaq -0x1b0(%rbp), %rdi
callq 0x7290
leaq -0x60(%rbp), %rdi
callq 0x122e0
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x7290
leaq -0x60(%rbp), %rdi
callq 0x122e0
movq -0x90(%rbp), %rdi
callq 0x77b0
nopw (%rax,%rax)