// File: /workspace/github_cpp_makefile_star2_O1/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 $0xc8, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6cac(%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, 0xc0(%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, 0xb8(%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
movl $0x0, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x406d
movl $0x0, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x407c
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movl $0x0, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x40b1
movl $0x0, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x40c0
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
cmpl $0x2, %ebp
jb 0x4284
movl $0x1, %ebx
movl $0x200, %r13d           # imm = 0x200
leaq 0x10(%rsp), %r14
movq (%r15), %rax
vmovsd (%rax,%rbx,8), %xmm0
vucomisd -0x8(%rax,%rbx,8), %xmm0
jbe 0x4171
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rdi, %rax
je 0x4102
addq $-0x4, %rax
jmp 0x4130
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0x40(%rsp)
cmpq 0x20(%rsp), %rax
je 0x420b
movq 0x48(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x4159
movq 0x58(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq (%r15), %rdx
movslq -0x4(%rcx), %rcx
vmovsd (%rdx,%rcx,8), %xmm0
vucomisd (%rdx,%rbx,8), %xmm0
jb 0x40f7
jmp 0x420b
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
je 0x418c
addq $-0x4, %rax
jmp 0x41c6
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x98(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0x90(%rsp)
cmpq 0x70(%rsp), %rax
je 0x420b
movq 0x98(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x41f4
movq 0xa8(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
movslq -0x4(%rcx), %rcx
vucomisd (%rdx,%rcx,8), %xmm0
jb 0x4181
movl %ebx, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x422f
movl %ebx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x423c
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movl %ebx, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4269
movl %ebx, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x4278
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
incq %rbx
cmpq %r12, %rbx
jne 0x40d9
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x4562
movl $0x200, %r13d           # imm = 0x200
movq %r12, %rbx
movl %ebp, %r14d
movq 0x20(%rsp), %rcx
movslq (%rcx), %rcx
vmovsd (%rax,%rcx,8), %xmm0
movl %r14d, %ecx
subl %ebp, %ecx
movq 0xc0(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, (%rdx,%rcx,8)
movq 0x70(%rsp), %rdx
movslq (%rdx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
movq 0xb8(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, (%rdx,%rcx,8)
vmovsd (%rax,%rbx,8), %xmm0
leal -0x1(%r14), %ecx
vucomisd (%rax,%rcx,8), %xmm0
jbe 0x437e
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rdi, %rax
je 0x430f
addq $-0x4, %rax
jmp 0x433d
callq 0x20e0
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0x40(%rsp)
cmpq 0x20(%rsp), %rax
je 0x4418
movq 0x48(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x4366
movq 0x58(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq (%r15), %rdx
movslq -0x4(%rcx), %rcx
vmovsd (%rdx,%rcx,8), %xmm0
vucomisd (%rdx,%rbx,8), %xmm0
jb 0x4304
jmp 0x4418
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
je 0x4399
addq $-0x4, %rax
jmp 0x43d3
callq 0x20e0
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x98(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0x90(%rsp)
cmpq 0x70(%rsp), %rax
je 0x4418
movq 0x98(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x4401
movq 0xa8(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq (%r15), %rdx
vmovsd (%rdx,%rbx,8), %xmm0
movslq -0x4(%rcx), %rcx
vucomisd (%rdx,%rcx,8), %xmm0
jb 0x438e
movl %r14d, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x443e
movl %r14d, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x444d
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movl %r14d, 0xc(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x447c
movl %r14d, (%rax)
addq $0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x448b
leaq 0x60(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5868
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r14d
jne 0x44ad
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x44d6
addq $0x4, %rax
jmp 0x4503
movq 0x70(%rsp), %rax
movl (%rax), %ecx
addl %ebp, %ecx
cmpl %ecx, %r14d
jne 0x4545
movq 0x80(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x450a
addq $0x4, %rax
jmp 0x4540
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 0x4545
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, %rbx
cmpq %r14, %rcx
ja 0x42a7
leaq 0x10(%rsp), %r15
movq 0x10(%r15), %rdx
movslq (%rdx), %rdx
vmovsd (%rax,%rdx,8), %xmm0
subq %r12, %rcx
movq 0xc0(%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 0xb8(%rsp), %rax
movq (%rax), %rax
vmovsd %xmm0, (%rax,%rcx,8)
callq 0x5a60
movq %r15, %rdi
callq 0x5a60
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x45df
jmp 0x45df
movq %rax, %r15
jmp 0x45ec
movq %rax, %r15
jmp 0x45f6
movq %rax, %r15
jmp 0x460b
jmp 0x45df
jmp 0x45df
jmp 0x45df
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x5a60
leaq 0x10(%rsp), %rdi
callq 0x5a60
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x460b
callq 0x20e0
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4620
callq 0x20e0
movq %r15, %rdi
callq 0x2190