// File: /workspace/github_cpp_makefile_star2_O2/shangjingbo1226[P]MACFP/src/methods/../utils/suffix_array.h
// Function: SuffixArray::SuffixArray(std::vector<int, std::allocator<int>> const&)
SuffixArray(const vector<int> &str) : s(str) {
        n = s.size();
        m = 0;
        for (int i = 0; i < n; ++ i) {
            ++ s[i];
            m = max(m, s[i] + 1);
        }
        s.push_back(0);
        ++ n;

        s.resize(n * 3, 0);
        sa.resize(n * 3, 0);
        wa.resize(n, 0);
        wb.resize(n, 0);
        wv.resize(n, 0);
        wss.resize(n, 0);

        dc3(&s[0], &sa[0], n, m);

        wa.clear(); wa.shrink_to_fit();
        wb.clear(); wb.shrink_to_fit();
        wv.clear(); wv.shrink_to_fit();
        wss.clear(); wss.shrink_to_fit();

        sa.resize(n); sa.shrink_to_fit();

        rank.resize(n);
        height.resize(n);
        for (long long i = 0; i < n; ++ i) {
            rank[sa[i]] = i;
        }
        for (long long i = 0, j, k = 0; i < n; height[rank[i ++]] = k) {
            if (rank[i] == 0) {
                continue;
            }
            for (k ? -- k : 0, j = sa[rank[i] - 1]; s[i + k] == s[j + k]; ++ k);
        }

        segment_tree.resize(n * 2 + 5, 0);
        build_tree(0, n - 1);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r13
leaq 0x10(%rdi), %r12
movq %r12, %rdi
callq 0x4a0c
leaq 0x28(%r13), %r14
leaq 0x40(%r13), %rbx
leaq 0x58(%r13), %rax
movq %rax, 0x30(%rsp)
leaq 0x70(%r13), %rax
movq %rax, 0x28(%rsp)
leaq 0x88(%r13), %rax
movq %rax, 0x20(%rsp)
leaq 0xa0(%r13), %rax
movq %rax, 0x10(%rsp)
leaq 0xb8(%r13), %rax
movq %rax, 0x18(%rsp)
leaq 0xd0(%r13), %rax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
movl $0xc0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq %rcx, (%r13)
andl $0x0, 0x8(%r13)
testq %rcx, %rcx
cmovleq %rbp, %rcx
cmpq %rbp, %rcx
je 0x5524
movl (%rax,%rbp,4), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rax,%rbp,4)
addl $0x2, %edx
movl 0x8(%r13), %esi
cmpl %edx, %esi
cmovgl %esi, %edx
movl %edx, 0x8(%r13)
incq %rbp
jmp 0x5501
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %r12, %rdi
movq %r12, 0x40(%rsp)
callq 0x60e2
movq (%r13), %rax
incq %rax
movq %rax, (%r13)
leaq (%rax,%rax,2), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq %r12, %rdi
callq 0x5c0a
imulq $0x3, (%r13), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq %r14, %rdi
callq 0x5c0a
movq (%r13), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq %rbx, %rdi
callq 0x5c0a
movq (%r13), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x30(%rsp), %rdi
callq 0x5c0a
movq (%r13), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x28(%rsp), %rdi
callq 0x5c0a
movq (%r13), %rsi
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x20(%rsp), %rdi
callq 0x5c0a
movq 0x10(%r13), %rsi
movq 0x28(%r13), %rdx
movq (%r13), %rcx
movl 0x8(%r13), %r8d
movq %r13, %rdi
callq 0x5c3e
movq 0x40(%r13), %rax
cmpq %rax, 0x48(%r13)
je 0x55e9
movq %rax, 0x48(%r13)
movq %rbx, %rdi
callq 0x659c
movq 0x58(%r13), %rax
cmpq %rax, 0x60(%r13)
je 0x55ff
movq %rax, 0x60(%r13)
movq 0x30(%rsp), %rdi
callq 0x659c
movq 0x70(%r13), %rax
cmpq %rax, 0x78(%r13)
je 0x5617
movq %rax, 0x78(%r13)
movq 0x28(%rsp), %rdi
callq 0x659c
movq 0x88(%r13), %rax
cmpq %rax, 0x90(%r13)
je 0x5638
movq %rax, 0x90(%r13)
movq 0x20(%rsp), %rdi
callq 0x659c
movq (%r13), %rsi
movq %r14, %rdi
callq 0x5f92
movq %r14, %rdi
callq 0x659c
movq (%r13), %rsi
movq 0x10(%rsp), %rdi
callq 0x5fc4
movq (%r13), %rsi
movq 0x18(%rsp), %rdi
callq 0x5fc4
movq (%r14), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
xorl %edx, %edx
movq (%r13), %r11
cmpq %r11, %rdx
jge 0x5695
movslq (%rax,%rdx,4), %rsi
movq %rdx, (%rcx,%rsi,8)
incq %rdx
jmp 0x567f
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%r14), %rcx
movq (%r12), %rdx
movq 0x18(%rsp), %rsi
movq (%rsi), %rsi
xorl %edi, %edi
pushq $0x1
popq %r8
movq %rdx, %r9
xorl %r12d, %r12d
cmpq %r11, %rdi
jge 0x5704
movq (%rax,%rdi,8), %r11
testq %r11, %r11
je 0x56f3
movslq -0x4(%rcx,%r11,4), %r10
leaq (%rdx,%r10,4), %rbp
cmpq $0x1, %r12
movq %r8, %r10
cmovbq %r12, %r10
notq %r10
addq %r12, %r10
movl 0x4(%r9,%r10,4), %r15d
leaq 0x1(%r10), %r12
cmpl 0x4(%rbp,%r10,4), %r15d
movq %r12, %r10
je 0x56e0
incq %rdi
movq %r12, (%rsi,%r11,8)
movq (%r13), %r11
addq $0x4, %r9
jmp 0x56b8
leaq 0x5(,%r11,2), %rsi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq 0x38(%rsp), %rdi
callq 0x5ff6
movq (%r13), %rdx
decq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x602a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x574f
jmp 0x574f
jmp 0x574f
jmp 0x574f
jmp 0x574f
jmp 0x574f
jmp 0x574f
jmp 0x574f
movq %rax, %r13
movq 0x38(%rsp), %rdi
callq 0x6bae
movq 0x18(%rsp), %rdi
callq 0x6bae
movq 0x10(%rsp), %rdi
callq 0x6bae
movq 0x20(%rsp), %rdi
callq 0x66a2
movq 0x28(%rsp), %rdi
callq 0x66a2
movq 0x30(%rsp), %rdi
callq 0x66a2
movq %rbx, %rdi
callq 0x66a2
movq %r14, %rdi
callq 0x66a2
movq 0x40(%rsp), %rdi
callq 0x66a2
movq %r13, %rdi
callq 0x2310