// File: /workspace/github_cpp_makefile_star2_O3/shangjingbo1226[P]MACFP/src/methods/../utils/my_string.h
// Function: String::String(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
String(string s) : s(s) {
        vector<int> a;
        map<char, int> remap;
        vector<bool> occur(256, false);
        for (size_t i = 0; i < s.size(); ++ i) {
            occur[s[i] + 128] = true;
        }
        for (int ch = -128; ch < 128; ++ ch) {
            if (occur[ch + 128]) {
                int new_id = remap.size();
                remap[ch] = new_id;
            }
        }
        for (size_t i = 0; i < s.size(); ++ i) {
            a.push_back(remap[s[i]]);
        }
        sa = new SuffixArray(a);

        h = new ULL[s.size() + 1];
        pw = new ULL[s.size() + 1];
        h[0] = 0;
        pw[0] = 1;
        for (size_t i = 0; i < s.size(); ++ i) {
            h[i + 1] = h[i] * MAGIC + (a[i] + 1);
            pw[i + 1] = pw[i] * MAGIC;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x30(%rsp)
movq %rax, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x8028
xorl %eax, %eax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x70(%rsp), %rcx
movl $0x0, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0xe(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, 0x38(%rsp)
callq 0x61a6
cmpq $0x0, 0x8(%r14)
je 0x5ab1
movq (%r14), %rax
movq 0x40(%rsp), %rdx
xorl %esi, %esi
movzbl (%rax,%rsi), %ecx
movl %ecx, %edi
shrl $0x3, %edi
andl $-0x8, %edi
movl $0x1, %r8d
shlq %cl, %r8
xorl $0x10, %edi
orq %r8, (%rdx,%rdi)
incq %rsi
cmpq 0x8(%r14), %rsi
jb 0x5a8c
movq $-0x80, %rbp
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
leaq 0x3f(%r13), %rbx
leaq 0xe(%rsp), %r12
leaq 0x80(%rbp), %rax
movl %eax, %ecx
shrl $0x3, %ecx
andl $-0x8, %ecx
addq 0x40(%rsp), %rcx
andq %rbx, %rax
xorl %edx, %edx
cmpq %r13, %rax
setbe %dl
movq -0x8(%rcx,%rdx,8), %rax
btq %rbp, %rax
jae 0x5b12
movq 0x90(%rsp), %r15
movb %bpl, 0xe(%rsp)
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x620e
movl %r15d, (%rax)
incq %rbp
cmpq $0x80, %rbp
jne 0x5acb
cmpq $0x0, 0x8(%r14)
je 0x5b6e
xorl %ebx, %ebx
leaq 0x68(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r14), %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq 0x6274
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x5b5a
movl (%rax), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x5b65
movq %r12, %rdi
movq %rax, %rdx
callq 0x8a8e
incq %rbx
cmpq 0x8(%r14), %rbx
jb 0x5b31
movl $0xe8, %edi
movq 0x38(%rsp), %rbx
callq 0x21e0
movq %rax, %r15
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x62da
movq %r15, 0x20(%rbx)
movq 0x8(%r14), %r12
leaq 0x1(%r12), %rax
shrq $0x3d, %rax
leaq 0x8(,%r12,8), %rcx
xorl %r15d, %r15d
negq %rax
sbbq %r15, %r15
orq %rcx, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x28(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
movq $0x0, (%r14)
movq $0x1, (%rax)
testq %r12, %r12
je 0x5c1c
movl $0x1, %ecx
movq 0x10(%rsp), %rdx
xorl %esi, %esi
xorl %edi, %edi
imulq $0xabcdef, %rsi, %rsi   # imm = 0xABCDEF
movslq (%rdx,%rdi,4), %r8
addq %r8, %rsi
incq %rsi
movq %rsi, 0x8(%r14,%rdi,8)
imulq $0xabcdef, %rcx, %rcx   # imm = 0xABCDEF
movq %rcx, 0x8(%rax,%rdi,8)
leaq 0x1(%rdi), %r8
movq %r8, %rdi
cmpq %r8, %r12
jne 0x5bee
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5c33
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
leaq 0x68(%rsp), %rdi
callq 0x7fd8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5c54
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xe8, %esi
movq %r15, %rdi
callq 0x21f0
jmp 0x5c84
movq %rax, %r14
jmp 0x5caf
jmp 0x5c81
jmp 0x5c81
movq %rax, %r14
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5caf
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
xorl %eax, %eax
movq %rax, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movq %rax, 0x50(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x7fd8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5cd0
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x38(%rsp), %rax
movq (%rax), %rdi
cmpq 0x30(%rsp), %rdi
je 0x5cef
movq 0x30(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2330
nop