// File: 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:
subq $0x748, %rsp            # imm = 0x748
movq %rdi, 0x740(%rsp)
movq %rsi, 0x738(%rsp)
movl %edx, 0x734(%rsp)
movq %rcx, 0x728(%rsp)
movl $0xffffffff, 0x70c(%rsp) # imm = 0xFFFFFFFF
leaq 0x70b(%rsp), %rdi
movq %rdi, 0x1b0(%rsp)
callq 0x59a0
movq 0x1b0(%rsp), %rcx
leaq 0x710(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
leaq 0x70c(%rsp), %rdx
callq 0x59b0
jmp 0x2bea
leaq 0x70b(%rsp), %rdi
callq 0x5a30
movl $0x0, 0x6f8(%rsp)
movq 0x740(%rsp), %rdi
callq 0x2120
movl %eax, 0x6f4(%rsp)
movq 0x738(%rsp), %rdi
callq 0x2120
movl %eax, 0x6f0(%rsp)
movl $0x0, 0x6ec(%rsp)
movl 0x6ec(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x2cfd
movq 0x740(%rsp), %rdi
movslq 0x6ec(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
cmpl $-0x1, (%rax)
jne 0x2ce5
movl 0x6f8(%rsp), %eax
movl %eax, 0x1ac(%rsp)
addl $0x1, %eax
movl %eax, 0x6f8(%rsp)
movq 0x740(%rsp), %rdi
movslq 0x6ec(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movl 0x1ac(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x2ce5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x70b(%rsp), %rdi
callq 0x5a30
jmp 0x450d
jmp 0x2ce7
movl 0x6ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6ec(%rsp)
jmp 0x2c35
movl $0x0, 0x6e8(%rsp)
movl 0x6e8(%rsp), %eax
cmpl 0x6f0(%rsp), %eax
jge 0x2da8
movq 0x738(%rsp), %rdi
movslq 0x6e8(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
cmpl $-0x1, (%rax)
jne 0x2d90
movl 0x6f8(%rsp), %eax
movl %eax, 0x1a8(%rsp)
addl $0x1, %eax
movl %eax, 0x6f8(%rsp)
movq 0x738(%rsp), %rdi
movslq 0x6e8(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movl 0x1a8(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x2d92
movl 0x6e8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6e8(%rsp)
jmp 0x2d08
movslq 0x6f8(%rsp), %rdi
movslq 0x734(%rsp), %rsi
leaq 0x6e0(%rsp), %rdx
callq 0x2480
testb $0x1, %al
jne 0x2df1
movq 0xf200(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0xa22a(%rip), %rsi      # 0xd004
movb $0x0, %al
callq 0x2200
movl $0x1, 0x6dc(%rsp)
jmp 0x44eb
movq 0x6e0(%rsp), %rdi
callq 0x24f0
movq %rax, 0x6e0(%rsp)
movq 0x6e0(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x6d0(%rsp)
cmpq $0x100000, 0x6e0(%rsp) # imm = 0x100000
ja 0x329b
movq 0x6e0(%rsp), %rax
movl 0x6f4(%rsp), %ecx
addl 0x6f0(%rsp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
ja 0x329b
movq 0x6e0(%rsp), %rax
movq %rax, 0x198(%rsp)
movl $0xffffffff, 0x6b4(%rsp) # imm = 0xFFFFFFFF
leaq 0x6b3(%rsp), %rdi
movq %rdi, 0x1a0(%rsp)
callq 0x59a0
movq 0x198(%rsp), %rsi
movq 0x1a0(%rsp), %rcx
leaq 0x6b8(%rsp), %rdi
leaq 0x6b4(%rsp), %rdx
callq 0x59b0
jmp 0x2ea8
leaq 0x6b3(%rsp), %rdi
callq 0x5a30
movslq 0x6f0(%rsp), %rax
movq %rax, 0x188(%rsp)
leaq 0x697(%rsp), %rdi
movq %rdi, 0x190(%rsp)
callq 0x59a0
movq 0x188(%rsp), %rsi
movq 0x190(%rsp), %rdx
leaq 0x698(%rsp), %rdi
callq 0x5a60
jmp 0x2ef9
leaq 0x697(%rsp), %rdi
callq 0x5a30
movq $0x0, 0x688(%rsp)
movl $0x0, 0x684(%rsp)
movl 0x684(%rsp), %eax
cmpl 0x6f0(%rsp), %eax
jge 0x307c
movq 0x688(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x180(%rsp)
movq 0x738(%rsp), %rdi
movslq 0x684(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0x180(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x688(%rsp)
movl 0x684(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x3064
movq 0x688(%rsp), %rsi
leaq 0x6b8(%rsp), %rdi
callq 0x5a40
movl (%rax), %eax
movl %eax, 0x178(%rsp)
movslq 0x684(%rsp), %rsi
leaq 0x698(%rsp), %rdi
callq 0x5a40
movl 0x178(%rsp), %ecx
movl %ecx, (%rax)
movl 0x684(%rsp), %eax
movl %eax, 0x17c(%rsp)
movq 0x688(%rsp), %rsi
leaq 0x6b8(%rsp), %rdi
callq 0x5a40
movl 0x17c(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x3064
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x6b3(%rsp), %rdi
callq 0x5a30
jmp 0x4500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x697(%rsp), %rdi
callq 0x5a30
jmp 0x3289
jmp 0x3066
movl 0x684(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x684(%rsp)
jmp 0x2f1d
movq $0x0, 0x688(%rsp)
movl $0x0, 0x680(%rsp)
movl 0x680(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x326a
movq 0x688(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x740(%rsp), %rdi
movslq 0x680(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0x170(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x688(%rsp)
movl 0x680(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x3252
movq 0x728(%rsp), %rdi
callq 0x5ae0
movl %eax, 0x67c(%rsp)
movq 0x688(%rsp), %rsi
leaq 0x6b8(%rsp), %rdi
callq 0x5a40
movl (%rax), %eax
movl %eax, 0x678(%rsp)
cmpl $-0x1, 0x678(%rsp)
je 0x31f2
movq 0x728(%rsp), %rax
movq %rax, 0x168(%rsp)
leaq 0x670(%rsp), %rdi
leaq 0x680(%rsp), %rsi
leaq 0x678(%rsp), %rdx
callq 0x5b30
jmp 0x3193
movq 0x168(%rsp), %rdi
leaq 0x670(%rsp), %rsi
callq 0x5b00
jmp 0x31aa
jmp 0x31ac
movslq 0x678(%rsp), %rsi
leaq 0x698(%rsp), %rdi
callq 0x5a40
movl (%rax), %eax
movl %eax, 0x678(%rsp)
jmp 0x3156
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x698(%rsp), %rdi
callq 0x5c40
jmp 0x3289
movq 0x728(%rsp), %rdi
callq 0x5ba0
movq %rax, 0x660(%rsp)
movslq 0x67c(%rsp), %rsi
leaq 0x660(%rsp), %rdi
callq 0x5bd0
movq %rax, 0x668(%rsp)
movq 0x728(%rsp), %rdi
callq 0x5c10
movq %rax, 0x658(%rsp)
movq 0x668(%rsp), %rdi
movq 0x658(%rsp), %rsi
callq 0x5b60
jmp 0x3250
jmp 0x3252
jmp 0x3254
movl 0x680(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x680(%rsp)
jmp 0x3093
leaq 0x698(%rsp), %rdi
callq 0x5c40
leaq 0x6b8(%rsp), %rdi
callq 0x5c40
jmp 0x44e0
leaq 0x6b8(%rsp), %rdi
callq 0x5c40
jmp 0x4500
movq 0x6e0(%rsp), %rdi
movl 0x6f4(%rsp), %eax
addl 0x6f0(%rsp), %eax
movslq %eax, %rsi
leaq 0x650(%rsp), %rdx
callq 0x2420
testb $0x1, %al
jne 0x32ca
jmp 0x3a1c
movl $0x10, 0x64c(%rsp)
leaq 0x4c0(%rsp), %rax
movq %rax, %rcx
addq $0x180, %rcx            # imm = 0x180
movq %rcx, 0x158(%rsp)
movq %rax, 0x160(%rsp)
movq 0x160(%rsp), %rdi
movq %rdi, 0x150(%rsp)
callq 0x5ca0
movq 0x150(%rsp), %rax
movq 0x158(%rsp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, 0x160(%rsp)
jne 0x32f7
movl $0x0, 0x4bc(%rsp)
cmpl $0x10, 0x4bc(%rsp)
jge 0x33d2
movslq 0x4bc(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movl 0x6f4(%rsp), %esi
movl 0x6f0(%rsp), %ecx
movl %esi, %eax
addl %ecx, %eax
movl %ecx, %edx
movl %esi, %ecx
leal 0xf(%rcx,%rdx), %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x4, %eax
movslq %eax, %rsi
callq 0x5cb0
jmp 0x3386
jmp 0x3388
movl 0x4bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4bc(%rsp)
jmp 0x3338
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x4c0(%rsp), %rax
movq %rax, 0x140(%rsp)
addq $0x180, %rax            # imm = 0x180
movq %rax, 0x148(%rsp)
jmp 0x39e1
movq 0x6e0(%rsp), %rdi
callq 0x2520
movl %eax, 0x13c(%rsp)
jmp 0x33e8
movl 0x13c(%rsp), %eax
movl %eax, 0x4b8(%rsp)
movq $0x0, 0x4b0(%rsp)
movl $0x0, 0x4ac(%rsp)
movl 0x4ac(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x350b
movq 0x4b0(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x130(%rsp)
movq 0x740(%rsp), %rdi
movslq 0x4ac(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0x130(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x4b0(%rsp)
movl 0x4ac(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x34f3
movq 0x4b0(%rsp), %rax
movq %rax, 0x128(%rsp)
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movslq 0x4ac(%rsp), %rax
movb 0x4b8(%rsp), %cl
shlq %cl, %rax
movq 0x128(%rsp), %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x4a0(%rsp)
leaq 0x4a0(%rsp), %rsi
callq 0x5dc0
jmp 0x34f1
jmp 0x34f3
jmp 0x34f5
movl 0x4ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ac(%rsp)
jmp 0x340d
movq $0x0, 0x4b0(%rsp)
movl $0x0, 0x49c(%rsp)
movl 0x49c(%rsp), %eax
cmpl 0x6f0(%rsp), %eax
jge 0x362a
movq 0x4b0(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x120(%rsp)
movq 0x738(%rsp), %rdi
movslq 0x49c(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0x120(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x4b0(%rsp)
movl 0x49c(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x3612
movq 0x4b0(%rsp), %rax
movq %rax, 0x118(%rsp)
andl $0xf, %eax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movl 0x6f4(%rsp), %eax
movl 0x49c(%rsp), %ecx
addl %ecx, %eax
cltq
movb 0x4b8(%rsp), %cl
shlq %cl, %rax
movq 0x118(%rsp), %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x490(%rsp)
leaq 0x490(%rsp), %rsi
callq 0x5dc0
jmp 0x3610
jmp 0x3612
jmp 0x3614
movl 0x49c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x49c(%rsp)
jmp 0x3522
movl $0x0, 0x48c(%rsp)
cmpl $0x10, 0x48c(%rsp)
jge 0x3988
movslq 0x48c(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movq 0x6e0(%rsp), %rsi
shrq $0x4, %rsi
callq 0x2850
jmp 0x366a
movslq 0x48c(%rsp), %rax
leaq 0x4c0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x56f0
movl %eax, 0x488(%rsp)
movl $0x0, 0x484(%rsp)
movl $0x0, 0x480(%rsp)
movl 0x484(%rsp), %eax
cmpl 0x488(%rsp), %eax
jge 0x3970
movl 0x484(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x480(%rsp)
movl 0x480(%rsp), %ecx
xorl %eax, %eax
cmpl 0x488(%rsp), %ecx
movb %al, 0x117(%rsp)
jge 0x375f
movslq 0x48c(%rsp), %rax
leaq 0x4c0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x480(%rsp), %rsi
callq 0x58c0
movq (%rax), %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x108(%rsp)
movslq 0x48c(%rsp), %rax
leaq 0x4c0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x484(%rsp), %rsi
callq 0x58c0
movq %rax, %rcx
movq 0x108(%rsp), %rax
movq (%rcx), %rcx
andq 0x6d0(%rsp), %rcx
cmpq %rcx, %rax
sete %al
movb %al, 0x117(%rsp)
movb 0x117(%rsp), %al
testb $0x1, %al
jne 0x376c
jmp 0x3784
jmp 0x376e
movl 0x480(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x480(%rsp)
jmp 0x36c8
movl 0x480(%rsp), %eax
subl 0x484(%rsp), %eax
cmpl $0x1, %eax
jle 0x395b
movl 0x484(%rsp), %eax
movl %eax, 0x47c(%rsp)
movl 0x47c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x480(%rsp), %ecx
movb %al, 0x107(%rsp)
jge 0x3808
movslq 0x48c(%rsp), %rax
leaq 0x4c0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x47c(%rsp), %rsi
callq 0x58c0
movq (%rax), %rax
movl 0x4b8(%rsp), %ecx
shrq %cl, %rax
movslq 0x6f4(%rsp), %rcx
cmpq %rcx, %rax
setb %al
movb %al, 0x107(%rsp)
movb 0x107(%rsp), %al
testb $0x1, %al
jne 0x3815
jmp 0x3828
movl 0x47c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x47c(%rsp)
jmp 0x37a9
movl 0x484(%rsp), %eax
movl %eax, 0x478(%rsp)
movl 0x478(%rsp), %eax
cmpl 0x47c(%rsp), %eax
jge 0x3959
movl 0x47c(%rsp), %eax
movl %eax, 0x474(%rsp)
movl 0x474(%rsp), %eax
cmpl 0x480(%rsp), %eax
jge 0x3941
movq 0x728(%rsp), %rax
movq %rax, 0xf8(%rsp)
movslq 0x48c(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movslq 0x478(%rsp), %rsi
callq 0x58c0
movq (%rax), %rax
movb 0x4b8(%rsp), %cl
shrq %cl, %rax
movq %rax, 0x460(%rsp)
movslq 0x48c(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x4c0(%rsp,%rax,8), %rdi
movslq 0x474(%rsp), %rsi
callq 0x58c0
movq (%rax), %rax
movb 0x4b8(%rsp), %cl
shrq %cl, %rax
movslq 0x6f4(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x458(%rsp)
leaq 0x46c(%rsp), %rdi
leaq 0x460(%rsp), %rsi
leaq 0x458(%rsp), %rdx
callq 0x5df0
jmp 0x3912
movq 0xf8(%rsp), %rdi
leaq 0x46c(%rsp), %rsi
callq 0x5b00
jmp 0x3929
jmp 0x392b
movl 0x474(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x474(%rsp)
jmp 0x3858
jmp 0x3943
movl 0x478(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x478(%rsp)
jmp 0x3836
jmp 0x395b
jmp 0x395d
movl 0x480(%rsp), %eax
movl %eax, 0x484(%rsp)
jmp 0x36a3
jmp 0x3972
movl 0x48c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48c(%rsp)
jmp 0x3635
leaq 0x4c0(%rsp), %rax
movq %rax, 0xe8(%rsp)
addq $0x180, %rax            # imm = 0x180
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0xe0(%rsp)
callq 0x5940
movq 0xe8(%rsp), %rcx
movq 0xe0(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xf0(%rsp)
jne 0x39a6
jmp 0x4110
movq 0x148(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0xd8(%rsp)
callq 0x5940
movq 0x140(%rsp), %rcx
movq 0xd8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x148(%rsp)
jne 0x39e1
jmp 0x4500
movl $0x10, 0x454(%rsp)
leaq 0x2d0(%rsp), %rax
movq %rax, %rcx
addq $0x180, %rcx            # imm = 0x180
movq %rcx, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x5e20
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, 0xd0(%rsp)
jne 0x3a49
movl $0x0, 0x2cc(%rsp)
cmpl $0x10, 0x2cc(%rsp)
jge 0x3b24
movslq 0x2cc(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d0(%rsp,%rax,8), %rdi
movl 0x6f4(%rsp), %esi
movl 0x6f0(%rsp), %ecx
movl %esi, %eax
addl %ecx, %eax
movl %ecx, %edx
movl %esi, %ecx
leal 0xf(%rcx,%rdx), %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x4, %eax
movslq %eax, %rsi
callq 0x5e30
jmp 0x3ad8
jmp 0x3ada
movl 0x2cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2cc(%rsp)
jmp 0x3a8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x2d0(%rsp), %rax
movq %rax, 0xb0(%rsp)
addq $0x180, %rax            # imm = 0x180
movq %rax, 0xb8(%rsp)
jmp 0x40db
movq $0x0, 0x2c0(%rsp)
movl $0x0, 0x2bc(%rsp)
movl 0x2bc(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x3c45
movq 0x2c0(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0xa8(%rsp)
movq 0x740(%rsp), %rdi
movslq 0x2bc(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movl 0x2bc(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x3c2d
movq 0x2c0(%rsp), %rax
movl %eax, %ecx
andl $0xf, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x2d0(%rsp,%rcx,8), %rcx
movq %rcx, 0xa0(%rsp)
shrq $0x4, %rax
movq %rax, 0x2a0(%rsp)
leaq 0x2a8(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
leaq 0x2bc(%rsp), %rdx
callq 0x5f70
jmp 0x3c14
movq 0xa0(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x5f40
jmp 0x3c2b
jmp 0x3c2d
jmp 0x3c2f
movl 0x2bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2bc(%rsp)
jmp 0x3b3b
movq $0x0, 0x2c0(%rsp)
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
cmpl 0x6f0(%rsp), %eax
jge 0x3d7d
movq 0x2c0(%rsp), %rax
movslq 0x6f8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x98(%rsp)
movq 0x738(%rsp), %rdi
movslq 0x29c(%rsp), %rsi
callq 0x2190
movzbl (%rax), %eax
movl %eax, %esi
leaq 0x710(%rsp), %rdi
callq 0x5a40
movq %rax, %rcx
movq 0x98(%rsp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
andq 0x6d0(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movl 0x29c(%rsp), %eax
movl 0x734(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x3d65
movq 0x2c0(%rsp), %rax
movl %eax, %ecx
andl $0xf, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x2d0(%rsp,%rcx,8), %rcx
movq %rcx, 0x90(%rsp)
shrq $0x4, %rax
movq %rax, 0x280(%rsp)
movl 0x6f4(%rsp), %eax
movl 0x29c(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x27c(%rsp)
leaq 0x288(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x27c(%rsp), %rdx
callq 0x5fa0
jmp 0x3d4c
movq 0x90(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x5f40
jmp 0x3d63
jmp 0x3d65
jmp 0x3d67
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x3c5c
movl $0x0, 0x278(%rsp)
cmpl $0x10, 0x278(%rsp)
jge 0x409a
movslq 0x278(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d0(%rsp,%rax,8), %rdi
movq 0x6e0(%rsp), %rsi
shrq $0x4, %rsi
callq 0x2560
jmp 0x3dbd
movslq 0x278(%rsp), %rax
leaq 0x2d0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x5450
movl %eax, 0x274(%rsp)
movl $0x0, 0x270(%rsp)
movl $0x0, 0x26c(%rsp)
movl 0x270(%rsp), %eax
cmpl 0x274(%rsp), %eax
jge 0x4082
movl $0x0, 0x268(%rsp)
movl 0x270(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x26c(%rsp)
movl 0x26c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x274(%rsp), %ecx
movb %al, 0x8f(%rsp)
jge 0x3eaa
movslq 0x278(%rsp), %rax
leaq 0x2d0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x26c(%rsp), %rsi
callq 0x55e0
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movslq 0x278(%rsp), %rax
leaq 0x2d0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x270(%rsp), %rsi
callq 0x55e0
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq (%rcx), %rax
sete %al
movb %al, 0x8f(%rsp)
movb 0x8f(%rsp), %al
testb $0x1, %al
jne 0x3eb7
jmp 0x3ecf
jmp 0x3eb9
movl 0x26c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x26c(%rsp)
jmp 0x3e26
movl 0x26c(%rsp), %eax
subl 0x270(%rsp), %eax
cmpl $0x1, %eax
jle 0x406d
movl 0x270(%rsp), %eax
movl %eax, 0x264(%rsp)
movl 0x264(%rsp), %ecx
xorl %eax, %eax
cmpl 0x26c(%rsp), %ecx
movb %al, 0x7f(%rsp)
jge 0x3f3f
movslq 0x278(%rsp), %rax
leaq 0x2d0(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq 0x264(%rsp), %rsi
callq 0x55e0
movl 0x8(%rax), %eax
cmpl 0x6f4(%rsp), %eax
setl %al
movb %al, 0x7f(%rsp)
movb 0x7f(%rsp), %al
testb $0x1, %al
jne 0x3f49
jmp 0x3f5c
movl 0x264(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x264(%rsp)
jmp 0x3ef4
movl 0x270(%rsp), %eax
movl %eax, 0x260(%rsp)
movl 0x260(%rsp), %eax
cmpl 0x264(%rsp), %eax
jge 0x406b
movl 0x264(%rsp), %eax
movl %eax, 0x25c(%rsp)
movl 0x25c(%rsp), %eax
cmpl 0x26c(%rsp), %eax
jge 0x4053
movq 0x728(%rsp), %rax
movq %rax, 0x68(%rsp)
movslq 0x278(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d0(%rsp,%rax,8), %rdi
movslq 0x260(%rsp), %rsi
callq 0x55e0
addq $0x8, %rax
movq %rax, 0x70(%rsp)
movslq 0x278(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d0(%rsp,%rax,8), %rdi
movslq 0x25c(%rsp), %rsi
callq 0x55e0
movq 0x70(%rsp), %rsi
movl 0x8(%rax), %eax
movl 0x6f4(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x250(%rsp)
leaq 0x254(%rsp), %rdi
leaq 0x250(%rsp), %rdx
callq 0x5fd0
jmp 0x4027
movq 0x68(%rsp), %rdi
leaq 0x254(%rsp), %rsi
callq 0x5b00
jmp 0x403b
jmp 0x403d
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x3f8c
jmp 0x4055
movl 0x260(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x260(%rsp)
jmp 0x3f6a
jmp 0x406d
jmp 0x406f
movl 0x26c(%rsp), %eax
movl %eax, 0x270(%rsp)
jmp 0x3df6
jmp 0x4084
movl 0x278(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x278(%rsp)
jmp 0x3d88
leaq 0x2d0(%rsp), %rax
movq %rax, 0x58(%rsp)
addq $0x180, %rax            # imm = 0x180
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x50(%rsp)
callq 0x5690
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x60(%rsp)
jne 0x40b2
jmp 0x4110
movq 0xb8(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x48(%rsp)
callq 0x5690
movq 0xb0(%rsp), %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xb8(%rsp)
jne 0x40db
jmp 0x4500
movq 0x728(%rsp), %rdi
callq 0x5ae0
movq %rax, 0x38(%rsp)
movq 0x728(%rsp), %rdi
callq 0x5ae0
movq %rax, %rdi
callq 0x2520
movl %eax, 0x44(%rsp)
jmp 0x413d
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
movslq %ecx, %rcx
imulq %rcx, %rax
imull $0x3, 0x6f4(%rsp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x41bc
movq 0x728(%rsp), %rdi
callq 0x5ba0
movq %rax, 0x248(%rsp)
movq 0x728(%rsp), %rdi
callq 0x5c10
movq %rax, 0x240(%rsp)
movq 0x248(%rsp), %rdi
movq 0x240(%rsp), %rsi
callq 0x6000
jmp 0x419e
jmp 0x44de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
jmp 0x4500
movl 0x6f4(%rsp), %eax
incl %eax
cltq
movq %rax, 0x28(%rsp)
movl $0x0, 0x224(%rsp)
leaq 0x223(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x59a0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rcx
leaq 0x228(%rsp), %rdi
leaq 0x224(%rsp), %rdx
callq 0x59b0
jmp 0x420a
leaq 0x223(%rsp), %rdi
callq 0x5a30
movq 0x728(%rsp), %rdi
callq 0x5ae0
movq %rax, 0x18(%rsp)
leaq 0x207(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x6040
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x208(%rsp), %rdi
callq 0x6050
jmp 0x4254
leaq 0x207(%rsp), %rdi
callq 0x60d0
movq 0x728(%rsp), %rax
movq %rax, 0x1f8(%rsp)
movq 0x1f8(%rsp), %rdi
callq 0x5ba0
movq %rax, 0x1f0(%rsp)
movq 0x1f8(%rsp), %rdi
callq 0x5c10
movq %rax, 0x1e8(%rsp)
leaq 0x1f0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x60e0
testb $0x1, %al
jne 0x42b9
jmp 0x434d
leaq 0x1f0(%rsp), %rdi
callq 0x6120
movq %rax, 0x1e0(%rsp)
movq 0x1e0(%rsp), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x228(%rsp), %rdi
callq 0x5a40
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1f0(%rsp), %rdi
callq 0x6130
jmp 0x429b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x223(%rsp), %rdi
callq 0x5a30
jmp 0x4500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x207(%rsp), %rdi
callq 0x60d0
jmp 0x44cf
movl $0x0, 0x1dc(%rsp)
movl 0x1dc(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x43b8
movslq 0x1dc(%rsp), %rsi
leaq 0x228(%rsp), %rdi
callq 0x5a40
movl (%rax), %eax
movl %eax, 0x14(%rsp)
movl 0x1dc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x228(%rsp), %rdi
callq 0x5a40
movl 0x14(%rsp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl 0x1dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1dc(%rsp)
jmp 0x4358
movq 0x728(%rsp), %rax
movq %rax, 0x1d0(%rsp)
movq 0x1d0(%rsp), %rdi
callq 0x5ba0
movq %rax, 0x1c8(%rsp)
movq 0x1d0(%rsp), %rdi
callq 0x5c10
movq %rax, 0x1c0(%rsp)
leaq 0x1c8(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x60e0
testb $0x1, %al
jne 0x4410
jmp 0x449e
leaq 0x1c8(%rsp), %rdi
callq 0x6120
movq %rax, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq (%rax), %rsi
leaq 0x228(%rsp), %rdi
callq 0x5a40
movslq (%rax), %rsi
movl %esi, %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x208(%rsp), %rdi
callq 0x6150
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6170
jmp 0x4467
jmp 0x4469
leaq 0x1c8(%rsp), %rdi
callq 0x6130
jmp 0x43f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x700(%rsp)
movl %eax, 0x6fc(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x6200
jmp 0x44cf
movq 0x728(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x61a0
leaq 0x208(%rsp), %rdi
callq 0x6200
leaq 0x228(%rsp), %rdi
callq 0x5c40
jmp 0x44de
leaq 0x228(%rsp), %rdi
callq 0x5c40
jmp 0x4500
jmp 0x44e0
movl $0x0, 0x6dc(%rsp)
leaq 0x710(%rsp), %rdi
callq 0x5c40
addq $0x748, %rsp            # imm = 0x748
retq
leaq 0x710(%rsp), %rdi
callq 0x5c40
movq 0x700(%rsp), %rdi
callq 0x2260
nopw (%rax,%rax)