// File: 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
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x298(%rbp)
movl $0x1, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2260
movq -0x10(%rbp), %rsi
leaq -0x240(%rbp), %rdi
movl $0x8, %edx
callq 0x22d0
jmp 0x43b5
jmp 0x43b7
leaq -0x240(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2050
movq %rax, -0x2a0(%rbp)
jmp 0x43d0
movq -0x2a0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2230
movb %al, -0x2a1(%rbp)
jmp 0x43ee
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0x43fd
jmp 0x458d
movq -0x298(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x2c0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2130
movq -0x2c0(%rbp), %rdi
movq %rax, %rdx
leaq -0x14(%rbp), %rsi
callq 0x5ed0
movb %dl, -0x2b1(%rbp)
movq %rax, -0x2b0(%rbp)
jmp 0x443a
movb -0x2b1(%rbp), %al
movq -0x2b0(%rbp), %rcx
movq %rcx, -0x260(%rbp)
movb %al, -0x258(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x2120
movq -0x298(%rbp), %rdi
movq -0x2d0(%rbp), %rdx
movq %rsp, %rcx
movq %rcx, -0x268(%rbp)
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rsi
subq %rcx, %rsi
movq %rsi, -0x2c8(%rbp)
movq %rsi, %rsp
movq %rax, -0x270(%rbp)
callq 0x5f20
jmp 0x44a6
movl $0x0, -0x274(%rbp)
movq -0x2c8(%rbp), %rdi
movl -0x274(%rbp), %eax
movq %rax, -0x2d8(%rbp)
callq 0x2150
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
cmpq %rcx, %rax
jae 0x4575
movq -0x2c8(%rbp), %rax
movq -0x298(%rbp), %rdi
addq $0x8, %rdi
movl -0x274(%rbp), %ecx
leaq (%rax,%rcx,4), %rsi
leaq -0x14(%rbp), %rdx
callq 0x5fb0
movb %dl, -0x2e1(%rbp)
movq %rax, -0x2e0(%rbp)
jmp 0x4510
movb -0x2e1(%rbp), %al
movq -0x2e0(%rbp), %rcx
movq %rcx, -0x288(%rbp)
movb %al, -0x280(%rbp)
movl -0x274(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x44b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
jmp 0x45f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x2060
jmp 0x45f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x268(%rbp), %rax
movq %rax, %rsp
jmp 0x43b7
movq -0x298(%rbp), %rdi
addq $0x40, %rdi
movl $0x0, -0x28c(%rbp)
leaq -0x28c(%rbp), %rsi
callq 0x6000
movq %rax, -0x2f0(%rbp)
jmp 0x45b7
movq -0x2f0(%rbp), %rax
movb $0x23, (%rax)
movq 0x1ca00(%rip), %rdi     # 0x20fc8
leaq 0x11b58(%rip), %rsi     # 0x16127
callq 0x21a0
jmp 0x45d6
leaq -0x240(%rbp), %rdi
callq 0x2060
leaq -0x38(%rbp), %rdi
callq 0x2100
movq %rbp, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x2100
movq -0x248(%rbp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)
nop