// File: IHorvalds[P]RomAna/./processing/analyze_poet.hpp
// Function: PoetAnalyzer::dictionaryTask(InflexEngine&, char const*)
void dictionaryTask(InflexEngine& dict, const char* textName) {
    // Open the normal file
    text txt(textName);
    
    // Open the latin_file
    std::string tmp = textName;
    std::string pythonCommand = "python3 processing/convert_into_latin.py " + tmp;
    int warning = system(pythonCommand.data());
    tmp = "latin_" + tmp;
    text latin_txt(tmp); 

    // Read the first words
    std::string word = txt.serveWord();
    std::string latin_word = latin_txt.serveWord();

    // Continue parsing the text until its end
    while ((word != " <EOF> ") && (latin_word != " <EOF> ")) {
      // Update the frequencies
      dict.updateFreq(word, latin_word);
      word = txt.serveWord();
      latin_word = latin_txt.serveWord();
    }
    txt.close();
  }

// Assembly:
subq $0xe28, %rsp            # imm = 0xE28
movq %rdi, 0xe20(%rsp)
movq %rsi, 0xe18(%rsp)
movq %rdx, 0xe10(%rsp)
movq 0xe10(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x7d7(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x4630
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x7d8(%rsp), %rdi
callq 0xacb0
jmp 0xefd7
leaq 0x7f8(%rsp), %rdi
leaq 0x7d8(%rsp), %rsi
callq 0xb220
jmp 0xefee
leaq 0x7d8(%rsp), %rdi
callq 0x4200
leaq 0x7d7(%rsp), %rdi
callq 0x43b0
movq 0xe10(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x79f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x4630
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x7a0(%rsp), %rdi
callq 0xacb0
jmp 0xf040
leaq 0x79f(%rsp), %rdi
callq 0x43b0
leaq 0x619e(%rip), %rsi      # 0x151f2
leaq 0x778(%rsp), %rdi
leaq 0x7a0(%rsp), %rdx
callq 0xb330
jmp 0xf06b
leaq 0x778(%rsp), %rdi
callq 0x41d0
movq %rax, %rdi
callq 0x42d0
movl %eax, 0x34(%rsp)
jmp 0xf086
movl 0x34(%rsp), %eax
movl %eax, 0x774(%rsp)
leaq 0x6490(%rip), %rsi      # 0x15528
leaq 0x750(%rsp), %rdi
leaq 0x7a0(%rsp), %rdx
callq 0xb330
jmp 0xf0af
leaq 0x7a0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x750(%rsp), %rsi
movq %rsi, 0x20(%rsp)
callq 0x4410
movq 0x20(%rsp), %rdi
callq 0x4200
movq 0x28(%rsp), %rsi
leaq 0x118(%rsp), %rdi
callq 0x4170
jmp 0xf0ec
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xb220
jmp 0xf103
leaq 0x118(%rsp), %rdi
callq 0x4200
leaq 0xf8(%rsp), %rdi
leaq 0x7f8(%rsp), %rsi
callq 0xb460
jmp 0xf127
leaq 0xd8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xb460
jmp 0xf13e
jmp 0xf140
leaq 0x60d5(%rip), %rsi      # 0x1521c
leaq 0xf8(%rsp), %rdi
callq 0xb6a0
movb %al, 0x1f(%rsp)
jmp 0xf15a
movb 0x1f(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1e(%rsp)
jne 0xf16b
jmp 0xf18f
leaq 0x60aa(%rip), %rsi      # 0x1521c
leaq 0xd8(%rsp), %rdi
callq 0xb6a0
movb %al, 0x1d(%rsp)
jmp 0xf185
movb 0x1d(%rsp), %al
movb %al, 0x1e(%rsp)
jmp 0xf18f
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0xf19c
jmp 0xf3cf
movq 0xe18(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4170
jmp 0xf1c0
leaq 0x98(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x4170
jmp 0xf1d7
movq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x5620
jmp 0xf1f3
leaq 0x98(%rsp), %rdi
callq 0x4200
leaq 0xb8(%rsp), %rdi
callq 0x4200
leaq 0x78(%rsp), %rdi
leaq 0x7f8(%rsp), %rsi
callq 0xb460
jmp 0xf221
leaq 0xf8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x4410
movq 0x8(%rsp), %rdi
callq 0x4200
leaq 0x58(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xb460
jmp 0xf256
leaq 0xd8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x4410
leaq 0x58(%rsp), %rdi
callq 0x4200
jmp 0xf140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf2ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
leaq 0x7d8(%rsp), %rdi
callq 0x4200
leaq 0x7d7(%rsp), %rdi
callq 0x43b0
jmp 0xf482
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
leaq 0x79f(%rsp), %rdi
callq 0x43b0
jmp 0xf475
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf468
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf45b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x4200
jmp 0xf45b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf44e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf441
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf434
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
jmp 0xf3c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7c8(%rsp)
movl %eax, 0x7c4(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x4200
leaq 0xb8(%rsp), %rdi
callq 0x4200
jmp 0xf434
leaq 0x7f8(%rsp), %rdi
callq 0xf6a0
jmp 0xf3de
leaq 0xd8(%rsp), %rdi
callq 0x4200
leaq 0xf8(%rsp), %rdi
callq 0x4200
leaq 0x138(%rsp), %rdi
callq 0xb6d0
leaq 0x778(%rsp), %rdi
callq 0x4200
leaq 0x7a0(%rsp), %rdi
callq 0x4200
leaq 0x7f8(%rsp), %rdi
callq 0xb6d0
addq $0xe28, %rsp            # imm = 0xE28
retq
leaq 0xd8(%rsp), %rdi
callq 0x4200
leaq 0xf8(%rsp), %rdi
callq 0x4200
leaq 0x138(%rsp), %rdi
callq 0xb6d0
leaq 0x778(%rsp), %rdi
callq 0x4200
leaq 0x7a0(%rsp), %rdi
callq 0x4200
leaq 0x7f8(%rsp), %rdi
callq 0xb6d0
movq 0x7c8(%rsp), %rdi
callq 0x4620
nop