// File: /workspace/github_cpp_makefile_star2_O1/bubiche[P]wu_manber/./wu_manber.hpp
// Function: wu_manber::WuManber<char, std::char_traits<char>>::preProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void preProcess(const std::vector<StringType> &patterns) {
      m_ = 0;
      for (const auto &pattern : patterns) {
        std::size_t patternLength = pattern.size();
        if (patternLength < B_) {
          if (patternLength == 1) {
            lengthOnePatterns_.push_back(pattern);
          } else if (patternLength == 2) {
            lengthTwoPatterns_.push_back(pattern);
          }
          continue;
        }
        m_ = (!m_) ? patternLength : std::min(patternLength, m_);
        patternList_.push_back(pattern);
      }
      k_ = patternList_.size();

      // fill default value for SHIFT table
      for (std::size_t i = 0; i < tableSize_; ++i) {
        shiftTable_[i] = m_ - B_ + 1;
      }

      // fill HASH/PREFIX and SHIFT tables
      for (std::size_t i = 0; i < k_; ++i) {
        for (std::size_t j = m_; j >= B_; --j) {
          unsigned int hashValue = getWuManberTableHashFromText_(patternList_[i], j - 1);

          std::size_t shiftLength = m_ - j;
          shiftTable_[hashValue] = std::min(shiftTable_[hashValue], shiftLength);
          if (!shiftLength) {
            PatternHash patternHashToAdd;
            patternHashToAdd.idx = i;

            // calculate this prefixHash to help us skip some patterns if there are collisions in hashPrefixTable_
            patternHashToAdd.prefixHash = getPrefixHashFromText_(patternList_[i], 0);
            hashPrefixTable_[hashValue].push_back(patternHashToAdd);
          }
        }
      }

      isShortPatternExist_ = (lengthOnePatterns_.size() > 0) || (lengthTwoPatterns_.size() > 0);
      if (isShortPatternExist_) {
        lengthOnePatternLookup_.resize(alphabetSize_);
        lengthTwoPatternLookup_.resize(alphabetSize_);
        for (std::size_t i = 0; i < alphabetSize_; ++i) {
          lengthOnePatternLookup_[i] = -1;
          lengthTwoPatternLookup_[i].resize(alphabetSize_);
          for (std::size_t j = 0; j < alphabetSize_; ++j) {
            lengthTwoPatternLookup_[i][j] = -1;
          }
        }

        for (std::size_t i = 0; i < lengthOnePatterns_.size(); ++i) {
          lengthOnePatternLookup_[static_cast<std::size_t>(lengthOnePatterns_[i][0])] = i;
        }

        for (std::size_t i = 0; i < lengthTwoPatterns_.size(); ++i) {
          lengthTwoPatternLookup_[static_cast<std::size_t>(lengthTwoPatterns_[i][0])][static_cast<std::size_t>(lengthTwoPatterns_[i][1])] = i;
        }
      }

      isInitialized_ = true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x2916
leaq 0x58(%rbx), %r12
leaq 0xc8(%rbx), %r13
leaq 0xb0(%rbx), %rbp
movq 0x8(%r14), %rax
cmpq $0x2, %rax
ja 0x28e9
movq %rbp, %rdi
cmpq $0x1, %rax
je 0x2905
movq %r13, %rdi
cmpq $0x2, %rax
je 0x2905
jmp 0x290d
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
movq %rax, %rdx
cmovbq %rcx, %rdx
testq %rcx, %rcx
cmoveq %rax, %rdx
movq %rdx, 0x8(%rbx)
movq %r12, %rdi
movq %r14, %rsi
callq 0x3646
addq $0x20, %r14
cmpq %r15, %r14
jne 0x28cb
movq 0x60(%rbx), %rax
subq 0x58(%rbx), %rax
sarq $0x5, %rax
movq %rax, 0x10(%rbx)
cmpq $0x0, 0x20(%rbx)
je 0x2948
movq 0x28(%rbx), %rax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
addq $-0x2, %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq 0x20(%rbx), %rcx
jb 0x2933
cmpq $0x0, 0x10(%rbx)
je 0x2a26
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x8(%rbx), %r12
cmpq $0x3, %r12
jb 0x2a19
movq %r12, %r13
negq %r13
movq %r15, %rbp
shlq $0x5, %rbp
movq 0x58(%rbx), %rsi
movq (%rsi,%rbp), %rax
movsbl -0x1(%r12,%rax), %edx
movzwl 0x18(%rbx), %ecx
shll %cl, %edx
movsbl -0x2(%r12,%rax), %edi
addl %edx, %edi
shll %cl, %edi
movsbl -0x3(%r12,%rax), %eax
addl %edi, %eax
xorl %edx, %edx
divq 0x20(%rbx)
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rdi
leaq (%rax,%r13), %r8
movq (%rdi,%rdx,8), %r9
cmpq %r9, %r8
cmovbq %r8, %r9
movq %r9, (%rdi,%rdx,8)
cmpq %rax, %r12
jne 0x2a09
addq %rbp, %rsi
movq %r15, 0x10(%rsp)
movq (%rsi), %rax
movsbl (%rax), %esi
shll %cl, %esi
movsbl 0x1(%rax), %eax
addl %esi, %eax
movl %eax, 0x8(%rsp)
movq 0x40(%rbx), %rax
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2a01
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x2a09
movq %r14, %rdx
callq 0x38e8
decq %r12
incq %r13
cmpq $0x2, %r12
ja 0x2976
incq %r15
cmpq 0x10(%rbx), %r15
jb 0x295b
movq 0xb8(%rbx), %rax
cmpq 0xb0(%rbx), %rax
je 0x2a3c
movb $0x1, 0x70(%rbx)
jmp 0x2a54
movq 0xd0(%rbx), %rax
cmpq 0xc8(%rbx), %rax
setne 0x70(%rbx)
je 0x2b5c
leaq 0x80(%rbx), %r15
movq 0x78(%rbx), %rsi
movq %r15, %rdi
callq 0x2f46
leaq 0x98(%rbx), %r14
movq 0x78(%rbx), %rsi
movq %r14, %rdi
callq 0x3684
cmpq $0x0, 0x78(%rbx)
je 0x2ad9
xorl %r12d, %r12d
movq 0x80(%rbx), %rax
movq $-0x1, (%rax,%r12,8)
leaq (%r12,%r12,2), %r13
leaq (,%r13,8), %rdi
addq 0x98(%rbx), %rdi
movq 0x78(%rbx), %rsi
callq 0x2f46
cmpq $0x0, 0x78(%rbx)
je 0x2ad0
movq (%r14), %rax
movq (%rax,%r13,8), %rax
xorl %ecx, %ecx
movq $-0x1, (%rax,%rcx,8)
incq %rcx
cmpq 0x78(%rbx), %rcx
jb 0x2abf
incq %r12
cmpq 0x78(%rbx), %r12
jb 0x2a84
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
je 0x2b14
sarq $0x5, %rcx
movq (%r15), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movq (%rax), %rdi
movsbq (%rdi), %rdi
movq %rsi, (%rdx,%rdi,8)
incq %rsi
addq $0x20, %rax
cmpq %rsi, %rcx
jne 0x2afd
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
subq %rax, %rcx
je 0x2b5c
sarq $0x5, %rcx
movq (%r14), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movq (%rax), %rdi
movsbq (%rdi), %r8
leaq (%r8,%r8,2), %r8
movsbq 0x1(%rdi), %rdi
movq (%rdx,%r8,8), %r8
movq %rsi, (%r8,%rdi,8)
incq %rsi
addq $0x20, %rax
cmpq %rsi, %rcx
jne 0x2b38
movb $0x1, 0xe0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq