// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: worker_Qp(std::atomic<unsigned long>&, 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::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::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&)
void worker_Qp(std::atomic<luint_t>& shared_l,
               const strlen_t k, const strnum_t m,
               const occ_countv_t& occv,
               const fnames_t& B_tpl,
               const fnames_t& prevQ_tpl,
               const fnames_t& currQ_tpl
               ) {
  luint_t l;
  while ((l = shared_l.fetch_add(1)) <= k) {
    assert(l <= k);
    enc_fasta_reader_t Bl1(B_tpl[l]);
    plain_fasta_reader_t Ql1(prevQ_tpl[l-1]);
    create_empty_file<enc_nucl_t>(currQ_tpl[l], m);
    mmap_writer_t<enc_nucl_t, ALPHSIZE> Ql(currQ_tpl[l]);
    luint_t cumsum = 0;
    for (enc_nucl_t sigma = 0; sigma < ALPHSIZE; ++sigma) {
      Ql.seek(sigma, cumsum);
      cumsum += occv[l][sigma];
    }
    for (strnum_t i = 0; i < m; ++i) {
      const enc_nucl_t Ql1i = Ql1.read();
      const enc_nucl_t Bl1i = Bl1.read();
      Ql.write(Bl1i, Ql1i);
    }
    remove_file(prevQ_tpl[l-1]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, %r15
movq %rdi, 0x40(%rsp)
movl %esi, %eax
movq %rax, 0x38(%rsp)
movl %edx, 0xc(%rsp)
movl %edx, %eax
movq %rax, 0x28(%rsp)
leaq 0x48(%rsp), %r13
leaq 0x60(%rsp), %r14
pushq $0x1
popq %rbx
movq 0x40(%rsp), %rax
lock
xaddq %rbx, (%rax)
cmpq 0x38(%rsp), %rbx
ja 0x327c
movq %r13, %rdi
movq %rbx, %r13
shlq $0x5, %r13
movq 0x30(%rsp), %rax
movq (%rax), %rsi
addq %r13, %rsi
leaq 0x5eba(%rip), %rbp      # 0x904f
movq %rbp, %rdx
callq 0x4b74
leaq -0x1(%rbx), %r12
shlq $0x5, %r12
movq 0x10(%rsp), %rax
movq (%rax), %rsi
addq %r12, %rsi
leaq 0x18(%rsp), %rdi
movq %rbp, %rdx
callq 0x53f6
movq 0x130(%rsp), %rbp
movq (%rbp), %rdi
addq %r13, %rdi
movq 0x28(%rsp), %rsi
callq 0x5460
addq (%rbp), %r13
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4f2a
imulq $0x30, %rbx, %rbp
xorl %r13d, %r13d
xorl %ebx, %ebx
cmpq $0x6, %r13
je 0x3213
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0x50f4
movq (%r15), %rax
addq %rbp, %rax
addq (%rax,%r13,8), %rbx
incq %r13
jmp 0x31f0
movl 0xc(%rsp), %ebx
leaq 0x48(%rsp), %r13
subl $0x1, %ebx
jb 0x324d
movb 0x20(%rsp), %bpl
movq 0x18(%rsp), %rdi
callq 0x2420
movb %al, 0x20(%rsp)
movq %r13, %rdi
callq 0x4c0c
movzbl %al, %esi
movzbl %bpl, %edx
movq %r14, %rdi
callq 0x5278
jmp 0x321c
movq 0x10(%rsp), %rax
addq (%rax), %r12
movq %r12, %rdi
callq 0x2692
movq %r14, %rdi
callq 0x53ac
leaq 0x18(%rsp), %rdi
callq 0x54b0
movq %r13, %rdi
callq 0x54b0
jmp 0x3161
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x32b1
jmp 0x3295
movq %rax, %rbx
jmp 0x32a7
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x53ac
leaq 0x18(%rsp), %rdi
callq 0x54b0
leaq 0x48(%rsp), %rdi
callq 0x54b0
movq %rbx, %rdi
callq 0x23d0