// File: /workspace/github_cpp_makefile_star2_O3/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: compute_interleave_LCP(unsigned char, unsigned int, std::vector<std::array<unsigned long, 6ul>, std::allocator<std::array<unsigned long, 6ul>>> const&, 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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void compute_interleave_LCP(
    const strlen_t k, const strnum_t m,
    const occ_countv_t& occv,
    const fnames_t& B_tpl,
    const fname_t& IXk_name
) {
  const fnames_t IX_names = {
    "supportfile-IX0.tmp",
    "supportfile-IX1.tmp",
  };
  const fnames_t Q_tpls[] = {
    template_generator("supportfile-Q0_%.3d.tmp", 0, k+1),
    template_generator("supportfile-Q1_%.3d.tmp", 0, k+1),
  };

  const luint_t tot = static_cast<luint_t>(m)*(k+1);
  const fnames_t L_tpl = template_generator("supportfile-L_%d.tmp", 0, ALPHSIZE);

  const fname_t LCP_name = "outfile-LCP.bin";
  { // IX0/1 and LCP
    strlen_writer_t IX0(IX_names[0]);
    for (strlen_t l = 0; l <= k; ++l) {
      for (strnum_t i = 0; i < m; ++i) {
        IX0.write(l);
      }
    }
    create_empty_file<strlen_t>(LCP_name, tot);
    create_empty_file<strlen_t>(IX_names[1], tot);
  }

  compute_Q1_l(k, occv, Q_tpls[0]);

  lcp_writer_t LCP(LCP_name);
  LCP.seek(0);
  LCP.write(static_cast<strlen_t>(-1));

  bool has_pseg_wider_than_1 = true;
  base_env_t base_env{k, m, IX_names, LCP};

  std::vector<luint_t> end_pos(concurrency_level+1, tot);
  end_pos[0] = 0;
  std::vector<std::vector<strnum_t>> end_pos_Qp(concurrency_level+1, std::vector<strnum_t>(k+1, 0));
  std::vector<bfv_env_t> bfv_envs;
  for (unsigned idx = 0; idx < concurrency_level; ++idx)
    bfv_envs.emplace_back(base_env);

  while (has_pseg_wider_than_1) {
    has_pseg_wider_than_1 = false;
    ++base_env.p;
    std::cout << " - iteration " << static_cast<fuint_t>(base_env.p) << std::endl;
    const fnames_t& prevQ_tpl = Q_tpls[(base_env.p-1)%2];
    const fnames_t& currQ_tpl = Q_tpls[base_env.p%2];
    std::vector<luint_t> this_end_pos = end_pos;
    std::vector<std::vector<strnum_t>> this_end_pos_Qp = end_pos_Qp;
    {
      std::cout << "   - compute IX";
      for (strlen_t l = base_env.p+1; l <= k+1; ++l) {
        base_env.Qp.emplace_back(prevQ_tpl[l-1]);
      }
      std::vector<std::thread> threads;
      unsigned idx;
      for (idx = 1; idx <= concurrency_level && this_end_pos[idx-1] < tot; ++idx) {
        threads
          .emplace_back(worker_IX,
                        idx, std::ref(base_env), std::ref(bfv_envs[idx-1]),
                        std::cref(this_end_pos), std::cref(this_end_pos_Qp)
                        );
      }
      for (auto& t: threads) {
        t.join();
      }
      for (unsigned j = 0; j < idx-1; ++j) {
        has_pseg_wider_than_1 |= bfv_envs[j].has_pseg_wider_than_1;
      }
      std::vector<size_t> pos(idx-1, 0);
      unsigned midi = 0;
      unsigned finished = 0;
      for (unsigned j = 0; j < idx-1; ++j) {
        while (pos[j] < bfv_envs[j].end_pos.size() &&
               bfv_envs[j].end_pos[pos[j]] <  base_env.midpoints[midi]) {
          ++pos[j];
        }
        if (pos[j] >= bfv_envs[j].end_pos.size()) ++finished;
      }
      while (finished < idx - 1) {
        luint_t cmin_j = 0;
        for (unsigned j = 0; j < idx-1; ++j) {
          if (
              pos[j] < bfv_envs[j].end_pos.size() &&
              bfv_envs[j].end_pos[pos[j]] >= base_env.midpoints[midi] &&
              (bfv_envs[j].end_pos[pos[j]] < bfv_envs[cmin_j].end_pos[pos[cmin_j]] ||
               bfv_envs[cmin_j].end_pos[pos[cmin_j]] < base_env.midpoints[midi])
              ) {
            cmin_j = j;
          }
        }
        if (pos[cmin_j] >= bfv_envs[cmin_j].end_pos.size()) break;
        end_pos[midi+1]= bfv_envs[cmin_j].end_pos[pos[cmin_j]];
        end_pos_Qp[midi+1] = bfv_envs[cmin_j].end_pos_Qp[pos[cmin_j]];
        ++midi;
        ++pos[cmin_j];
        finished = 0;
        for (unsigned j = 0; j < idx-1; ++j) {
          while (pos[j] < bfv_envs[j].end_pos.size() &&
                 bfv_envs[j].end_pos[pos[j]] <  base_env.midpoints[midi]) {
            ++pos[j];
          }
          if (pos[j] >= bfv_envs[j].end_pos.size()) ++finished;
        }
      }
      base_env.Qp.clear();
      std::cout << std::endl;
    }
    if (has_pseg_wider_than_1) {
      std::cout << "   - compute Qp" << std::endl;
      remove_file(currQ_tpl[base_env.p-1]);
      remove_file(prevQ_tpl[k]);
      std::vector<std::thread> threads;
      std::atomic<luint_t> shared_l(base_env.p+1);
      for (unsigned idx = 0; idx < concurrency_level; ++idx) {
        threads
          .emplace_back(worker_Qp,
                        std::ref(shared_l), k, m, std::cref(occv),
                        std::cref(B_tpl), std::cref(prevQ_tpl), std::cref(currQ_tpl)
                        );
      }
      for (auto& t: threads) {
        t.join();
      }
    } else {
      remove_file(currQ_tpl[base_env.p-1]);
      remove_file(prevQ_tpl[k]);
      for (strlen_t l = base_env.p+1; l <= k; ++l) {
        remove_file(prevQ_tpl[l-1]);
      }
    }
  }
  rename_file(IX_names[base_env.p%2], IXk_name);
  remove_file(IX_names[(base_env.p-1)%2]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %r8, 0x188(%rsp)
movq %rcx, 0x190(%rsp)
movq %rdx, 0x88(%rsp)
movb %dil, 0x3(%rsp)
movl %esi, 0x4(%rsp)
leaq 0x108(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x58c3(%rip), %rsi      # 0x9092
leaq 0x58cf(%rip), %rdx      # 0x90a5
leaq 0xf8(%rsp), %rdi
callq 0x711e
leaq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x58a8(%rip), %rsi      # 0x90a6
leaq 0x58b4(%rip), %rdx      # 0x90b9
callq 0x711e
leaq 0xe0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x200(%rsp), %rcx
movl $0x2, %edx
callq 0x60fa
movq $-0x40, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x3847
movq (%rbx), %rsi
incq %rsi
callq 0x2260
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x3833
leaq 0xf8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x5857(%rip), %rsi      # 0x90ba
leaq 0x5867(%rip), %rdx      # 0x90d1
callq 0x711e
movzbl 0x3(%rsp), %ecx
incl %ecx
leaq 0x200(%rsp), %r14
leaq 0xf8(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x26cc
leaq 0x218(%rsp), %r14
leaq 0x1d0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5826(%rip), %rsi      # 0x90d2
leaq 0x5836(%rip), %rdx      # 0x90e9
leaq 0x1c0(%rsp), %rdi
callq 0x711e
movzbl 0x3(%rsp), %ecx
incl %ecx
leaq 0x1c0(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x26cc
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x38f6
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x2260
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3913
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2260
movl 0x4(%rsp), %eax
movzbl 0x3(%rsp), %ecx
incq %rcx
imulq %rax, %rcx
movq %rcx, 0x18(%rsp)
leaq 0xf8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57b0(%rip), %rsi      # 0x90ea
leaq 0x57bd(%rip), %rdx      # 0x90fe
callq 0x711e
leaq 0x230(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x26cc
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x397f
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x576d(%rip), %rsi      # 0x90ff
leaq 0x5775(%rip), %rdx      # 0x910e
leaq 0xa8(%rsp), %rdi
callq 0x711e
movq 0xe0(%rsp), %rax
movq (%rax), %rdi
leaq 0x56d4(%rip), %rsi      # 0x908c
callq 0x22a0
movq %rax, %r14
xorl %ebp, %ebp
movl 0x4(%rsp), %eax
testl %eax, %eax
movl $0x0, %eax
je 0x39ec
movzbl %bpl, %ebx
xorl %r15d, %r15d
movl %ebx, %edi
movq %r14, %rsi
callq 0x20b0
incl %r15d
movl 0x4(%rsp), %eax
cmpl %eax, %r15d
jb 0x39d6
incb %bpl
cmpb 0x3(%rsp), %bpl
jbe 0x39c6
movq 0x18(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x60c6
movq 0xe0(%rsp), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rsi
callq 0x60c6
testq %r14, %r14
je 0x3a2b
movq %r14, %rdi
callq 0x2240
movzbl 0x3(%rsp), %edi
leaq 0x200(%rsp), %rdx
movq 0x88(%rsp), %rsi
callq 0x2de0
movq 0xa8(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x21a0
leaq 0x1c0(%rsp), %rbx
movl %eax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x11(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a1e
movq %rbx, %rdi
movl $0xff, %esi
callq 0x5ab8
movzbl 0x3(%rsp), %esi
movl 0x4(%rsp), %edx
leaq 0xf8(%rsp), %rdi
leaq 0xe0(%rsp), %rcx
movq %rbx, %r8
callq 0x6142
movl 0xa792(%rip), %esi      # 0xe240
incl %esi
leaq 0xc8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0x1a8(%rsp), %rcx
callq 0x630e
movq 0xc8(%rsp), %rax
movq $0x0, (%rax)
movl 0xa761(%rip), %ebx      # 0xe240
movzbl 0x3(%rsp), %esi
incq %rsi
leaq 0x90(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x1e8(%rsp), %rcx
callq 0x642e
incl %ebx
leaq 0x1a8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rsi
callq 0x65aa
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b3a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpl $0x0, 0xa6ee(%rip)      # 0xe240
je 0x3b78
xorl %ebp, %ebp
leaq 0x20(%rsp), %rbx
leaq 0xf8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6642
incl %ebp
cmpl 0xa6ca(%rip), %ebp      # 0xe240
jb 0x3b63
leaq 0x110(%rsp), %rbx
incb 0x128(%rsp)
movl $0xd, %edx
movq 0xa43d(%rip), %rdi      # 0xdfd0
leaq 0x5575(%rip), %rsi      # 0x910f
callq 0x2290
movzbl 0x128(%rsp), %esi
movq 0xa422(%rip), %rdi      # 0xdfd0
callq 0x2160
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movzbl 0x128(%rsp), %r14d
leaq 0x90(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x66ac
leaq 0x1e8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x672c
movl $0xf, %edx
movq 0xa3b4(%rip), %rdi      # 0xdfd0
leaq 0x54fa(%rip), %rsi      # 0x911d
callq 0x2290
leal -0x1(%r14), %eax
movzwl %ax, %ecx
shrl $0xf, %ecx
addl %r14d, %ecx
decl %ecx
andl $-0x2, %ecx
subl %ecx, %eax
movswq %ax, %rax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r13
addq $0x200, %r13            # imm = 0x200
andl $0x1, %r14d
leaq (%r14,%r14,2), %rax
leaq (%rsp,%rax,8), %r15
addq $0x200, %r15            # imm = 0x200
movb 0x128(%rsp), %r14b
incb %r14b
movzbl %r14b, %r14d
movzbl 0x3(%rsp), %eax
incl %eax
cmpl %r14d, %eax
jb 0x3c9c
movq (%r13), %rax
movl %r14d, %ecx
shll $0x5, %ecx
leaq (%rax,%rcx), %rsi
addq $-0x20, %rsi
incb %r14b
movq %rbx, %rdi
callq 0x67c6
jmp 0x3c6d
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x1, 0x8(%rsp)
cmpl $0x0, 0xa584(%rip)      # 0xe240
je 0x3dd0
movq 0x90(%rsp), %rax
movq (%rax), %rcx
movl $0x1, %eax
cmpq 0x18(%rsp), %rcx
jae 0x3d7b
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rax
shlq $0x5, %rax
addq 0x20(%rsp), %rax
leaq 0xf8(%rsp), %rcx
movq %rcx, 0x68(%rsp)
movq %rax, 0x10(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x1e8(%rsp), %rax
movq %rax, 0x80(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
leaq -0x7a7(%rip), %rsi      # 0x3584
leaq 0x10(%rsp), %rdx
leaq 0x70(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x68(%rsp), %r9
leaq 0x88(%rsp), %rax
pushq %rax
callq 0x6802
addq $0x10, %rsp
movl 0x8(%rsp), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rsp)
cmpl 0xa4de(%rip), %eax      # 0xe240
ja 0x3d7b
movq 0x90(%rsp), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq 0x18(%rsp), %rdx
jb 0x3cdf
movq %r15, %rbx
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %r14
cmpq %r14, %r15
je 0x3da2
movq %r15, %rdi
callq 0x23b0
addq $0x8, %r15
cmpq %r14, %r15
jne 0x3d8d
movl 0x8(%rsp), %eax
decl %eax
je 0x3dd7
movq 0x20(%rsp), %rcx
movl %eax, %esi
movq %rsi, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rax
xorl %edx, %edx
xorl %r12d, %r12d
movq %rbx, %r15
orb 0x29(%rcx,%rdx), %r12b
addq $0x60, %rdx
cmpq %rdx, %rax
jne 0x3dc0
jmp 0x3ddf
xorl %esi, %esi
xorl %r12d, %r12d
jmp 0x3ddf
xorl %esi, %esi
xorl %r12d, %r12d
movq %rbx, %r15
movq $0x0, 0x10(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x630e
movq %r15, 0x198(%rsp)
movl 0x8(%rsp), %ecx
decl %ecx
je 0x3e91
movq 0x68(%rsp), %rax
movq 0x20(%rsp), %rdx
movq 0x130(%rsp), %rsi
movl %ecx, %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
leaq (%r9,%r9,2), %r10
shlq $0x5, %r10
movq 0x30(%rdx,%r10), %r11
movq 0x38(%rdx,%r10), %r10
subq %r11, %r10
sarq $0x3, %r10
movq (%rax,%r9,8), %r14
movl $0x1, %r15d
cmpq %r10, %r14
jae 0x3e84
movq (%r11,%r14,8), %rbx
xorl %r15d, %r15d
cmpq (%rsi), %rbx
jae 0x3e84
incq %r14
movq %r14, %rbx
movq %r14, (%rax,%r9,8)
cmpq %r14, %r10
je 0x3e7a
movq (%r11,%rbx,8), %r15
leaq 0x1(%rbx), %r14
cmpq (%rsi), %r15
jb 0x3e61
xorl %r15d, %r15d
cmpq %r10, %rbx
setae %r15b
addl %r15d, %r8d
incq %r9
cmpq %rdi, %r9
jne 0x3e2a
jmp 0x3e94
xorl %r8d, %r8d
cmpl %ecx, %r8d
jae 0x4014
xorl %r15d, %r15d
movq 0x68(%rsp), %rax
movq 0x20(%rsp), %rdx
movq 0x130(%rsp), %rsi
movl %r15d, %r15d
movl %ecx, %ecx
leaq 0x38(%rdx), %rdi
xorl %r8d, %r8d
xorl %r14d, %r14d
movq (%rax,%r8,8), %r9
movq -0x8(%rdi), %r10
movq (%rdi), %r11
subq %r10, %r11
sarq $0x3, %r11
cmpq %r11, %r9
jae 0x3f10
movq (%r10,%r9,8), %r9
movq (%rsi,%r15,8), %r10
cmpq %r10, %r9
jb 0x3f10
leaq (%r14,%r14,2), %r11
shlq $0x5, %r11
movq (%rax,%r14,8), %rbx
movq 0x30(%rdx,%r11), %r11
movq (%r11,%rbx,8), %r11
movq %r8, %rbx
cmpq %r10, %r11
jb 0x3f05
movq %r14, %rbx
movq %r8, %r14
cmpq %r11, %r9
jb 0x3f10
movq %rbx, %r14
incq %r8
addq $0x60, %rdi
cmpq %r8, %rcx
jne 0x3ec1
movq (%rax,%r14,8), %rcx
leaq (%r14,%r14,2), %rsi
shlq $0x5, %rsi
movq 0x30(%rdx,%rsi), %rdi
movq 0x38(%rdx,%rsi), %r8
subq %rdi, %r8
sarq $0x3, %r8
cmpq %r8, %rcx
jae 0x4014
addq %rsi, %rdx
movq (%rdi,%rcx,8), %rcx
incl %r15d
movq 0xc8(%rsp), %rsi
movq %rcx, (%rsi,%r15,8)
movq (%rax,%r14,8), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x48(%rdx), %rsi
leaq (%r15,%r15,2), %rdi
shlq $0x3, %rdi
addq 0x1a8(%rsp), %rdi
callq 0x686c
movq 0x68(%rsp), %rax
incq (%rax,%r14,8)
movl 0x8(%rsp), %ecx
decl %ecx
je 0x4008
movq 0x20(%rsp), %rdx
movq 0x130(%rsp), %rsi
movl %ecx, %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
leaq (%r9,%r9,2), %r10
shlq $0x5, %r10
movq 0x30(%rdx,%r10), %r11
movq 0x38(%rdx,%r10), %r10
subq %r11, %r10
sarq $0x3, %r10
movq (%rax,%r9,8), %rbp
movl $0x1, %ebx
cmpq %r10, %rbp
jae 0x3ffb
movq (%r11,%rbp,8), %r14
xorl %ebx, %ebx
cmpq (%rsi,%r15,8), %r14
jae 0x3ffb
incq %rbp
movq %rbp, %r14
movq %rbp, (%rax,%r9,8)
cmpq %rbp, %r10
je 0x3ff3
movq (%r11,%r14,8), %rbx
leaq 0x1(%r14), %rbp
cmpq (%rsi,%r15,8), %rbx
jb 0x3fd9
xorl %ebx, %ebx
cmpq %r10, %r14
setae %bl
addl %ebx, %r8d
incq %r9
cmpq %rdi, %r9
jne 0x3fa3
jmp 0x400b
xorl %r8d, %r8d
cmpl %ecx, %r8d
jb 0x3ea5
movq 0x110(%rsp), %r14
movq 0x118(%rsp), %rbx
cmpq %r14, %rbx
je 0x4045
movq %r14, %r15
movq %r15, %rdi
callq 0x5cf8
addq $0x28, %r15
cmpq %rbx, %r15
jne 0x402c
movq %r14, 0x118(%rsp)
movq 0x9f84(%rip), %rcx      # 0xdfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x9f66(%rip), %rdi      # 0xdfd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
movq 0x198(%rsp), %r15
je 0x4096
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x40(%rsp), %rdi
callq 0x6950
testb $0x1, %r12b
je 0x41f4
movl $0xf, %edx
movq 0x9f1a(%rip), %rdi      # 0xdfd0
leaq 0x5070(%rip), %rsi      # 0x912d
callq 0x2290
movq 0x9f07(%rip), %rcx      # 0xdfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x9ee9(%rip), %rdi      # 0xdfd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
movzbl 0x128(%rsp), %eax
movq (%r15), %rcx
shll $0x5, %eax
movq -0x20(%rcx,%rax), %rdi
callq 0x2400
movzbl 0x3(%rsp), %eax
movq (%r13), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
callq 0x2400
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movzbl 0x128(%rsp), %eax
incq %rax
movq %rax, 0x68(%rsp)
cmpl $0x0, 0xa0f7(%rip)      # 0xe240
je 0x424c
xorl %r14d, %r14d
movq 0x190(%rsp), %rbx
leaq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %rbx, 0x80(%rsp)
movq %r13, 0x8(%rsp)
movq %r15, 0x1a0(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
leaq -0xbd9(%rip), %rsi      # 0x35bd
leaq 0x18(%rsp), %rdx
leaq 0xb(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x68(%rsp), %r9
leaq 0x1a8(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
leaq 0x98(%rsp), %rax
pushq %rax
callq 0x698c
addq $0x20, %rsp
incl %r14d
cmpl 0xa06b(%rip), %r14d     # 0xe240
jb 0x415a
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %r14
cmpq %r14, %r15
je 0x424c
movq %r15, %rdi
callq 0x23b0
addq $0x8, %r15
jmp 0x41e1
movzbl 0x128(%rsp), %eax
movq (%r15), %rcx
shll $0x5, %eax
movq -0x20(%rcx,%rax), %rdi
callq 0x2400
movzbl 0x3(%rsp), %eax
movq (%r13), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
callq 0x2400
movb 0x128(%rsp), %bpl
incb %bpl
cmpb 0x3(%rsp), %bpl
ja 0x4256
movq (%r13), %rax
movzbl %bpl, %ebp
movl %ebp, %ecx
shll $0x5, %ecx
movq -0x20(%rax,%rcx), %rdi
callq 0x2400
jmp 0x4229
leaq 0x40(%rsp), %rdi
callq 0x6950
leaq 0x1e8(%rsp), %rdi
callq 0x6a12
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4280
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
testb $0x1, %r12b
leaq 0x110(%rsp), %rbx
jne 0x3b80
movzbl 0x128(%rsp), %eax
andl $0x1, %eax
movq 0xe0(%rsp), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
movq 0x188(%rsp), %rax
movq (%rax), %rsi
callq 0x2120
movzbl 0x128(%rsp), %eax
leal -0x1(%rax), %ecx
movzwl %cx, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
decl %ecx
andl $-0x2, %ecx
negl %ecx
addl %ecx, %eax
decl %eax
movswq %ax, %rax
movq 0xe0(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rdi
callq 0x2400
leaq 0x20(%rsp), %rdi
callq 0x6a66
leaq 0x1a8(%rsp), %rdi
callq 0x6a12
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x4327
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0xf8(%rsp), %rdi
callq 0x6aae
leaq 0x1c0(%rsp), %rdi
callq 0x6ade
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x4366
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x230(%rsp), %rdi
callq 0x578c
movl $0x18, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x200, %rdi            # imm = 0x200
callq 0x578c
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x4378
leaq 0xe0(%rsp), %rdi
callq 0x578c
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4593
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
jmp 0x4593
movq %rax, %rbx
jmp 0x4593
movq %rax, %rbx
jmp 0x45b0
movq %rax, %rbx
jmp 0x45bd
movq %rax, %rbx
jmp 0x45ca
movq %rax, %rbx
jmp 0x45ef
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45fc
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x45fc
movq %rax, %rbx
jmp 0x45fc
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x4454
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x4454
jmp 0x4451
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4471
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x200(%rsp), %r15
cmpq %r14, %r15
je 0x461c
addq $-0x18, %r14
movq %r14, %rdi
callq 0x578c
cmpq %r15, %r14
jne 0x4482
jmp 0x461c
movq %rax, %rbx
jmp 0x461c
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x2450
jmp 0x4629
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4629
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x4629
movq %rax, %rbx
jmp 0x4629
movq %rax, %rbx
testq %r14, %r14
je 0x45ca
movq %r14, %rdi
callq 0x2240
jmp 0x45ca
jmp 0x4516
jmp 0x4540
jmp 0x4516
movq %rax, %rbx
jmp 0x455f
jmp 0x451f
jmp 0x454f
movq %rax, %rbx
jmp 0x457c
jmp 0x4540
jmp 0x453b
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x4543
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
jmp 0x4543
movq %rax, %rbx
jmp 0x4543
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x6950
jmp 0x4552
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
callq 0x6a12
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x457c
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x20(%rsp), %rdi
callq 0x6a66
leaq 0x1a8(%rsp), %rdi
callq 0x6a12
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x45b0
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0xf8(%rsp), %rdi
callq 0x6aae
leaq 0x1c0(%rsp), %rdi
callq 0x6ade
leaq 0xb8(%rsp), %rax
movq 0xa8(%rsp), %rdi
cmpq %rax, %rdi
je 0x45ef
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x230(%rsp), %rdi
callq 0x578c
movl $0x18, %r14d
leaq (%rsp,%r14), %rdi
addq $0x200, %rdi            # imm = 0x200
callq 0x578c
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x4602
leaq 0xe0(%rsp), %rdi
callq 0x578c
movq %rbx, %rdi
callq 0x23d0