// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/rlcsa_test.cpp
// Function: main
int main(int argc, char** argv)
{
  std::cout << "RLCSA test" << std::endl;
  std::cout << std::endl;

  bool adaptive = false, direct = false, locate = false, pizza = false, count_steps = false;
  bool use_sa = false;
  bool listing = false, rle = false;
  usint ignore = 0, generate = 0;
  bool ignore_tab = false;
  bool write = false, write_patterns = false, sort_patterns = false;
  char* base_name = 0;
  char* patterns_name = 0;
  #ifdef MULTITHREAD_SUPPORT
  sint threads = 1;
  #endif
  for(int i = 1; i < argc; i++)
  {
    if(argv[i][0] == '-')
    {
      switch(argv[i][1])
      {
        case 'a':
          adaptive = true; break;
        case 'd':
          direct = true; break;
        case 'g':
          generate = atoi(argv[i] + 2); break;
        case 'i':
          if(argv[i][2] == 't') { ignore = 1; ignore_tab = true; }
          else                  { ignore = atoi(argv[i] + 2); }
          break;
        case 'l':
          locate = true; break;
        case 'L':
          listing = true; break;
        case 'o':
          sort_patterns = true; break;
        case 'p':
          pizza = true; break;
        case 'r':
          rle = true; break;
        case 'S':
          use_sa = true; break;
        case 's':
          count_steps = true; break;
        case 'W':
          write_patterns = true; break;
        case 'w':
          write = true; break;
        default:
          std::cout << "Invalid option: " << argv[i] << std::endl << std::endl;
          printUsage();
          return 1;
      }
    }
    else if(base_name == 0)
    {
      base_name = argv[i];
    }
    else if(patterns_name == 0)
    {
      patterns_name = argv[i];
    }
    #ifdef MULTITHREAD_SUPPORT
    else
    {
      threads = std::min(MAX_THREADS, std::max(atoi(argv[i]), 1));
    }
    #endif
  }
  if(base_name == 0) { printUsage(); return 2; }

  std::cout << "Options:";
  if(generate > 0) { std::cout << " generate=" << generate; }
  if(ignore_tab) { std::cout << " ignore=tab"; }
  else if(ignore > 0) { std::cout << " ignore=" << ignore; }
  if(use_sa) { adaptive = direct = count_steps = listing = false; }
  if(listing)
  {
    locate = adaptive = count_steps = write = false;
    std::cout << " listing";
    if(direct || rle)
    {
      std::cout << "(";
      if(direct)      { std::cout << " direct"; }
      if(rle)         { std::cout << " rle"; }
      if(count_steps) { std::cout << " steps"; write = false; }
      std::cout << " )";
    }
  }
  else if(locate)
  {
    rle = sort_patterns = false;
    std::cout << " locate";
    if(adaptive || direct || count_steps)
    {
      std::cout << "(";
      if(adaptive)    { std::cout << " adaptive"; direct = true; }
      if(direct)      { std::cout << " direct"; }
      if(count_steps) { std::cout << " steps"; write = false; }
      std::cout << " )";
    }
  }
  else { adaptive = direct = count_steps = write = rle = sort_patterns = false; }
  if(sort_patterns) { std::cout << " sort_patterns"; }
  if(pizza) { std::cout << " pizza"; }
  if(use_sa) { std::cout << " sa"; }
  if(write_patterns) { std::cout << " write_patterns"; }
  if(write) { std::cout << " write"; }
  std::cout << std::endl;
  std::cout << "Base name: " << base_name << std::endl;
  if(patterns_name != 0) { std::cout << "Patterns: " << patterns_name << std::endl; }
  #ifdef MULTITHREAD_SUPPORT
  std::cout << "Threads: " << threads << std::endl; 
  #endif
  std::cout << std::endl;


  const RLCSA* rlcsa = (use_sa ? 0 : new RLCSA(base_name, false));
  const SuffixArray* sa = (use_sa ? new SuffixArray(base_name, false) : 0);
  usint size = 0, text_size = 0;
  if(use_sa)
  {
    if(!sa->isOk())
    {
      delete rlcsa; rlcsa = 0;
      delete sa; sa = 0;
      return 3;
    }
    sa->reportSize(true);
    size = sa->getSize();
    text_size = size;
  }
  else
  {
    if(!rlcsa->isOk())
    {
      delete rlcsa; rlcsa = 0;
      delete sa; sa = 0;
      return 3;
    }
    rlcsa->printInfo();
    rlcsa->reportSize(true);
    size = rlcsa->getSize();
    text_size = rlcsa->getTextSize();
  }
  if(patterns_name == 0)
  {
    delete rlcsa; rlcsa = 0;
    delete sa; sa = 0;
    return 0;
  }

  AdaptiveSamples* adaptive_samples = 0;
  if(adaptive)
  {
    adaptive_samples = new AdaptiveSamples(*rlcsa, base_name);
    adaptive_samples->report();
    if(!adaptive_samples->isOk())
    {
      delete rlcsa; rlcsa = 0;
      delete sa; sa = 0;
      delete adaptive_samples; adaptive_samples = 0;
      return 4;
    }
  }

  DocArray* docarray = 0;
  if(listing)
  {
    if(direct)
    {
      docarray = new DocArray(*rlcsa);
    }
    else
    {
      docarray = new DocArray(*rlcsa, base_name);
      docarray->reportSize(true);
      if(!docarray->isOk() || !docarray->hasGrammar())
      {
        delete rlcsa; rlcsa = 0;
        delete sa; sa = 0;
        delete adaptive_samples; adaptive_samples = 0;
        delete docarray; docarray = 0;
        return 5;
      }
    }
  }

  std::ifstream pattern_file(patterns_name, std::ios_base::binary);
  if(!pattern_file)
  {
    std::cerr << "Error opening pattern file!" << std::endl;
    delete rlcsa; rlcsa = 0;
    delete sa; sa = 0;
    delete adaptive_samples; adaptive_samples = 0;
    return 6;
  }
  std::vector<std::string> rows;
  if(!pizza) { readRows(pattern_file, rows, true); }
  else       { readPizzaChili(pattern_file, rows); }
  pattern_file.close();
  if(rows.size() == 0)
  {
    std::cerr << "No patterns found!" << std::endl;
    delete rlcsa; rlcsa = 0;
    delete sa; sa = 0;
    delete adaptive_samples; adaptive_samples = 0;
    return 7;
  }
  std::vector<Pattern> patterns;
  createPatterns(rows, patterns, ignore_tab, ignore);
  rows.clear();


  // Generate random patterns according to weights.
  if(generate > 0)
  {
    DeltaEncoder encoder(2 * sizeof(usint));
    usint sum = 0;
    for(std::vector<Pattern>::iterator iter = patterns.begin(); iter != patterns.end(); ++iter)
    {
      encoder.addBit(sum);
      sum += iter->weight;
    }
    encoder.flush();
    DeltaVector vector(encoder, sum);

    std::vector<Pattern> new_patterns; new_patterns.reserve(generate);
    DeltaVector::Iterator viter(vector);
    srand(0xDEADBEEF);  // FIXME random seed
    for(usint i = 0; i < generate; i++)
    {
      usint tmp = viter.rank(rand() % sum);
      new_patterns.push_back(patterns[tmp - 1]);
    }
    patterns.clear();
    patterns.assign(new_patterns.begin(), new_patterns.end());
    new_patterns.clear();
    std::cout << "Generated " << patterns.size() << " patterns." << std::endl;
    std::cout << std::endl;
  }

  // Prepare weights for writing the number of occurrences.
  weight_type* totals = 0;
  if(write)
  {
    totals = new weight_type[text_size];
    for(usint i = 0; i < text_size; i++) { totals[i] = 0; }
  }


  // Actual work.
  #ifdef MULTITHREAD_SUPPORT
  omp_set_num_threads(threads);
  #endif
  double start = readTimer();

  #pragma omp parallel for schedule(dynamic, 1)
  for(usint i = 0; i < patterns.size(); i++)
  {
    patterns[i].range = (use_sa ? sa->count(patterns[i].pattern) : rlcsa->count(patterns[i].pattern));

    if(locate && patterns[i].found())
    {
      usint* matches = 0;
      uint* sa_matches = 0;
      if(adaptive)    { matches = adaptive_samples->locate(patterns[i].range, count_steps); }
      else if(use_sa) { sa_matches = sa->locate(patterns[i].range); }
      else            { matches = rlcsa->locate(patterns[i].range, direct, count_steps); }
      if(count_steps)
      {
        patterns[i].steps = 0;
        for(usint j = 0; j < patterns[i].occ(); j++)
        {
          patterns[i].steps += matches[j];
        }
      }

      if(write)
      {
        #pragma omp critical
        {
          if(use_sa) { for(usint j = 0; j < patterns[i].occ(); j++) { totals[sa_matches[j]] += patterns[i].weight; } }
          else       { for(usint j = 0; j < patterns[i].occ(); j++) { totals[matches[j]] += patterns[i].weight; } }
        }
      }
      delete[] sa_matches; sa_matches = 0;
      delete[] matches; matches = 0;
    }
    if(listing && patterns[i].found())
    {
      if(rle)
      {
        std::vector<pair_type>* docs =
          (direct ? docarray->directListingRLE(patterns[i].range)
                  : docarray->listDocumentsRLE(patterns[i].range));
        if(docs != 0)
        {
          patterns[i].docc = 0;
          for(std::vector<pair_type>::iterator iter = docs->begin(); iter != docs->end(); ++iter)
          {
            patterns[i].docc += length(*iter);
          }
        }
        delete docs;
      }
      else
      {
        std::vector<usint>* docs =
          (direct ? docarray->directListing(patterns[i].range)
                  : docarray->listDocuments(patterns[i].range));
        if(docs != 0)
        {
          patterns[i].docc = docs->size();
          delete docs; docs = 0;
        }
      }
    }
  }

  double seconds = readTimer() - start;
  double megabytes = totalSize(patterns) / (double)MEGABYTE;


  // Report.
  std::cout << "Patterns:      " << patterns.size() << " (" << (patterns.size() / seconds) << " / sec)" << std::endl;
  std::cout << "Total size:    " << megabytes << " MB";
  if(!locate)
  {
    std::cout << " (" << (megabytes / seconds) << " MB/s)";
  }
  std::cout << std::endl;

  usint total_occ = totalOcc(patterns), total_steps = totalSteps(patterns);
  std::cout << "Found:         " << totalFound(patterns) << std::endl;
  std::cout << "Occurrences:   " << total_occ;
  if(locate)
  {
    std::cout << " (" << (total_occ / seconds) << " / sec)";
    if(count_steps)
    {
      std::cout << std::endl
                << "Locate steps:  " << total_steps << " (" << (total_steps / (double)total_occ) << " / occurrence)";
    }
  }
  std::cout << std::endl;
  if(listing)
  {
    usint total_docc = totalDocc(patterns);
    std::cout << "Documents:     " << total_docc << " (" << (total_docc / seconds) << " / sec)" << std::endl;
  }
  std::cout << "Time:          " << seconds << " seconds" << std::endl;
  std::cout << std::endl;


  // Write.
  if(write)
  {
    std::string output_name(patterns_name); output_name += ".found";
    std::ofstream output(output_name.c_str(), std::ios_base::binary);
    if(!output)
    {
      std::cerr << "Cannot open output file (" << output_name << ")!" << std::endl;
    }
    else
    {
      output.write((char*)totals, text_size * sizeof(weight_type));
      output.close();
    }

    weight_type max_weight = 0, total_weight = 0;
    for(usint i = 0; i < size; i++) 
    {
      max_weight = std::max(max_weight, totals[i]);
      total_weight += totals[i];
    }
    std::cout << "Weights:       " << max_weight << " (max), " 
              << (((double)total_weight) / size) << " (average)" << std::endl;
    std::cout << std::endl;
  }

  if(write_patterns)
  {
    printPatterns(patterns, std::string(patterns_name) + ".selected");
    printPatterns(patterns, std::string(patterns_name) + ".found", true);
  }
  if(sort_patterns)
  {
    sequentialSort(patterns.begin(), patterns.end(), pod_comparator);
    printPatterns(patterns, std::string(patterns_name) + ".sorted", true);
  }

  // Cleanup.

  if(adaptive) { adaptive_samples->report(); }
  delete rlcsa; rlcsa = 0;
  delete sa; sa = 0;
  delete adaptive_samples; adaptive_samples = 0;
  delete docarray; docarray = 0;
  delete[] totals; totals = 0;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x598, %rsp            # imm = 0x598
movq %rsi, %r14
movl %edi, %ebx
movq 0x27bd7(%rip), %r15     # 0x2cfd0
leaq 0x1cd8a(%rip), %rsi     # 0x2218a
movl $0xa, %edx
movq %r15, %rdi
callq 0x32e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
cmpl $0x2, %ebx
jl 0x56a0
movl %ebx, %ebp
movq $0x0, 0x28(%rsp)
movl $0x1, %r12d
leaq 0x1cbc4(%rip), %r13     # 0x22040
movq $0x0, (%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x58(%rsp)
movl $0x0, 0x50(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0xc(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%r14,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x552c
movzbl 0x1(%rdi), %eax
cmpl $0x60, %eax
jle 0x554a
addl $-0x61, %eax
cmpl $0x16, %eax
ja 0x5ed0
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x1, %al
movq %rax, 0x28(%rsp)
jmp 0x553d
testq %r15, %r15
je 0x553a
testq %rbx, %rbx
cmoveq %rdi, %rbx
jmp 0x553d
movq %rdi, %r15
incq %r12
cmpq %r12, %rbp
jne 0x54fb
jmp 0x5610
cmpl $0x4c, %eax
je 0x55e3
cmpl $0x53, %eax
je 0x55ef
cmpl $0x57, %eax
jne 0x5ed0
movb $0x1, %al
movq %rax, 0x98(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x78(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x48(%rsp)
jmp 0x553d
movb $0x1, %al
movl %eax, 0x50(%rsp)
jmp 0x553d
cmpb $0x74, 0x2(%rdi)
jne 0x55fb
movl $0x1, 0x80(%rsp)
movb $0x1, %al
movq %rax, 0x88(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x68(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x70(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, (%rsp)
jmp 0x553d
addq $0x2, %rdi
callq 0x33e0
movl %eax, 0xc(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x18(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x58(%rsp)
jmp 0x553d
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x553d
addq $0x2, %rdi
callq 0x33e0
movl %eax, 0x80(%rsp)
jmp 0x553d
testq %r15, %r15
je 0x56a0
movq 0x279b0(%rip), %r14     # 0x2cfd0
leaq 0x1cb7f(%rip), %rsi     # 0x221a6
movl $0x8, %edx
movq %r14, %rdi
callq 0x32e0
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
je 0x5661
movq 0x2798d(%rip), %r12     # 0x2cfd0
leaq 0x1cb65(%rip), %rsi     # 0x221af
movl $0xa, %edx
movq %r12, %rdi
callq 0x32e0
movl %ebp, %esi
movq %r12, %rdi
callq 0x31a0
movq 0x58(%rsp), %rax
xorb $0x1, %al
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rax
testb $0x1, %al
movq %rax, 0x88(%rsp)
je 0x56be
movq 0x27948(%rip), %rdi     # 0x2cfd0
leaq 0x1cb2b(%rip), %rsi     # 0x221ba
movl $0xb, %edx
callq 0x32e0
movq 0x28(%rsp), %r13
jmp 0x56f7
callq 0x72ed
movl $0x2, %ebx
movl %ebx, %eax
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x80(%rsp)
movq 0x28(%rsp), %r13
je 0x56f7
movq 0x278fc(%rip), %r12     # 0x2cfd0
leaq 0x1caeb(%rip), %rsi     # 0x221c6
movl $0x8, %edx
movq %r12, %rdi
callq 0x32e0
movl 0x80(%rsp), %esi
movq %r12, %rdi
callq 0x31a0
movq 0x58(%rsp), %rcx
movq 0x10(%rsp), %rdx
orb %dl, %cl
movzbl %r13b, %ebp
xorl %eax, %eax
testb $0x1, %dl
cmovnel %eax, %ebp
movq (%rsp), %r13
movzbl %r13b, %r12d
cmovnel %eax, %r12d
movzbl 0x18(%rsp), %edx
cmovnel %eax, %edx
movl %edx, 0x28(%rsp)
movq %rcx, 0x58(%rsp)
testb $0x1, %cl
je 0x579d
movl $0x0, 0x78(%rsp)
testb $0x1, 0x68(%rsp)
je 0x57f3
movq 0x27885(%rip), %rdi     # 0x2cfd0
leaq 0x1ca9d(%rip), %rsi     # 0x221ef
movl $0x7, %edx
callq 0x32e0
testb $0x1, %bpl
je 0x58b3
movq 0x27863(%rip), %r12     # 0x2cfd0
leaq 0x1d71f(%rip), %rsi     # 0x22e93
movl $0x1, %edx
movq %r12, %rdi
callq 0x32e0
leaq 0x1ca6f(%rip), %rsi     # 0x221f7
movl $0x9, %edx
movq %r12, %rdi
callq 0x32e0
movb $0x1, %r12b
jmp 0x58d5
movq 0x2782c(%rip), %rdi     # 0x2cfd0
leaq 0x1ca24(%rip), %rsi     # 0x221cf
movl $0x8, %edx
callq 0x32e0
testb $0x1, %r13b
je 0x580d
movq 0x2780e(%rip), %r12     # 0x2cfd0
leaq 0x1d6ca(%rip), %rsi     # 0x22e93
movl $0x1, %edx
movq %r12, %rdi
callq 0x32e0
leaq 0x1c9fb(%rip), %rsi     # 0x221d8
movl $0x7, %edx
movq %r12, %rdi
callq 0x32e0
testb $0x1, 0x50(%rsp)
jne 0x582c
jmp 0x5844
xorl %ebp, %ebp
xorl %r12d, %r12d
movl $0x0, 0x28(%rsp)
movl $0x0, 0x50(%rsp)
jmp 0x58a5
testb $0x1, 0x50(%rsp)
je 0x585c
movq 0x277b5(%rip), %rdi     # 0x2cfd0
leaq 0x1d671(%rip), %rsi     # 0x22e93
movl $0x1, %edx
callq 0x32e0
movq 0x2779d(%rip), %rdi     # 0x2cfd0
leaq 0x1c9a6(%rip), %rsi     # 0x221e0
movl $0x4, %edx
callq 0x32e0
movq 0x27785(%rip), %rdi     # 0x2cfd0
leaq 0x1c99a(%rip), %rsi     # 0x221ec
movl $0x2, %edx
callq 0x32e0
testb $0x1, 0x78(%rsp)
je 0x5883
movq 0x27766(%rip), %rdi     # 0x2cfd0
leaq 0x1c990(%rip), %rsi     # 0x22201
movl $0xe, %edx
callq 0x32e0
movb $0x1, %al
movl %eax, 0x78(%rsp)
jmp 0x588b
movl $0x0, 0x78(%rsp)
xorl %ebp, %ebp
movq (%rsp), %rax
movl %eax, %r12d
movq $0x0, 0x68(%rsp)
movl $0x0, 0x28(%rsp)
movq $0x0, 0x70(%rsp)
jmp 0x593d
testb $0x1, %r12b
je 0x5ea5
movq 0x2770c(%rip), %rdi     # 0x2cfd0
leaq 0x1d5c8(%rip), %rsi     # 0x22e93
movl $0x1, %edx
callq 0x32e0
movq 0x276f4(%rip), %rdi     # 0x2cfd0
leaq 0x1c8f5(%rip), %rsi     # 0x221d8
movl $0x7, %edx
callq 0x32e0
testb $0x1, 0x28(%rsp)
je 0x5915
movq 0x276d5(%rip), %rdi     # 0x2cfd0
leaq 0x1c8e3(%rip), %rsi     # 0x221e5
movl $0x6, %edx
callq 0x32e0
movq $0x0, 0x70(%rsp)
movq 0x276b4(%rip), %rdi     # 0x2cfd0
leaq 0x1c8c9(%rip), %rsi     # 0x221ec
movl $0x2, %edx
callq 0x32e0
movl $0x0, 0x78(%rsp)
movl $0x0, 0x50(%rsp)
testb $0x1, 0x48(%rsp)
je 0x595c
movq 0x27685(%rip), %rdi     # 0x2cfd0
leaq 0x1c8be(%rip), %rsi     # 0x22210
movl $0x6, %edx
callq 0x32e0
testb $0x1, 0x10(%rsp)
je 0x597b
movq 0x27666(%rip), %rdi     # 0x2cfd0
leaq 0x1c8a6(%rip), %rsi     # 0x22217
movl $0x3, %edx
callq 0x32e0
testb $0x1, 0x98(%rsp)
je 0x599d
movq 0x27644(%rip), %rdi     # 0x2cfd0
leaq 0x1c888(%rip), %rsi     # 0x2221b
movl $0xf, %edx
callq 0x32e0
testb $0x1, 0x70(%rsp)
je 0x59bc
movq 0x27625(%rip), %rdi     # 0x2cfd0
leaq 0x1c879(%rip), %rsi     # 0x2222b
movl $0x6, %edx
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
leaq 0x1c848(%rip), %rsi     # 0x22232
movl $0xb, %edx
movq %r14, %rdi
callq 0x32e0
movq %r15, %rdi
callq 0x3110
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
testq %rbx, %rbx
je 0x5a8a
leaq 0x1c7fe(%rip), %rsi     # 0x2223e
movl $0xa, %edx
movq %r14, %rdi
callq 0x32e0
movq %rbx, %rdi
callq 0x3110
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
testb $0x1, 0x10(%rsp)
je 0x5b61
movl $0x30, %edi
callq 0x3290
movq %rax, %r14
leaq 0x390(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %r15, %rsi
movq %rax, 0x18(%rsp)
callq 0x7a74
leaq 0x390(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x12e60
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b19
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
movq 0x18(%rsp), %r14
cmpb $0x0, (%r14)
je 0x5cea
movq %r14, %rdi
movl $0x1, %esi
callq 0x13b10
testq %rbx, %rbx
je 0x5e31
movl 0x28(%r14), %eax
subl 0x2c(%r14), %eax
movq $0x0, (%rsp)
movl %eax, 0x90(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x5c0d
movl $0x830, %edi            # imm = 0x830
callq 0x3290
movq %rax, %r14
leaq 0x390(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %r15, %rsi
movq %rax, (%rsp)
callq 0x7a74
leaq 0x390(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x964c
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5bbd
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
movq (%rsp), %r14
cmpb $0x0, (%r14)
je 0x5cf9
movq %r14, %rdi
callq 0xcd76
movq %r14, %rdi
movl $0x1, %esi
callq 0xcace
testq %rbx, %rbx
je 0x5e3b
movq $0x0, 0x18(%rsp)
movl 0x4(%r14), %eax
movl %eax, 0x94(%rsp)
movq 0x828(%r14), %rax
movl (%rax), %eax
movl %eax, 0x90(%rsp)
testb $0x1, %bpl
je 0x5d18
movl $0x60, %edi
callq 0x3290
movq %rax, %r14
leaq 0x390(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %r15, %rsi
movq %rax, 0x60(%rsp)
callq 0x7a74
leaq 0x390(%rsp), %rdx
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x13d44
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c76
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
movq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x144ac
cmpb $0x0, 0x58(%r14)
jne 0x5d21
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x32a0
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x5cb9
movq %rbx, %rdi
callq 0x1337a
movl $0x30, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x14384
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movl $0x4, %ebx
jmp 0x56aa
movq %r14, %rdi
callq 0x1337a
movl $0x30, %esi
jmp 0x5d06
movq %r14, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %r14, %rdi
callq 0x32a0
movl $0x3, %ebx
jmp 0x56aa
movq $0x0, 0x60(%rsp)
testb $0x1, 0x58(%rsp)
je 0x5d33
movq $0x0, 0x20(%rsp)
jmp 0x5d58
movl $0x50, %edi
callq 0x3290
testb $0x1, %r12b
movq %rax, 0x20(%rsp)
je 0x5f17
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x159e2
leaq 0x390(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x34d0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x3b0(%rsp,%rax)
je 0x5e67
movq 0x27264(%rip), %rbx     # 0x2cff0
leaq 0x1c4b6(%rip), %rsi     # 0x22249
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x32e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq 0x27232(%rip), %rdi     # 0x2cff0
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x5ddc
movq %rbx, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x32a0
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x5dfb
movq %rbx, %rdi
callq 0x1337a
movl $0x30, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x60(%rsp), %rbx
testq %rbx, %rbx
je 0x5e1a
movq %rbx, %rdi
callq 0x14384
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movl $0x6, %ebx
jmp 0x7076
movq %r14, %rdi
callq 0x1337a
jmp 0x5e53
movq %r14, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %r14, %rdi
callq 0x32a0
xorl %r14d, %r14d
movl $0x30, %esi
movq %r14, %rdi
callq 0x32a0
xorl %ebx, %ebx
jmp 0x56aa
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
testb $0x1, 0x48(%rsp)
je 0x600e
leaq 0x390(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x201d9
jmp 0x6028
movl $0x0, 0x78(%rsp)
testb $0x1, 0x28(%rsp)
je 0x5935
movq 0x27111(%rip), %rdi     # 0x2cfd0
leaq 0x1cfcd(%rip), %rsi     # 0x22e93
movl $0x1, %edx
jmp 0x58e8
movq 0x270f9(%rip), %rbx     # 0x2cfd0
leaq 0x1c2b7(%rip), %rsi     # 0x22195
movl $0x10, %edx
movq %rbx, %rdi
callq 0x32e0
movq (%r14,%r12,8), %r14
testq %r14, %r14
je 0x6175
movq %r14, %rdi
callq 0x3110
movq 0x270c9(%rip), %rdi     # 0x2cfd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x32e0
jmp 0x618c
leaq 0x390(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %r15, %rsi
callq 0x7a74
leaq 0x390(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
movl $0x1, %ecx
callq 0x160ca
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f6b
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
movq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x18036
cmpb $0x1, 0x48(%r14)
jne 0x5f93
movq 0x20(%rsp), %rax
cmpb $0x0, 0x49(%rax)
jne 0x5d58
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x32a0
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x5fbe
movq %rbx, %rdi
callq 0x1337a
movl $0x30, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x60(%rsp), %rbx
testq %rbx, %rbx
je 0x5fdd
movq %rbx, %rdi
callq 0x14384
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x163e2
movl $0x50, %esi
movq %rbx, %rdi
callq 0x32a0
movl $0x5, %ebx
jmp 0x56aa
leaq 0x390(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movl $0x1, %edx
callq 0x20107
leaq 0x390(%rsp), %rdi
callq 0x3080
movq 0xa8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
je 0x60eb
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movzbl 0x88(%rsp), %edx
andl $0x1, %edx
leaq 0xa0(%rsp), %rdi
movl 0x80(%rsp), %ecx
callq 0x772f
leaq 0xa0(%rsp), %rdi
movq (%rdi), %rsi
callq 0x8016
cmpl $0x0, 0xc(%rsp)
je 0x636a
leaq 0xc0(%rsp), %rdi
movl $0x8, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0x1d25a
movq 0x30(%rsp), %r13
cmpq 0x38(%rsp), %r13
je 0x61ec
xorl %r15d, %r15d
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
callq 0x1d2d6
addl 0x20(%r13), %r15d
addq $0x38, %r13
cmpq 0x38(%rsp), %r13
jne 0x60cc
jmp 0x61ef
movq 0x26efe(%rip), %rdi     # 0x2cff0
leaq 0x1c16c(%rip), %rsi     # 0x22265
movl $0x12, %edx
callq 0x32e0
movq 0x26ee6(%rip), %rdi     # 0x2cff0
callq 0x3120
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x6120
movq %rbx, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x32a0
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x613f
movq %rbx, %rdi
callq 0x1337a
movl $0x30, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x60(%rsp), %rbx
testq %rbx, %rbx
je 0x615e
movq %rbx, %rdi
callq 0x14384
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movl $0x7, %ebx
jmp 0x7069
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3450
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
callq 0x72ed
movl $0x1, %ebx
jmp 0x56aa
xorl %r15d, %r15d
leaq 0xc0(%rsp), %rdi
callq 0x1d30a
leaq 0x148(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl %r15d, %edx
callq 0x1c810
xorpd %xmm0, %xmm0
leaq 0x130(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0xc(%rsp), %esi
callq 0x7ace
leaq 0x190(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x1c828
movl $0xdeadbeef, %edi       # imm = 0xDEADBEEF
callq 0x3260
leaq 0x190(%rsp), %r13
leaq 0x130(%rsp), %r14
callq 0x30a0
xorl %edx, %edx
divl %r15d
movq %r13, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x1c834
decl %eax
imulq $0x38, %rax, %rsi
addq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x7bd8
decl 0xc(%rsp)
jne 0x6264
leaq 0x30(%rsp), %r14
movq (%r14), %rsi
movq %r14, %rdi
callq 0x82de
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq %r14, %rdi
callq 0x8330
leaq 0x130(%rsp), %rdi
movq (%rdi), %rsi
callq 0x82de
movq 0x26cfe(%rip), %rdi     # 0x2cfd0
leaq 0x1bf9f(%rip), %rsi     # 0x22278
movl $0xa, %edx
callq 0x32e0
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
sarq $0x3, %rsi
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rsi
movq 0x26cca(%rip), %rdi     # 0x2cfd0
callq 0x31a0
movq %rax, %r14
leaq 0x1c113(%rip), %rsi     # 0x22428
movl $0xa, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
movq 0x26c9f(%rip), %rdi     # 0x2cfd0
callq 0x3120
leaq 0x190(%rsp), %rdi
callq 0x1c82e
leaq 0x130(%rsp), %rdi
callq 0x7c34
leaq 0x148(%rsp), %rdi
callq 0x1c816
leaq 0xc0(%rsp), %rdi
callq 0x1d264
testb $0x1, 0x70(%rsp)
je 0x63a3
movl 0x90(%rsp), %r15d
movl %r15d, %r14d
shlq $0x2, %r14
movq %r14, %rdi
callq 0x3030
movq %rax, 0x48(%rsp)
testl %r15d, %r15d
je 0x63ac
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3170
jmp 0x63ac
movq $0x0, 0x48(%rsp)
movl %ebp, 0xc(%rsp)
callq 0x203e7
movsd %xmm0, 0x80(%rsp)
movq 0x30(%rsp), %rsi
cmpq %rsi, 0x38(%rsp)
je 0x6688
xorl %r15d, %r15d
movzbl 0x28(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x88(%rsp)
imulq $0x38, %r15, %rbp
addq %rbp, %rsi
testb $0x1, 0x10(%rsp)
je 0x63fa
movq 0x18(%rsp), %rdi
callq 0x13648
jmp 0x6403
movq (%rsp), %rdi
callq 0xb028
movq 0x30(%rsp), %rcx
movq %rax, 0x24(%rcx,%rbp)
testb $0x1, 0x68(%rsp)
je 0x655a
leaq (%rcx,%rbp), %rax
addq $0x24, %rax
movq (%rax), %rsi
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x655a
testb $0x1, 0xc(%rsp)
je 0x644c
movq 0x60(%rsp), %rdi
movl 0x88(%rsp), %edx
callq 0x14bd8
jmp 0x6479
testb $0x1, 0x10(%rsp)
je 0x6462
movq 0x18(%rsp), %rdi
callq 0x13850
xorl %r13d, %r13d
jmp 0x647e
movzbl %r12b, %edx
andl $0x1, %edx
movq (%rsp), %rdi
movl 0x88(%rsp), %ecx
callq 0xb35e
movq %rax, %r13
xorl %eax, %eax
testb $0x1, 0x28(%rsp)
je 0x64be
movq 0x30(%rsp), %rcx
movl $0x0, 0x2c(%rcx,%rbp)
movq 0x24(%rcx,%rbp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
subl %esi, %edx
cmpl $-0x1, %edx
je 0x64be
addq %rbp, %rcx
incl %edx
xorl %esi, %esi
xorl %edi, %edi
addl (%r13,%rsi,4), %edi
movl %edi, 0x2c(%rcx)
incq %rsi
cmpq %rdx, %rsi
jb 0x64ae
testb $0x1, 0x70(%rsp)
je 0x6540
movq 0x30(%rsp), %rcx
movq 0x24(%rcx,%rbp), %rsi
addq %rbp, %rcx
movq %rsi, %rdx
shrq $0x20, %rdx
subl %esi, %edx
testb $0x1, 0x10(%rsp)
je 0x6511
cmpl $-0x1, %edx
movq 0x48(%rsp), %r8
je 0x6540
xorl %edx, %edx
movl 0x20(%rcx), %esi
movl (%rax,%rdx,4), %edi
addl %esi, (%r8,%rdi,4)
incq %rdx
movq 0x24(%rcx), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
subl %esi, %edi
incl %edi
cmpq %rdi, %rdx
jb 0x64ee
jmp 0x6545
cmpl $-0x1, %edx
movq 0x48(%rsp), %r8
je 0x6540
xorl %edx, %edx
movl 0x20(%rcx), %esi
movl (%r13,%rdx,4), %edi
addl %esi, (%r8,%rdi,4)
incq %rdx
movq 0x24(%rcx), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
subl %esi, %edi
incl %edi
cmpq %rdi, %rdx
jb 0x651d
testq %rax, %rax
je 0x654d
movq %rax, %rdi
callq 0x3330
testq %r13, %r13
je 0x655a
movq %r13, %rdi
callq 0x3330
testb $0x1, 0x58(%rsp)
jne 0x665d
movq 0x30(%rsp), %rax
movq 0x24(%rax,%rbp), %rsi
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x665d
testb $0x1, 0x50(%rsp)
je 0x6597
testb $0x1, %r12b
je 0x65a9
movq 0x20(%rsp), %rdi
callq 0x183dc
jmp 0x65b3
testb $0x1, %r12b
je 0x6616
movq 0x20(%rsp), %rdi
callq 0x1837c
jmp 0x6620
movq 0x20(%rsp), %rdi
callq 0x18348
movq %rax, %r13
testq %rax, %rax
je 0x660c
movq 0x30(%rsp), %rcx
movl $0x0, 0x30(%rcx,%rbp)
movq (%r13), %rdi
movq 0x8(%r13), %rax
cmpq %rax, %rdi
je 0x65fb
addq %rbp, %rcx
addq $0x30, %rcx
xorl %edx, %edx
movq %rdi, %rsi
movq (%rsi), %r8
subl %r8d, %edx
shrq $0x20, %r8
addl %r8d, %edx
incl %edx
movl %edx, (%rcx)
addq $0x8, %rsi
cmpq %rax, %rsi
jne 0x65e1
testq %rdi, %rdi
je 0x660c
movq 0x10(%r13), %rsi
subq %rdi, %rsi
callq 0x32a0
movl $0x18, %esi
movq %r13, %rdi
jmp 0x6658
movq 0x20(%rsp), %rdi
callq 0x182fc
movq %rax, %r14
testq %rax, %rax
je 0x665d
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
shrq $0x2, %rax
movq 0x30(%rsp), %rcx
movl %eax, 0x30(%rcx,%rbp)
testq %rdi, %rdi
je 0x6650
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x32a0
movl $0x18, %esi
movq %r14, %rdi
callq 0x32a0
incl %r15d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq %r15, %rax
ja 0x63e0
callq 0x203e7
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
movl 0xc(%rsp), %ebp
xorpd %xmm0, %xmm0
je 0x66f6
movsd 0x1b95e(%rip), %xmm1    # 0x22010
movapd 0x1b966(%rip), %xmm2    # 0x22020
movsd 0x8(%rax), %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
addsd %xmm4, %xmm0
addq $0x38, %rax
cmpq %rcx, %rax
jne 0x66ba
cvttsd2si %xmm0, %rax
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x1b93a(%rip), %xmm0    # 0x22030
movsd %xmm0, 0x50(%rsp)
movq 0x268cd(%rip), %rdi     # 0x2cfd0
leaq 0x1bb79(%rip), %rsi     # 0x22283
movl $0xf, %edx
callq 0x32e0
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
sarq $0x3, %rsi
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rsi
movq 0x26899(%rip), %rdi     # 0x2cfd0
callq 0x31a0
movq %rax, %r14
leaq 0x1c74c(%rip), %rsi     # 0x22e92
movl $0x2, %edx
movq %rax, %rdi
callq 0x32e0
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
movsd 0x10(%rsp), %xmm2
subsd 0x80(%rsp), %xmm2
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
movq %rax, %xmm1
punpckldq 0x1b885(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1b88d(%rip), %xmm1    # 0x22020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
divsd %xmm2, %xmm0
movq %r14, %rdi
callq 0x3410
movq %rax, %r14
leaq 0x1bad8(%rip), %rsi     # 0x22293
movl $0x7, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
movq 0x267f9(%rip), %rdi     # 0x2cfd0
leaq 0x1babd(%rip), %rsi     # 0x2229b
movl $0xf, %edx
callq 0x32e0
movq 0x267e1(%rip), %rdi     # 0x2cfd0
movsd 0x50(%rsp), %xmm0
callq 0x3410
leaq 0x1baaa(%rip), %rsi     # 0x222ab
movl $0x3, %edx
movq %rax, %rdi
callq 0x32e0
testb $0x1, 0x68(%rsp)
jne 0x6859
movq 0x267b4(%rip), %rdi     # 0x2cfd0
leaq 0x1c66f(%rip), %rsi     # 0x22e92
movl $0x2, %edx
callq 0x32e0
movsd 0x50(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
movq 0x26790(%rip), %rdi     # 0x2cfd0
callq 0x3410
leaq 0x1ba63(%rip), %rsi     # 0x222af
movl $0x6, %edx
movq %rax, %rdi
callq 0x32e0
movq 0x26770(%rip), %rdi     # 0x2cfd0
callq 0x3120
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
je 0x68c7
xorpd %xmm0, %xmm0
movq %rax, %rdx
movq 0x24(%rdx), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
subl %esi, %edi
incl %edi
xorps %xmm1, %xmm1
cvtsi2sd %rdi, %xmm1
addsd %xmm1, %xmm0
addq $0x38, %rdx
cmpq %rcx, %rdx
jne 0x687b
cvttsd2si %xmm0, %r14
xorpd %xmm0, %xmm0
movl 0x2c(%rax), %edx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
addsd %xmm1, %xmm0
addq $0x38, %rax
cmpq %rcx, %rax
jne 0x68a8
cvttsd2si %xmm0, %r12
jmp 0x68cd
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x266fc(%rip), %rdi     # 0x2cfd0
leaq 0x1b9db(%rip), %rsi     # 0x222b6
movl $0xf, %edx
callq 0x32e0
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
je 0x692d
xorpd %xmm0, %xmm0
movsd 0x1b738(%rip), %xmm1    # 0x22038
movq 0x24(%rax), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
cmpl %esi, %edx
ja 0x691b
movapd %xmm2, %xmm0
addq $0x38, %rax
cmpq %rcx, %rax
jne 0x6900
cvttsd2si %xmm0, %rax
movl %eax, %esi
jmp 0x692f
xorl %esi, %esi
movq 0x2669a(%rip), %rdi     # 0x2cfd0
callq 0x31a0
movq %rax, %rdi
callq 0x3120
movq 0x26686(%rip), %rdi     # 0x2cfd0
leaq 0x1b975(%rip), %rsi     # 0x222c6
movl $0xf, %edx
callq 0x32e0
movl %r14d, %r14d
movq 0x2666b(%rip), %rdi     # 0x2cfd0
movq %r14, %rsi
callq 0x31a0
testb $0x1, 0x68(%rsp)
je 0x6a3d
movq 0x26651(%rip), %rdi     # 0x2cfd0
leaq 0x1c50c(%rip), %rsi     # 0x22e92
movl $0x2, %edx
callq 0x32e0
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movsd %xmm0, 0x68(%rsp)
divsd 0x10(%rsp), %xmm0
movq 0x26625(%rip), %rdi     # 0x2cfd0
callq 0x3410
leaq 0x1b8dc(%rip), %rsi     # 0x22293
movl $0x7, %edx
movq %rax, %rdi
callq 0x32e0
testb $0x1, 0x28(%rsp)
je 0x6a3d
movq 0x265fe(%rip), %rdi     # 0x2cfd0
callq 0x3120
movq %rax, %r15
leaq 0x1b8f5(%rip), %rsi     # 0x222d6
movl $0xf, %edx
movq %rax, %rdi
callq 0x32e0
movl %r12d, %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x31a0
movq %rax, %r15
leaq 0x1c48c(%rip), %rsi     # 0x22e92
movl $0x2, %edx
movq %rax, %rdi
callq 0x32e0
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
divsd 0x68(%rsp), %xmm0
movq %r15, %rdi
callq 0x3410
leaq 0x1b8b6(%rip), %rsi     # 0x222e6
movl $0xe, %edx
movq %rax, %rdi
callq 0x32e0
movq 0x2658c(%rip), %rdi     # 0x2cfd0
callq 0x3120
testb $0x1, 0x58(%rsp)
jne 0x6aff
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
je 0x6a86
xorpd %xmm0, %xmm0
movl 0x30(%rax), %edx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
addsd %xmm1, %xmm0
addq $0x38, %rax
cmpq %rcx, %rax
jne 0x6a67
cvttsd2si %xmm0, %r14
jmp 0x6a89
xorl %r14d, %r14d
movq 0x26540(%rip), %rdi     # 0x2cfd0
leaq 0x1b85e(%rip), %rsi     # 0x222f5
movl $0xf, %edx
callq 0x32e0
movl %r14d, %r14d
movq 0x26525(%rip), %rdi     # 0x2cfd0
movq %r14, %rsi
callq 0x31a0
movq %rax, %r15
leaq 0x1c3d5(%rip), %rsi     # 0x22e92
movl $0x2, %edx
movq %rax, %rdi
callq 0x32e0
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
divsd 0x10(%rsp), %xmm0
movq %r15, %rdi
callq 0x3410
movq %rax, %r14
leaq 0x1b7a9(%rip), %rsi     # 0x22293
movl $0x7, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
movq 0x264ca(%rip), %rdi     # 0x2cfd0
leaq 0x1b7f8(%rip), %rsi     # 0x22305
movl $0xf, %edx
callq 0x32e0
movq 0x264b2(%rip), %rdi     # 0x2cfd0
movsd 0x10(%rsp), %xmm0
callq 0x3410
movq %rax, %r14
leaq 0x1b7e2(%rip), %rsi     # 0x22315
movl $0x8, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
movq 0x26481(%rip), %rdi     # 0x2cfd0
callq 0x3120
testb $0x1, 0x70(%rsp)
je 0x6d2c
leaq 0xc0(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %rbx, %rsi
callq 0x7a74
leaq 0x1b7a0(%rip), %rsi     # 0x2231e
leaq 0xc0(%rsp), %rdi
callq 0x34f0
movq 0xc0(%rsp), %rsi
leaq 0x190(%rsp), %rdi
movl $0x4, %edx
callq 0x32d0
movq 0x190(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x1b0(%rsp,%rax)
je 0x6c10
movq 0x2642e(%rip), %rdi     # 0x2cff0
leaq 0x1b75c(%rip), %rsi     # 0x22325
movl $0x19, %edx
callq 0x32e0
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movq 0x26406(%rip), %rdi     # 0x2cff0
callq 0x32e0
movq %rax, %r14
leaq 0x1b746(%rip), %rsi     # 0x2233f
movl $0x2, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
jmp 0x6c3a
movl 0x90(%rsp), %edx
shlq $0x2, %rdx
leaq 0x190(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x3350
leaq 0x190(%rsp), %rdi
callq 0x3380
xorl %r15d, %r15d
movl 0x94(%rsp), %eax
movl %eax, %r12d
testl %eax, %eax
je 0x6c74
xorl %ecx, %ecx
xorl %eax, %eax
movq 0x48(%rsp), %rsi
movl (%rsi,%rcx,4), %edx
cmpl %edx, %eax
cmovbel %edx, %eax
addl %edx, %r15d
incq %rcx
cmpq %rcx, %r12
jne 0x6c54
movl %r15d, %ecx
movl %eax, %r15d
cvtsi2sd %rcx, %xmm0
jmp 0x6c78
xorpd %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x2634b(%rip), %rdi     # 0x2cfd0
leaq 0x1b6b6(%rip), %rsi     # 0x22342
movl $0xf, %edx
callq 0x32e0
movq 0x26333(%rip), %rdi     # 0x2cfd0
movq %r15, %rsi
callq 0x31a0
movq %rax, %r14
leaq 0x1b6a3(%rip), %rsi     # 0x22352
movl $0x8, %edx
movq %rax, %rdi
callq 0x32e0
cvtsi2sd %r12, %xmm1
movsd 0x58(%rsp), %xmm0
divsd %xmm1, %xmm0
movq %r14, %rdi
callq 0x3410
movq %rax, %r14
leaq 0x1b67e(%rip), %rsi     # 0x2235b
movl $0xa, %edx
movq %rax, %rdi
callq 0x32e0
movq %r14, %rdi
callq 0x3120
movq 0x262d7(%rip), %rdi     # 0x2cfd0
callq 0x3120
leaq 0x190(%rsp), %rdi
callq 0x33a0
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d2c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32a0
testb $0x1, 0x98(%rsp)
je 0x6ed1
leaq 0xc0(%rsp), %rdi
leaq 0x148(%rsp), %rdx
movq %rbx, %rsi
callq 0x7a74
leaq 0x1b60d(%rip), %rsi     # 0x22366
leaq 0xc0(%rsp), %rdi
callq 0x34f0
leaq 0x1a0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6d96
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x6d9f
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x190(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x78fa
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x6de7
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x32a0
leaq 0xd0(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x6e08
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32a0
leaq 0xc0(%rsp), %rdi
leaq 0x148(%rsp), %rdx
movq %rbx, %rsi
callq 0x7a74
leaq 0x1b4f7(%rip), %rsi     # 0x2231e
leaq 0xc0(%rsp), %rdi
callq 0x34f0
movq %r14, 0x190(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6e60
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x6e69
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x190(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
movl $0x1, %edx
callq 0x78fa
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x6eb4
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x32a0
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6ed1
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32a0
cmpb $0x0, 0x78(%rsp)
je 0x6fc3
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
leaq 0x2662b(%rip), %rdx     # 0x2d518
callq 0x7c92
leaq 0xc0(%rsp), %rdi
leaq 0x148(%rsp), %rdx
movq %rbx, %rsi
callq 0x7a74
leaq 0x1b45f(%rip), %rsi     # 0x22370
leaq 0xc0(%rsp), %rdi
callq 0x34f0
leaq 0x1a0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6f4e
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x6f57
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x190(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
movl $0x1, %edx
callq 0x78fa
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x6fa2
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x32a0
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6fc3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32a0
testb $0x1, %bpl
je 0x6fd3
movq 0x60(%rsp), %rdi
callq 0x144ac
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x6fe4
movq %rbx, %rdi
callq 0xab4a
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x32a0
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x7003
movq %rbx, %rdi
callq 0x1337a
movl $0x30, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x60(%rsp), %rbx
testq %rbx, %rbx
je 0x7022
movq %rbx, %rdi
callq 0x14384
movl $0x60, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x20(%rsp), %rbx
testq %rbx, %rbx
je 0x7041
movq %rbx, %rdi
callq 0x163e2
movl $0x50, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x705d
callq 0x3330
leaq 0x30(%rsp), %rdi
callq 0x7c34
xorl %ebx, %ebx
leaq 0xa0(%rsp), %rdi
callq 0x7cde
leaq 0x390(%rsp), %rdi
callq 0x3090
jmp 0x56aa
jmp 0x70d1
jmp 0x7103
movq %rax, %rbx
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x70b6
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x70b6
jmp 0x7285
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
jne 0x71ad
jmp 0x72c1
jmp 0x7285
movq %rax, %rbx
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x7198
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x7198
jmp 0x7103
jmp 0x7285
jmp 0x7103
movq %rax, %rbx
jmp 0x7198
jmp 0x7285
jmp 0x7285
jmp 0x7117
movq %rax, %rbx
jmp 0x729a
jmp 0x727e
jmp 0x727e
jmp 0x7285
jmp 0x7285
jmp 0x7285
jmp 0x7285
movq %rax, %rbx
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7168
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x7168
jmp 0x7165
movq %rax, %rbx
movl $0x50, %esi
movq 0x20(%rsp), %rdi
jmp 0x7275
jmp 0x7188
jmp 0x7285
jmp 0x7285
jmp 0x7285
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x33a0
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72c1
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x72c1
movq %rax, %rbx
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x71eb
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x71eb
movq %rax, %rbx
movl $0x60, %esi
movq 0x60(%rsp), %rdi
jmp 0x7275
jmp 0x728a
movq %rax, %rbx
jmp 0x72cb
jmp 0x7285
movq %rax, %rbx
jmp 0x72d8
movq %rax, %rbx
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x725d
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x725d
movq %rax, %rbx
leaq 0x3a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x726b
movq 0x3a0(%rsp), %rsi
incq %rsi
callq 0x32a0
jmp 0x726b
movq %rax, %rbx
movl $0x830, %esi            # imm = 0x830
movq (%rsp), %rdi
jmp 0x7275
movq %rax, %rbx
movl $0x30, %esi
movq 0x18(%rsp), %rdi
callq 0x32a0
jmp 0x72e5
jmp 0x7285
movq %rax, %rbx
jmp 0x72b4
jmp 0x7285
movq %rax, %rbx
jmp 0x72c1
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x1c82e
leaq 0x130(%rsp), %rdi
callq 0x7c34
leaq 0x148(%rsp), %rdi
callq 0x1c816
leaq 0xc0(%rsp), %rdi
callq 0x1d264
leaq 0x30(%rsp), %rdi
callq 0x7c34
leaq 0xa0(%rsp), %rdi
callq 0x7cde
leaq 0x390(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x34b0