// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::Trie_t::encodeCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void encodeCharacters(const std::string& filename)
    {
      // std::cout << "[LOG] Encoding characters." << std::endl;
      unsigned int lineCode = 1;
      std::string currentLine;
      std::ifstream fileInputStream(filename);

      while (std::getline(fileInputStream, currentLine)) {

        m_reverseCharacterMap.emplace(lineCode, currentLine.back());

        wchar_t anomalousCharacters[currentLine.size()];
        push_string_to_wchar(anomalousCharacters, currentLine);

        for (unsigned int i = 0; i < wcslen(anomalousCharacters); i++) {
          m_characterMap.emplace(anomalousCharacters[i], lineCode);
        }

        lineCode++;
      }

      m_reverseCharacterMap[0] = '#'; // lambda character
      std::cout << "Charmap has been mapped.\n";
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
movl $0x1, -0x2c(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x270(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2240
leaq 0x40(%rbx), %rax
movq %rax, -0x58(%rbp)
addq $0x8, %rbx
leaq -0x2c(%rbp), %r13
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %edx
movq %r14, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3c60
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
leaq (%rax,%rcx), %rdx
decq %rdx
movq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x40a6
movq %rsp, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq %rsp, %r14
leaq 0xf(,%rax,4), %r15
andq $-0x10, %r15
movq %r14, %r12
subq %r15, %r12
movq %r12, %rsp
negq %r15
movl $0x6, %edi
leaq 0x4486(%rip), %rsi      # 0x8076
callq 0x2140
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rdx
movq %rax, -0x60(%rbp)
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
xorl %ecx, %ecx
callq 0x2170
movq -0x48(%rbp), %rax
movl $0x0, (%r12,%rax,4)
cmpl $0x0, (%r14,%r15)
je 0x3c4d
movl $0x1, %r15d
xorl %r14d, %r14d
leaq (%r12,%r14,4), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x435e
movl %r15d, %r14d
movq %r12, %rdi
callq 0x2120
incl %r15d
cmpq %r14, %rax
ja 0x3c2b
movq -0x68(%rbp), %rsp
incl -0x2c(%rbp)
leaq -0x270(%rbp), %r14
jmp 0x3b6d
leaq -0x60(%rbp), %rsi
movl $0x0, (%rsi)
movq -0x58(%rbp), %rdi
callq 0x45fa
movb $0x23, (%rax)
movq 0x8353(%rip), %rdi      # 0xbfd0
leaq 0x44bb(%rip), %rsi      # 0x813f
movl $0x19, %edx
callq 0x21a0
leaq -0x270(%rbp), %rdi
callq 0x2060
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3cb3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2180
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ccd
jmp 0x3ccd
movq %rax, %rbx
jmp 0x3cdc
jmp 0x3ccd
movq %rax, %rbx
leaq -0x270(%rbp), %rdi
callq 0x2060
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3cf5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2270
nop