// File: /workspace/github_cpp_makefile_star2_O2/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 $0xc8, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x6d04(%rip), %rax      # 0xad70
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq 0x8(%rsi), %rsi
subq (%r12), %rsi
sarq $0x3, %rsi
movq %rdx, (%rsp)
movl %edx, %ebx
subq %rbx, %rsi
incq %rsi
leaq 0x28(%rsp), %rdx
movq %rdi, 0x10(%rsp)
callq 0x4392
movq 0x8(%r12), %rsi
subq (%r12), %rsi
addq $0x20, %r14
sarq $0x3, %rsi
subq %rbx, %rsi
incq %rsi
leaq 0x28(%rsp), %rdx
movq %r14, 0x8(%rsp)
movq %r14, %rdi
callq 0x4392
leaq 0x28(%rsp), %rdi
callq 0x4eca
leaq 0x78(%rsp), %rdi
callq 0x4eca
movq (%rsp), %rax
leal -0x1(%rax), %r14d
xorl %r15d, %r15d
leaq 0x28(%rsp), %rbx
leaq 0x18(%rsp), %r13
leaq 0x78(%rsp), %rbp
cmpq %r15, %r14
je 0x412a
movq (%r12), %rax
vmovsd (%rax,%r15,8), %xmm0
vmovsd %xmm0, 0x18(%rsp)
movl %r15d, 0x20(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x50c9
movq %rbp, %rdi
movq %r13, %rsi
callq 0x5e20
incq %r15
jmp 0x40f5
leaq 0x28(%rsp), %r13
leaq 0x18(%rsp), %rbp
leaq 0x78(%rsp), %rbx
movq (%rsp), %rax
movl %eax, %r14d
movl %r14d, %eax
movq (%r12), %rcx
movq 0x8(%r12), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x41e8
vmovsd (%rcx,%rax,8), %xmm0
vmovsd %xmm0, 0x18(%rsp)
movl %r14d, 0x20(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x50c9
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5e20
movl %r14d, %r15d
subl (%rsp), %r15d
movq 0x38(%rsp), %rax
cmpl %r15d, 0x8(%rax)
ja 0x41a6
movq %r13, %rdi
callq 0x4e8e
jmp 0x4189
movq %rbx, %rdi
callq 0x4e8e
movq 0x88(%rsp), %rax
cmpl %r15d, 0x8(%rax)
jbe 0x419e
movq 0x38(%rsp), %rcx
vmovsd (%rcx), %xmm0
movl %r15d, %ecx
movq 0x10(%rsp), %rdx
movq (%rdx), %rdx
vmovsd %xmm0, 0x8(%rdx,%rcx,8)
vmovsd (%rax), %xmm0
movq 0x8(%rsp), %rax
movq (%rax), %rax
vmovsd %xmm0, 0x8(%rax,%rcx,8)
incl %r14d
jmp 0x4140
leaq 0x78(%rsp), %rdi
callq 0x609e
leaq 0x28(%rsp), %rdi
callq 0x609e
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x422c
movq %rax, %rbx
jmp 0x4236
movq %rax, %rbx
jmp 0x4240
jmp 0x421f
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x609e
leaq 0x28(%rsp), %rdi
callq 0x609e
movq 0x8(%rsp), %rdi
callq 0x60f0
movq 0x10(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x2160