// File: /workspace/github_cpp_makefile_star2_O1/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 $0x258, %rsp            # imm = 0x258
movq %r8, 0x190(%rsp)
movq %rcx, 0x1a8(%rsp)
movq %rdx, 0x90(%rsp)
movb %dil, 0xb(%rsp)
movl %esi, 0xc(%rsp)
leaq 0x110(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x58c2(%rip), %rsi      # 0x9052
leaq 0x58ce(%rip), %rdx      # 0x9065
leaq 0x100(%rsp), %r12
movq %r12, %rdi
callq 0x6ed6
leaq 0x120(%rsp), %r15
leaq 0x130(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x58a4(%rip), %rsi      # 0x9066
leaq 0x58b0(%rip), %rdx      # 0x9079
movq %r15, %rdi
callq 0x6ed6
leaq 0xe8(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x210(%rsp), %r14
movl $0x2, %edx
movq %r14, %rcx
callq 0x6132
movq $-0x40, %r15
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x3811
movq (%rbx), %rsi
incq %rsi
callq 0x2260
addq $-0x20, %rbx
addq $0x20, %r15
jne 0x37fd
leaq 0x100(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x584d(%rip), %rsi      # 0x907a
leaq 0x585d(%rip), %rdx      # 0x9091
callq 0x6ed6
movzbl 0xb(%rsp), %ecx
incl %ecx
leaq 0x210(%rsp), %r15
leaq 0x100(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x268c
leaq 0x228(%rsp), %r15
leaq 0x1e0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x581c(%rip), %rsi      # 0x9092
leaq 0x582c(%rip), %rdx      # 0x90a9
leaq 0x1d0(%rsp), %rdi
callq 0x6ed6
movzbl 0xb(%rsp), %ecx
incl %ecx
leaq 0x1d0(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x268c
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x38c0
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x2260
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x38dd
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2260
movl 0xc(%rsp), %eax
movzbl 0xb(%rsp), %ecx
incq %rcx
imulq %rax, %rcx
movq %rcx, 0x68(%rsp)
leaq 0x100(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x57a6(%rip), %rsi      # 0x90aa
leaq 0x57b3(%rip), %rdx      # 0x90be
callq 0x6ed6
leaq 0x240(%rsp), %rdi
leaq 0x100(%rsp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x268c
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x3949
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5763(%rip), %rsi      # 0x90bf
leaq 0x576b(%rip), %rdx      # 0x90ce
leaq 0x98(%rsp), %rdi
callq 0x6ed6
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x56ca(%rip), %rsi      # 0x904c
callq 0x22a0
movq %rax, %r14
xorl %ebp, %ebp
cmpl $0x0, 0xc(%rsp)
je 0x39ae
movzbl %bpl, %ebx
xorl %r15d, %r15d
movl %ebx, %edi
movq %r14, %rsi
callq 0x20b0
incl %r15d
cmpl 0xc(%rsp), %r15d
jb 0x399a
incb %bpl
cmpb 0xb(%rsp), %bpl
jbe 0x398c
movq 0x68(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x60fe
movq 0xe8(%rsp), %rdi
addq $0x20, %rdi
movq 0x68(%rsp), %rsi
callq 0x60fe
testq %r14, %r14
je 0x39ed
movq %r14, %rdi
callq 0x2240
movzbl 0xb(%rsp), %edi
leaq 0x210(%rsp), %rdx
movq 0x90(%rsp), %rsi
callq 0x2dad
movq 0x98(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x21a0
leaq 0x1d0(%rsp), %rbx
movl %eax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x11(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a36
movq %rbx, %rdi
movl $0xff, %esi
callq 0x5acc
movzbl 0xb(%rsp), %esi
movl 0xc(%rsp), %edx
leaq 0x100(%rsp), %r12
leaq 0xe8(%rsp), %rcx
movq %r12, %rdi
movq %rbx, %r8
callq 0x617a
movl 0xa7cd(%rip), %esi      # 0xe240
incl %esi
leaq 0xd0(%rsp), %rdi
leaq 0x68(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
callq 0x62ac
movq 0xd0(%rsp), %rax
movq $0x0, (%rax)
movl 0xa79c(%rip), %ebx      # 0xe240
movzbl 0xb(%rsp), %esi
incq %rsi
leaq 0xb8(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x1f8(%rsp), %rcx
callq 0x632a
incl %ebx
leaq 0x1b8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rsi
callq 0x63a8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3aff
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpl $0x0, 0xa729(%rip)      # 0xe240
je 0x3b3d
xorl %ebp, %ebp
leaq 0x20(%rsp), %rbx
leaq 0x100(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6440
incl %ebp
cmpl 0xa705(%rip), %ebp      # 0xe240
jb 0x3b28
incb 0x130(%rsp)
movl $0xd, %edx
movq 0xa480(%rip), %rdi      # 0xdfd0
leaq 0x5578(%rip), %rsi      # 0x90cf
callq 0x2290
movzbl 0x130(%rsp), %esi
movq 0xa465(%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 0x130(%rsp), %ebx
leaq 0xb8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x64a2
leaq 0x1f8(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x6522
movl $0xf, %edx
movq 0xa3f8(%rip), %rdi      # 0xdfd0
leaq 0x54fe(%rip), %rsi      # 0x90dd
callq 0x2290
leal -0x1(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ebx, %ecx
decl %ecx
andl $-0x2, %ecx
subl %ecx, %eax
cltq
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %r14
addq $0x210, %r14            # imm = 0x210
andl $0x1, %ebx
leaq (%rbx,%rbx,2), %rax
leaq (%rsp,%rax,8), %r15
addq $0x210, %r15            # imm = 0x210
movb 0x130(%rsp), %bl
incb %bl
movzbl %bl, %ebx
movzbl 0xb(%rsp), %eax
incl %eax
cmpl %ebx, %eax
jb 0x3c50
movq (%r14), %rax
movl %ebx, %ecx
shll $0x5, %ecx
leaq (%rax,%rcx), %rsi
addq $-0x20, %rsi
incb %bl
leaq 0x118(%rsp), %rdi
callq 0x65bc
jmp 0x3c21
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x1, 0x10(%rsp)
cmpl $0x0, 0xa5d0(%rip)      # 0xe240
leaq 0xb8(%rsp), %rbx
je 0x3d0e
xorl %eax, %eax
movl %eax, %eax
movq 0xb8(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
cmpq 0x68(%rsp), %rcx
jae 0x3d0e
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq 0x20(%rsp), %rax
movq %r12, 0x70(%rsp)
movq %rax, 0x18(%rsp)
movq %rbx, 0x60(%rsp)
leaq 0x1f8(%rsp), %rax
movq %rax, 0x88(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
leaq -0x78c(%rip), %rsi      # 0x3545
leaq 0x18(%rsp), %rdx
leaq 0x78(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x68(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x65f2
addq $0x10, %rsp
movl 0x10(%rsp), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rsp)
cmpl 0xa538(%rip), %ecx      # 0xe240
jbe 0x3c80
movq %r15, 0x198(%rsp)
movq %r14, 0x1a0(%rsp)
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rbx
cmpq %rbx, %r15
je 0x3d3b
movq %r15, %rdi
callq 0x23b0
addq $0x8, %r15
jmp 0x3d28
movl 0x10(%rsp), %eax
decl %eax
movl %eax, %esi
je 0x3d69
movq 0x20(%rsp), %rax
movq %rsi, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %ebp, %ebp
orb 0x29(%rax,%rdx), %bpl
addq $0x60, %rdx
cmpq %rdx, %rcx
jne 0x3d59
jmp 0x3d6b
xorl %ebp, %ebp
movq $0x0, 0x18(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x62ac
movl 0x10(%rsp), %edi
xorl %r15d, %r15d
movl $0x0, %eax
decl %edi
je 0x3e10
movq 0x70(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq 0x138(%rsp), %rsi
movl %edi, %edi
xorl %r8d, %r8d
xorl %eax, %eax
leaq (%r8,%r8,2), %r9
shlq $0x5, %r9
movq 0x30(%rdx,%r9), %r10
movq 0x38(%rdx,%r9), %r9
subq %r10, %r9
sarq $0x3, %r9
movq (%rcx,%r8,8), %r11
cmpq %r9, %r11
setae %bl
jae 0x3e01
movq (%r10,%r11,8), %r14
cmpq (%rsi), %r14
jae 0x3e01
incq %r11
movq %r11, %rbx
movq %r11, (%rcx,%r8,8)
cmpq %r11, %r9
je 0x3dfb
movq (%r10,%rbx,8), %r14
leaq 0x1(%rbx), %r11
cmpq (%rsi), %r14
jb 0x3de2
cmpq %r9, %rbx
setae %bl
movzbl %bl, %r9d
addl %r9d, %eax
incq %r8
cmpq %rdi, %r8
jne 0x3db1
movl 0x10(%rsp), %r8d
decl %r8d
cmpl %r8d, %eax
jae 0x3f9e
movq 0x70(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq 0x138(%rsp), %rsi
movl %r15d, %edi
movl %r8d, %r8d
leaq 0x38(%rdx), %r9
xorl %r10d, %r10d
xorl %r12d, %r12d
movq (%rcx,%r10,8), %r11
movq -0x8(%r9), %rbx
movq (%r9), %r14
subq %rbx, %r14
sarq $0x3, %r14
cmpq %r14, %r11
jae 0x3e92
movq (%rbx,%r11,8), %r11
movq (%rsi,%rdi,8), %rbx
cmpq %rbx, %r11
jb 0x3e92
leaq (%r12,%r12,2), %r14
shlq $0x5, %r14
movq (%rcx,%r12,8), %r13
movq 0x30(%rdx,%r14), %r14
movq (%r14,%r13,8), %r14
movq %r10, %r13
cmpq %rbx, %r14
jb 0x3e87
movq %r12, %r13
movq %r10, %r12
cmpq %r14, %r11
jb 0x3e92
movq %r13, %r12
incq %r10
addq $0x60, %r9
cmpq %r10, %r8
jne 0x3e43
movq 0x70(%rsp), %rdx
movq (%rdx,%r12,8), %r14
movq 0x20(%rsp), %rcx
leaq (%r12,%r12,2), %rsi
shlq $0x5, %rsi
movq 0x30(%rcx,%rsi), %rdi
movq 0x38(%rcx,%rsi), %rbx
subq %rdi, %rbx
sarq $0x3, %rbx
cmpq %rbx, %r14
jae 0x3f95
addq %rsi, %rcx
movq (%rdi,%r14,8), %rax
incl %r15d
movq 0xd0(%rsp), %rsi
movq %rax, (%rsi,%r15,8)
movq (%rdx,%r12,8), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x48(%rcx), %rsi
leaq (%r15,%r15,2), %rdi
shlq $0x3, %rdi
addq 0x1b8(%rsp), %rdi
callq 0x6656
movq 0x70(%rsp), %rcx
incq (%rcx,%r12,8)
movl 0x10(%rsp), %eax
decl %eax
je 0x3f93
movq 0x20(%rsp), %rdx
movq 0x138(%rsp), %rsi
movl %eax, %edi
xorl %r8d, %r8d
xorl %eax, %eax
leaq (%r8,%r8,2), %r9
shlq $0x5, %r9
movq 0x30(%rdx,%r9), %r10
movq 0x38(%rdx,%r9), %r9
subq %r10, %r9
sarq $0x3, %r9
movq (%rcx,%r8,8), %r11
cmpq %r9, %r11
setae %r13b
jae 0x3f82
movq (%r10,%r11,8), %r12
cmpq (%rsi,%r15,8), %r12
jae 0x3f82
incq %r11
movq %r11, %r13
movq %r11, (%rcx,%r8,8)
cmpq %r11, %r9
je 0x3f7b
movq (%r10,%r13,8), %r12
leaq 0x1(%r13), %r11
cmpq (%rsi,%r15,8), %r12
jb 0x3f61
cmpq %r9, %r13
setae %r13b
movzbl %r13b, %r9d
addl %r9d, %eax
incq %r8
cmpq %rdi, %r8
jne 0x3f2e
jmp 0x3f95
xorl %eax, %eax
cmpq %rbx, %r14
jb 0x3e10
movq 0x118(%rsp), %rbx
movq 0x120(%rsp), %r14
cmpq %rbx, %r14
je 0x3fcf
movq %rbx, %r15
movq %r15, %rdi
callq 0x5d38
addq $0x28, %r15
cmpq %r14, %r15
jne 0x3fb6
movq %rbx, 0x120(%rsp)
movq 0x9ffa(%rip), %rcx      # 0xdfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2220
leaq 0x100(%rsp), %r12
movsbl %al, %esi
movq 0x9fd4(%rip), %rdi      # 0xdfd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
movq 0x1a0(%rsp), %r14
movq 0x198(%rsp), %r15
je 0x4033
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x40(%rsp), %rdi
callq 0x672c
testb $0x1, %bpl
je 0x4191
movl $0xf, %edx
movq 0x9f7d(%rip), %rdi      # 0xdfd0
leaq 0x5093(%rip), %rsi      # 0x90ed
callq 0x2290
movq 0x9f6a(%rip), %rcx      # 0xdfd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x9f4c(%rip), %rdi      # 0xdfd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
movzbl 0x130(%rsp), %eax
movq (%r15), %rcx
shll $0x5, %eax
movq -0x20(%rcx,%rax), %rdi
callq 0x2400
movzbl 0xb(%rsp), %eax
movq (%r14), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
callq 0x2400
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movzbl 0x130(%rsp), %eax
incq %rax
movq %rax, 0x70(%rsp)
cmpl $0x0, 0xa15b(%rip)      # 0xe240
je 0x4174
xorl %ebx, %ebx
leaq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %r14, 0x10(%rsp)
movq %r15, 0x1b0(%rsp)
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
leaq -0xbb3(%rip), %rsi      # 0x357e
leaq 0x20(%rsp), %rdx
leaq 0x13(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x68(%rsp), %r9
leaq 0x1b8(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0xa0(%rsp), %rax
pushq %rax
callq 0x6768
addq $0x20, %rsp
incl %ebx
cmpl 0xa0d2(%rip), %ebx      # 0xe240
jb 0x40ed
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rbx
cmpq %rbx, %r15
je 0x41e3
movq %r15, %rdi
callq 0x23b0
addq $0x8, %r15
jmp 0x417e
movzbl 0x130(%rsp), %eax
movq (%r15), %rcx
shll $0x5, %eax
movq -0x20(%rcx,%rax), %rdi
callq 0x2400
movzbl 0xb(%rsp), %eax
movq (%r14), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
callq 0x2400
movb 0x130(%rsp), %bl
incb %bl
cmpb 0xb(%rsp), %bl
ja 0x41ed
movq (%r14), %rax
movzbl %bl, %ebx
movl %ebx, %ecx
shll $0x5, %ecx
movq -0x20(%rax,%rcx), %rdi
callq 0x2400
jmp 0x41c4
leaq 0x40(%rsp), %rdi
callq 0x672c
leaq 0x1f8(%rsp), %rdi
callq 0x67e6
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x4217
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
testb $0x1, %bpl
jne 0x3b3d
movzbl 0x130(%rsp), %eax
andl $0x1, %eax
movq 0xe8(%rsp), %rcx
shll $0x5, %eax
movq (%rcx,%rax), %rdi
movq 0x190(%rsp), %rax
movq (%rax), %rsi
callq 0x2120
movzbl 0x130(%rsp), %eax
movl %eax, %ecx
decl %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
decl %ecx
andl $-0x2, %ecx
negl %ecx
addl %ecx, %eax
decl %eax
cltq
movq 0xe8(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rdi
callq 0x2400
leaq 0x20(%rsp), %rdi
callq 0x6834
leaq 0x1b8(%rsp), %rdi
callq 0x67e6
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x42b2
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x100(%rsp), %rdi
callq 0x6876
leaq 0x1d0(%rsp), %rdi
callq 0x68a6
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x42f1
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x240(%rsp), %rdi
callq 0x57a4
movl $0x18, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x210, %rdi            # imm = 0x210
callq 0x57a4
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x4303
leaq 0xe8(%rsp), %rdi
callq 0x57a4
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4541
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
jmp 0x4541
movq %rax, %rbx
jmp 0x4541
movq %rax, %rbx
jmp 0x455e
movq %rax, %rbx
jmp 0x456b
movq %rax, %rbx
jmp 0x4578
movq %rax, %rbx
jmp 0x459d
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x45aa
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x45aa
movq %rax, %rbx
jmp 0x45aa
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x43df
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x43df
jmp 0x43dc
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x4404
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x4404
movq %rax, %rbx
movq %r14, %r15
cmpq %r15, %r14
je 0x45ca
leaq 0x210(%rsp), %r14
addq $-0x18, %r15
movq %r15, %rdi
callq 0x57a4
cmpq %r14, %r15
jne 0x4415
jmp 0x45ca
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x2450
movb $0x1, %al
jmp 0x4456
movq %rax, %rbx
xorl %eax, %eax
jmp 0x4456
movq %rax, %rbx
xorl %eax, %eax
movq %r12, %r15
cmpq %r15, %r12
sete %cl
orb %al, %cl
jne 0x45d7
addq $-0x10, %r15
leaq 0x100(%rsp), %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x4484
movq (%r15), %rsi
incq %rsi
callq 0x2260
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x4470
jmp 0x45d7
movq %rax, %rbx
testq %r14, %r14
je 0x4578
movq %r14, %rdi
callq 0x2240
jmp 0x4578
jmp 0x44c1
jmp 0x44ee
jmp 0x44c1
movq %rax, %rbx
jmp 0x450d
jmp 0x44c6
jmp 0x44fd
movq %rax, %rbx
jmp 0x452a
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x44f1
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
jmp 0x44f1
jmp 0x44ee
jmp 0x44e9
movq %rax, %rbx
jmp 0x44f1
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x672c
jmp 0x4500
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
callq 0x67e6
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x452a
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x20(%rsp), %rdi
callq 0x6834
leaq 0x1b8(%rsp), %rdi
callq 0x67e6
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x455e
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x100(%rsp), %rdi
callq 0x6876
leaq 0x1d0(%rsp), %rdi
callq 0x68a6
leaq 0xa8(%rsp), %rax
movq 0x98(%rsp), %rdi
cmpq %rax, %rdi
je 0x459d
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x240(%rsp), %rdi
callq 0x57a4
movl $0x18, %r14d
leaq (%rsp,%r14), %rdi
addq $0x210, %rdi            # imm = 0x210
callq 0x57a4
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x45b0
leaq 0xe8(%rsp), %rdi
callq 0x57a4
movq %rbx, %rdi
callq 0x23d0