// File: /workspace/github_cpp_makefile_star2_O2/nilnilnil[P]autocomplete/./include/segtree.hpp
// Function: segtree::test()
int
    test() {
        vui_t v;
        v.push_back(45);
        v.push_back(4);
        v.push_back(5);
        v.push_back(2);
        v.push_back(99);
        v.push_back(41);
        v.push_back(45);
        v.push_back(45);
        v.push_back(51);
        v.push_back(89);
        v.push_back(1);
        v.push_back(3);
        v.push_back(5);
        v.push_back(98);

        for (int i = 0; i < 10; ++i) {
            // printf("%d: %d\n", i, log2(i));
        }

        SegmentTree st;
        st.initialize(v);

        for (size_t i = 0; i < v.size(); ++i) {
            for (size_t j = i; j < v.size(); ++j) {
                pui_t one = st.query_max(i, j);
                pui_t two = naive_query_max(v, i, j);
                printf("query_max(%u, %u) == (%u, %u)\n", (uint_t)i, (uint_t)j, one.first, two.first);
                assert(one.first == two.first);
            }
        }

        return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsp, %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x18(%rsp), %rsi
movl $0x2d, (%rsi)
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x4, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x5, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x2, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x63, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x29, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x2d, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x2d, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x33, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x59, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x1, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x3, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x5, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rsi
movl $0x62, (%rsi)
movq %rsp, %rdi
callq 0xb1d6
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x9486
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x94b8
movq %rsp, %rbx
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x18(%rsp), %r14
leaq 0xc2d9(%rip), %r15      # 0x1203e
xorl %r12d, %r12d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %r12
jae 0x5dd0
movq %r12, %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %r13
jae 0x5dcb
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x9512
movq %rax, %rbp
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x5be5
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0x5060
incq %r13
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
jmp 0x5d7a
incq %r12
jmp 0x5d68
leaq 0x18(%rsp), %rdi
callq 0x9f06
movq %rsp, %rdi
callq 0xb1a2
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5e16
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
jmp 0x5e11
movq %rax, %rbx
jmp 0x5e23
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x9f06
movq %rsp, %rdi
callq 0xb1a2
movq %rbx, %rdi
callq 0x58e0