// File: /workspace/github_cpp_makefile_star2_O1/ikatanic[P]lcskpp/./utils.h
// Function: calc_matches(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>*)
void calc_matches(const string& a, const string& b, int k,
                 vector<pair<int, int>>* matches) {
  // First, remap characters to interval [0, sigma>,
  // where sigma is alphabet size.
  vector<int> map(256, -1);
  int sigma = 0;
  int n = a.size();
  int m = b.size();
  for (int i = 0; i < n; ++i) {
    if (map[(uint8_t)a[i]] == -1) {
      map[(uint8_t)a[i]] = sigma++;
    }
  }
  for (int i = 0; i < m; ++i) {
    if (map[(uint8_t)b[i]] == -1) {
      map[(uint8_t)b[i]] = sigma++;
    }
  }
  // sigma_to_k is number of possible k length strings
  uint64_t sigma_to_k;
  if (!power_fits_in_63bits(sigma, k, &sigma_to_k)) {
    fprintf(stderr, "This implementation works only when sigma^k < 2^63.");
    return;
  }
  // increase sigma_to_k to the next power of two, for cheaper mod operation
  sigma_to_k = next_pw2(sigma_to_k);
  uint64_t mod_mask = sigma_to_k - 1;


  // Now to find actual pairs, we use perfect hash-table if sigma_to_k is small
  // enough, and otherwise:
  //   a) throw k-length substrings hashes from both string, into 16 buckets,
  //      based on first 4 bits of the hash.
  //   b) radix sort each bucket
  //   c) find consecutive hashes of the same value and save pairs of hashes
  //      from different strings.

  if (sigma_to_k <= (1 << 20) && sigma_to_k <= 4 * (n + m)) {
    // for each value of hash build a linked list containing such substrings
    // from the second string
    vector<int> last(sigma_to_k, -1);
    vector<int> prev(m);
    uint64_t current_hash = 0;
    for (int i = 0; i < m; ++i) {
      current_hash = (current_hash * sigma + map[(uint8_t)b[i]]) & mod_mask;
      if (i >= k-1) {
        prev[i] = last[current_hash];
        last[current_hash] = i;
      }
    }

    // now for each substring of the first string, fetch equal substrings from
    // the linked list
    current_hash = 0;
    for (int i = 0; i < n; ++i) {
      current_hash = (current_hash * sigma + map[(uint8_t)a[i]]) & mod_mask;
      if (i >= k-1) {
        int sz = matches->size();
        for (int j = last[current_hash]; j != -1; j = prev[j]) {
          matches->push_back({i, j});
        }
        reverse(matches->begin() + sz, matches->end());
      }
    }
  } else {
    // Now we need to store pairs (hash, position in string), if both things
    // can fit into single 64-bit integer, we do so. Otherwise we use std::pair.

    uint64_t _tmp;
    if (product_fits_in_63bits(sigma_to_k, n + m, &_tmp)) {
      const int P = 16; // number of buckets
      vector<uint64_t> hashes[P];
      for (int p = 0; p < P; ++p) {
        hashes[p].reserve((n + m) / P);
      }

      // we use bitwise shifting instead of div/mul by sigma_to_k
      int shift = log2(sigma_to_k);

      uint64_t current_hash = 0;
      for (int i = 0; i < n; ++i) {
        current_hash = (current_hash * sigma + map[(uint8_t)a[i]]) & mod_mask;
        if (i >= k-1) hashes[current_hash%P].push_back((i*1LLU << shift) + current_hash/P);
      }

      current_hash = 0;
      for (int i = 0; i < m; ++i) {
        current_hash = (current_hash * sigma + map[(uint8_t)b[i]]) & mod_mask;
        if (i >= k-1) hashes[current_hash%P].push_back(((n + i)*1LLU << shift) + current_hash/P);
      }

      for (int p = 0; p < P; ++p) {
        radix_sort(hashes[p], sigma_to_k / P);

        int sz = hashes[p].size();
        for (int i = 0, j = 0; i < sz; i = j) {
          for (j = i + 1; j < sz &&
            (hashes[p][j] & mod_mask) == (hashes[p][i] & mod_mask); ++j);

          if (j - i > 1) {
            int s = i;
            while (s < j && (hashes[p][s] >> shift) < n) ++s;

            for (int k1 = i; k1 < s; ++k1) {
              for (int k2 = s; k2 < j; ++k2) {
                matches->push_back({hashes[p][k1] >> shift, (hashes[p][k2] >> shift) - n});
              }
            }
          }
        }
      }
    } else {
      const int P = 16;
      vector<pair<uint64_t, int>> hashes[P];
      for (int p = 0; p < P; ++p) {
        hashes[p].reserve((n + m) / P);
      }

      uint64_t current_hash = 0;
      for (int i = 0; i < n; ++i) {
        current_hash = (current_hash * sigma + map[(uint8_t)a[i]]) & mod_mask;
        if (i >= k-1) hashes[current_hash%P].push_back({current_hash / P, i});
      }

      current_hash = 0;

      for (int i = 0; i < m; ++i) {
        current_hash = (current_hash * sigma + map[(uint8_t)b[i]]) & mod_mask;
        if (i >= k-1) hashes[current_hash%P].push_back({current_hash / P, (n + i)});
      }

      for (int p = 0; p < P; ++p) {
        radix_sort(hashes[p], sigma_to_k / P);

        int sz = hashes[p].size();
        for (int i = 0, j = 0; i < sz; i = j) {
          int s = 0;
          for (j = i+1; j < sz && hashes[p][j].first == hashes[p][i].first; ++j);

          if (j - i > 1) {
            int s = i;
            while (s < j && hashes[p][s].second < n) ++s;

            for (int k1 = i; k1 < s; ++k1) {
              for (int k2 = s; k2 < j; ++k2) {
                matches->push_back({hashes[p][k1].second, hashes[p][k2].second - n});
              }
            }
          }
        }
      }
    }


    // Now we have to sort matching pairs. If there is small number of pairs
    // sort them using std::sort, otherwise use the pigeonhole sort:
    if (matches->size() * log2(matches->size()) < 3 * n) {
      sort(matches->begin(), matches->end());
    } else {
      vector<int> pos(n+1, 0);
      vector<pair<int, int>> tmp(matches->size());
      for (auto& p : *matches) pos[p.first + 1]++;
      for (int i = 0; i < n; ++i)
        pos[i+1] += pos[i];
      for (auto& p : *matches) tmp[ pos[p.first]++ ] = p;
      matches->swap(tmp);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rcx, 0x8(%rsp)
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r14
movl $0x400, %edi            # imm = 0x400
callq 0x2150
movq %rax, %rbx
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
movl $0xff, %esi
callq 0x20c0
movq 0x8(%r14), %rdx
movq %r15, 0x40(%rsp)
movq 0x8(%r15), %r8
testl %edx, %edx
movq %rdx, 0x18(%rsp)
jle 0x2839
movq (%r14), %rcx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
movzbl (%rcx,%rsi), %edi
cmpl $-0x1, (%rbx,%rdi,4)
jne 0x282f
movl %eax, (%rbx,%rdi,4)
incl %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x2820
jmp 0x283b
xorl %eax, %eax
testl %r8d, %r8d
jle 0x286a
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
movl %r8d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
movzbl (%rcx,%rsi), %edi
cmpl $-0x1, (%rbx,%rdi,4)
jne 0x2862
movl %eax, (%rbx,%rdi,4)
incl %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x2853
movslq %eax, %r15
movl $0x1, %ecx
testl %r13d, %r13d
sete %sil
je 0x28aa
xorl %esi, %esi
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %r15
testl %r15d, %r15d
js 0x28aa
movslq %r13d, %rdx
decq %rdx
imulq %r15, %rcx
subq $0x1, %rdx
setb %sil
jb 0x28aa
cmpq %rcx, %rax
jae 0x2897
testb %sil, %sil
je 0x336a
movq %r14, (%rsp)
movq %r8, 0x10(%rsp)
movl $0x1, %eax
movq %rax, %r14
addq %rax, %rax
cmpq %rcx, %r14
jb 0x28c1
leaq -0x1(%r14), %rax
movq %rax, 0x50(%rsp)
cmpq $0x100000, %r14         # imm = 0x100000
movq %rbx, 0x58(%rsp)
ja 0x28fd
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
addl %ecx, %eax
shll $0x2, %eax
cltq
cmpq %rax, %r14
jbe 0x3181
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
leal (%rsi,%rdi), %eax
movslq %eax, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rcx
leal (%rsi,%rdi), %edx
addl $0xf, %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x4, %edx
movslq %edx, %rbp
cmpq %r14, %rax
movq %r14, 0x68(%rsp)
movq %r13, 0x48(%rsp)
leaq 0x90(%rsp), %rdi
jae 0x2c85
xorl %ebx, %ebx
movl $0x180, %edx            # imm = 0x180
xorl %esi, %esi
callq 0x20c0
leaq (%rsp,%rbx), %rdi
addq $0x90, %rdi
movq %rbp, %rsi
callq 0x3eb6
addq $0x18, %rbx
cmpq $0x180, %rbx            # imm = 0x180
jne 0x2956
movq %r15, %rbp
cmpl $0x0, 0x18(%rsp)
jle 0x2a1a
movq 0x48(%rsp), %rax
decl %eax
movslq %eax, %rbx
movq 0x18(%rsp), %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
leaq 0x20(%rsp), %r14
xorl %r13d, %r13d
imulq %rbp, %r13
movq (%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r12), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %r13
andq 0x50(%rsp), %r13
cmpq %rbx, %r12
jl 0x2a12
movl %r13d, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %r13, %rax
shrq $0x4, %rax
movq %rax, 0x20(%rsp)
movl %r12d, 0x28(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2a0a
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x2a12
movq %r14, %rdx
callq 0x42ea
incq %r12
cmpq %r12, %r15
jne 0x29a5
movq 0x10(%rsp), %r14
testl %r14d, %r14d
jle 0x2ac4
movq %rbp, %r13
movq 0x48(%rsp), %rax
decl %eax
movslq %eax, %rbx
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
leaq 0x20(%rsp), %rbp
xorl %r12d, %r12d
imulq %r13, %r12
movq 0x40(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r15), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %r12
andq 0x50(%rsp), %r12
cmpq %rbx, %r15
jl 0x2abc
movl %r12d, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %r12, %rax
shrq $0x4, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
addl %r15d, %eax
movl %eax, 0x28(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2ab4
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x2abc
movq %rbp, %rdx
callq 0x42ea
incq %r15
cmpq %r15, %r14
jne 0x2a47
movq 0x68(%rsp), %rsi
shrq $0x4, %rsi
xorl %eax, %eax
movq %rsi, 0x68(%rsp)
movq %rax, 0x48(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r13
addq $0x90, %r13
movq %r13, %rdi
callq 0x2499
movq 0x8(%r13), %rcx
subq (%r13), %rcx
shrq $0x4, %rcx
testl %ecx, %ecx
jle 0x2c48
movl %ecx, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq %rcx, 0x70(%rsp)
movq %r10, 0x50(%rsp)
movl %ebp, %eax
movslq %ebp, %r15
leal 0x1(%r15), %edx
cmpl %ecx, %edx
cmovlel %ecx, %edx
leal -0x1(%rdx), %ecx
movq %rcx, (%rsp)
leaq 0x1(%r15), %rsi
movq %r15, %rcx
shlq $0x4, %rcx
leaq 0x10(%rcx), %rdi
cmpq %r10, %rsi
jge 0x2b63
movq (%r13), %r8
movq (%r8,%rdi), %r9
incl %ebp
incq %rsi
addq $0x10, %rdi
cmpq (%r8,%rcx), %r9
je 0x2b3e
leal -0x1(%rbp), %edx
movq %rdx, (%rsp)
jmp 0x2b65
movl %edx, %ebp
movl %ebp, %edx
subl %eax, %edx
cmpl $0x2, %edx
movq 0x8(%rsp), %rdi
jl 0x2c36
movl %eax, %ebx
cmpl (%rsp), %eax
jg 0x2ba6
movq (%r13), %rsi
movq (%rsp), %rdx
incl %edx
addq %rsi, %rcx
addq $0x8, %rcx
movl %eax, %ebx
movq 0x18(%rsp), %rsi
cmpl %esi, (%rcx)
jge 0x2ba6
incl %ebx
addq $0x10, %rcx
cmpl %ebx, %edx
jne 0x2b96
movl %edx, %ebx
cmpl %ebx, %eax
jge 0x2c36
movslq %ebx, %rax
shlq $0x4, %rax
orq $0x8, %rax
movq %rax, 0x40(%rsp)
movq (%rsp), %rax
subl %ebx, %eax
incl %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %r14d
movq 0x40(%rsp), %r12
cmpl (%rsp), %ebx
jg 0x2c2e
movq (%r13), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movl (%rax,%r12), %edx
subl 0x18(%rsp), %edx
movl 0x8(%rax,%rcx), %eax
movl %eax, 0x20(%rsp)
movl %edx, 0x24(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2c11
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x2c25
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x4092
movq 0x8(%rsp), %rdi
addq $0x10, %r12
decl %r14d
jne 0x2bd9
incq %r15
cmpl %r15d, %ebx
jne 0x2bca
movq 0x70(%rsp), %rcx
cmpl %ecx, %ebp
movq 0x50(%rsp), %r10
jl 0x2b1a
movq 0x48(%rsp), %rax
incq %rax
cmpq $0x10, %rax
movq 0x68(%rsp), %rsi
jne 0x2ad4
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x2c76
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x2c64
jmp 0x3013
xorl %ebx, %ebx
movl $0x180, %edx            # imm = 0x180
xorl %esi, %esi
callq 0x20c0
leaq (%rsp,%rbx), %rdi
addq $0x90, %rdi
movq %rbp, %rsi
callq 0x3e28
addq $0x18, %rbx
cmpq $0x180, %rbx            # imm = 0x180
jne 0x2c93
movq %r15, %rbx
movq %r14, %rdi
callq 0x2489
movl %eax, %ebp
cmpl $0x0, 0x18(%rsp)
movq 0x50(%rsp), %r14
jle 0x2d6b
movq 0x48(%rsp), %rax
decl %eax
cltq
movq %rax, 0x70(%rsp)
movq 0x18(%rsp), %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %r12d, %r12d
imulq %rbx, %r12
movq (%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r13), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %r12
andq %r14, %r12
cmpq 0x70(%rsp), %r13
jl 0x2d63
movl %r12d, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
movq %r13, %rdx
movl %ebp, %ecx
shlq %cl, %rdx
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %r12, %rax
shrq $0x4, %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2d59
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2d63
leaq 0x20(%rsp), %rdx
callq 0x41d0
incq %r13
cmpq %r13, %r15
jne 0x2cf0
cmpl $0x0, 0x10(%rsp)
jle 0x2e23
movq 0x48(%rsp), %rax
decl %eax
movslq 0x18(%rsp), %rcx
movq %rcx, (%rsp)
movslq %eax, %r15
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
imulq %rbx, %r12
movq 0x40(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r13), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %r12
andq %r14, %r12
cmpq %r15, %r13
jl 0x2e15
movl %r12d, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
movq (%rsp), %rcx
leaq (%rcx,%r13), %rdx
movl %ebp, %ecx
shlq %cl, %rdx
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %r12, %rax
shrq $0x4, %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2e0b
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2e15
leaq 0x20(%rsp), %rdx
callq 0x41d0
incq %r13
cmpq %r13, 0x10(%rsp)
jne 0x2d9e
movq 0x68(%rsp), %rsi
shrq $0x4, %rsi
movslq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
xorl %eax, %eax
movq %rsi, 0x68(%rsp)
movq %rax, 0x78(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r13
addq $0x90, %r13
movq %r13, %rdi
callq 0x262b
movq 0x8(%r13), %rdx
subq (%r13), %rdx
shrq $0x3, %rdx
testl %edx, %edx
movq 0x8(%rsp), %rdi
jle 0x2fdb
movl %edx, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq %rdx, 0x48(%rsp)
movq %r8, 0x88(%rsp)
movl %r12d, %eax
movslq %r12d, %r15
leal 0x1(%r15), %ecx
cmpl %edx, %ecx
cmovlel %edx, %ecx
leal -0x1(%rcx), %edx
movq %rdx, (%rsp)
leaq 0x1(%r15), %rdx
cmpq %r8, %rdx
jge 0x2ed5
movq (%r13), %rsi
movq (%rsi,%r15,8), %rdi
xorq (%rsi,%rdx,8), %rdi
incl %r12d
incq %rdx
testq %r14, %rdi
movq 0x8(%rsp), %rdi
je 0x2ea9
leal -0x1(%r12), %ecx
movq %rcx, (%rsp)
jmp 0x2ed8
movl %ecx, %r12d
movl %r12d, %ecx
subl %eax, %ecx
cmpl $0x2, %ecx
jl 0x2fc0
movl %eax, %r9d
cmpl (%rsp), %eax
jg 0x2f2d
movq (%rsp), %rcx
leal 0x1(%rcx), %edx
leaq (,%r15,8), %rsi
addq (%r13), %rsi
movl %eax, %r9d
movq 0x80(%rsp), %r8
movq (%rsi), %rdi
movl %ebp, %ecx
shrq %cl, %rdi
cmpq %r8, %rdi
jae 0x2f28
incl %r9d
addq $0x8, %rsi
cmpl %r9d, %edx
jne 0x2f0c
movl %edx, %r9d
movq 0x8(%rsp), %rdi
cmpl %r9d, %eax
jge 0x2fc0
movslq %r9d, %rax
movq %rax, 0x40(%rsp)
movq (%rsp), %rax
subl %r9d, %eax
incl %eax
movl %eax, 0x10(%rsp)
movl %r9d, 0x70(%rsp)
movl 0x10(%rsp), %ebx
movq 0x40(%rsp), %r14
cmpl (%rsp), %r9d
jg 0x2fb3
movq (%r13), %rax
movq (%rax,%r15,8), %rdx
movl %ebp, %ecx
shrq %cl, %rdx
movq (%rax,%r14,8), %rax
shrq %cl, %rax
subl 0x18(%rsp), %eax
movl %edx, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2f98
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x2fac
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x4092
movq 0x8(%rsp), %rdi
incq %r14
decl %ebx
jne 0x2f5f
incq %r15
movl 0x70(%rsp), %r9d
cmpl %r15d, %r9d
jne 0x2f50
movq 0x48(%rsp), %rdx
cmpl %edx, %r12d
movq 0x50(%rsp), %r14
movq 0x88(%rsp), %r8
jl 0x2e8f
movq 0x78(%rsp), %rax
incq %rax
cmpq $0x10, %rax
movq 0x68(%rsp), %rsi
jne 0x2e40
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x3009
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x2ff7
movq 0x8(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r15
movq %r15, %r13
subq %r12, %r13
sarq $0x3, %r13
movq %r13, %rdi
callq 0x2489
cltq
imulq %r13, %rax
movq 0x18(%rsp), %r14
movq %r14, %rcx
shlq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
sarq $0x20, %rcx
cmpq %rcx, %rax
movq 0x58(%rsp), %rbx
jae 0x3086
cmpq %r15, %r12
je 0x3350
bsrq %r13, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4405
movq %r12, %rdi
movq %r15, %rsi
callq 0x44b8
jmp 0x3350
leal 0x1(%r14), %eax
movslq %eax, %rsi
leaq 0x20(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rcx
callq 0x3c2a
movq %r14, %r15
movq 0x8(%rsp), %r14
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x3f52
movq (%r14), %rdi
movq 0x8(%r14), %rax
cmpq %rax, %rdi
je 0x30f3
movq 0x90(%rsp), %rcx
movq %rdi, %rdx
movslq (%rdx), %rsi
incl 0x4(%rcx,%rsi,4)
addq $0x8, %rdx
cmpq %rax, %rdx
jne 0x30e3
testl %r15d, %r15d
jle 0x311f
movq 0x90(%rsp), %rcx
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl (%rcx), %edx
xorl %esi, %esi
addl 0x4(%rcx,%rsi,4), %edx
movl %edx, 0x4(%rcx,%rsi,4)
leaq 0x1(%rsi), %r8
movq %r8, %rsi
cmpq %r8, %r15
jne 0x310b
cmpq %rax, %rdi
je 0x3153
movq 0x90(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq %rdi, %rsi
movslq (%rsi), %r8
movslq (%rcx,%r8,4), %r9
leal 0x1(%r9), %r10d
movl %r10d, (%rcx,%r8,4)
movq (%rsi), %r8
movq %r8, (%rdx,%r9,8)
addq $0x8, %rsi
cmpq %rax, %rsi
jne 0x3134
movq 0x8(%rsp), %rsi
movq 0x10(%rsi), %rcx
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsi)
movq 0x30(%rsp), %rdx
movq %rdx, 0x10(%rsi)
movq %rdi, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
jmp 0x3334
leaq 0x20(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rcx
movq %r14, %rsi
callq 0x3c2a
movq 0x10(%rsp), %r14
movslq %r14d, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x3d9e
movq 0x50(%rsp), %r10
testl %r14d, %r14d
jle 0x3216
movq 0x40(%rsp), %rax
movq (%rax), %rax
leal -0x1(%r13), %esi
movq 0x90(%rsp), %rcx
movq 0x20(%rsp), %rdx
movslq %esi, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %edi, %edi
xorl %r8d, %r8d
imulq %r15, %r8
movzbl (%rax,%rdi), %r9d
movslq (%rbx,%r9,4), %r9
addq %r9, %r8
andq %r10, %r8
cmpq %rsi, %rdi
jl 0x320e
movl (%rcx,%r8,4), %r9d
movl %r9d, (%rdx,%rdi,4)
movl %edi, (%rcx,%r8,4)
incq %rdi
cmpq %rdi, %r14
jne 0x31ea
movq %r15, 0x40(%rsp)
movq 0x18(%rsp), %r12
testl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
jle 0x332f
decl %r13d
movslq %r13d, %r9
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
leaq 0x60(%rsp), %r13
xorl %r15d, %r15d
movq %r9, 0x10(%rsp)
imulq 0x40(%rsp), %r15
movq (%rsi), %rax
movzbl (%rax,%rbp), %eax
movslq (%rbx,%rax,4), %rax
addq %rax, %r15
andq %r10, %r15
cmpq %r9, %rbp
jl 0x331e
movq 0x8(%rdi), %rbx
subq (%rdi), %rbx
movq 0x90(%rsp), %rax
movl (%rax,%r15,4), %r14d
cmpl $-0x1, %r14d
je 0x32c9
movl %ebp, 0x60(%rsp)
movl %r14d, 0x64(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x32a9
movq 0x60(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x32bb
movq 0x8(%rsp), %rdi
movq %r13, %rdx
callq 0x4092
movq 0x8(%rsp), %rdi
movslq %r14d, %rax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
jmp 0x3281
movq 0x8(%rdi), %rax
shlq $0x1d, %rbx
sarq $0x1d, %rbx
addq (%rdi), %rbx
cmpq %rax, %rbx
setne %cl
addq $-0x8, %rax
cmpq %rbx, %rax
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
movq 0x50(%rsp), %r10
movq (%rsp), %rsi
movq 0x10(%rsp), %r9
jne 0x331e
movl (%rbx), %ecx
movl (%rax), %edx
movl %edx, (%rbx)
movl %ecx, (%rax)
movl 0x4(%rbx), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%rbx)
movl %ecx, 0x4(%rax)
addq $0x8, %rbx
addq $-0x8, %rax
cmpq %rax, %rbx
jb 0x32fd
incq %rbp
cmpq %r12, %rbp
movq 0x58(%rsp), %rbx
jne 0x324e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x333e
callq 0x2130
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3350
callq 0x2130
movq %rbx, %rdi
callq 0x2130
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2260
jmp 0x3350
jmp 0x3375
jmp 0x337c
movq %rax, %r14
jmp 0x33a6
jmp 0x337c
movq %rax, %r14
jmp 0x3404
jmp 0x33ba
jmp 0x33e0
jmp 0x33ba
jmp 0x33e0
jmp 0x33ba
jmp 0x33e0
jmp 0x33ba
jmp 0x33e0
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x33a6
callq 0x2130
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3404
callq 0x2130
jmp 0x3404
movq %rax, %r14
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x33d4
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x33c2
jmp 0x3404
movq %rax, %r14
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x33fa
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x33e8
movq 0x58(%rsp), %rdi
callq 0x2130
movq %r14, %rdi
callq 0x2200