// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r15
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
xorl %r14d, %r14d
movq %r15, %rdi
xorl %esi, %esi
callq 0x4f6a
leaq 0xd0(%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 0xe0(%rsp), %rbx
movl %r14d, (%rbx)
movq %r14, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
movq %r14, 0x20(%rbx)
movq (%r13), %rcx
movq %rcx, 0x28(%rsp)
movl %r14d, 0x10(%rsp)
movq 0x30(%r15), %rax
movq 0x40(%r15), %rdx
addq $-0x10, %rdx
cmpq %rdx, %rax
je 0x3296
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x70(%rsp)
jmp 0x32aa
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x50e2
leaq 0x78(%r13), %r15
movq (%r13), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0x0, (%rdx)
movq %r15, %rdi
callq 0x52fe
movq (%r13), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0xa0(%rsp), %rdi
callq 0x545c
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
je 0x354f
leaq 0x8(%rsp), %rbp
movq %r13, 0x90(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x332b
addq $0x10, %rax
jmp 0x335d
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 0x4ed8
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r12
cmpq %r12, %r14
je 0x3528
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movq 0xe8(%rsp), %rdx
movq %rbx, %rcx
testq %rdx, %rdx
je 0x33b7
movq %rbx, %rcx
xorl %esi, %esi
cmpq %rax, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x339f
movq %rbx, %rdx
cmpq %rbx, %rcx
je 0x33ca
cmpq 0x20(%rcx), %rax
cmovbq %rbx, %rcx
movq %rcx, %rdx
cmpq %rbx, %rdx
jne 0x351f
movl 0x18(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
leaq 0xd8(%rsp), %rdi
movq %rbp, %rsi
callq 0x587e
leaq 0xa0(%rsp), %rdi
movq %rbp, %rsi
leaq 0x10(%rsp), %rdx
callq 0x59c2
movl 0x4(%rsp), %eax
cmpl 0xdc(%r13), %eax
jge 0x344d
movq 0x70(%rsp), %rcx
movq 0x80(%rsp), %rdx
addq $-0x10, %rdx
cmpq %rdx, %rcx
je 0x343b
movq 0x8(%rsp), %rdx
movq %rdx, (%rcx)
movl %eax, 0x8(%rcx)
addq $0x10, %rcx
movq %rcx, 0x70(%rsp)
jmp 0x344d
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
leaq 0x4(%rsp), %rdx
callq 0x5a90
cmpb $0x0, 0x24(%rsp)
je 0x3463
movq 0x8(%rsp), %rax
cmpb $0x1, 0x34(%rax)
jne 0x351f
movq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %r15, %rdi
leaq 0x98(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x5b60
movq 0x8(%rsp), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax,%rdx,8), %rax
movq (%rax), %rdx
cmpq 0x8(%rdx), %rcx
je 0x34b4
movq %rdx, %rax
movq (%rdx), %rdx
jmp 0x34a6
movq (%rax), %r13
cmpq $0x0, 0x10(%r13)
je 0x3517
addq $0x10, %r13
decl 0x4(%rsp)
movq %r15, %rdi
movq %r13, %rsi
leaq 0x4(%rsp), %rdx
callq 0x5b60
testb $0x1, %dl
je 0x3517
movq (%r13), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax,%rdx,8), %rax
movq (%rax), %rdx
cmpq 0x8(%rdx), %rcx
je 0x3509
movq %rdx, %rax
movq (%rdx), %rdx
jmp 0x34fb
movq (%rax), %rax
leaq 0x10(%rax), %r13
cmpq $0x0, 0x10(%rax)
jne 0x34c2
movq 0x90(%rsp), %r13
addq $0x8, %r14
jmp 0x337b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x353f
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
jne 0x330f
leaq 0xd8(%rsp), %rdi
callq 0x5c0e
leaq 0xa0(%rsp), %rdi
callq 0x5c5e
leaq 0x40(%rsp), %rdi
callq 0x5cce
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x358b
jmp 0x358b
jmp 0x358b
movq %rax, %rbx
jmp 0x35ae
jmp 0x3594
jmp 0x3594
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x35ae
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0xd8(%rsp), %rdi
callq 0x5c0e
leaq 0xa0(%rsp), %rdi
callq 0x5c5e
leaq 0x40(%rsp), %rdi
callq 0x5cce
movq %rbx, %rdi
callq 0x2270