// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x5704
leaq 0x28(%rbx), %r15
movl $0xc0, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2110
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rsi
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq %rcx, (%rbx)
movl $0x0, 0x8(%rbx)
testq %rcx, %rcx
jle 0x61ff
xorl %edx, %edx
movl (%rax,%rdx,4), %edi
leal 0x1(%rdi), %r8d
movl %r8d, (%rax,%rdx,4)
addl $0x2, %edi
movl 0x8(%rbx), %r8d
cmpl %edi, %r8d
cmovgl %r8d, %edi
movl %edi, 0x8(%rbx)
incq %rdx
cmpq %rdx, %rcx
jne 0x61db
leaq 0x40(%rbx), %r12
leaq 0x58(%rbx), %r13
leaq 0x70(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x88(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0xa0(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0xb8(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0xd0(%rbx), %rax
movq %rax, 0x30(%rsp)
movl $0x0, (%rsp)
cmpq 0x20(%rbx), %rsi
movq %r14, 0x28(%rsp)
je 0x6262
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rbx)
jmp 0x626d
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6ebc
movq (%rbx), %rax
incq %rax
movq %rax, (%rbx)
leaq (%rax,%rax,2), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq %r14, %rdi
callq 0x6936
movq (%rbx), %rax
leaq (%rax,%rax,2), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq %r15, %rdi
callq 0x6936
movq (%rbx), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq %r12, %rdi
callq 0x6936
movq (%rbx), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq %r13, %rdi
callq 0x6936
movq (%rbx), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq 0x20(%rsp), %rdi
callq 0x6936
movq (%rbx), %rsi
movq %rsp, %rdx
movl $0x0, (%rdx)
movq 0x18(%rsp), %rdi
callq 0x6936
movq 0x10(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movq %rbx, %rdi
callq 0x696a
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x631c
movq %rax, 0x48(%rbx)
movq 0x50(%rbx), %rax
cmpq 0x48(%rbx), %rax
je 0x632e
movq %r12, %rdi
callq 0x72f4
movq 0x58(%rbx), %rax
cmpq %rax, 0x60(%rbx)
je 0x633c
movq %rax, 0x60(%rbx)
movq 0x68(%rbx), %rax
cmpq 0x60(%rbx), %rax
je 0x634e
movq %r13, %rdi
callq 0x72f4
movq 0x70(%rbx), %rax
cmpq %rax, 0x78(%rbx)
je 0x635c
movq %rax, 0x78(%rbx)
movq 0x80(%rbx), %rax
cmpq 0x78(%rbx), %rax
je 0x6373
movq 0x20(%rsp), %rdi
callq 0x72f4
movq 0x88(%rbx), %rax
cmpq %rax, 0x90(%rbx)
je 0x638a
movq %rax, 0x90(%rbx)
movq 0x98(%rbx), %rax
cmpq 0x90(%rbx), %rax
je 0x63a4
movq 0x18(%rsp), %rdi
callq 0x72f4
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x6d70
movq 0x38(%rbx), %rax
cmpq 0x30(%rbx), %rax
je 0x63c1
movq %r15, %rdi
callq 0x72f4
movq (%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x6da2
movq (%rbx), %rsi
movq 0x10(%rsp), %rdi
callq 0x6da2
movq %r12, %r14
cmpq $0x0, (%rbx)
jle 0x6401
movq (%r15), %rax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
xorl %edx, %edx
movslq (%rax,%rdx,4), %rsi
movq %rdx, (%rcx,%rsi,8)
incq %rdx
cmpq (%rbx), %rdx
jl 0x63f1
movq (%rbx), %r10
testq %r10, %r10
jle 0x6479
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%r15), %rcx
movq 0x28(%rsp), %rdx
movq (%rdx), %rdx
movq 0x10(%rsp), %rsi
movq (%rsi), %rsi
xorl %r12d, %r12d
movq %rdx, %rdi
xorl %r9d, %r9d
movq (%rax,%r9,8), %r10
testq %r10, %r10
je 0x6466
movslq -0x4(%rcx,%r10,4), %r8
leaq (%rdx,%r8,4), %r11
cmpq $0x1, %r12
movl $0x1, %r8d
cmovbq %r12, %r8
notq %r8
addq %r12, %r8
movl 0x4(%rdi,%r8,4), %ebp
leaq 0x1(%r8), %r12
cmpl 0x4(%r11,%r8,4), %ebp
movq %r12, %r8
je 0x6453
incq %r9
movq %r12, (%rsi,%r10,8)
movq (%rbx), %r10
addq $0x4, %rdi
cmpq %r10, %r9
jl 0x642d
leaq 0x5(,%r10,2), %rsi
movq %rsp, %rdx
movq $0x0, (%rdx)
movq 0x30(%rsp), %rdi
callq 0x6dd4
movq (%rbx), %rdx
decq %rdx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %r12
callq 0x6e08
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x64c7
jmp 0x64ca
jmp 0x64c7
jmp 0x64c7
jmp 0x64c7
jmp 0x64c7
jmp 0x64c7
jmp 0x64c7
movq %r12, %r14
movq %rax, %r12
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x64e9
movq 0xe0(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6505
movq 0xc8(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6521
movq 0xb0(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x653d
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6559
movq 0x80(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq (%r13), %rdi
testq %rdi, %rdi
je 0x656e
movq 0x68(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6582
movq 0x50(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x6596
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x65af
movq 0x20(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %r12, %rdi
callq 0x2330
nop