// File: wx-csy[P]librmq/./librmq/block.h
// Function: librmq::rmq_block<int>::init_block(int const*, unsigned long)
void init_block(const T *data, size_t si) {
        size_t ptr = si * BLOCKSZ;
        for (int i = 0; i < BLOCKSZ; i++) {
            if (i) {
                pref[ptr + i] = data[i] < data[pref[ptr + i - 1]] ? 
                    i : pref[ptr + i - 1];
            } else {
                pref[ptr + i] = i;
            }
        }
        for (int i = BLOCKSZ - 1; i >= 0; i--) {
            if (i == BLOCKSZ - 1) {
                suf[ptr + i] = i;
            } else {
                suf[ptr + i] = data[i] < data[suf[ptr + i + 1]] ?
                    i : suf[ptr + i + 1];
            }
        }
        for (int i = 0; i < BLOCKSZ; i++) pref[ptr + i] += ptr;
        for (int i = 0; i < BLOCKSZ; i++) suf[ptr + i] += ptr;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x38(%rsp)
movq -0x18(%rsp), %rax
shlq $0xa, %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x24(%rsp)
movslq -0x24(%rsp), %rax
cmpq $0x400, %rax            # imm = 0x400
jae 0x4931
cmpl $0x0, -0x24(%rsp)
je 0x4900
movq -0x38(%rsp), %rdx
movq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq 0x18(%rdx), %rdx
movq -0x20(%rsp), %rsi
movslq -0x24(%rsp), %rdi
addq %rdi, %rsi
subq $0x1, %rsi
movq (%rdx,%rsi,8), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x48bc
movslq -0x24(%rsp), %rax
movq %rax, -0x40(%rsp)
jmp 0x48df
movq -0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x24(%rsp), %rdx
addq %rdx, %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rsp)
movq -0x38(%rsp), %rax
movq -0x40(%rsp), %rdx
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x24(%rsp), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x491f
movq -0x38(%rsp), %rax
movslq -0x24(%rsp), %rdx
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x24(%rsp), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x4921
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x485f
movl $0x3ff, -0x28(%rsp)     # imm = 0x3FF
cmpl $0x0, -0x28(%rsp)
jl 0x4a01
movslq -0x28(%rsp), %rax
cmpq $0x3ff, %rax            # imm = 0x3FF
jne 0x4972
movq -0x38(%rsp), %rax
movslq -0x28(%rsp), %rdx
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x28(%rsp), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x49ef
movq -0x38(%rsp), %rdx
movq -0x10(%rsp), %rax
movslq -0x28(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq 0x20(%rdx), %rdx
movq -0x20(%rsp), %rsi
movslq -0x28(%rsp), %rdi
addq %rdi, %rsi
movq 0x8(%rdx,%rsi,8), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x49b0
movslq -0x28(%rsp), %rax
movq %rax, -0x48(%rsp)
jmp 0x49d0
movq -0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x28(%rsp), %rdx
addq %rdx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x48(%rsp)
movq -0x38(%rsp), %rax
movq -0x48(%rsp), %rdx
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x28(%rsp), %rsi
addq %rsi, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x49f1
movl -0x28(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rsp)
jmp 0x4939
movl $0x0, -0x2c(%rsp)
movslq -0x2c(%rsp), %rax
cmpq $0x400, %rax            # imm = 0x400
jae 0x4a46
movq -0x38(%rsp), %rax
movq -0x20(%rsp), %rdx
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x2c(%rsp), %rsi
addq %rsi, %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rsp)
jmp 0x4a09
movl $0x0, -0x30(%rsp)
movslq -0x30(%rsp), %rax
cmpq $0x400, %rax            # imm = 0x400
jae 0x4a8b
movq -0x38(%rsp), %rax
movq -0x20(%rsp), %rdx
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
movslq -0x30(%rsp), %rsi
addq %rsi, %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rsp)
jmp 0x4a4e
retq
nopl (%rax)