// File: lemire[P]runningmaxmin/runningmaxmin.cpp
// Function: compareallalgos(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, unsigned int, bool)
void compareallalgos(std::vector<floattype> & data,
                     std::vector<double> & timings, uint width, bool doslow) {
    if (timings.size() < 8)
        timings = std::vector<double>(8, 0.0);
    clock_t start, finish;
    start = clock();
    if (doslow)
        slowmaxmin A(data, width);
    finish = clock();
    timings[0] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    vanHerkGilWermanmaxmin B(data, width);
    finish = clock();
    timings[1] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    lemiremaxmin C(data, width);
    finish = clock();
    timings[2] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    GilKimmel D(data, width);
    finish = clock();
    timings[3] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    if (width < sizeof(unsigned long) * 8)
        lemirebitmapmaxmin BL(data, width);
    finish = clock();
    timings[4] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    simplelemiremaxmin F(data, width);
    finish = clock();
    timings[5] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    lemiremaxminwrap Cw(data, width);
    finish = clock();
    timings[6] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
    start = clock();
    monowedgewrap Mw(data, width);
    finish = clock();
    timings[7] += static_cast<double>(finish - start) / CLOCKS_PER_SEC;
}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movb %cl, %al
movq %rdi, 0x270(%rsp)
movq %rsi, 0x268(%rsp)
movl %edx, 0x264(%rsp)
andb $0x1, %al
movb %al, 0x263(%rsp)
movq 0x268(%rsp), %rdi
callq 0x4f20
cmpq $0x8, %rax
jae 0x27f6
movq $0x0, 0x240(%rsp)
leaq 0x23f(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x4dc0
movq 0x50(%rsp), %rcx
leaq 0x248(%rsp), %rdi
movl $0x8, %esi
leaq 0x240(%rsp), %rdx
callq 0x4f40
jmp 0x279f
movq 0x268(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4fc0
leaq 0x248(%rsp), %rdi
callq 0x4e80
leaq 0x23f(%rsp), %rdi
callq 0x4e50
jmp 0x27f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
leaq 0x23f(%rsp), %rdi
callq 0x4e50
jmp 0x2d50
callq 0x20d0
movq %rax, 0x220(%rsp)
testb $0x1, 0x263(%rsp)
je 0x2836
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x1e0(%rsp), %rdi
callq 0x5000
leaq 0x1e0(%rsp), %rdi
callq 0x5320
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe7bd(%rip), %xmm1     # 0x11020
vmovsd %xmm1, 0x40(%rsp)
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x38(%rsp)
movq 0x268(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4e60
vmovsd 0x38(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x1a8(%rsp), %rdi
callq 0x5370
callq 0x20d0
vmovsd 0x40(%rsp), %xmm1
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x48(%rsp)
movq 0x268(%rsp), %rdi
movl $0x1, %esi
callq 0x4e60
vmovsd 0x48(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x170(%rsp), %rdi
callq 0x5f50
jmp 0x2943
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe6b0(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rsp)
movq 0x268(%rsp), %rdi
movl $0x2, %esi
callq 0x4e60
vmovsd 0x30(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x138(%rsp), %rdi
callq 0x69f0
jmp 0x29c9
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
subq 0x220(%rsp), %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe62d(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
movq 0x268(%rsp), %rdi
movl $0x3, %esi
callq 0x4e60
vmovsd 0x28(%rsp), %xmm0
vaddsd (%rax), %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movl 0x264(%rsp), %eax
cmpq $0x40, %rax
jae 0x2aaf
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x100(%rsp), %rdi
callq 0x72b0
jmp 0x2a55
leaq 0x100(%rsp), %rdi
callq 0x7e00
jmp 0x2aaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x2d43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x2d36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x2d29
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe544(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x20(%rsp)
movq 0x268(%rsp), %rdi
movl $0x4, %esi
callq 0x4e60
vmovsd 0x20(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0xc8(%rsp), %rdi
callq 0x7e50
jmp 0x2b35
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe4be(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x18(%rsp)
movq 0x268(%rsp), %rdi
movl $0x5, %esi
callq 0x4e60
vmovsd 0x18(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x90(%rsp), %rdi
callq 0x8730
jmp 0x2bbb
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
movq 0x220(%rsp), %rcx
subq %rcx, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe438(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rsp)
movq 0x268(%rsp), %rdi
movl $0x6, %esi
callq 0x4e60
vmovsd 0x10(%rsp), %xmm1
vmovsd (%rax), %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, (%rax)
callq 0x20d0
movq %rax, 0x220(%rsp)
movq 0x270(%rsp), %rsi
movl 0x264(%rsp), %edx
leaq 0x58(%rsp), %rdi
callq 0x8a40
jmp 0x2c3e
callq 0x20d0
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rax
subq 0x220(%rsp), %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0xe3b8(%rip), %xmm1     # 0x11020
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
movq 0x268(%rsp), %rdi
movl $0x7, %esi
callq 0x4e60
vmovsd 0x8(%rsp), %xmm0
vaddsd (%rax), %xmm0, %xmm0
vmovsd %xmm0, (%rax)
leaq 0x58(%rsp), %rdi
callq 0x8e50
leaq 0x90(%rsp), %rdi
callq 0x8ea0
leaq 0xc8(%rsp), %rdi
callq 0x8ef0
leaq 0x138(%rsp), %rdi
callq 0x8f40
leaq 0x170(%rsp), %rdi
callq 0x8f90
leaq 0x1a8(%rsp), %rdi
callq 0x8fe0
addq $0x278, %rsp            # imm = 0x278
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x2d1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x8ea0
leaq 0xc8(%rsp), %rdi
callq 0x8ef0
leaq 0x138(%rsp), %rdi
callq 0x8f40
leaq 0x170(%rsp), %rdi
callq 0x8f90
leaq 0x1a8(%rsp), %rdi
callq 0x8fe0
movq 0x230(%rsp), %rdi
callq 0x2210
nopl (%rax)