// File: /workspace/github_cpp_makefile_star2_O1/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 0x631f(%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 0x555c
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 0x555c
leaq 0x38(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %rbp, %rsi
callq 0x555c
movq %rbx, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbp, %rsi
callq 0x555c
movq (%r13), %rcx
movq 0x8(%r13), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
movq %rsi, 0x8(%rsp)
subq %rbp, %rsi
incq %rsi
je 0x4cd8
movq %r14, 0x50(%rsp)
movq 0x8(%rsp), %rax
decl %eax
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x10(%rsp), %rdx
leal -0x1(%rdx,%rdx), %edi
movq %rdi, 0x20(%rsp)
movq (%r15), %r11
leal -0x1(%rdx), %ebp
leaq 0x8(%r9), %rdi
movq %rdi, 0x18(%rsp)
movl %edx, %edx
movq %rdx, 0x28(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rsi, 0x30(%rsp)
movq %rbx, %r15
cmpl %eax, %ebp
movl %eax, %r12d
cmovbl %ebp, %r12d
movl %ebp, %esi
cmpq %rax, %rsi
cmovaeq %rax, %rsi
movq 0x28(%rsp), %rdx
addq %rdx, %rbx
leal -0x1(%rbx), %r10d
cmpl %r10d, %eax
cmovbl %eax, %r10d
vmovsd (%rcx,%r10,8), %xmm0
vmovsd %xmm0, (%r8)
cmpl %r15d, %r10d
jbe 0x4b07
movl %r12d, %edi
subl %esi, %edi
leal -0x1(%rsi), %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 %esi
addq $-0x8, %r14
cmpl %r15d, %esi
ja 0x4ae7
vmovsd (%rcx,%r10,8), %xmm0
vmovsd %xmm0, (%r9)
movq 0x20(%rsp), %rdx
leal (%rdx,%r15), %esi
movq 0x8(%rsp), %rdx
cmpl %edx, %esi
cmovael %edx, %esi
leal 0x1(%r10), %edx
cmpl %esi, %edx
jae 0x4b58
leal 0x1(%r12), %edi
movl %esi, %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 0x4b3f
cmpl %r10d, %esi
je 0x4b89
addl %r13d, %r12d
subl %r10d, %esi
xorl %edi, %edi
leal (%r15,%rdi), %edx
movl %r12d, %r10d
vmovsd (%r8,%r10,8), %xmm0
vmaxsd (%r9,%rdi,8), %xmm0, %xmm0
vmovsd %xmm0, (%r11,%rdx,8)
incq %rdi
decl %r12d
cmpq %rsi, %rdi
jb 0x4b65
movl %ebx, %edx
movq 0x10(%rsp), %rsi
addl %esi, %ebp
subl %esi, %r13d
movq 0x30(%rsp), %rsi
cmpq %rdx, %rsi
ja 0x4aa3
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r15d
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x10(%rsp), %rax
leal -0x1(%rax,%rax), %edx
movq %rdx, 0x20(%rsp)
movq 0x50(%rsp), %rdx
movq (%rdx), %r11
leal -0x1(%rax), %ebp
leaq 0x8(%r9), %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r13, %rbx
cmpl %r15d, %ebp
movl %r15d, %edi
cmovbl %ebp, %edi
movl %ebp, %esi
cmpq %r15, %rsi
cmovaeq %r15, %rsi
movq 0x28(%rsp), %rax
addq %rax, %r13
leal -0x1(%r13), %r10d
cmpl %r10d, %r15d
cmovbl %r15d, %r10d
vmovsd (%rcx,%r10,8), %xmm0
vmovsd %xmm0, (%r8)
cmpl %ebx, %r10d
jbe 0x4c40
movl %edi, %eax
subl %esi, %eax
leal -0x1(%rsi), %edx
leaq (%rcx,%rdx,8), %r14
movl %eax, %edx
incl %eax
vmovsd (%r14), %xmm0
vminsd (%r8,%rdx,8), %xmm0, %xmm0
vmovsd %xmm0, (%r8,%rax,8)
decl %esi
addq $-0x8, %r14
cmpl %ebx, %esi
ja 0x4c21
vmovsd (%rcx,%r10,8), %xmm0
vmovsd %xmm0, (%r9)
movq 0x20(%rsp), %rax
leal (%rax,%rbx), %esi
movq 0x8(%rsp), %rax
cmpl %eax, %esi
cmovael %eax, %esi
leal 0x1(%r10), %eax
cmpl %esi, %eax
jae 0x4c8e
leal 0x1(%rdi), %eax
movl %esi, %r14d
vmovsd (%r9), %xmm0
movq 0x18(%rsp), %rdx
vmovsd (%rcx,%rax,8), %xmm1
vminsd %xmm0, %xmm1, %xmm0
vmovsd %xmm0, (%rdx)
incq %rax
addq $0x8, %rdx
cmpq %r14, %rax
jb 0x4c75
cmpl %r10d, %esi
je 0x4cbd
addl %r12d, %edi
subl %r10d, %esi
xorl %eax, %eax
leal (%rbx,%rax), %edx
movl %edi, %r10d
vmovsd (%r8,%r10,8), %xmm0
vminsd (%r9,%rax,8), %xmm0, %xmm0
vmovsd %xmm0, (%r11,%rdx,8)
incq %rax
decl %edi
cmpq %rsi, %rax
jb 0x4c9b
movl %r13d, %eax
movq 0x10(%rsp), %rdx
addl %edx, %ebp
subl %edx, %r12d
movq 0x30(%rsp), %rsi
cmpq %rax, %rsi
ja 0x4bde
movq 0x58(%rsp), %rcx
movq 0x10(%rcx), %rax
subq 0x8(%rcx), %rax
sarq $0x3, %rax
cmpq %rsi, %rax
jne 0x4d2c
movq 0x28(%rcx), %rax
subq 0x20(%rcx), %rax
sarq $0x3, %rax
cmpq %rsi, %rax
jne 0x4d4b
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x4d0e
callq 0x20e0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4d1d
callq 0x20e0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3434(%rip), %rdi      # 0x8167
leaq 0x345a(%rip), %rsi      # 0x8194
leaq 0x3465(%rip), %rcx      # 0x81a6
movl $0xf7, %edx
callq 0x20a0
leaq 0x34a2(%rip), %rdi      # 0x81f4
leaq 0x343b(%rip), %rsi      # 0x8194
leaq 0x3446(%rip), %rcx      # 0x81a6
movl $0xf8, %edx
callq 0x20a0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4d81
callq 0x20e0
jmp 0x4d81
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4d93
callq 0x20e0
jmp 0x4d93
movq %rax, %rbx
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4da0
callq 0x20e0
movq %rbx, %rdi
callq 0x2190