// File: lemire[P]runningmaxmin/runningmaxmin.cpp
// Function: sinetimings(unsigned int, unsigned int, double, unsigned int, bool)
void sinetimings(uint width = 50, uint size = 10000, floattype period = 500.0,
                 uint times = 500, bool doslow = true) {
    std::vector<double> timings;
    for (uint i = 0; i < times; ++i) {
        std::vector<floattype> data(size);
        for (uint j = 0; j < size; ++j)
            data[j] = sin(2 * M_PI * j / period);
        compareallalgos(data, timings, width, doslow);
    }
    std::cout << std::setw(15) << "slow";
    std::cout << std::setw(15) << "vanHerk";
    std::cout << std::setw(15) << "lemire";
    std::cout << std::setw(15) << "gilkimmel";
    std::cout << std::setw(15) << "bitmap";
    std::cout << std::setw(15) << "simplelemire";
    std::cout << std::setw(15) << "lemirew";
    std::cout << std::setw(15) << "monowedge";
    std::cout << std::endl;
    for (int i = 0; i <= 7; ++i) {
        std::cout << std::setw(15) << timings[i];
    }
    std::cout << std::endl;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movb %cl, %al
movl %edi, 0x134(%rsp)
movl %esi, 0x130(%rsp)
vmovsd %xmm0, 0x128(%rsp)
movl %edx, 0x124(%rsp)
andb $0x1, %al
movb %al, 0x123(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x4ee0
movl $0x0, 0x104(%rsp)
movl 0x104(%rsp), %eax
cmpl 0x124(%rsp), %eax
jae 0x3998
movl 0x130(%rsp), %eax
movq %rax, 0x98(%rsp)
leaq 0xe7(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x4dc0
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x4dd0
jmp 0x386f
leaq 0xe7(%rsp), %rdi
callq 0x4e50
movl $0x0, 0xd0(%rsp)
movl 0xd0(%rsp), %eax
cmpl 0x130(%rsp), %eax
jae 0x3926
movl 0xd0(%rsp), %eax
vcvtsi2sd %rax, %xmm0, %xmm1
vmovsd 0xd779(%rip), %xmm0     # 0x11028
vmulsd %xmm1, %xmm0, %xmm0
vdivsd 0x128(%rsp), %xmm0, %xmm0
callq 0x2040
vmovsd %xmm0, 0x90(%rsp)
movl 0xd0(%rsp), %eax
movl %eax, %esi
leaq 0xe8(%rsp), %rdi
callq 0x4e60
vmovsd 0x90(%rsp), %xmm0
vmovsd %xmm0, (%rax)
movl 0xd0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd0(%rsp)
jmp 0x3887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0xe7(%rsp), %rdi
callq 0x4e50
jmp 0x3cbf
movl 0x134(%rsp), %edx
movzbl 0x123(%rsp), %ecx
andl $0x1, %ecx
leaq 0xe8(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x2720
jmp 0x394f
leaq 0xe8(%rsp), %rdi
callq 0x4e80
movl 0x104(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x104(%rsp)
jmp 0x3818
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x4e80
jmp 0x3cbf
movl $0xf, %edi
callq 0x9030
movl %eax, 0x8c(%rsp)
jmp 0x39ab
movl 0x8c(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0xcc(%rsp), %esi
movq 0x12601(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x80(%rsp)
jmp 0x39d6
movq 0x80(%rsp), %rdi
leaq 0xd6fd(%rip), %rsi      # 0x110e2
callq 0x2110
jmp 0x39ec
movl $0xf, %edi
callq 0x9030
movl %eax, 0x7c(%rsp)
jmp 0x39fc
movl 0x7c(%rsp), %eax
movl %eax, 0xc8(%rsp)
movl 0xc8(%rsp), %esi
movq 0x125b3(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x70(%rsp)
jmp 0x3a21
movq 0x70(%rsp), %rdi
leaq 0xd655(%rip), %rsi      # 0x11082
callq 0x2110
jmp 0x3a34
movl $0xf, %edi
callq 0x9030
movl %eax, 0x6c(%rsp)
jmp 0x3a44
movl 0x6c(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %esi
movq 0x1256b(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x60(%rsp)
jmp 0x3a69
movq 0x60(%rsp), %rdi
leaq 0xd622(%rip), %rsi      # 0x11097
callq 0x2110
jmp 0x3a7c
movl $0xf, %edi
callq 0x9030
movl %eax, 0x5c(%rsp)
jmp 0x3a8c
movl 0x5c(%rsp), %eax
movl %eax, 0xc0(%rsp)
movl 0xc0(%rsp), %esi
movq 0x12523(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x50(%rsp)
jmp 0x3ab1
movq 0x50(%rsp), %rdi
leaq 0xd5b8(%rip), %rsi      # 0x11075
callq 0x2110
jmp 0x3ac4
movl $0xf, %edi
callq 0x9030
movl %eax, 0x4c(%rsp)
jmp 0x3ad4
movl 0x4c(%rsp), %eax
movl %eax, 0xbc(%rsp)
movl 0xbc(%rsp), %esi
movq 0x124db(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x40(%rsp)
jmp 0x3af9
movq 0x40(%rsp), %rdi
leaq 0xd585(%rip), %rsi      # 0x1108a
callq 0x2110
jmp 0x3b0c
movl $0xf, %edi
callq 0x9030
movl %eax, 0x3c(%rsp)
jmp 0x3b1c
movl 0x3c(%rsp), %eax
movl %eax, 0xb8(%rsp)
movl 0xb8(%rsp), %esi
movq 0x12493(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x30(%rsp)
jmp 0x3b41
movq 0x30(%rsp), %rdi
leaq 0xd544(%rip), %rsi      # 0x11091
callq 0x2110
jmp 0x3b54
movl $0xf, %edi
callq 0x9030
movl %eax, 0x2c(%rsp)
jmp 0x3b64
movl 0x2c(%rsp), %eax
movl %eax, 0xb4(%rsp)
movl 0xb4(%rsp), %esi
movq 0x1244b(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x20(%rsp)
jmp 0x3b89
movq 0x20(%rsp), %rdi
leaq 0xd509(%rip), %rsi      # 0x1109e
callq 0x2110
jmp 0x3b9c
movl $0xf, %edi
callq 0x9030
movl %eax, 0x1c(%rsp)
jmp 0x3bac
movl 0x1c(%rsp), %eax
movl %eax, 0xb0(%rsp)
movl 0xb0(%rsp), %esi
movq 0x12403(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, 0x10(%rsp)
jmp 0x3bd1
movq 0x10(%rsp), %rdi
leaq 0xd4c9(%rip), %rsi      # 0x110a6
callq 0x2110
jmp 0x3be4
movq 0x123dd(%rip), %rdi     # 0x15fc8
movq 0x123c6(%rip), %rsi     # 0x15fb8
callq 0x2130
jmp 0x3bf9
movl $0x0, 0xac(%rsp)
cmpl $0x7, 0xac(%rsp)
jg 0x3c95
movl $0xf, %edi
callq 0x9030
movl %eax, 0xc(%rsp)
jmp 0x3c22
movl 0xc(%rsp), %eax
movl %eax, 0xa8(%rsp)
movl 0xa8(%rsp), %esi
movq 0x1238d(%rip), %rdi     # 0x15fc8
callq 0x2140
movq %rax, (%rsp)
jmp 0x3c46
movslq 0xac(%rsp), %rsi
leaq 0x108(%rsp), %rdi
callq 0x4e60
movq (%rsp), %rdi
vmovsd (%rax), %xmm0
callq 0x2230
jmp 0x3c6a
jmp 0x3c6c
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0x3c04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0x3cbf
movq 0x1232c(%rip), %rdi     # 0x15fc8
movq 0x12315(%rip), %rsi     # 0x15fb8
callq 0x2130
jmp 0x3caa
leaq 0x108(%rsp), %rdi
callq 0x4e80
addq $0x138, %rsp            # imm = 0x138
retq
leaq 0x108(%rsp), %rdi
callq 0x4e80
movq 0xd8(%rsp), %rdi
callq 0x2210
nopl (%rax)