// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::Trie_t::buildActiveNodeSet(bool)
void buildActiveNodeSet(bool _onlyFinalWords)
    {
      std::queue<std::pair<TrieNode_t*, int>> seekQueue;
      std::unordered_map<TrieNode_t*, TrieNode_t*> father;
      std::set<TrieNode_t*> visited;
      seekQueue.emplace(this->m_lambdaNode.get(), 0); // add the lambdaNode to the seek
      m_activeNodeSet.emplace(this->m_lambdaNode.get(), 0); // add the lambdaNode to the activeSet
      father.emplace(this->m_lambdaNode.get(), nullptr); // set lambdaNode father as nullptr

      /* initialization */

      while (!seekQueue.empty()) {
        auto currentNode = seekQueue.front(); // get currentNode
        seekQueue.pop();

        for (TrieNode_t* child : currentNode.first->getChildren()) {

          // verify if the child hasn't been visited recently
          if (visited.find(child) == visited.end()) {
            int currentLevel = currentNode.second + 1;

            visited.emplace(child); // add child to the visited set
            father.emplace(child, currentNode.first); // set current vertex as father

            if (currentLevel < m_fuzzyLimitThreshold) { // add the child on the seek only if it has a threshold < fuzzy
              seekQueue.emplace(child, currentLevel);
            }

            if (!_onlyFinalWords || child->isEndOfWord()) { // verify if this child is end of word
              TrieNode_t* currentChild = child;
              m_activeNodeSet.emplace(currentChild, currentLevel); // add the child to the activeSet

              auto currentChild_it = father.find(child);

              // add all the father's father's father's ... father's of this child to the activeSet
              while (currentChild_it->second != nullptr) {

                if (m_activeNodeSet.emplace(currentChild_it->second, --currentLevel).second) {
                  currentChild_it = father.find(currentChild_it->second);
                } else {
                  break;
                }
              }
            }
          }
        }
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %esi, 0x24(%rsp)
movq %rdi, %r12
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rbx
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4e9c
leaq 0x100(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0xa8(%rsp), %rax
movl %r14d, (%rax)
movq %r14, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r14, 0x20(%rax)
movq (%r12), %rcx
movq %rcx, 0x28(%rsp)
movl %r14d, 0x10(%rsp)
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rdx
addq $-0x10, %rdx
cmpq %rdx, %rax
je 0x32cd
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x70(%rsp)
jmp 0x32e1
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x5014
leaq 0x78(%r12), %r15
movq (%r12), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0x0, (%rdx)
movq %r15, %rdi
callq 0x5230
movq %r12, 0x90(%rsp)
movq (%r12), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0xd0(%rsp), %rdi
callq 0x538e
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
je 0x3563
leaq 0xd0(%rsp), %r12
leaq 0x4(%rsp), %r13
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x336b
addq $0x10, %rax
jmp 0x339d
movq 0x58(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x68(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x50(%rsp)
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x4e0a
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rbp
cmpq %rbp, %rbx
je 0x353e
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x3423
leaq 0xa8(%rsp), %r8
movq %r8, %rcx
movq %rdi, %rdx
movq 0x20(%rdi), %rsi
xorl %edi, %edi
cmpq %rax, %rsi
setb %dil
movq %rdx, %r8
cmovbq %rcx, %r8
movq 0x10(%rdx,%rdi,8), %rdi
testq %rdi, %rdi
jne 0x33e1
leaq 0xa8(%rsp), %rdi
cmpq %rdi, %r8
je 0x3423
cmpq %rax, %rsi
cmovbq %rcx, %rdx
cmpq 0x20(%rdx), %rax
jae 0x352c
movl 0x18(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x575a
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x589e
movl 0x4(%rsp), %eax
movq 0x90(%rsp), %rcx
cmpl 0xdc(%rcx), %eax
jge 0x34a3
movq 0x70(%rsp), %rcx
movq 0x80(%rsp), %rdx
addq $-0x10, %rdx
cmpq %rdx, %rcx
je 0x3491
movq 0x8(%rsp), %rdx
movq %rdx, (%rcx)
movl %eax, 0x8(%rcx)
addq $0x10, %rcx
movq %rcx, 0x70(%rsp)
jmp 0x34a3
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x5966
movq 0x8(%rsp), %rax
cmpb $0x0, 0x24(%rsp)
je 0x34b5
cmpb $0x1, 0x34(%rax)
jne 0x352c
movq %rax, 0x98(%rsp)
movq %r15, %rdi
leaq 0x98(%rsp), %rsi
movq %r13, %rdx
callq 0x5a36
movq 0x8(%rsp), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movq (%rax,%rdx,8), %rax
movq (%rax), %r14
cmpq 0x8(%r14), %rcx
je 0x350a
movq (%r14), %r14
jmp 0x34f1
movq %r12, %rdi
movq %r14, %rsi
callq 0x5ae4
movq %rax, %r14
cmpq $0x0, 0x10(%r14)
je 0x352c
addq $0x10, %r14
decl 0x4(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x5a36
testb $0x1, %dl
jne 0x34fc
addq $0x8, %rbx
cmpq %rbp, %rbx
jne 0x33c4
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x3553
movq 0x38(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x2180
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
jne 0x334f
leaq 0xa0(%rsp), %rdi
callq 0x5b40
leaq 0xd0(%rsp), %rdi
callq 0x5b90
leaq 0x40(%rsp), %rdi
callq 0x5c00
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x359f
jmp 0x359f
jmp 0x359f
movq %rax, %rbx
jmp 0x35c4
jmp 0x35aa
jmp 0x35aa
jmp 0x35aa
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x35c4
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0xa0(%rsp), %rdi
callq 0x5b40
leaq 0xd0(%rsp), %rdi
callq 0x5b90
leaq 0x40(%rsp), %rdi
callq 0x5c00
movq %rbx, %rdi
callq 0x2270