// File: /workspace/github_cpp_makefile_star2_O3/wx-csy[P]librmq/./librmq/block.h
// Function: librmq::rmq_block<int>::rmq_block(unsigned long, int const*)
rmq_block(size_t n, const T *data) :
            n(n), data(data) {
        nr_blocks = (n + BLOCKSZ - 1) / BLOCKSZ;
        size_t *segdata = new size_t[nr_blocks];
        pref = new size_t[nr_blocks * BLOCKSZ]; 
        suf = new size_t[nr_blocks * BLOCKSZ];
        size_t ptr = 0;
        for (size_t si = 0; ptr + BLOCKSZ <= n; ptr += BLOCKSZ, si++) {
            segdata[si] = std::min_element(data + ptr, data + ptr + BLOCKSZ) - data;
            init_block(data + ptr, si);
        }
        if (ptr != n) {
            T rdata[BLOCKSZ] = {0};
            for (size_t i = 0; ptr + i < n; i++) rdata[i] = data[ptr + i];
            segdata[nr_blocks - 1] = std::min_element(data + ptr, data + n) - data;
            init_block(rdata, nr_blocks - 1);
        }
        st.init(nr_blocks, data, segdata);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x10(%rdi)
addq $0x28, %rdi
movl $0x1f0, %edx            # imm = 0x1F0
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
callq 0x1080
leaq 0x3ff(%r13), %r12
movq %r12, %r15
shrq $0xa, %r15
movq %r15, 0x8(%rbx)
leaq (,%r15,8), %rdi
callq 0x1030
movq %rax, (%rsp)
shrq $0x3d, %r12
shlq $0xd, %r15
xorl %ebp, %ebp
negq %r12
sbbq %rbp, %rbp
orq %r15, %rbp
movq %rbp, %rdi
callq 0x1030
movq %rax, 0x18(%rbx)
movq %rbp, %rdi
callq 0x1030
movq %rax, 0x20(%rbx)
cmpq $0x400, %r13            # imm = 0x400
jae 0x305e
xorl %r15d, %r15d
jmp 0x30ca
leaq 0x4(%r14), %r12
movl $0x400, %eax            # imm = 0x400
xorl %ebp, %ebp
xorl %r15d, %r15d
leaq (%r14,%r15,4), %rsi
movq %rax, %r15
movl (%rsi), %ecx
xorl %edx, %edx
movq %rsi, %rax
leaq (%r12,%rdx), %rdi
movl (%r12,%rdx), %r8d
cmpl %ecx, %r8d
cmovll %r8d, %ecx
cmovlq %rdi, %rax
addq $0x4, %rdx
cmpq $0xffc, %rdx            # imm = 0xFFC
jne 0x307a
subq %r14, %rax
sarq $0x2, %rax
movq (%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x3332
incq %rbp
leaq 0x400(%r15), %rax
addq $0x1000, %r12           # imm = 0x1000
cmpq %r13, %rax
jbe 0x306c
cmpq %r15, %r13
je 0x315d
leaq 0x10(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x1080
movq %r13, %rdx
subq %r15, %rdx
jbe 0x30fe
leaq (%r14,%r15,4), %rsi
shlq $0x2, %rdx
leaq 0x10(%rsp), %rdi
callq 0x10a0
leaq (%r14,%r15,4), %rax
leaq (%r14,%r13,4), %rdx
leaq (%r14,%r15,4), %rcx
addq $0x4, %rcx
cmpq %rdx, %rcx
je 0x3139
movl (%rax), %edx
shlq $0x2, %r13
shlq $0x2, %r15
subq %r15, %r13
addq $-0x4, %r13
movl (%rcx), %esi
cmpl %edx, %esi
cmovll %esi, %edx
cmovlq %rcx, %rax
addq $0x4, %rcx
addq $-0x4, %r13
jne 0x3124
subq %r14, %rax
sarq $0x2, %rax
movq 0x8(%rbx), %rdx
movq (%rsp), %rcx
movq %rax, -0x8(%rcx,%rdx,8)
decq %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3332
movq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
movq (%rsp), %rcx
callq 0x2456
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3186
movq %rax, %r14
movq $-0x1e0, %r15           # imm = 0xFE20
movq 0x210(%rbx,%r15), %rdi
testq %rdi, %rdi
je 0x31a2
callq 0x10e0
addq $0x8, %r15
jne 0x3190
movq %r14, %rdi
callq 0x1110