// File: /workspace/github_cpp_makefile_star2_O1/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 0x5c72(%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, %r14d
subq %r14, %rsi
incq %rsi
leaq 0x30(%rsp), %rdx
callq 0x555c
movq 0x8(%r15), %rsi
subq (%r15), %rsi
addq $0x20, %rbx
sarq $0x3, %rsi
subq %r14, %rsi
incq %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x555c
vxorps %xmm0, %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
vmovups %ymm0, 0x30(%rdi)
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x63aa
leaq 0x80(%rsp), %rdi
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x30(%rdi)
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0x63aa
movl 0xc(%rsp), %eax
decl %eax
je 0x51ea
movl %eax, %ebp
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 0x6515
movq %rbx, %rdi
movq %r13, %rsi
callq 0x732e
incq %r12
cmpq %r12, %rbp
jne 0x51b6
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
movq 0x10(%rsp), %rbp
jbe 0x534b
leaq 0x20(%rsp), %r13
leaq 0x80(%rsp), %r12
movl 0xc(%rsp), %ecx
movl %ecx, %ebx
vmovsd (%rax,%r14,8), %xmm0
vmovsd %xmm0, 0x20(%rsp)
movl %ebx, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x6515
movq %r12, %rdi
movq %r13, %rsi
callq 0x732e
movl %ebx, %r14d
subl 0xc(%rsp), %r14d
movq 0x40(%rsp), %rax
cmpl %r14d, 0x8(%rax)
ja 0x529c
movq 0x50(%rsp), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x5268
addq $0x10, %rax
jmp 0x5295
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)
jmp 0x524e
movq 0x90(%rsp), %rax
cmpl %r14d, 0x8(%rax)
ja 0x5307
movq 0xa0(%rsp), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x52c1
addq $0x10, %rax
jmp 0x52fd
movq 0x98(%rsp), %rdi
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)
movq %rax, 0x90(%rsp)
jmp 0x52a4
movq 0x40(%rsp), %rcx
vmovsd (%rcx), %xmm0
incl %r14d
movq (%rbp), %rcx
vmovsd %xmm0, (%rcx,%r14,8)
vmovsd (%rax), %xmm0
movq 0x18(%rsp), %rax
movq (%rax), %rax
vmovsd %xmm0, (%rax,%r14,8)
incl %ebx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %rbx, %r14
cmpq %rbx, %rcx
ja 0x5219
leaq 0x80(%rsp), %rdi
callq 0x7758
leaq 0x30(%rsp), %rdi
callq 0x7758
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x5395
movq %rax, %r15
jmp 0x539f
movq %rax, %r15
jmp 0x53b1
jmp 0x5385
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x7758
leaq 0x30(%rsp), %rdi
callq 0x7758
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x53b1
callq 0x20e0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x53c3
callq 0x20e0
movq %r15, %rdi
callq 0x2190
nop