// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]runningmaxmin/./runningmaxmin.h
// Function: simplelemiremaxmin::simplelemiremaxmin(std::vector<double, std::allocator<double>>&, unsigned int)
simplelemiremaxmin(std::vector<floattype> & array, uint width)
        : maxvalues(array.size() - width + 1),
          minvalues(array.size() - width + 1) {
        std::deque<int> maxfifo, minfifo;
        maxfifo.push_back(0);
        minfifo.push_back(0);
        for (uint i = 1; i < width; ++i) {
            if (array[i] > array[i - 1]) { // overshoot
                maxfifo.pop_back();
                while (!maxfifo.empty()) {
                    if (array[i] <= array[maxfifo.back()])
                        break;
                    maxfifo.pop_back();
                }
            } else {
                minfifo.pop_back();
                while (!minfifo.empty()) {
                    if (array[i] >= array[minfifo.back()])
                        break;
                    minfifo.pop_back();
                }
            }
            maxfifo.push_back(i);
            minfifo.push_back(i);
        }
        for (uint i = width; i < array.size(); ++i) {
            maxvalues[i - width] = array[maxfifo.front()];
            minvalues[i - width] = array[minfifo.front()];
            if (array[i] > array[i - 1]) { // overshoot
                maxfifo.pop_back();
                while (!maxfifo.empty()) {
                    if (array[i] <= array[maxfifo.back()])
                        break;
                    maxfifo.pop_back();
                }
            } else {
                minfifo.pop_back();
                while (!minfifo.empty()) {
                    if (array[i] >= array[minfifo.back()])
                        break;
                    minfifo.pop_back();
                }
            }
            maxfifo.push_back(i);
            minfifo.push_back(i);
            if (i == width + maxfifo.front())
                maxfifo.pop_front();
            else if (i == width + minfifo.front())
                minfifo.pop_front();
        }
        maxvalues[array.size() - width] = array[maxfifo.front()];
        minvalues[array.size() - width] = array[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, %r14
leaq 0x6c6a(%rip), %rax      # 0xac50
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, %r14
sarq $0x3, %rsi
subq %r12, %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %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
movl $0x0, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x40a7
movl $0x0, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x40b6
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
movl $0x0, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x40eb
movl $0x0, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x40fa
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
cmpl $0x2, %ebp
jb 0x4366
movl $0x1, %ebx
leaq 0xc(%rsp), %r13
movq (%r15), %rax
vmovsd (%rax,%rbx,8), %xmm0
vucomisd -0x8(%rax,%rbx,8), %xmm0
jbe 0x4132
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rdi, %rax
je 0x4154
addq $-0x4, %rax
jmp 0x4183
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
je 0x4219
addq $-0x4, %rax
jmp 0x4254
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
je 0x42ef
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
cmpq %rdi, %rax
je 0x41bc
movslq -0x4(%rax), %rsi
vmovsd (%rdx,%rsi,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x42ef
addq $-0x4, %rax
jmp 0x420f
movq 0x58(%rsp), %rax
movq -0x8(%rax), %rax
movslq 0x1fc(%rax), %rax
vmovsd (%rdx,%rax,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x42ef
callq 0x20e0
movq 0x20(%rsp), %rcx
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x40(%rsp)
jmp 0x418d
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x90(%rsp)
movq 0x70(%rsp), %rcx
cmpq %rcx, %rax
je 0x42ef
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
cmpq %rdi, %rax
je 0x4288
movslq -0x4(%rax), %rsi
vucomisd (%rdx,%rsi,8), %xmm0
jae 0x42ef
addq $-0x4, %rax
jmp 0x42e2
movq 0xa8(%rsp), %rax
movq -0x8(%rax), %rax
movslq 0x1fc(%rax), %rax
vucomisd (%rdx,%rax,8), %xmm0
jae 0x42ef
callq 0x20e0
movq 0x70(%rsp), %rcx
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x90(%rsp)
jmp 0x4261
movl %ebx, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4313
movl %ebx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x4320
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x59ce
movl %ebx, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x434d
movl %ebx, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x435a
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x59ce
incq %rbx
cmpq %r12, %rbx
jne 0x410d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x46e6
movq %r12, %rbx
movl %ebp, %r13d
movq 0x20(%rsp), %rcx
movslq (%rcx), %rcx
vmovsd (%rax,%rcx,8), %xmm0
movl %r13d, %ecx
subl %ebp, %ecx
movq 0xb0(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, (%rdx,%rcx,8)
movq 0x70(%rsp), %rdx
movslq (%rdx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
movq (%r14), %rdx
vmovsd %xmm0, (%rdx,%rcx,8)
vmovsd (%rax,%rbx,8), %xmm0
leal -0x1(%r13), %ecx
vucomisd (%rax,%rcx,8), %xmm0
jbe 0x43df
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rdi, %rax
je 0x4401
addq $-0x4, %rax
jmp 0x4430
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
je 0x44c6
addq $-0x4, %rax
jmp 0x4501
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
je 0x459c
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
cmpq %rdi, %rax
je 0x4469
movslq -0x4(%rax), %rsi
vmovsd (%rdx,%rsi,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x459c
addq $-0x4, %rax
jmp 0x44bc
movq 0x58(%rsp), %rax
movq -0x8(%rax), %rax
movslq 0x1fc(%rax), %rax
vmovsd (%rdx,%rax,8), %xmm1
vucomisd %xmm0, %xmm1
jae 0x459c
callq 0x20e0
movq 0x20(%rsp), %rcx
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x40(%rsp)
jmp 0x443a
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x90(%rsp)
movq 0x70(%rsp), %rcx
cmpq %rcx, %rax
je 0x459c
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
cmpq %rdi, %rax
je 0x4535
movslq -0x4(%rax), %rsi
vucomisd (%rdx,%rsi,8), %xmm0
jae 0x459c
addq $-0x4, %rax
jmp 0x458f
movq 0xa8(%rsp), %rax
movq -0x8(%rax), %rax
movslq 0x1fc(%rax), %rax
vucomisd (%rdx,%rax,8), %xmm0
jae 0x459c
callq 0x20e0
movq 0x70(%rsp), %rcx
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0xa0(%rsp)
leaq 0x1fc(%rdi), %rax
movq %rax, 0x90(%rsp)
jmp 0x450e
movl %r13d, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x45c2
movl %r13d, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x45d1
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
movl %r13d, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4600
movl %r13d, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x460f
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x59ce
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r13d
jne 0x4631
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x465a
addq $0x4, %rax
jmp 0x4687
movq 0x70(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r13d
jne 0x46c9
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x468e
addq $0x4, %rax
jmp 0x46c4
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 0x46c9
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 %r13d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %r13, %rbx
cmpq %r13, %rcx
ja 0x4383
leaq 0x10(%rsp), %r15
movq 0x10(%r15), %rdx
movslq (%rdx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
subq %r12, %rcx
movq 0xb0(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, (%rdx,%rcx,8)
leaq 0x60(%rsp), %rdi
movq 0x10(%rdi), %rdx
movslq (%rdx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
movq (%r14), %rax
vmovsd %xmm0, (%rax,%rcx,8)
callq 0x5bc6
movq %r15, %rdi
callq 0x5bc6
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x475b
jmp 0x475b
movq %rax, %r15
jmp 0x4768
movq %rax, %r15
jmp 0x4772
movq %rax, %r15
jmp 0x477f
jmp 0x475b
jmp 0x475b
jmp 0x475b
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x5bc6
leaq 0x10(%rsp), %rdi
callq 0x5bc6
movq (%r14), %rdi
testq %rdi, %rdi
je 0x477f
callq 0x20e0
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4794
callq 0x20e0
movq %r15, %rdi
callq 0x2190