// File: /workspace/github_cpp_makefile_star2_O3/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, 0x18(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r13
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(%r13), %r8
movq %r14, 0x20(%rsp)
movq 0x8(%r14), %r15
testl %r8d, %r8d
jle 0x283b
movq (%r13), %rcx
movl %r8d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
movzbl (%rcx,%rsi), %edi
cmpl $-0x1, (%rbx,%rdi,4)
jne 0x2831
movl %eax, (%rbx,%rdi,4)
incl %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x2822
jmp 0x283d
xorl %eax, %eax
testl %r15d, %r15d
jle 0x286c
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movl %r15d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
movzbl (%rcx,%rsi), %edi
cmpl $-0x1, (%rbx,%rdi,4)
jne 0x2864
movl %eax, (%rbx,%rdi,4)
incl %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x2855
movq %r8, 0x10(%rsp)
movslq %eax, %r12
movl $0x1, %ecx
movl $0x1, %edx
testl %ebp, %ebp
je 0x28ab
movslq %ebp, %rsi
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %r12
movl $0x1, %edx
cmpq %rdx, %rax
jb 0x334e
imulq %r12, %rdx
decq %rsi
jne 0x2899
movq %rcx, %r14
addq %rcx, %rcx
cmpq %rdx, %r14
jb 0x28ab
leaq -0x1(%r14), %rax
movq %rax, 0x50(%rsp)
movq 0x10(%rsp), %rax
leal (%r15,%rax), %ecx
cmpq $0x100000, %r14         # imm = 0x100000
movq %rbx, 0x58(%rsp)
movq %r13, 0x8(%rsp)
ja 0x28ed
leal (,%rcx,4), %eax
cltq
cmpq %rax, %r14
jbe 0x3161
movq %rbp, 0x48(%rsp)
movq %r15, 0x40(%rsp)
movslq %ecx, %rsi
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rsi
leal 0xf(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x4, %edx
movslq %edx, %rbp
leaq 0x90(%rsp), %rdi
xorl %ebx, %ebx
movl $0x180, %edx            # imm = 0x180
xorl %esi, %esi
cmpq %r14, %rax
jae 0x2c66
callq 0x20c0
leaq (%rsp,%rbx), %rdi
addq $0x90, %rdi
movq %rbp, %rsi
callq 0x3e8a
addq $0x18, %rbx
cmpq $0x180, %rbx            # imm = 0x180
jne 0x2936
cmpl $0x0, 0x10(%rsp)
jle 0x29f3
movq 0x48(%rsp), %rax
decl %eax
movslq %eax, %rbx
movq 0x10(%rsp), %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %ebp, %ebp
imulq %r12, %rbp
movq 0x8(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r13), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %rbp
andq 0x50(%rsp), %rbp
cmpq %rbx, %r13
jl 0x29eb
movl %ebp, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %rbp, %rax
shrq $0x4, %rax
movq %rax, 0x28(%rsp)
movl %r13d, 0x30(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x29e1
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x29eb
leaq 0x28(%rsp), %rdx
callq 0x42c2
incq %r13
cmpq %r13, %r15
jne 0x297c
cmpl $0x0, 0x40(%rsp)
jle 0x2aa1
movq 0x48(%rsp), %rax
decl %eax
movslq %eax, %rbx
movq 0x40(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x40(%rsp)
xorl %r15d, %r15d
leaq 0x28(%rsp), %rbp
xorl %r13d, %r13d
imulq %r12, %r13
movq 0x20(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r15), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %r13
andq 0x50(%rsp), %r13
cmpq %rbx, %r15
jl 0x2a97
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, 0x28(%rsp)
movq 0x10(%rsp), %rax
addl %r15d, %eax
movl %eax, 0x30(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2a8f
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x2a97
movq %rbp, %rdx
callq 0x42c2
incq %r15
cmpq %r15, 0x40(%rsp)
jne 0x2a22
movq %r14, %rsi
shrq $0x4, %rsi
xorl %eax, %eax
movq %rsi, 0x70(%rsp)
movq %rax, 0x48(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r13
addq $0x90, %r13
movq %r13, %rdi
callq 0x248f
movq 0x8(%r13), %rcx
subq (%r13), %rcx
shrq $0x4, %rcx
testl %ecx, %ecx
jle 0x2c29
movl %ecx, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq %rcx, 0x60(%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, 0x8(%rsp)
leaq 0x1(%r15), %rsi
movq %r15, %rcx
shlq $0x4, %rcx
leaq 0x10(%rcx), %rdi
cmpq %r10, %rsi
jge 0x2b40
movq (%r13), %r8
movq (%r8,%rdi), %r9
incl %ebp
incq %rsi
addq $0x10, %rdi
cmpq (%r8,%rcx), %r9
je 0x2b1a
leal -0x1(%rbp), %edx
movq %rdx, 0x8(%rsp)
jmp 0x2b42
movl %edx, %ebp
movl %ebp, %edx
subl %eax, %edx
cmpl $0x2, %edx
movq 0x18(%rsp), %rdi
jl 0x2c17
movl %eax, %ebx
cmpl 0x8(%rsp), %eax
jg 0x2b85
movq (%r13), %rsi
movq 0x8(%rsp), %rdx
incl %edx
addq %rsi, %rcx
addq $0x8, %rcx
movl %eax, %ebx
movq 0x10(%rsp), %rsi
cmpl %esi, (%rcx)
jge 0x2b85
incl %ebx
addq $0x10, %rcx
cmpl %ebx, %edx
jne 0x2b75
movl %edx, %ebx
cmpl %ebx, %eax
jge 0x2c17
movslq %ebx, %rax
shlq $0x4, %rax
orq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
subl %ebx, %eax
incl %eax
movl %eax, 0x40(%rsp)
movl 0x40(%rsp), %r14d
movq 0x20(%rsp), %r12
cmpl 0x8(%rsp), %ebx
jg 0x2c0f
movq (%r13), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movl (%rax,%r12), %edx
subl 0x10(%rsp), %edx
movl 0x8(%rax,%rcx), %eax
movl %eax, 0x28(%rsp)
movl %edx, 0x2c(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2bf2
movq 0x28(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x2c06
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x406a
movq 0x18(%rsp), %rdi
addq $0x10, %r12
decl %r14d
jne 0x2bba
incq %r15
cmpl %r15d, %ebx
jne 0x2baa
movq 0x60(%rsp), %rcx
cmpl %ecx, %ebp
movq 0x50(%rsp), %r10
jl 0x2af5
movq 0x48(%rsp), %rax
incq %rax
cmpq $0x10, %rax
movq 0x70(%rsp), %rsi
jne 0x2aaf
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x2c57
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x2c45
jmp 0x2ff6
callq 0x20c0
leaq (%rsp,%rbx), %rdi
addq $0x90, %rdi
movq %rbp, %rsi
callq 0x3df8
addq $0x18, %rbx
cmpq $0x180, %rbx            # imm = 0x180
jne 0x2c6b
bsrq %r14, %rax
xorl %ecx, %ecx
movq %r14, 0x70(%rsp)
cmpq $0x2, %r14
cmovbl %ecx, %eax
movl %eax, %ebp
cmpl $0x0, 0x10(%rsp)
movq 0x50(%rsp), %r14
jle 0x2d49
movq 0x48(%rsp), %rax
decl %eax
cltq
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %ebx, %ebx
imulq %r12, %rbx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r13), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %rbx
andq %r14, %rbx
cmpq 0x60(%rsp), %r13
jl 0x2d41
movl %ebx, %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 %rbx, %rax
shrq $0x4, %rax
addq %rdx, %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2d37
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2d41
leaq 0x28(%rsp), %rdx
callq 0x41a8
incq %r13
cmpq %r13, %r15
jne 0x2cce
movq 0x40(%rsp), %r15
testl %r15d, %r15d
jle 0x2e00
movq 0x48(%rsp), %rax
decl %eax
movslq 0x10(%rsp), %rcx
movq %rcx, 0x60(%rsp)
cltq
movq %rax, 0x8(%rsp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %ebx, %ebx
imulq %r12, %rbx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r13), %eax
movq 0x58(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
addq %rax, %rbx
andq %r14, %rbx
cmpq 0x8(%rsp), %r13
jl 0x2df4
movl %ebx, %eax
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
movq 0x60(%rsp), %rcx
leaq (%rcx,%r13), %rdx
movl %ebp, %ecx
shlq %cl, %rdx
leaq (%rsp,%rax,8), %rdi
addq $0x90, %rdi
movq %rbx, %rax
shrq $0x4, %rax
addq %rdx, %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2dea
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2df4
leaq 0x28(%rsp), %rdx
callq 0x41a8
incq %r13
cmpq %r13, %r15
jne 0x2d7b
movq 0x70(%rsp), %rsi
shrq $0x4, %rsi
movslq 0x10(%rsp), %rax
movq %rax, 0x80(%rsp)
xorl %eax, %eax
movq %rsi, 0x70(%rsp)
movq %rax, 0x78(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r13
addq $0x90, %r13
movq %r13, %rdi
callq 0x2619
movq 0x8(%r13), %rdx
subq (%r13), %rdx
shrq $0x3, %rdx
testl %edx, %edx
movq 0x18(%rsp), %rdi
jle 0x2fbe
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, 0x8(%rsp)
leaq 0x1(%r15), %rdx
cmpq %r8, %rdx
jge 0x2eb4
movq (%r13), %rsi
movq (%rsi,%r15,8), %rdi
xorq (%rsi,%rdx,8), %rdi
incl %r12d
incq %rdx
testq %r14, %rdi
movq 0x18(%rsp), %rdi
je 0x2e87
leal -0x1(%r12), %ecx
movq %rcx, 0x8(%rsp)
jmp 0x2eb7
movl %ecx, %r12d
movl %r12d, %ecx
subl %eax, %ecx
cmpl $0x2, %ecx
jl 0x2fa3
movl %eax, %r9d
cmpl 0x8(%rsp), %eax
jg 0x2f0e
movq 0x8(%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 0x2f09
incl %r9d
addq $0x8, %rsi
cmpl %r9d, %edx
jne 0x2eed
movl %edx, %r9d
movq 0x18(%rsp), %rdi
cmpl %r9d, %eax
jge 0x2fa3
movslq %r9d, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
subl %r9d, %eax
incl %eax
movl %eax, 0x40(%rsp)
movl %r9d, 0x60(%rsp)
movl 0x40(%rsp), %ebx
movq 0x20(%rsp), %r14
cmpl 0x8(%rsp), %r9d
jg 0x2f96
movq (%r13), %rax
movq (%rax,%r15,8), %rdx
movl %ebp, %ecx
shrq %cl, %rdx
movq (%rax,%r14,8), %rax
shrq %cl, %rax
subl 0x10(%rsp), %eax
movl %edx, 0x28(%rsp)
movl %eax, 0x2c(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2f7b
movq 0x28(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x2f8f
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x406a
movq 0x18(%rsp), %rdi
incq %r14
decl %ebx
jne 0x2f42
incq %r15
movl 0x60(%rsp), %r9d
cmpl %r15d, %r9d
jne 0x2f32
movq 0x48(%rsp), %rdx
cmpl %edx, %r12d
movq 0x50(%rsp), %r14
movq 0x88(%rsp), %r8
jl 0x2e6c
movq 0x78(%rsp), %rax
incq %rax
cmpq $0x10, %rax
movq 0x70(%rsp), %rsi
jne 0x2e1d
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x2fec
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x2fda
movq 0x18(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r15
movq %r15, %rax
subq %r12, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl %ecx, %ecx
cmpq $0x2, %rax
cmovaeq %rdx, %rcx
imulq %rax, %rcx
movq 0x10(%rsp), %r14
movq %r14, %rax
shlq $0x20, %rax
leaq (%rax,%rax,2), %rax
sarq $0x20, %rax
cmpq %rax, %rcx
movq 0x58(%rsp), %rbx
jae 0x306b
cmpq %r15, %r12
je 0x3334
xorq $0x3f, %rdx
addq %rdx, %rdx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x43dd
movq %r12, %rdi
movq %r15, %rsi
callq 0x4490
jmp 0x3334
leal 0x1(%r14), %eax
movslq %eax, %rsi
leaq 0x28(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x68(%rsp), %rcx
callq 0x3bf0
movq %r14, %r15
movq 0x18(%rsp), %r14
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x3f26
movq (%r14), %rdi
movq 0x8(%r14), %rax
cmpq %rax, %rdi
je 0x30d8
movq 0x90(%rsp), %rcx
movq %rdi, %rdx
movslq (%rdx), %rsi
incl 0x4(%rcx,%rsi,4)
addq $0x8, %rdx
cmpq %rax, %rdx
jne 0x30c8
testl %r15d, %r15d
jle 0x3104
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 0x30f0
movq 0x28(%rsp), %rcx
cmpq %rax, %rdi
je 0x3138
movq 0x90(%rsp), %rdx
movq %rdi, %rsi
movslq (%rsi), %r8
movslq (%rdx,%r8,4), %r9
leal 0x1(%r9), %r10d
movl %r10d, (%rdx,%r8,4)
movq (%rsi), %r8
movq %r8, (%rcx,%r9,8)
addq $0x8, %rsi
cmpq %rax, %rsi
jne 0x3119
movq 0x18(%rsp), %rsi
movq 0x10(%rsi), %rdx
movq %rcx, (%rsi)
movups 0x30(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
movq %rdi, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0x3318
leaq 0x28(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x90(%rsp), %rdi
leaq 0x68(%rsp), %rcx
movq %r14, %rsi
callq 0x3bf0
movslq %r15d, %rsi
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x3d6c
movq 0x50(%rsp), %r10
testl %r15d, %r15d
jle 0x31f0
movq 0x20(%rsp), %rax
movq (%rax), %rax
leal -0x1(%rbp), %esi
movq 0x90(%rsp), %rcx
movq 0x28(%rsp), %rdx
movslq %esi, %rsi
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %edi, %edi
xorl %r8d, %r8d
imulq %r12, %r8
movzbl (%rax,%rdi), %r9d
movslq (%rbx,%r9,4), %r9
addq %r9, %r8
andq %r10, %r8
cmpq %rsi, %rdi
jl 0x31e8
movl (%rcx,%r8,4), %r9d
movl %r9d, (%rdx,%rdi,4)
movl %edi, (%rcx,%r8,4)
incq %rdi
cmpq %rdi, %r15
jne 0x31c4
cmpl $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
jle 0x3313
decl %ebp
movslq %ebp, %rsi
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %rsi, 0x20(%rsp)
imulq %r12, %r15
movq (%r13), %rax
movzbl (%rax,%rbp), %eax
movslq (%rbx,%rax,4), %rax
addq %rax, %r15
andq %r10, %r15
cmpq %rsi, %rbp
jl 0x3300
movq (%rdi), %r13
movq 0x8(%rdi), %rbx
movq 0x90(%rsp), %rax
movl (%rax,%r15,4), %r14d
movq %rbx, %rax
movq %r13, %rcx
cmpl $-0x1, %r14d
je 0x32ab
movl %ebp, 0x68(%rsp)
movl %r14d, 0x6c(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x327e
movq 0x68(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x3292
movq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x406a
movq 0x18(%rsp), %rdi
movslq %r14d, %rax
movq 0x28(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
cmpl $-0x1, %r14d
jne 0x325c
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %r13, %rbx
shlq $0x1d, %rbx
sarq $0x1d, %rbx
addq %rcx, %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 0x8(%rsp), %r13
movq 0x20(%rsp), %rsi
jne 0x3300
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 0x32df
incq %rbp
cmpq 0x10(%rsp), %rbp
movq 0x58(%rsp), %rbx
jne 0x321e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3322
callq 0x2130
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3334
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 0x3334
jmp 0x3359
jmp 0x3360
movq %rax, %r14
jmp 0x338a
jmp 0x3360
movq %rax, %r14
jmp 0x33e8
jmp 0x339e
jmp 0x33c4
jmp 0x339e
jmp 0x33c4
jmp 0x339e
jmp 0x33c4
jmp 0x339e
jmp 0x33c4
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x338a
callq 0x2130
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x33e8
callq 0x2130
jmp 0x33e8
movq %rax, %r14
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x33b8
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x33a6
jmp 0x33e8
movq %rax, %r14
movl $0x168, %ebx            # imm = 0x168
movq 0x90(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x33de
callq 0x2130
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x33cc
movq 0x58(%rsp), %rdi
callq 0x2130
movq %r14, %rdi
callq 0x2200