// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]runningmaxmin/./runningmaxmin.h
// Function: vanHerkGilWermanmaxmin::vanHerkGilWermanmaxmin(std::vector<double, std::allocator<double>>&, int)
vanHerkGilWermanmaxmin(std::vector<floattype> & array, int width)
        : maxvalues(array.size() - width + 1),
          minvalues(array.size() - width + 1) {
        std::vector<floattype> R(width);
        std::vector<floattype> S(width);
        for (uint j = 0; j < array.size() - width + 1; j += width) {
            uint Rpos = std::min(j + width - 1,
                                 static_cast<unsigned>(array.size() - 1));
            R[0] = array[Rpos];
            for (uint i = Rpos - 1; i + 1 > j; i -= 1)
                R[Rpos - i] = std::max(R[Rpos - i - 1], array[i]);
            S[0] = array[Rpos];
            uint m1 = std::min(j + 2 * width - 1,
                               static_cast<unsigned>(array.size()));
            for (uint i = Rpos + 1; i < m1; ++i) {
                S[i - Rpos] = std::max(S[i - Rpos - 1], array[i]);
            }
            for (uint i = 0; i < m1 - Rpos; i += 1)
                maxvalues[j + i] = std::max(S[i], R[(Rpos - j + 1) - i - 1]);
        }
        for (uint j = 0; j < array.size() - width + 1; j += width) {
            uint Rpos = std::min(j + width - 1,
                                 static_cast<unsigned>(array.size() - 1));
            R[0] = array[Rpos];
            for (uint i = Rpos - 1; i + 1 > j; i -= 1)
                R[Rpos - i] = std::min(R[Rpos - i - 1], array[i]);
            S[0] = array[Rpos];
            uint m1 = std::min(j + 2 * width - 1,
                               static_cast<unsigned>(array.size()));
            for (uint i = Rpos + 1; i < m1; ++i) {
                S[i - Rpos] = std::min(S[i - Rpos - 1], array[i]);
            }
            for (uint i = 0; i < m1 - Rpos; i += 1)
                minvalues[j + i] = std::min(S[i], R[(Rpos - j + 1) - i - 1]);
        }
        assert(maxvalues.size() == array.size() - width + 1);
        assert(minvalues.size() == array.size() - width + 1);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x61a3(%rip), %rax      # 0xace0
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x8(%rdi), %r15
movq 0x8(%rsi), %rsi
subq (%r13), %rsi
sarq $0x3, %rsi
movq %rdx, 0x10(%rsp)
movslq %edx, %rbp
subq %rbp, %rsi
incq %rsi
leaq 0x38(%rsp), %rdx
movq %r15, %rdi
callq 0x56be
movq 0x8(%r13), %rsi
subq (%r13), %rsi
leaq 0x20(%rbx), %r14
sarq $0x3, %rsi
subq %rbp, %rsi
incq %rsi
leaq 0x38(%rsp), %rdx
movq %r14, %rdi
callq 0x56be
leaq 0x38(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %rbp, %rsi
callq 0x56be
movq %rbx, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbp, %rsi
callq 0x56be
movq (%r13), %rcx
movq 0x8(%r13), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movq %rdx, 0x8(%rsp)
subq %rbp, %rdx
incq %rdx
je 0x4e56
movq %r14, 0x50(%rsp)
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r10d
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x10(%rsp), %rax
leal -0x1(%rax,%rax), %esi
movq %rsi, 0x20(%rsp)
movq (%r15), %r11
leal -0x1(%rax), %ebp
leaq 0x8(%r9), %rsi
movq %rsi, 0x18(%rsp)
movl %eax, %eax
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rdx, 0x30(%rsp)
movq %rbx, %r15
cmpl %r10d, %ebp
movl %r10d, %r12d
cmovbl %ebp, %r12d
movl %ebp, %eax
cmpq %r10, %rax
cmovaeq %r10, %rax
movq 0x28(%rsp), %rdx
addq %rdx, %rbx
leal -0x1(%rbx), %esi
cmpl %esi, %r10d
cmovbl %r10d, %esi
vmovsd (%rcx,%rsi,8), %xmm0
vmovsd %xmm0, (%r8)
cmpl %r15d, %esi
jbe 0x4c89
movl %r12d, %edi
subl %eax, %edi
leal -0x1(%rax), %edx
leaq (%rcx,%rdx,8), %r14
movl %edi, %edx
incl %edi
vmovsd (%r14), %xmm0
vmaxsd (%r8,%rdx,8), %xmm0, %xmm0
vmovsd %xmm0, (%r8,%rdi,8)
decl %eax
addq $-0x8, %r14
cmpl %r15d, %eax
ja 0x4c64
vmovsd (%rcx,%rsi,8), %xmm0
vmovsd %xmm0, (%r9)
movq 0x20(%rsp), %rax
addl %r15d, %eax
movq 0x8(%rsp), %rdx
cmpl %edx, %eax
cmovael %edx, %eax
leal 0x1(%rsi), %edx
cmpl %eax, %edx
jae 0x4cd2
leal 0x1(%r12), %edi
movl %eax, %r14d
vmovsd (%r9), %xmm0
movq 0x18(%rsp), %rdx
vmovsd (%rcx,%rdi,8), %xmm1
vmaxsd %xmm0, %xmm1, %xmm0
vmovsd %xmm0, (%rdx)
incq %rdi
addq $0x8, %rdx
cmpq %r14, %rdi
jb 0x4cb9
cmpl %esi, %eax
je 0x4d01
addl %r13d, %r12d
subl %esi, %eax
xorl %esi, %esi
leal (%r15,%rsi), %edx
movl %r12d, %edi
vmovsd (%r8,%rdi,8), %xmm0
vmaxsd (%r9,%rsi,8), %xmm0, %xmm0
vmovsd %xmm0, (%r11,%rdx,8)
incq %rsi
decl %r12d
cmpq %rax, %rsi
jb 0x4cdd
movl %ebx, %eax
movq 0x10(%rsp), %rdx
addl %edx, %ebp
subl %edx, %r13d
movq 0x30(%rsp), %rdx
cmpq %rax, %rdx
ja 0x4c21
testq %rdx, %rdx
movq 0x50(%rsp), %rsi
je 0x4e56
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r10d
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x10(%rsp), %rax
leal -0x1(%rax,%rax), %edx
movq %rdx, 0x20(%rsp)
movq (%rsi), %r11
leal -0x1(%rax), %ebp
leaq 0x8(%r9), %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r13, %rbx
cmpl %r10d, %ebp
movl %r10d, %r15d
cmovbl %ebp, %r15d
movl %ebp, %eax
cmpq %r10, %rax
cmovaeq %r10, %rax
movq 0x28(%rsp), %rdx
addq %rdx, %r13
leal -0x1(%r13), %esi
cmpl %esi, %r10d
cmovbl %r10d, %esi
vmovsd (%rcx,%rsi,8), %xmm0
vmovsd %xmm0, (%r8)
cmpl %ebx, %esi
jbe 0x4dc6
movl %r15d, %edi
subl %eax, %edi
leal -0x1(%rax), %edx
leaq (%rcx,%rdx,8), %r14
movl %edi, %edx
incl %edi
vmovsd (%r14), %xmm0
vminsd (%r8,%rdx,8), %xmm0, %xmm0
vmovsd %xmm0, (%r8,%rdi,8)
decl %eax
addq $-0x8, %r14
cmpl %ebx, %eax
ja 0x4da2
vmovsd (%rcx,%rsi,8), %xmm0
vmovsd %xmm0, (%r9)
movq 0x20(%rsp), %rax
addl %ebx, %eax
movq 0x8(%rsp), %rdx
cmpl %edx, %eax
cmovael %edx, %eax
leal 0x1(%rsi), %edx
cmpl %eax, %edx
jae 0x4e0d
leal 0x1(%r15), %edi
movl %eax, %r14d
vmovsd (%r9), %xmm0
movq 0x18(%rsp), %rdx
vmovsd (%rcx,%rdi,8), %xmm1
vminsd %xmm0, %xmm1, %xmm0
vmovsd %xmm0, (%rdx)
incq %rdi
addq $0x8, %rdx
cmpq %r14, %rdi
jb 0x4df4
cmpl %esi, %eax
je 0x4e3b
addl %r12d, %r15d
subl %esi, %eax
xorl %esi, %esi
leal (%rbx,%rsi), %edx
movl %r15d, %edi
vmovsd (%r8,%rdi,8), %xmm0
vminsd (%r9,%rsi,8), %xmm0, %xmm0
vmovsd %xmm0, (%r11,%rdx,8)
incq %rsi
decl %r15d
cmpq %rax, %rsi
jb 0x4e18
movl %r13d, %eax
movq 0x10(%rsp), %rdx
addl %edx, %ebp
subl %edx, %r12d
movq 0x30(%rsp), %rdx
cmpq %rax, %rdx
ja 0x4d5f
movq 0x58(%rsp), %rcx
movq 0x10(%rcx), %rax
subq 0x8(%rcx), %rax
sarq $0x3, %rax
cmpq %rdx, %rax
jne 0x4eaa
movq 0x28(%rcx), %rax
subq 0x20(%rcx), %rax
sarq $0x3, %rax
cmpq %rdx, %rax
jne 0x4ec9
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x4e8c
callq 0x20e0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4e9b
callq 0x20e0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32b6(%rip), %rdi      # 0x8167
leaq 0x32dc(%rip), %rsi      # 0x8194
leaq 0x32e7(%rip), %rcx      # 0x81a6
movl $0xf7, %edx
callq 0x20a0
leaq 0x3324(%rip), %rdi      # 0x81f4
leaq 0x32bd(%rip), %rsi      # 0x8194
leaq 0x32c8(%rip), %rcx      # 0x81a6
movl $0xf8, %edx
callq 0x20a0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4eff
callq 0x20e0
jmp 0x4eff
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4f11
callq 0x20e0
jmp 0x4f11
movq %rax, %rbx
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4f1e
callq 0x20e0
movq %rbx, %rdi
callq 0x2190