// File: /workspace/github_cpp_makefile_star2_O3/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 $0xb8, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x7586(%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, 0xb0(%rsp)
callq 0x56be
movq 0x8(%r15), %rsi
subq (%r15), %rsi
addq $0x20, %rbx
sarq $0x3, %rsi
subq %r12, %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x56be
vxorpd %xmm0, %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
vmovupd %ymm0, 0x30(%rdi)
vmovupd %ymm0, 0x20(%rdi)
vmovupd %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x5858
leaq 0x60(%rsp), %rdi
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %ymm0, 0x30(%rdi)
vmovupd %ymm0, 0x20(%rdi)
vmovupd %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x5858
cmpl $0x2, %ebp
jb 0x3981
movl $0x1, %r14d
leaq 0xc(%rsp), %r13
movq (%r15), %rcx
vmovsd (%rcx,%r14,8), %xmm0
leaq -0x1(%r14), %rax
vucomisd -0x8(%rcx,%r14,8), %xmm0
jbe 0x3726
movl %eax, 0xc(%rsp)
movq 0x90(%rsp), %rcx
movq 0xa0(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x3751
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x90(%rsp)
jmp 0x375e
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x3803
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x3810
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x59ce
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
je 0x3975
movq 0x48(%rsp), %rdi
movq (%r15), %rdx
vmovsd (%rdx,%r14,8), %xmm0
cmpq %rdi, %rcx
je 0x379d
movslq -0x4(%rcx), %rsi
vmovsd (%rdx,%rsi,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x38c1
addq $-0x4, %rcx
jmp 0x37f0
movq 0x58(%rsp), %rcx
movq -0x8(%rcx), %rcx
movslq 0x1fc(%rcx), %rcx
vmovsd (%rdx,%rcx,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x38c1
callq 0x20e0
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq -0x8(%rcx), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rcx
movq %rcx, 0x50(%rsp)
leaq 0x1fc(%rdi), %rcx
movq %rcx, 0x40(%rsp)
cmpq %rax, %rcx
jne 0x3776
jmp 0x3975
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x59ce
movq 0x70(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq %rax, %rcx
je 0x3975
movq 0x98(%rsp), %rdi
movq (%r15), %rdx
vmovsd (%rdx,%r14,8), %xmm0
cmpq %rdi, %rcx
je 0x3851
movslq -0x4(%rcx), %rsi
vucomisd (%rdx,%rsi,8), %xmm0
jae 0x38e2
addq $-0x4, %rcx
jmp 0x38ab
movq 0xa8(%rsp), %rcx
movq -0x8(%rcx), %rcx
movslq 0x1fc(%rcx), %rcx
vucomisd (%rdx,%rcx,8), %xmm0
jae 0x38e2
callq 0x20e0
movq 0x70(%rsp), %rax
movq 0xa8(%rsp), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq -0x8(%rcx), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rcx
movq %rcx, 0x90(%rsp)
cmpq %rax, %rcx
jne 0x382e
jmp 0x3975
movl (%rax), %ecx
addl %ebp, %ecx
cmpq %rcx, %r14
jne 0x3975
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3906
addq $0x4, %rax
jmp 0x3933
movl (%rax), %ecx
addl %ebp, %ecx
cmpq %rcx, %r14
jne 0x3975
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x393a
addq $0x4, %rax
jmp 0x3970
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 0x3975
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 %r14
cmpq %r12, %r14
jne 0x36e3
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x3d5b
movq %r12, %r13
movl %ebp, %r14d
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %rdx
cmpq %rcx, %rdx
je 0x39b1
movl (%rcx), %ecx
jmp 0x39b5
leal -0x1(%r14), %ecx
movl %ecx, %ecx
vmovsd (%rax,%rcx,8), %xmm0
movl %r14d, %r8d
subl %ebp, %r8d
movq 0xb0(%rsp), %rcx
movq (%rcx), %rcx
vmovsd %xmm0, (%rcx,%r8,8)
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rsi
cmpq %rcx, %rsi
je 0x39ee
movl (%rcx), %r9d
leal -0x1(%r14), %edi
jmp 0x39f5
leal -0x1(%r14), %edi
movl %edi, %r9d
movl %r9d, %r9d
vmovsd (%rax,%r9,8), %xmm0
movq (%rbx), %r9
vmovsd %xmm0, (%r9,%r8,8)
vmovsd (%rax,%r13,8), %xmm0
movl %edi, %r8d
vucomisd (%rax,%r8,8), %xmm0
jbe 0x3a3d
movl %edi, 0xc(%rsp)
movq 0xa0(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rsi
je 0x3a5c
movl %edi, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x90(%rsp)
jmp 0x3a70
movl %edi, 0xc(%rsp)
movq 0x50(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rdx
je 0x3a94
movl %edi, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x40(%rsp)
jmp 0x3aa3
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
movq 0x70(%rsp), %rcx
movl (%rcx), %eax
addl %ebp, %eax
cmpl %eax, %r14d
jne 0x3b0b
movq 0x80(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rcx
je 0x3ad0
addq $0x4, %rcx
jmp 0x3b06
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r14d
jne 0x3bfe
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3bcc
addq $0x4, %rax
jmp 0x3bf9
movq 0x78(%rsp), %rdi
callq 0x20e0
movq 0x88(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0x80(%rsp)
movq %rcx, 0x70(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
je 0x3d3e
movq 0x48(%rsp), %rdi
movq (%r15), %rdx
vmovsd (%rdx,%r13,8), %xmm0
cmpq %rdi, %rcx
je 0x3b46
movslq -0x4(%rcx), %rsi
vmovsd (%rdx,%rsi,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x3ba4
addq $-0x4, %rcx
jmp 0x3b95
movq 0x58(%rsp), %rcx
movq -0x8(%rcx), %rcx
movslq 0x1fc(%rcx), %rcx
vmovsd (%rdx,%rcx,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x3ba4
callq 0x20e0
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq -0x8(%rcx), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rcx
movq %rcx, 0x50(%rsp)
leaq 0x1fc(%rdi), %rcx
movq %rcx, 0x40(%rsp)
cmpq %rax, %rcx
jne 0x3b23
jmp 0x3d3e
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r14d
jne 0x3d3e
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3ccf
addq $0x4, %rax
jmp 0x3cfc
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 0x3d3e
movq 0x98(%rsp), %rdi
movq (%r15), %rdx
vmovsd (%rdx,%r13,8), %xmm0
cmpq %rdi, %rcx
je 0x3c3b
movslq -0x4(%rcx), %rsi
vucomisd (%rdx,%rsi,8), %xmm0
jae 0x3cab
addq $-0x4, %rcx
jmp 0x3c95
movq 0xa8(%rsp), %rcx
movq -0x8(%rcx), %rcx
movslq 0x1fc(%rcx), %rcx
vucomisd (%rdx,%rcx,8), %xmm0
jae 0x3cab
callq 0x20e0
movq 0x70(%rsp), %rax
movq 0xa8(%rsp), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq -0x8(%rcx), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rcx
movq %rcx, 0x90(%rsp)
cmpq %rax, %rcx
jne 0x3c1c
jmp 0x3d3e
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r14d
jne 0x3d3e
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3d03
addq $0x4, %rax
jmp 0x3d39
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 0x3d3e
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 %r14d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %r14, %r13
cmpq %r14, %rcx
ja 0x399e
movq 0x20(%rsp), %rdx
cmpq %rdx, 0x40(%rsp)
je 0x3d6c
movslq (%rdx), %rdx
jmp 0x3d70
leaq -0x1(%rcx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
movq %rcx, %rdx
subq %r12, %rdx
movq 0xb0(%rsp), %rsi
movq (%rsi), %rsi
vmovsd %xmm0, (%rsi,%rdx,8)
movq 0x70(%rsp), %rsi
cmpq %rsi, 0x90(%rsp)
je 0x3d9f
movslq (%rsi), %rcx
jmp 0x3da2
decq %rcx
vmovsd (%rax,%rcx,8), %xmm0
movq (%rbx), %rax
vmovsd %xmm0, (%rax,%rdx,8)
leaq 0x60(%rsp), %rdi
callq 0x5bc6
leaq 0x10(%rsp), %rdi
callq 0x5bc6
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x3df7
movq %rax, %r15
jmp 0x3e01
movq %rax, %r15
jmp 0x3e0e
jmp 0x3dea
jmp 0x3dea
jmp 0x3dea
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x5bc6
leaq 0x10(%rsp), %rdi
callq 0x5bc6
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3e0e
callq 0x20e0
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3e23
callq 0x20e0
movq %r15, %rdi
callq 0x2190
nop