// File: /workspace/github_cpp_makefile_star2_O3/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: base_env_t::base_env_t(unsigned char, unsigned int, 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&, mmap_swriter_t<unsigned char, 4194304ul>&)
base_env_t(
      const strlen_t _k,
      const strnum_t _m,
      const fnames_t& _IX_names,
      lcp_writer_t& _LCP
  )
    : k(_k),
      m(_m),
      IX_names(_IX_names),
      LCP(_LCP),
      p(0),
      midpoints{new luint_t[concurrency_level]},
      E(static_cast<luint_t>(_m)*(_k+1), false)
  {
    const luint_t tot = static_cast<luint_t>(m)*(k+1);
    const luint_t step =
      atleast1(tot/concurrency_level + ((tot%concurrency_level)>(concurrency_level/2) ? 1 : 0));
    for (luint_t i = 0, pos = step; i<concurrency_level-1; ++i, pos += step) {
      midpoints[i] = pos;
    }
    midpoints[concurrency_level-1] = tot;

    E[tot-1] = true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
movb %bpl, (%rdi)
movl %edx, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x18(%rdi)
movdqu %xmm0, 0x21(%rdi)
movl 0x80cd(%rip), %edi      # 0xe240
shlq $0x3, %rdi
callq 0x2030
movq %rax, 0x38(%r14)
leaq 0x40(%r14), %rbx
movl %r15d, %eax
movzbl %bpl, %esi
incq %rsi
imulq %rax, %rsi
leaq 0x7(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x6(%rsp), %rcx
movq %rbx, %rdi
callq 0x6d18
pxor %xmm0, %xmm0
movdqu %xmm0, 0x78(%r14)
movdqu %xmm0, 0x68(%r14)
movq $0x0, 0x88(%r14)
movl 0x4(%r14), %eax
movzbl (%r14), %esi
incq %rsi
imulq %rax, %rsi
movl 0x8069(%rip), %ecx      # 0xe240
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movl %ecx, %edi
shrl %edi
xorl %r8d, %r8d
cmpq %rdi, %rdx
seta %r8b
leaq (%rax,%r8), %rdx
cmpq $0x1, %rdx
adcq %r8, %rax
movq 0x38(%r14), %rdx
decl %ecx
je 0x62a5
leaq 0x1(%rcx), %rdi
andq $-0x2, %rdi
leaq -0x1(%rcx), %r8
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x2dfe(%rip), %xmm1     # 0x9020
xorl %r8d, %r8d
movdqa 0x2e03(%rip), %xmm2     # 0x9030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x2e03(%rip), %xmm4     # 0x9040
movq %r8, %r9
orq $0x1, %r9
imulq %rax, %r9
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %r10d
notl %r10d
testb $0x1, %r10b
je 0x6280
movq %r9, (%rdx,%r8,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %r10d
testb $0x1, %r10b
je 0x6298
addq %rax, %r9
movq %r9, 0x8(%rdx,%r8,8)
addq $0x2, %r8
paddq %xmm4, %xmm1
cmpq %r8, %rdi
jne 0x623d
movq %rsi, (%rdx,%rcx,8)
leaq -0x1(%rsi), %rcx
addq $0x3e, %rsi
testq %rcx, %rcx
cmovnsq %rcx, %rsi
sarq $0x6, %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq 0x3f(%rax), %rdx
andq %rcx, %rdx
xorl %edi, %edi
cmpq %rax, %rdx
setbe %dil
movl $0x1, %eax
shlq %cl, %rax
orq %rax, -0x8(%rsi,%rdi,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x62f7
movq %rax, %rbx
addq $0x18, %r14
movq %r14, %rdi
callq 0x5fbe
movq %rbx, %rdi
callq 0x23d0