// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]runningmaxmin/./runningmaxmin.h
// Function: monowedgewrap::monowedgewrap(std::vector<double, std::allocator<double>>&, unsigned int)
monowedgewrap(std::vector<floattype> & array, uint width)
        : maxvalues(array.size() - width + 1),
          minvalues(array.size() - width + 1) {
        std::deque<Sample> max_wedge;
        std::deque<Sample> min_wedge;
        for (uint i = 0; i < width - 1; ++i) {
            Sample sample = {array[i], i};
            mono_wedge::max_wedge_update(max_wedge, sample);
            mono_wedge::min_wedge_update(min_wedge, sample);
        }
        for (uint i = width; i < array.size(); ++i) {
            Sample sample = {array[i], i};
            mono_wedge::max_wedge_update(max_wedge, sample);
            mono_wedge::min_wedge_update(min_wedge, sample);
            while (max_wedge.front().time <= i-width) max_wedge.pop_front();
            while (min_wedge.front().time <= i-width) min_wedge.pop_front();
            maxvalues[i - width + 1] = max_wedge.front().value;
            minvalues[i - width + 1] = min_wedge.front().value;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5b0e(%rip), %rax      # 0xad70
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x10(%rsp)
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movl %edx, 0xc(%rsp)
movl %edx, %ebp
subq %rbp, %rsi
incq %rsi
leaq 0x30(%rsp), %rdx
callq 0x56be
movq 0x8(%r15), %rsi
subq (%r15), %rsi
addq $0x20, %rbx
sarq $0x3, %rsi
subq %rbp, %rsi
incq %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x56be
vxorps %xmm0, %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
vmovups %ymm0, 0x30(%rdi)
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x6530
leaq 0x80(%rsp), %rdi
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x30(%rdi)
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x6530
movl 0xc(%rsp), %eax
decl %eax
je 0x534e
movl %eax, %r14d
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
leaq 0x80(%rsp), %rbx
movq (%r15), %rax
vmovsd (%rax,%r12,8), %xmm0
vmovsd %xmm0, 0x20(%rsp)
movl %r12d, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x669b
movq %rbx, %rdi
movq %r13, %rsi
callq 0x74d0
incq %r12
cmpq %r12, %r14
jne 0x531a
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
movq 0x10(%rsp), %r14
jbe 0x54ae
leaq 0x20(%rsp), %r13
leaq 0x80(%rsp), %r12
movl 0xc(%rsp), %ecx
movl %ecx, %ebx
vmovsd (%rax,%rbp,8), %xmm0
vmovsd %xmm0, 0x20(%rsp)
movl %ebx, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x669b
movq %r12, %rdi
movq %r13, %rsi
callq 0x74d0
movl %ebx, %ebp
subl 0xc(%rsp), %ebp
movq 0x40(%rsp), %rax
cmpl %ebp, 0x8(%rax)
ja 0x53ff
movq 0x50(%rsp), %rcx
leaq -0x10(%rcx), %rdx
cmpq %rdx, %rax
je 0x53c8
addq $0x10, %rax
jmp 0x53f5
movq 0x48(%rsp), %rdi
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)
movq %rax, 0x40(%rsp)
cmpl %ebp, 0x8(%rax)
jbe 0x53b9
movq 0x90(%rsp), %rcx
cmpl %ebp, 0x8(%rcx)
ja 0x5471
movq 0xa0(%rsp), %rax
leaq -0x10(%rax), %rdx
cmpq %rdx, %rcx
je 0x5423
addq $0x10, %rcx
jmp 0x545f
movq 0x98(%rsp), %rdi
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)
movq %rcx, 0x90(%rsp)
cmpl %ebp, 0x8(%rcx)
jbe 0x5414
movq 0x40(%rsp), %rax
vmovsd (%rax), %xmm0
movl %ebp, %eax
movq (%r14), %rdx
vmovsd %xmm0, 0x8(%rdx,%rax,8)
vmovsd (%rcx), %xmm0
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
vmovsd %xmm0, 0x8(%rcx,%rax,8)
incl %ebx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %rbx, %rbp
cmpq %rbx, %rcx
ja 0x537d
leaq 0x80(%rsp), %rdi
callq 0x78ce
leaq 0x30(%rsp), %rdi
callq 0x78ce
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x54f8
movq %rax, %r15
jmp 0x5502
movq %rax, %r15
jmp 0x5514
jmp 0x54e8
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x78ce
leaq 0x30(%rsp), %rdi
callq 0x78ce
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5514
callq 0x20e0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5526
callq 0x20e0
movq %r15, %rdi
callq 0x2190