// File: IHorvalds[P]RomAna/gui.cpp
// Function: main
int main(int argc, char** argv) {
  if (argc < 3) {
    std::cout << "The following options are available: 0(BUILD_TRIE) or 1 (PROCESS_TEXT) or 2 (UPDATE_DICT) or 3 (PROCESS_POET) or 4 (GINIFY_POET) or 5 (ESSENCE_POET) or 6 (COMPUTE_SIMILARITY)" << std::endl;
    std::cout << "You should insert one of the following schemas: " << std::endl;
    std::cout << "BUILD_TRIE: " << argv[0] << " 0 [file to read the inflections from] [file in which to save the dictionary]" << std::endl;
    std::cout << "PROCESS_TEXT: " << argv[0] << " 1 [dictionary file name] [input file name] [output file name]" << std::endl;
    std::cout << "UPDATE_DICT: " << argv[0] << " 2 [dictionary file name] [input file name] [output file name] [new dictionary file name]" << std::endl;
    std::cout << "ANALYZE_POET: " << argv[0] << " 3 [poet name from poets.txt]" << std::endl;
    std::cout << "GINIFY_POET: " << argv[0] << " 4 [poet name from poets.txt]" << std::endl;
    std::cout << "ESSENCE_POET: " << argv[0] << " 5 [poet name from poets.txt] [distribution type - richness or relative] [sortValues - if the ratios should be sorted]" << std::endl;
    std::cout << "COMPUTE_SIMILARITY: " << argv[0] << " 6 [poet name from poets.txt]" << std::endl;
    return -1;
  }
  
  uint32_t option = atoi(argv[1]);
  switch (option) {
    case BUILD_TRIE : {
      errorArgs(BUILD_TRIE, argc, 4); 
      
      const char* filename = argv[2];
      const char* saveInto = argv[3];
      
      // Create the latin file with python
      std::string tmp = filename;
      std::string pythonCommand = "python3 processing/convert_into_latin.py " + tmp;
      int warning = system(pythonCommand.data());
      size_t pos = tmp.find_last_of("/");
      if (pos == std::string::npos)
        tmp = "latin_" + tmp;
      else
        tmp = tmp.substr(0, pos) + "/latin_" + tmp.substr(pos + 1, tmp.size());
      const char* latinFilename = tmp.data();
      
      // Alloc the dictionary
      InflexEngine A(InflexEngine::Build, filename, latinFilename);
      
      std::cerr << "Size of InflexEngine = " << A.getSize() << std::endl;
      
      // And save the InflexEngine
      A.saveExternal(saveInto);
      
      // Erase the temporary latin file
      std::string eraseCommand = "rm " + tmp;
      warning = system(eraseCommand.data());
      break;
    }
    case PROCESS_TEXT : {
      errorArgs(PROCESS_TEXT, argc, 5); 
      
      // Use the InflexEngine while parsing the text
      std::string dictName = argv[2];
      InflexEngine dict(InflexEngine::Load, dictName.data());
      dictionaryTask(dict, argv[3]);
     
      // Print the frequencies obtained
      dict.showFreqs(argv[4]);
      break;
    }
    case UPDATE_DICT : {
      errorArgs(UPDATE_DICT, argc, 6); 
      
      // Use the InflexEngine while parsing the text
      std::string dictName = argv[2];
      InflexEngine dict(InflexEngine::Load, dictName.data()); 
      
      dictionaryTask(dict, argv[3]);
      
      // Print the frequencies obtained
      dict.showFreqs(argv[4]);
    
      // Save the new obtained dictionary
      dict.saveExternal(argv[5]);
      break;
    }
    case ANALYZE_POET : {
      errorArgs(ANALYZE_POET, argc, 3);
      
      // Compute the local frequencies of each word
      std::string poetName = argv[2];  
      PoetAnalyzer analyzer(poetName);
      analyzer.saveFrequencies();
      break;
    }
    case GINIFY_POET : {
      errorArgs(GINIFY_POET, argc, 3);
      
      // Ginify the poet, i.e, compute the local ginis
      std::string poetName = argv[2];
      LocalGiniGenerator gini(poetName);
      gini.save();
      break;
    }
    case ESSENCE_POET : {
      errorArgs(ESSENCE_POET, argc, 5);
      
      // Ginify the poet, i.e, compute the gini coefficient for each word
      std::string poetName = argv[2];
      std::string distributionType = argv[3];
      bool sortValues = atoi(argv[4]);
      EssenceGenerator essence(poetName, distributionType, sortValues);
      essence.save();
      break;
    }
    case COMPUTE_SIMILARITY : {
      errorArgs(COMPUTE_SIMILARITY, argc, 3);
      
      // Ginify the poet, i.e, compute the gini coefficient for each word
      std::string poetName = argv[2];
      SimilarityGenerator cmp(poetName);
      cmp.save();
      break;
    }
    default : {
      std::cout << "The option " << argv[1] << " is not (yet) available!" << std::endl;
    }
  }
  return 0;
}

// Assembly:
subq $0x5c8, %rsp            # imm = 0x5C8
movl $0x0, 0x5c4(%rsp)
movl %edi, 0x5c0(%rsp)
movq %rsi, 0x5b8(%rsp)
cmpl $0x3, 0x5c0(%rsp)
jge 0x886f
movq 0x13982(%rip), %rdi     # 0x1bfc8
leaq 0xcbd7(%rip), %rsi      # 0x15224
callq 0x4330
movq %rax, %rdi
movq 0x1394c(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x13960(%rip), %rdi     # 0x1bfc8
leaq 0xcc64(%rip), %rsi      # 0x152d3
callq 0x4330
movq %rax, %rdi
movq 0x1392a(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x1393e(%rip), %rdi     # 0x1bfc8
leaq 0xcc73(%rip), %rsi      # 0x15304
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcc5e(%rip), %rsi      # 0x15311
callq 0x4330
movq %rax, %rdi
movq 0x138e6(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x138fa(%rip), %rdi     # 0x1bfc8
leaq 0xcc8a(%rip), %rsi      # 0x1535f
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcc77(%rip), %rsi      # 0x1536e
callq 0x4330
movq %rax, %rdi
movq 0x138a2(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x138b6(%rip), %rdi     # 0x1bfc8
leaq 0xcc94(%rip), %rsi      # 0x153ad
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcc80(%rip), %rsi      # 0x153bb
callq 0x4330
movq %rax, %rdi
movq 0x1385e(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x13872(%rip), %rdi     # 0x1bfc8
leaq 0xccb8(%rip), %rsi      # 0x15415
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcca5(%rip), %rsi      # 0x15424
callq 0x4330
movq %rax, %rdi
movq 0x1381a(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x1382e(%rip), %rdi     # 0x1bfc8
leaq 0xcca1(%rip), %rsi      # 0x15442
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcc8d(%rip), %rsi      # 0x15450
callq 0x4330
movq %rax, %rdi
movq 0x137d6(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x137ea(%rip), %rdi     # 0x1bfc8
leaq 0xcc89(%rip), %rsi      # 0x1546e
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xcc76(%rip), %rsi      # 0x1547d
callq 0x4330
movq %rax, %rdi
movq 0x13792(%rip), %rsi     # 0x1bfa8
callq 0x4380
movq 0x137a6(%rip), %rdi     # 0x1bfc8
leaq 0xcccb(%rip), %rsi      # 0x154f4
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq (%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xccbe(%rip), %rsi      # 0x15509
callq 0x4330
movq %rax, %rdi
movq 0x1374e(%rip), %rsi     # 0x1bfa8
callq 0x4380
movl $0xffffffff, 0x5c4(%rsp) # imm = 0xFFFFFFFF
jmp 0x97e5
movq 0x5b8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x4550
movl %eax, 0x5b4(%rsp)
movl 0x5b4(%rsp), %eax
movq %rax, 0xd0(%rsp)
subq $0x6, %rax
ja 0x9795
movq 0xd0(%rsp), %rax
leaq 0xc769(%rip), %rcx      # 0x15018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x5c0(%rsp), %esi
xorl %edi, %edi
movl $0x4, %edx
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x5a8(%rsp)
movq 0x5b8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x5a0(%rsp)
movq 0x5a8(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0x57f(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x4630
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
leaq 0x580(%rsp), %rdi
callq 0xacb0
jmp 0x8937
leaq 0x57f(%rsp), %rdi
callq 0x43b0
leaq 0xc8a7(%rip), %rsi      # 0x151f2
leaq 0x548(%rsp), %rdi
leaq 0x580(%rsp), %rdx
callq 0xb330
jmp 0x8962
leaq 0x548(%rsp), %rdi
callq 0x41d0
movq %rax, %rdi
callq 0x42d0
movl %eax, 0xbc(%rsp)
jmp 0x8980
movl 0xbc(%rsp), %eax
movl %eax, 0x544(%rsp)
leaq 0x580(%rsp), %rdi
leaq 0xcc8c(%rip), %rsi      # 0x15629
movq $-0x1, %rdx
callq 0x4320
movq %rax, 0x538(%rsp)
cmpq $-0x1, 0x538(%rsp)
jne 0x8a5d
leaq 0xcb61(%rip), %rsi      # 0x15528
leaq 0x518(%rsp), %rdi
leaq 0x580(%rsp), %rdx
callq 0xb330
jmp 0x89de
leaq 0x580(%rsp), %rdi
leaq 0x518(%rsp), %rsi
callq 0x4410
leaq 0x518(%rsp), %rdi
callq 0x4200
jmp 0x8bbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x57f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8d3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8d2e
movq 0x538(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x4b8(%rsp), %rdi
leaq 0x580(%rsp), %rsi
callq 0x4360
jmp 0x8a80
leaq 0xcaa0(%rip), %rdx      # 0x15527
leaq 0x4d8(%rsp), %rdi
leaq 0x4b8(%rsp), %rsi
callq 0xb6e0
jmp 0x8a9e
movq 0x538(%rsp), %rax
incq %rax
movq %rax, 0xb0(%rsp)
leaq 0x580(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x4260
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq %rax, %rcx
leaq 0x498(%rsp), %rdi
callq 0x4360
jmp 0x8ae8
leaq 0x4f8(%rsp), %rdi
leaq 0x4d8(%rsp), %rsi
leaq 0x498(%rsp), %rdx
callq 0xad70
jmp 0x8b07
leaq 0x580(%rsp), %rdi
leaq 0x4f8(%rsp), %rsi
callq 0x4410
leaq 0x4f8(%rsp), %rdi
callq 0x4200
leaq 0x498(%rsp), %rdi
callq 0x4200
leaq 0x4d8(%rsp), %rdi
callq 0x4200
leaq 0x4b8(%rsp), %rdi
callq 0x4200
jmp 0x8bbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8bac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8b9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x498(%rsp), %rdi
callq 0x4200
leaq 0x4d8(%rsp), %rdi
callq 0x4200
leaq 0x4b8(%rsp), %rdi
callq 0x4200
jmp 0x8d2e
leaq 0x580(%rsp), %rdi
callq 0x41d0
movq %rax, 0x490(%rsp)
movq 0x5a8(%rsp), %rdx
movq 0x490(%rsp), %rcx
leaq 0x460(%rsp), %rdi
movl $0x2, %esi
callq 0x6110
jmp 0x8bf7
movq 0x133f2(%rip), %rdi     # 0x1bff0
leaq 0xc92a(%rip), %rsi      # 0x1552f
callq 0x4330
movq %rax, 0xa0(%rsp)
jmp 0x8c14
leaq 0x460(%rsp), %rdi
callq 0x7160
movq 0xa0(%rsp), %rdi
movl %eax, %esi
callq 0x44a0
movq %rax, 0x98(%rsp)
jmp 0x8c3a
movq 0x98(%rsp), %rdi
movq 0x1335f(%rip), %rsi     # 0x1bfa8
callq 0x4380
jmp 0x8c50
movq 0x5a0(%rsp), %rsi
leaq 0x460(%rsp), %rdi
callq 0x7780
jmp 0x8c67
leaq 0xc8d9(%rip), %rsi      # 0x15547
leaq 0x440(%rsp), %rdi
leaq 0x580(%rsp), %rdx
callq 0xb330
jmp 0x8c85
leaq 0x440(%rsp), %rdi
callq 0x41d0
movq %rax, %rdi
callq 0x42d0
movl %eax, 0x94(%rsp)
jmp 0x8ca3
movl 0x94(%rsp), %eax
movl %eax, 0x544(%rsp)
leaq 0x440(%rsp), %rdi
callq 0x4200
leaq 0x460(%rsp), %rdi
callq 0x7030
leaq 0x548(%rsp), %rdi
callq 0x4200
leaq 0x580(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8d21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x440(%rsp), %rdi
callq 0x4200
leaq 0x460(%rsp), %rdi
callq 0x7030
leaq 0x548(%rsp), %rdi
callq 0x4200
leaq 0x580(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x1, %edi
movl $0x5, %edx
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x80(%rsp)
leaq 0x41f(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x4630
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x420(%rsp), %rdi
callq 0xacb0
jmp 0x8dab
leaq 0x41f(%rsp), %rdi
callq 0x43b0
leaq 0x420(%rsp), %rdi
callq 0x41d0
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x3e8(%rsp), %rdi
movl $0x1, %esi
callq 0x6110
jmp 0x8de0
movq 0x5b8(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x3e8(%rsp), %rdi
callq 0x8110
jmp 0x8dfb
movq 0x5b8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x70(%rsp)
leaq 0x3c7(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x4630
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x3c8(%rsp), %rdi
callq 0xacb0
jmp 0x8e37
leaq 0x3e8(%rsp), %rdi
leaq 0x3c8(%rsp), %rsi
callq 0x7d80
jmp 0x8e4e
leaq 0x3c8(%rsp), %rdi
callq 0x4200
leaq 0x3c7(%rsp), %rdi
callq 0x43b0
leaq 0x3e8(%rsp), %rdi
callq 0x7030
leaq 0x420(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x41f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8f2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8f1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x8f10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x3c8(%rsp), %rdi
callq 0x4200
leaq 0x3c7(%rsp), %rdi
callq 0x43b0
leaq 0x3e8(%rsp), %rdi
callq 0x7030
leaq 0x420(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x2, %edi
movl $0x6, %edx
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x60(%rsp)
leaq 0x39f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x4630
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x3a0(%rsp), %rdi
callq 0xacb0
jmp 0x8f8e
leaq 0x39f(%rsp), %rdi
callq 0x43b0
leaq 0x3a0(%rsp), %rdi
callq 0x41d0
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x368(%rsp), %rdi
movl $0x1, %esi
callq 0x6110
jmp 0x8fc3
movq 0x5b8(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x368(%rsp), %rdi
callq 0x8110
jmp 0x8fde
movq 0x5b8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x50(%rsp)
leaq 0x347(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x4630
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x348(%rsp), %rdi
callq 0xacb0
jmp 0x901a
leaq 0x368(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x7d80
jmp 0x9031
leaq 0x348(%rsp), %rdi
callq 0x4200
leaq 0x347(%rsp), %rdi
callq 0x43b0
movq 0x5b8(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0x368(%rsp), %rdi
callq 0x7780
jmp 0x9066
leaq 0x368(%rsp), %rdi
callq 0x7030
leaq 0x3a0(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x39f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x9128
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x911b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x910e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x4200
leaq 0x347(%rsp), %rdi
callq 0x43b0
leaq 0x368(%rsp), %rdi
callq 0x7030
leaq 0x3a0(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x3, %edx
movl %edx, %edi
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
leaq 0x31f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x4630
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x320(%rsp), %rdi
callq 0xacb0
jmp 0x9189
leaq 0x31f(%rsp), %rdi
callq 0x43b0
leaq 0x280(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0x4170
jmp 0x91ad
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0xb730
jmp 0x91c4
leaq 0x280(%rsp), %rdi
callq 0x4200
leaq 0x2a0(%rsp), %rdi
callq 0xb790
jmp 0x91e0
leaq 0x2a0(%rsp), %rdi
callq 0xbc50
leaq 0x320(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x31f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x927f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x4200
jmp 0x927f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0xbc50
leaq 0x320(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x4, %edi
movl $0x3, %edx
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0x25f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4630
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x260(%rsp), %rdi
callq 0xacb0
jmp 0x92e3
leaq 0x25f(%rsp), %rdi
callq 0x43b0
leaq 0x218(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x4170
jmp 0x9307
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0xbc90
jmp 0x931e
leaq 0x218(%rsp), %rdi
callq 0x4200
leaq 0x238(%rsp), %rdi
callq 0xbcb0
jmp 0x933a
leaq 0x238(%rsp), %rdi
callq 0xbda0
leaq 0x260(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x25f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x93d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x4200
jmp 0x93d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x238(%rsp), %rdi
callq 0xbda0
leaq 0x260(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x5, %edx
movl %edx, %edi
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x1f7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x4630
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x1f8(%rsp), %rdi
callq 0xacb0
jmp 0x943a
leaq 0x1f7(%rsp), %rdi
callq 0x43b0
movq 0x5b8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4630
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x1d0(%rsp), %rdi
callq 0xacb0
jmp 0x9483
leaq 0x1cf(%rsp), %rdi
callq 0x43b0
movq 0x5b8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x4550
testl %eax, %eax
setne 0x1ce(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x4170
jmp 0x94c2
leaq 0x140(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x4170
jmp 0x94d9
movzbl 0x1ce(%rsp), %ecx
andl $0x1, %ecx
leaq 0x180(%rsp), %rdi
leaq 0x160(%rsp), %rsi
leaq 0x140(%rsp), %rdx
callq 0xbdb0
jmp 0x9503
leaq 0x140(%rsp), %rdi
callq 0x4200
leaq 0x160(%rsp), %rdi
callq 0x4200
leaq 0x180(%rsp), %rdi
callq 0xbe30
jmp 0x952c
leaq 0x180(%rsp), %rdi
callq 0xc100
leaq 0x1d0(%rsp), %rdi
callq 0x4200
leaq 0x1f8(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x1f7(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x1cf(%rsp), %rdi
callq 0x43b0
jmp 0x962e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x9621
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x95f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x4200
leaq 0x160(%rsp), %rdi
callq 0x4200
jmp 0x9621
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x180(%rsp), %rdi
callq 0xc100
leaq 0x1d0(%rsp), %rdi
callq 0x4200
leaq 0x1f8(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movl 0x5c0(%rsp), %esi
movl $0x6, %edi
movl $0x3, %edx
callq 0x8090
movq 0x5b8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4630
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0xacb0
jmp 0x9690
leaq 0x11f(%rsp), %rdi
callq 0x43b0
leaq 0xd8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x4170
jmp 0x96b4
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0xc130
jmp 0x96cb
leaq 0xd8(%rsp), %rdi
callq 0x4200
leaq 0xf8(%rsp), %rdi
callq 0xc150
jmp 0x96e7
leaq 0xf8(%rsp), %rdi
callq 0xc4a0
leaq 0x120(%rsp), %rdi
callq 0x4200
jmp 0x97da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0x11f(%rsp), %rdi
callq 0x43b0
jmp 0x97f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
jmp 0x9786
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x4200
jmp 0x9786
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x570(%rsp)
movl %eax, 0x56c(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0xc4a0
leaq 0x120(%rsp), %rdi
callq 0x4200
jmp 0x97f4
movq 0x1282c(%rip), %rdi     # 0x1bfc8
leaq 0xbda8(%rip), %rsi      # 0x1554b
callq 0x4330
movq %rax, %rdi
movq 0x5b8(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x4330
movq %rax, %rdi
leaq 0xbd91(%rip), %rsi      # 0x15557
callq 0x4330
movq %rax, %rdi
movq 0x127d3(%rip), %rsi     # 0x1bfa8
callq 0x4380
movl $0x0, 0x5c4(%rsp)
movl 0x5c4(%rsp), %eax
addq $0x5c8, %rsp            # imm = 0x5C8
retq
movq 0x570(%rsp), %rdi
callq 0x4620
nopw %cs:(%rax,%rax)