// File: /workspace/github_cpp_makefile_star2_O1/lemire[P]runningmaxmin/./runningmaxmin.h
// Function: lemiremaxmin::lemiremaxmin(std::vector<double, std::allocator<double>>&, unsigned int)
lemiremaxmin(std::vector<floattype> & array, uint width)
        : maxvalues(array.size() - width + 1),
          minvalues(array.size() - width + 1) {
        std::deque<int> maxfifo, minfifo;
        for (uint i = 1; i < width; ++i) {
            if (array[i] > array[i - 1]) { // overshoot
                minfifo.push_back(i - 1);
                while (!maxfifo.empty()) {
                    if (array[i] <= array[maxfifo.back()]) {
                        if (i == width + maxfifo.front())
                            maxfifo.pop_front();
                        break;
                    }
                    maxfifo.pop_back();
                }
            } else {
                maxfifo.push_back(i - 1);
                while (!minfifo.empty()) {
                    if (array[i] >= array[minfifo.back()]) {
                        if (i == width + minfifo.front())
                            minfifo.pop_front();
                        break;
                    }
                    minfifo.pop_back();
                }
            }
        }
        for (uint i = width; i < array.size(); ++i) {
            maxvalues[i - width] =
                array[maxfifo.empty() ? i - 1 : maxfifo.front()];
            minvalues[i - width] =
                array[minfifo.empty() ? i - 1 : minfifo.front()];
            if (array[i] > array[i - 1]) { // overshoot
                minfifo.push_back(i - 1);
                if (i == width + minfifo.front())
                    minfifo.pop_front();
                while (!maxfifo.empty()) {
                    if (array[i] <= array[maxfifo.back()]) {
                        if (i == width + maxfifo.front())
                            maxfifo.pop_front();
                        break;
                    }
                    maxfifo.pop_back();
                }
            } else {
                maxfifo.push_back(i - 1);
                if (i == width + maxfifo.front())
                    maxfifo.pop_front();
                while (!minfifo.empty()) {
                    if (array[i] >= array[minfifo.back()]) {
                        if (i == width + minfifo.front())
                            minfifo.pop_front();
                        break;
                    }
                    minfifo.pop_back();
                }
            }
        }
        maxvalues[array.size() - width] =
            array[maxfifo.empty() ? array.size() - 1 : maxfifo.front()];
        minvalues[array.size() - width] =
            array[minfifo.empty() ? array.size() - 1 : minfifo.front()];
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x7588(%rip), %rax      # 0xabc0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movl %edx, %r12d
subq %r12, %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
movq %rdi, 0xb8(%rsp)
callq 0x555c
movq 0x8(%r15), %rsi
subq (%r15), %rsi
addq $0x20, %rbx
sarq $0x3, %rsi
subq %r12, %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, 0xc0(%rsp)
movq %rbx, %rdi
callq 0x555c
vxorpd %xmm0, %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
vmovupd %ymm0, 0x30(%rdi)
vmovupd %ymm0, 0x20(%rdi)
vmovupd %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x56f2
leaq 0x60(%rsp), %rdi
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %ymm0, 0x30(%rdi)
vmovupd %ymm0, 0x20(%rdi)
vmovupd %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x56f2
cmpl $0x2, %ebp
jb 0x395d
movl $0x1, %ebx
leaq 0xc(%rsp), %r13
movl $0x200, %r14d           # imm = 0x200
movq (%r15), %rcx
vmovsd (%rcx,%rbx,8), %xmm0
leaq -0x1(%rbx), %rax
vucomisd -0x8(%rcx,%rbx,8), %xmm0
jbe 0x372f
movl %eax, 0xc(%rsp)
movq 0x90(%rsp), %rcx
movq 0xa0(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x375a
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x90(%rsp)
jmp 0x3767
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x37f0
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x37fd
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x5868
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
je 0x3951
movq 0x48(%rsp), %rdi
movq %rcx, %rdx
cmpq %rdi, %rcx
jne 0x3793
movq 0x58(%rsp), %rdx
movq -0x8(%rdx), %rdx
addq %r14, %rdx
movq (%r15), %rsi
movslq -0x4(%rdx), %rdx
vmovsd (%rsi,%rdx,8), %xmm0
vucomisd (%rsi,%rbx,8), %xmm0
jae 0x389d
cmpq %rdi, %rcx
je 0x37b5
addq $-0x4, %rcx
jmp 0x37e4
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rcx
movq %rcx, 0x48(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0x50(%rsp)
addq $0x1fc, %rcx            # imm = 0x1FC
movq %rcx, 0x40(%rsp)
movq 0x20(%rsp), %rax
jmp 0x3771
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x5868
movq 0x70(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq %rax, %rcx
je 0x3951
movq 0x98(%rsp), %rdi
movq %rcx, %rdx
cmpq %rdi, %rcx
jne 0x3832
movq 0xa8(%rsp), %rdx
movq -0x8(%rdx), %rdx
addq %r14, %rdx
movq (%r15), %rsi
vmovsd (%rsi,%rbx,8), %xmm0
movslq -0x4(%rdx), %rdx
vucomisd (%rsi,%rdx,8), %xmm0
jae 0x38be
cmpq %rdi, %rcx
je 0x3850
addq $-0x4, %rcx
jmp 0x388b
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rcx
movq %rcx, 0x98(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0xa0(%rsp)
addq $0x1fc, %rcx            # imm = 0x1FC
movq %rcx, 0x90(%rsp)
movq 0x70(%rsp), %rax
jmp 0x380a
movl (%rax), %ecx
addl %ebp, %ecx
cmpq %rcx, %rbx
jne 0x3951
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x38e2
addq $0x4, %rax
jmp 0x390f
movl (%rax), %ecx
addl %ebp, %ecx
cmpq %rcx, %rbx
jne 0x3951
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3916
addq $0x4, %rax
jmp 0x394c
movq 0x28(%rsp), %rdi
callq 0x20e0
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3951
movq 0x78(%rsp), %rdi
callq 0x20e0
movq 0x88(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x70(%rsp)
incq %rbx
cmpq %r12, %rbx
jne 0x36ee
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x3d0f
movl $0x200, %r13d           # imm = 0x200
movq %r12, %r14
movl %ebp, %ebx
movq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rcx
cmpq %rdx, %rcx
je 0x3992
movl (%rdx), %edx
jmp 0x3995
leal -0x1(%rbx), %edx
movl %edx, %edx
vmovsd (%rax,%rdx,8), %xmm0
movl %ebx, %esi
subl %ebp, %esi
movq 0xb8(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, (%rdx,%rsi,8)
movq 0x70(%rsp), %rdi
movq 0x90(%rsp), %rdx
cmpq %rdi, %rdx
je 0x39c6
movl (%rdi), %edi
jmp 0x39c9
leal -0x1(%rbx), %edi
movl %edi, %edi
vmovsd (%rax,%rdi,8), %xmm0
movq 0xc0(%rsp), %rdi
movq (%rdi), %rdi
vmovsd %xmm0, (%rdi,%rsi,8)
vmovsd (%rax,%r14,8), %xmm0
leal -0x1(%rbx), %esi
vucomisd (%rax,%rsi,8), %xmm0
jbe 0x3a15
movl %esi, 0xc(%rsp)
movq 0xa0(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rdx
je 0x3a34
movl %esi, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x90(%rsp)
jmp 0x3a43
movl %esi, 0xc(%rsp)
movq 0x50(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rcx
je 0x3a6b
movl %esi, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x3a7a
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movq 0x70(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %ebx
jne 0x3ae1
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3aa6
addq $0x4, %rax
jmp 0x3adc
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %ebx
jne 0x3bc0
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3b8e
addq $0x4, %rax
jmp 0x3bbb
movq 0x78(%rsp), %rdi
callq 0x20e0
movq 0x88(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x70(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
je 0x3cf3
movq 0x48(%rsp), %rdi
movq %rcx, %rdx
cmpq %rdi, %rcx
jne 0x3b0d
movq 0x58(%rsp), %rdx
movq -0x8(%rdx), %rdx
addq %r13, %rdx
movq (%r15), %rsi
movslq -0x4(%rdx), %rdx
vmovsd (%rsi,%rdx,8), %xmm0
vucomisd (%rsi,%r14,8), %xmm0
jae 0x3b67
cmpq %rdi, %rcx
je 0x3b2c
addq $-0x4, %rcx
jmp 0x3b5b
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rcx
movq %rcx, 0x48(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0x50(%rsp)
addq $0x1fc, %rcx            # imm = 0x1FC
movq %rcx, 0x40(%rsp)
movq 0x20(%rsp), %rax
jmp 0x3aeb
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %ebx
jne 0x3cf3
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3c84
addq $0x4, %rax
jmp 0x3cb1
movq 0x28(%rsp), %rdi
callq 0x20e0
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq %rax, %rcx
je 0x3cf3
movq 0x98(%rsp), %rdi
movq %rcx, %rdx
cmpq %rdi, %rcx
jne 0x3bf5
movq 0xa8(%rsp), %rdx
movq -0x8(%rdx), %rdx
addq %r13, %rdx
movq (%r15), %rsi
vmovsd (%rsi,%r14,8), %xmm0
movslq -0x4(%rdx), %rdx
vucomisd (%rsi,%rdx,8), %xmm0
jae 0x3c61
cmpq %rdi, %rcx
je 0x3c14
addq $-0x4, %rcx
jmp 0x3c4f
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rcx
movq %rcx, 0x98(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0xa0(%rsp)
addq $0x1fc, %rcx            # imm = 0x1FC
movq %rcx, 0x90(%rsp)
movq 0x70(%rsp), %rax
jmp 0x3bcd
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %ebx
jne 0x3cf3
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3cb8
addq $0x4, %rax
jmp 0x3cee
movq 0x28(%rsp), %rdi
callq 0x20e0
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3cf3
movq 0x78(%rsp), %rdi
callq 0x20e0
movq 0x88(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x70(%rsp)
incl %ebx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %rbx, %r14
cmpq %rbx, %rcx
ja 0x397f
movq 0x20(%rsp), %rdx
cmpq %rdx, 0x40(%rsp)
je 0x3d20
movslq (%rdx), %rdx
jmp 0x3d24
leaq -0x1(%rcx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
movq %rcx, %rdx
subq %r12, %rdx
movq 0xb8(%rsp), %rsi
movq (%rsi), %rsi
vmovsd %xmm0, (%rsi,%rdx,8)
movq 0x70(%rsp), %rsi
cmpq %rsi, 0x90(%rsp)
je 0x3d53
movslq (%rsi), %rcx
jmp 0x3d56
decq %rcx
vmovsd (%rax,%rcx,8), %xmm0
movq 0xc0(%rsp), %rax
movq (%rax), %rax
vmovsd %xmm0, (%rax,%rdx,8)
leaq 0x60(%rsp), %rdi
callq 0x5a60
leaq 0x10(%rsp), %rdi
callq 0x5a60
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x3db3
movq %rax, %r15
jmp 0x3dbd
movq %rax, %r15
jmp 0x3dd2
jmp 0x3da6
jmp 0x3da6
jmp 0x3da6
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x5a60
leaq 0x10(%rsp), %rdi
callq 0x5a60
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3dd2
callq 0x20e0
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3de7
callq 0x20e0
movq %r15, %rdi
callq 0x2190
nop