// File: 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
movq %rsp, %rbp
subq $0xd40, %rsp            # imm = 0xD40
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x4a400(%rip), %rdi     # 0x50fd0
leaq 0x35614(%rip), %rsi     # 0x3c1eb
callq 0x4300
movq %rax, %rdi
movq 0x4a3ca(%rip), %rsi     # 0x50fb0
callq 0x4370
movq 0x4a3de(%rip), %rdi     # 0x50fd0
movq 0x4a3b7(%rip), %rsi     # 0x50fb0
callq 0x4370
movb $0x0, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movb $0x0, -0x13(%rbp)
movb $0x0, -0x14(%rbp)
movb $0x0, -0x15(%rbp)
movb $0x0, -0x16(%rbp)
movb $0x0, -0x17(%rbp)
movb $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movb $0x0, -0x22(%rbp)
movb $0x0, -0x23(%rbp)
movb $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x6df9
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x6db5
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
addl $-0x4c, %eax
movl %eax, %ecx
movq %rcx, -0x8e0(%rbp)
subl $0x2b, %eax
ja 0x6d5d
movq -0x8e0(%rbp), %rax
leaq 0x35396(%rip), %rcx     # 0x3c040
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, -0x11(%rbp)
jmp 0x6db3
movb $0x1, -0x12(%rbp)
jmp 0x6db3
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
callq 0x4540
movl %eax, -0x20(%rbp)
jmp 0x6db3
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x74, %eax
jne 0x6d04
movl $0x1, -0x1c(%rbp)
movb $0x1, -0x21(%rbp)
jmp 0x6d1c
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
callq 0x4540
movl %eax, -0x1c(%rbp)
jmp 0x6db3
movb $0x1, -0x13(%rbp)
jmp 0x6db3
movb $0x1, -0x17(%rbp)
jmp 0x6db3
movb $0x1, -0x24(%rbp)
jmp 0x6db3
movb $0x1, -0x14(%rbp)
jmp 0x6db3
movb $0x1, -0x18(%rbp)
jmp 0x6db3
movb $0x1, -0x16(%rbp)
jmp 0x6db3
movb $0x1, -0x15(%rbp)
jmp 0x6db3
movb $0x1, -0x23(%rbp)
jmp 0x6db3
movb $0x1, -0x22(%rbp)
jmp 0x6db3
movq 0x4a26c(%rip), %rdi     # 0x50fd0
leaq 0x3548b(%rip), %rsi     # 0x3c1f6
callq 0x4300
movq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4300
movq %rax, %rdi
movq 0x4a222(%rip), %rsi     # 0x50fb0
callq 0x4370
movq %rax, %rdi
movq 0x4a213(%rip), %rsi     # 0x50fb0
callq 0x4370
callq 0x9770
movl $0x1, -0x4(%rbp)
jmp 0x9750
jmp 0x6de9
cmpq $0x0, -0x30(%rbp)
jne 0x6dce
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x6de7
cmpq $0x0, -0x38(%rbp)
jne 0x6de5
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x6de7
jmp 0x6de9
jmp 0x6deb
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6c53
cmpq $0x0, -0x30(%rbp)
jne 0x6e11
callq 0x9770
movl $0x2, -0x4(%rbp)
jmp 0x9750
movq 0x4a1b8(%rip), %rdi     # 0x50fd0
leaq 0x353e8(%rip), %rsi     # 0x3c207
callq 0x4300
cmpl $0x0, -0x20(%rbp)
jbe 0x6e48
movq 0x4a19f(%rip), %rdi     # 0x50fd0
leaq 0x353d8(%rip), %rsi     # 0x3c210
callq 0x4300
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x4480
testb $0x1, -0x21(%rbp)
je 0x6e63
movq 0x4a17b(%rip), %rdi     # 0x50fd0
leaq 0x353bf(%rip), %rsi     # 0x3c21b
callq 0x4300
jmp 0x6e89
cmpl $0x0, -0x1c(%rbp)
jbe 0x6e87
movq 0x4a160(%rip), %rdi     # 0x50fd0
leaq 0x353b0(%rip), %rsi     # 0x3c227
callq 0x4300
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x4480
jmp 0x6e89
testb $0x1, -0x16(%rbp)
je 0x6e9f
movb $0x0, -0x17(%rbp)
movb $0x0, -0x15(%rbp)
movb $0x0, -0x12(%rbp)
movb $0x0, -0x11(%rbp)
testb $0x1, -0x17(%rbp)
je 0x6f52
movb $0x0, -0x22(%rbp)
movb $0x0, -0x15(%rbp)
movb $0x0, -0x11(%rbp)
movb $0x0, -0x13(%rbp)
movq 0x4a110(%rip), %rdi     # 0x50fd0
leaq 0x35369(%rip), %rsi     # 0x3c230
callq 0x4300
testb $0x1, -0x12(%rbp)
jne 0x6ed8
testb $0x1, -0x18(%rbp)
je 0x6f4d
movq 0x4a0f1(%rip), %rdi     # 0x50fd0
leaq 0x35fd3(%rip), %rsi     # 0x3ceb9
callq 0x4300
testb $0x1, -0x12(%rbp)
je 0x6f04
movq 0x4a0d8(%rip), %rdi     # 0x50fd0
leaq 0x3533a(%rip), %rsi     # 0x3c239
callq 0x4300
testb $0x1, -0x18(%rbp)
je 0x6f1d
movq 0x4a0bf(%rip), %rdi     # 0x50fd0
leaq 0x35329(%rip), %rsi     # 0x3c241
callq 0x4300
testb $0x1, -0x15(%rbp)
je 0x6f3a
movq 0x4a0a6(%rip), %rdi     # 0x50fd0
leaq 0x35315(%rip), %rsi     # 0x3c246
callq 0x4300
movb $0x0, -0x22(%rbp)
movq 0x4a08f(%rip), %rdi     # 0x50fd0
leaq 0x35305(%rip), %rsi     # 0x3c24d
callq 0x4300
jmp 0x701e
testb $0x1, -0x13(%rbp)
je 0x7004
movb $0x0, -0x24(%rbp)
movb $0x0, -0x18(%rbp)
movq 0x4a065(%rip), %rdi     # 0x50fd0
leaq 0x352de(%rip), %rsi     # 0x3c250
callq 0x4300
testb $0x1, -0x11(%rbp)
jne 0x6f89
testb $0x1, -0x12(%rbp)
jne 0x6f89
testb $0x1, -0x15(%rbp)
je 0x7002
movq 0x4a040(%rip), %rdi     # 0x50fd0
leaq 0x35f22(%rip), %rsi     # 0x3ceb9
callq 0x4300
testb $0x1, -0x11(%rbp)
je 0x6fb9
movq 0x4a027(%rip), %rdi     # 0x50fd0
leaq 0x352a8(%rip), %rsi     # 0x3c258
callq 0x4300
movb $0x1, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
je 0x6fd2
movq 0x4a00a(%rip), %rdi     # 0x50fd0
leaq 0x3526c(%rip), %rsi     # 0x3c239
callq 0x4300
testb $0x1, -0x15(%rbp)
je 0x6fef
movq 0x49ff1(%rip), %rdi     # 0x50fd0
leaq 0x35260(%rip), %rsi     # 0x3c246
callq 0x4300
movb $0x0, -0x22(%rbp)
movq 0x49fda(%rip), %rdi     # 0x50fd0
leaq 0x35250(%rip), %rsi     # 0x3c24d
callq 0x4300
jmp 0x701c
movb $0x0, -0x24(%rbp)
movb $0x0, -0x18(%rbp)
movb $0x0, -0x22(%rbp)
movb $0x0, -0x15(%rbp)
movb $0x0, -0x12(%rbp)
movb $0x0, -0x11(%rbp)
jmp 0x701e
testb $0x1, -0x24(%rbp)
je 0x7037
movq 0x49fa5(%rip), %rdi     # 0x50fd0
leaq 0x35230(%rip), %rsi     # 0x3c262
callq 0x4300
testb $0x1, -0x14(%rbp)
je 0x7050
movq 0x49f8c(%rip), %rdi     # 0x50fd0
leaq 0x35226(%rip), %rsi     # 0x3c271
callq 0x4300
testb $0x1, -0x16(%rbp)
je 0x7069
movq 0x49f73(%rip), %rdi     # 0x50fd0
leaq 0x35214(%rip), %rsi     # 0x3c278
callq 0x4300
testb $0x1, -0x23(%rbp)
je 0x7082
movq 0x49f5a(%rip), %rdi     # 0x50fd0
leaq 0x351ff(%rip), %rsi     # 0x3c27c
callq 0x4300
testb $0x1, -0x22(%rbp)
je 0x709b
movq 0x49f41(%rip), %rdi     # 0x50fd0
leaq 0x351f6(%rip), %rsi     # 0x3c28c
callq 0x4300
movq 0x49f2e(%rip), %rdi     # 0x50fd0
movq 0x49f07(%rip), %rsi     # 0x50fb0
callq 0x4370
movq 0x49f1b(%rip), %rdi     # 0x50fd0
leaq 0x351d7(%rip), %rsi     # 0x3c293
callq 0x4300
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x4300
movq %rax, %rdi
movq 0x49ed9(%rip), %rsi     # 0x50fb0
callq 0x4370
cmpq $0x0, -0x38(%rbp)
je 0x7111
movq 0x49ee6(%rip), %rdi     # 0x50fd0
leaq 0x351ae(%rip), %rsi     # 0x3c29f
callq 0x4300
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0x4300
movq %rax, %rdi
movq 0x49ea4(%rip), %rsi     # 0x50fb0
callq 0x4370
movq 0x49eb8(%rip), %rdi     # 0x50fd0
movq 0x49e91(%rip), %rsi     # 0x50fb0
callq 0x4370
movb -0x16(%rbp), %al
movb $0x0, -0x51(%rbp)
movb $0x0, -0x7a(%rbp)
movb $0x0, -0x8d(%rbp)
testb $0x1, %al
je 0x7148
xorl %eax, %eax
movq %rax, -0x8e8(%rbp)
jmp 0x71c9
movl $0x830, %edi            # imm = 0x830
callq 0x4320
movq %rax, %rcx
movq %rcx, -0x900(%rbp)
movq %rax, -0x50(%rbp)
movb $0x1, -0x51(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8f8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x8f0(%rbp)
callq 0x45d0
movq -0x8f8(%rbp), %rsi
movq -0x8f0(%rbp), %rdx
movb $0x1, -0x7a(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x9f60
jmp 0x719c
movq -0x900(%rbp), %rdi
movb $0x1, -0x8d(%rbp)
leaq -0x78(%rbp), %rsi
xorl %edx, %edx
callq 0xea20
jmp 0x71b7
movq -0x900(%rbp), %rax
movb $0x0, -0x51(%rbp)
movq %rax, -0x8e8(%rbp)
movq -0x8e8(%rbp), %rax
movq %rax, -0x908(%rbp)
testb $0x1, -0x8d(%rbp)
jne 0x71e2
jmp 0x71eb
leaq -0x78(%rbp), %rdi
callq 0x4688
testb $0x1, -0x7a(%rbp)
jne 0x71f3
jmp 0x71fc
leaq -0x79(%rbp), %rdi
callq 0x4390
movq -0x908(%rbp), %rax
movq %rax, -0x48(%rbp)
movb -0x16(%rbp), %al
movb $0x0, -0xa1(%rbp)
movb $0x0, -0xca(%rbp)
movb $0x0, -0xcb(%rbp)
testb $0x1, %al
je 0x72bf
movl $0x30, %edi
callq 0x4320
movq %rax, %rcx
movq %rcx, -0x920(%rbp)
movq %rax, -0xa0(%rbp)
movb $0x1, -0xa1(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x918(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x910(%rbp)
callq 0x45d0
movq -0x918(%rbp), %rsi
movq -0x910(%rbp), %rdx
movb $0x1, -0xca(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x9f60
jmp 0x728a
movq -0x920(%rbp), %rdi
movb $0x1, -0xcb(%rbp)
leaq -0xc8(%rbp), %rsi
xorl %edx, %edx
callq 0x22c00
jmp 0x72a8
movq -0x920(%rbp), %rax
movb $0x0, -0xa1(%rbp)
movq %rax, -0x928(%rbp)
jmp 0x72ca
xorl %eax, %eax
movq %rax, -0x928(%rbp)
jmp 0x72ca
movq -0x928(%rbp), %rax
movq %rax, -0x930(%rbp)
testb $0x1, -0xcb(%rbp)
jne 0x72e3
jmp 0x72ef
leaq -0xc8(%rbp), %rdi
callq 0x4688
testb $0x1, -0xca(%rbp)
jne 0x72fa
jmp 0x7306
leaq -0xc9(%rbp), %rdi
callq 0x4390
movq -0x930(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0xd0(%rbp)
movl $0x0, -0xd4(%rbp)
testb $0x1, -0x16(%rbp)
je 0x74d7
movq -0x98(%rbp), %rdi
callq 0xa3b0
testb $0x1, %al
jne 0x74a3
movq -0x48(%rbp), %rax
movq %rax, -0x938(%rbp)
cmpq $0x0, %rax
je 0x7374
movq -0x938(%rbp), %rdi
callq 0x10ba0
movq -0x938(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x940(%rbp)
cmpq $0x0, %rax
je 0x73ad
movq -0x940(%rbp), %rdi
callq 0x23480
movq -0x940(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movl $0x3, -0x4(%rbp)
jmp 0x9750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
testb $0x1, -0x8d(%rbp)
jne 0x73f5
jmp 0x73fe
leaq -0x78(%rbp), %rdi
callq 0x4688
jmp 0x7400
testb $0x1, -0x7a(%rbp)
jne 0x7408
jmp 0x7411
leaq -0x79(%rbp), %rdi
callq 0x4390
testb $0x1, -0x51(%rbp)
jne 0x7419
jmp 0x7427
movq -0x50(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
jmp 0x975c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x746b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
testb $0x1, -0xcb(%rbp)
jne 0x745d
jmp 0x7469
leaq -0xc8(%rbp), %rdi
callq 0x4688
jmp 0x746b
testb $0x1, -0xca(%rbp)
jne 0x7476
jmp 0x7482
leaq -0xc9(%rbp), %rdi
callq 0x4390
testb $0x1, -0xa1(%rbp)
jne 0x748d
jmp 0x749e
movq -0xa0(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
jmp 0x975c
movq -0x98(%rbp), %rdi
movl $0x1, %esi
callq 0x23f20
movq -0x98(%rbp), %rdi
callq 0xa3d0
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movl %eax, -0xd4(%rbp)
jmp 0x7597
movq -0x48(%rbp), %rdi
callq 0xa3f0
testb $0x1, %al
jne 0x7562
movq -0x48(%rbp), %rax
movq %rax, -0x948(%rbp)
cmpq $0x0, %rax
je 0x7512
movq -0x948(%rbp), %rdi
callq 0x10ba0
movq -0x948(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x950(%rbp)
cmpq $0x0, %rax
je 0x754b
movq -0x950(%rbp), %rdi
callq 0x23480
movq -0x950(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movl $0x3, -0x4(%rbp)
jmp 0x9750
movq -0x48(%rbp), %rdi
callq 0x13a00
movq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x13790
movq -0x48(%rbp), %rdi
callq 0xa410
movl %eax, -0xd0(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa430
movl %eax, -0xd4(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x761c
movq -0x48(%rbp), %rax
movq %rax, -0x958(%rbp)
cmpq $0x0, %rax
je 0x75cc
movq -0x958(%rbp), %rdi
callq 0x10ba0
movq -0x958(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x960(%rbp)
cmpq $0x0, %rax
je 0x7605
movq -0x960(%rbp), %rdi
callq 0x23480
movq -0x960(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movl $0x0, -0x4(%rbp)
jmp 0x9750
movq $0x0, -0xe0(%rbp)
testb $0x1, -0x11(%rbp)
je 0x7812
movl $0x60, %edi
callq 0x4320
movq %rax, -0x980(%rbp)
movb $0x1, -0x102(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x978(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x970(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x968(%rbp)
callq 0x45d0
movq -0x970(%rbp), %rsi
movq -0x968(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x9f60
jmp 0x768e
movq -0x978(%rbp), %rsi
movq -0x980(%rbp), %rdi
leaq -0x100(%rbp), %rdx
callq 0x240f0
jmp 0x76aa
movq -0x980(%rbp), %rax
movb $0x0, -0x102(%rbp)
movq %rax, -0xe0(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4688
leaq -0x101(%rbp), %rdi
callq 0x4390
movq -0xe0(%rbp), %rdi
callq 0x24da0
movq -0xe0(%rbp), %rdi
callq 0xa460
testb $0x1, %al
jne 0x7810
movq -0x48(%rbp), %rax
movq %rax, -0x988(%rbp)
cmpq $0x0, %rax
je 0x7725
movq -0x988(%rbp), %rdi
callq 0x10ba0
movq -0x988(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x990(%rbp)
cmpq $0x0, %rax
je 0x775e
movq -0x990(%rbp), %rdi
callq 0x23480
movq -0x990(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x998(%rbp)
cmpq $0x0, %rax
je 0x779a
movq -0x998(%rbp), %rdi
callq 0x24b50
movq -0x998(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
movq $0x0, -0xe0(%rbp)
movl $0x4, -0x4(%rbp)
jmp 0x9750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x77e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4688
leaq -0x101(%rbp), %rdi
callq 0x4390
testb $0x1, -0x102(%rbp)
jne 0x77fa
jmp 0x780b
movq -0x980(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
jmp 0x975c
jmp 0x7812
movq $0x0, -0x110(%rbp)
testb $0x1, -0x17(%rbp)
je 0x7ac5
testb $0x1, -0x12(%rbp)
je 0x788a
movl $0x50, %edi
callq 0x4320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x9a0(%rbp)
movq -0x48(%rbp), %rsi
callq 0x264b0
jmp 0x784f
movq -0x9a0(%rbp), %rax
movq %rax, -0x110(%rbp)
jmp 0x7ac3
movq -0x9a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
movl $0x50, %esi
callq 0x4330
jmp 0x975c
movl $0x50, %edi
callq 0x4320
movq %rax, -0x9c0(%rbp)
movb $0x1, -0x132(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x9b8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x9b0(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x9a8(%rbp)
callq 0x45d0
movq -0x9b0(%rbp), %rsi
movq -0x9a8(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x9f60
jmp 0x78e7
movq -0x9b8(%rbp), %rsi
movq -0x9c0(%rbp), %rdi
leaq -0x130(%rbp), %rdx
movl $0x1, %ecx
callq 0x26c40
jmp 0x7908
movq -0x9c0(%rbp), %rax
movb $0x0, -0x132(%rbp)
movq %rax, -0x110(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x4688
leaq -0x131(%rbp), %rdi
callq 0x4390
movq -0x110(%rbp), %rdi
movl $0x1, %esi
callq 0x295c0
movq -0x110(%rbp), %rdi
callq 0xa480
testb $0x1, %al
jne 0x7958
jmp 0x796c
movq -0x110(%rbp), %rdi
callq 0xa4a0
testb $0x1, %al
jne 0x7ac1
movq -0x48(%rbp), %rax
movq %rax, -0x9c8(%rbp)
cmpq $0x0, %rax
je 0x799a
movq -0x9c8(%rbp), %rdi
callq 0x10ba0
movq -0x9c8(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x9d0(%rbp)
cmpq $0x0, %rax
je 0x79d3
movq -0x9d0(%rbp), %rdi
callq 0x23480
movq -0x9d0(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x9d8(%rbp)
cmpq $0x0, %rax
je 0x7a0f
movq -0x9d8(%rbp), %rdi
callq 0x24b50
movq -0x9d8(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
movq $0x0, -0xe0(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x9e0(%rbp)
cmpq $0x0, %rax
je 0x7a4b
movq -0x9e0(%rbp), %rdi
callq 0x272b0
movq -0x9e0(%rbp), %rdi
movl $0x50, %esi
callq 0x4330
movq $0x0, -0x110(%rbp)
movl $0x5, -0x4(%rbp)
jmp 0x9750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x7a94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x4688
leaq -0x131(%rbp), %rdi
callq 0x4390
testb $0x1, -0x132(%rbp)
jne 0x7aab
jmp 0x7abc
movq -0x9c0(%rbp), %rdi
movl $0x50, %esi
callq 0x4330
jmp 0x975c
jmp 0x7ac3
jmp 0x7ac5
movq -0x38(%rbp), %rsi
leaq -0x340(%rbp), %rdi
movl $0x4, %edx
callq 0x45f0
movq -0x340(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x340(%rbp,%rax), %rdi
callq 0x4180
movb %al, -0x9e1(%rbp)
jmp 0x7afa
movb -0x9e1(%rbp), %al
testb $0x1, %al
jne 0x7b09
jmp 0x7c15
movq 0x494e0(%rip), %rdi     # 0x50ff0
leaq 0x34793(%rip), %rsi     # 0x3c2aa
callq 0x4300
movq %rax, -0x9f0(%rbp)
jmp 0x7b25
movq -0x9f0(%rbp), %rdi
movq 0x4947d(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x7b3a
movq -0x48(%rbp), %rax
movq %rax, -0x9f8(%rbp)
cmpq $0x0, %rax
je 0x7b68
movq -0x9f8(%rbp), %rdi
callq 0x10ba0
movq -0x9f8(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xa00(%rbp)
cmpq $0x0, %rax
je 0x7ba1
movq -0xa00(%rbp), %rdi
callq 0x23480
movq -0xa00(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xa08(%rbp)
cmpq $0x0, %rax
je 0x7bdd
movq -0xa08(%rbp), %rdi
callq 0x24b50
movq -0xa08(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
movq $0x0, -0xe0(%rbp)
movl $0x6, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x9734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9742
leaq -0x360(%rbp), %rdi
callq 0xa4c0
testb $0x1, -0x14(%rbp)
jne 0x7c5a
leaq -0x340(%rbp), %rdi
leaq -0x360(%rbp), %rsi
movl $0x1, %edx
callq 0x36be0
jmp 0x7c41
jmp 0x7c71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9726
leaq -0x340(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x36cb0
jmp 0x7c6f
jmp 0x7c71
leaq -0x340(%rbp), %rdi
callq 0x40c0
jmp 0x7c7f
leaq -0x360(%rbp), %rdi
callq 0xa4e0
cmpq $0x0, %rax
jne 0x7d8a
movq 0x49354(%rip), %rdi     # 0x50ff0
leaq 0x34623(%rip), %rsi     # 0x3c2c6
callq 0x4300
movq %rax, -0xa10(%rbp)
jmp 0x7cb1
movq -0xa10(%rbp), %rdi
movq 0x492f1(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x7cc6
movq -0x48(%rbp), %rax
movq %rax, -0xa18(%rbp)
cmpq $0x0, %rax
je 0x7cf4
movq -0xa18(%rbp), %rdi
callq 0x10ba0
movq -0xa18(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xa20(%rbp)
cmpq $0x0, %rax
je 0x7d2d
movq -0xa20(%rbp), %rdi
callq 0x23480
movq -0xa20(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xa28(%rbp)
cmpq $0x0, %rax
je 0x7d69
movq -0xa28(%rbp), %rdi
callq 0x24b50
movq -0xa28(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
movq $0x0, -0xe0(%rbp)
movl $0x7, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
jmp 0x9718
leaq -0x378(%rbp), %rdi
movq %rdi, -0xa30(%rbp)
callq 0xa500
movq -0xa30(%rbp), %rsi
movl -0x1c(%rbp), %ecx
movzbl -0x21(%rbp), %edx
andl $0x1, %edx
leaq -0x360(%rbp), %rdi
callq 0x99e0
jmp 0x7dbc
leaq -0x360(%rbp), %rdi
callq 0xa520
cmpl $0x0, -0x20(%rbp)
jbe 0x8122
leaq -0x3e8(%rbp), %rdi
movl $0x8, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0x32a60
jmp 0x7dea
movl $0x0, -0x3ec(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xa540
movq %rax, -0x3f8(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xa5b0
movq %rax, -0x400(%rbp)
leaq -0x3f8(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0xa570
testb $0x1, %al
jne 0x7e33
jmp 0x7e9e
movl -0x3ec(%rbp), %esi
leaq -0x3e8(%rbp), %rdi
callq 0x32b80
jmp 0x7e47
leaq -0x3f8(%rbp), %rdi
callq 0xa5e0
movl 0x20(%rax), %eax
addl -0x3ec(%rbp), %eax
movl %eax, -0x3ec(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0xa600
jmp 0x7e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x970a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x8111
leaq -0x3e8(%rbp), %rdi
callq 0x32be0
jmp 0x7eac
movl -0x3ec(%rbp), %edx
leaq -0x448(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x32390
jmp 0x7ec7
leaq -0x460(%rbp), %rdi
movq %rdi, -0xa38(%rbp)
callq 0xa500
movq -0xa38(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
callq 0xa620
jmp 0x7eed
leaq -0x4d8(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0x32410
jmp 0x7f02
movl $0xdeadbeef, %edi       # imm = 0xDEADBEEF
callq 0x42e0
movl $0x0, -0x4dc(%rbp)
movl -0x4dc(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x7fd9
callq 0x4100
movl -0x3ec(%rbp), %ecx
xorl %edx, %edx
movl %edx, -0xa40(%rbp)
divl %ecx
movl %edx, %esi
movl -0xa40(%rbp), %edx
leaq -0x4d8(%rbp), %rdi
callq 0x32460
movl %eax, -0xa3c(%rbp)
jmp 0x7f56
movl -0xa3c(%rbp), %eax
movl %eax, -0x4e0(%rbp)
movl -0x4e0(%rbp), %eax
decl %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rsi
leaq -0x460(%rbp), %rdi
callq 0xa720
jmp 0x7f89
jmp 0x7f8b
movl -0x4dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4dc(%rbp)
jmp 0x7f16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x80f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x4d8(%rbp), %rdi
callq 0x32440
jmp 0x80f9
leaq -0x378(%rbp), %rdi
movq %rdi, -0xa48(%rbp)
callq 0xa7b0
leaq -0x460(%rbp), %rdi
movq %rdi, -0xa50(%rbp)
callq 0xa540
movq -0xa50(%rbp), %rdi
movq %rax, -0x4e8(%rbp)
callq 0xa5b0
movq -0xa48(%rbp), %rdi
movq %rax, -0x4f0(%rbp)
movq -0x4e8(%rbp), %rsi
movq -0x4f0(%rbp), %rdx
callq 0xa7d0
jmp 0x8035
leaq -0x460(%rbp), %rdi
callq 0xa7b0
movq 0x48f88(%rip), %rdi     # 0x50fd0
leaq 0x3428a(%rip), %rsi     # 0x3c2d9
callq 0x4300
movq %rax, -0xa58(%rbp)
jmp 0x805d
leaq -0x378(%rbp), %rdi
callq 0xa810
movq -0xa58(%rbp), %rdi
movq %rax, %rsi
callq 0x40d0
movq %rax, -0xa60(%rbp)
jmp 0x8081
movq -0xa60(%rbp), %rdi
leaq 0x343fa(%rip), %rsi     # 0x3c489
callq 0x4300
movq %rax, -0xa68(%rbp)
jmp 0x809d
movq -0xa68(%rbp), %rdi
movq 0x48f05(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x80b2
movq 0x48f17(%rip), %rdi     # 0x50fd0
movq 0x48ef0(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x80c7
leaq -0x4d8(%rbp), %rdi
callq 0x32440
leaq -0x460(%rbp), %rdi
callq 0xa840
leaq -0x448(%rbp), %rdi
callq 0x323c0
leaq -0x3e8(%rbp), %rdi
callq 0x32a90
jmp 0x8122
leaq -0x460(%rbp), %rdi
callq 0xa840
leaq -0x448(%rbp), %rdi
callq 0x323c0
leaq -0x3e8(%rbp), %rdi
callq 0x32a90
jmp 0x970a
movq $0x0, -0x4f8(%rbp)
testb $0x1, -0x22(%rbp)
je 0x819a
movl -0xd4(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x4030
movq %rax, -0xa70(%rbp)
jmp 0x814d
movq -0xa70(%rbp), %rax
movq %rax, -0x4f8(%rbp)
movl $0x0, -0x4fc(%rbp)
movl -0x4fc(%rbp), %eax
cmpl -0xd4(%rbp), %eax
jae 0x8198
movq -0x4f8(%rbp), %rax
movl -0x4fc(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
movl -0x4fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4fc(%rbp)
jmp 0x8165
jmp 0x819a
callq 0x36f70
movsd %xmm0, -0xa78(%rbp)
jmp 0x81a9
movsd -0xa78(%rbp), %xmm0
movsd %xmm0, -0x508(%rbp)
movl $0x0, -0x50c(%rbp)
movl -0x50c(%rbp), %eax
movq %rax, -0xa80(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xa810
movq %rax, %rcx
movq -0xa80(%rbp), %rax
cmpq %rcx, %rax
jae 0x89d9
testb $0x1, -0x16(%rbp)
je 0x823f
movq -0x98(%rbp), %rax
movq %rax, -0xa90(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xa90(%rbp), %rdi
movq %rax, %rsi
callq 0x23830
movq %rax, -0xa88(%rbp)
jmp 0x822f
movq -0xa88(%rbp), %rax
movq %rax, -0x514(%rbp)
jmp 0x8284
movq -0x48(%rbp), %rax
movq %rax, -0xaa0(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xaa0(%rbp), %rdi
movq %rax, %rsi
callq 0x111d0
movq %rax, -0xa98(%rbp)
jmp 0x8276
movq -0xa98(%rbp), %rax
movq %rax, -0x514(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
addq $0x24, %rdi
leaq -0x514(%rbp), %rsi
callq 0xa8a0
testb $0x1, -0x13(%rbp)
je 0x867c
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
callq 0xa8d0
movb %al, -0xaa1(%rbp)
jmp 0x82d9
movb -0xaa1(%rbp), %al
testb $0x1, %al
jne 0x82e8
jmp 0x867c
movq $0x0, -0x520(%rbp)
movq $0x0, -0x528(%rbp)
testb $0x1, -0x11(%rbp)
je 0x8367
movq -0xe0(%rbp), %rax
movq %rax, -0xab8(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xab8(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x530(%rbp)
movq -0x530(%rbp), %rsi
movzbl -0x15(%rbp), %edx
andl $0x1, %edx
callq 0x253b0
movq %rax, -0xab0(%rbp)
jmp 0x8354
movq -0xab0(%rbp), %rax
movq %rax, -0x520(%rbp)
jmp 0x842a
testb $0x1, -0x16(%rbp)
je 0x83c6
movq -0x98(%rbp), %rax
movq %rax, -0xac8(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xac8(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x538(%rbp)
movq -0x538(%rbp), %rsi
callq 0x23b10
movq %rax, -0xac0(%rbp)
jmp 0x83b6
movq -0xac0(%rbp), %rax
movq %rax, -0x528(%rbp)
jmp 0x8428
movq -0x48(%rbp), %rax
movq %rax, -0xad8(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xad8(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x540(%rbp)
movq -0x540(%rbp), %rsi
movzbl -0x15(%rbp), %ecx
movzbl -0x12(%rbp), %edx
andl $0x1, %edx
andl $0x1, %ecx
callq 0x117f0
movq %rax, -0xad0(%rbp)
jmp 0x841a
movq -0xad0(%rbp), %rax
movq %rax, -0x520(%rbp)
jmp 0x842a
testb $0x1, -0x15(%rbp)
je 0x84e5
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl $0x0, 0x2c(%rax)
movl $0x0, -0x544(%rbp)
movl -0x544(%rbp), %eax
movl %eax, -0xae0(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
callq 0xa900
movl %eax, -0xadc(%rbp)
jmp 0x8489
movl -0xae0(%rbp), %eax
movl -0xadc(%rbp), %ecx
cmpl %ecx, %eax
jae 0x84e3
movq -0x520(%rbp), %rax
movl -0x544(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0xae4(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl -0xae4(%rbp), %ecx
addl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl -0x544(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x544(%rbp)
jmp 0x8459
jmp 0x84e5
testb $0x1, -0x22(%rbp)
je 0x8626
testb $0x1, -0x16(%rbp)
je 0x8590
movl $0x0, -0x548(%rbp)
movl -0x548(%rbp), %eax
movl %eax, -0xaec(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
callq 0xa900
movl %eax, -0xae8(%rbp)
jmp 0x8533
movl -0xaec(%rbp), %eax
movl -0xae8(%rbp), %ecx
cmpl %ecx, %eax
jae 0x858b
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl 0x20(%rax), %edx
movq -0x4f8(%rbp), %rax
movq -0x528(%rbp), %rcx
movl -0x548(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x548(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x548(%rbp)
jmp 0x8503
jmp 0x8624
movl $0x0, -0x54c(%rbp)
movl -0x54c(%rbp), %eax
movl %eax, -0xaf4(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
callq 0xa900
movl %eax, -0xaf0(%rbp)
jmp 0x85ca
movl -0xaf4(%rbp), %eax
movl -0xaf0(%rbp), %ecx
cmpl %ecx, %eax
jae 0x8622
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl 0x20(%rax), %edx
movq -0x4f8(%rbp), %rax
movq -0x520(%rbp), %rcx
movl -0x54c(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x54c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54c(%rbp)
jmp 0x859a
jmp 0x8624
jmp 0x8626
movq -0x528(%rbp), %rax
movq %rax, -0xb00(%rbp)
cmpq $0x0, %rax
je 0x8646
movq -0xb00(%rbp), %rdi
callq 0x4450
movq $0x0, -0x528(%rbp)
movq -0x520(%rbp), %rax
movq %rax, -0xb08(%rbp)
cmpq $0x0, %rax
je 0x8671
movq -0xb08(%rbp), %rdi
callq 0x4450
movq $0x0, -0x520(%rbp)
testb $0x1, -0x17(%rbp)
je 0x89c3
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq %rax, %rdi
callq 0xa8d0
movb %al, -0xb09(%rbp)
jmp 0x86aa
movb -0xb09(%rbp), %al
testb $0x1, %al
jne 0x86b9
jmp 0x89c3
testb $0x1, -0x18(%rbp)
je 0x8884
testb $0x1, -0x12(%rbp)
je 0x8722
movq -0x110(%rbp), %rax
movq %rax, -0xb20(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xb20(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x560(%rbp)
movq -0x560(%rbp), %rsi
callq 0x29a80
movq %rax, -0xb18(%rbp)
jmp 0x8712
movq -0xb18(%rbp), %rax
movq %rax, -0xb28(%rbp)
jmp 0x877b
movq -0x110(%rbp), %rax
movq %rax, -0xb38(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xb38(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x568(%rbp)
movq -0x568(%rbp), %rsi
callq 0x29940
movq %rax, -0xb30(%rbp)
jmp 0x876b
movq -0xb30(%rbp), %rax
movq %rax, -0xb28(%rbp)
jmp 0x877b
movq -0xb28(%rbp), %rax
movq %rax, -0x558(%rbp)
cmpq $0x0, -0x558(%rbp)
je 0x884e
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl $0x0, 0x30(%rax)
movq -0x558(%rbp), %rdi
callq 0xa930
movq %rax, -0x570(%rbp)
movq -0x558(%rbp), %rdi
callq 0xa9a0
movq %rax, -0x578(%rbp)
leaq -0x570(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0xa960
testb $0x1, %al
jne 0x87f1
jmp 0x884c
leaq -0x570(%rbp), %rdi
callq 0xa9f0
movq (%rax), %rax
movq %rax, -0x580(%rbp)
movq -0x580(%rbp), %rdi
callq 0xa9d0
movl %eax, -0xb3c(%rbp)
jmp 0x881b
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl -0xb3c(%rbp), %ecx
addl 0x30(%rax), %ecx
movl %ecx, 0x30(%rax)
leaq -0x570(%rbp), %rdi
callq 0xaa10
jmp 0x87c5
jmp 0x884e
movq -0x558(%rbp), %rax
movq %rax, -0xb48(%rbp)
cmpq $0x0, %rax
je 0x887f
movq -0xb48(%rbp), %rdi
callq 0xaa30
movq -0xb48(%rbp), %rdi
movl $0x18, %esi
callq 0x4330
jmp 0x89c1
testb $0x1, -0x12(%rbp)
je 0x88e3
movq -0x110(%rbp), %rax
movq %rax, -0xb58(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xb58(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x590(%rbp)
movq -0x590(%rbp), %rsi
callq 0x299d0
movq %rax, -0xb50(%rbp)
jmp 0x88d3
movq -0xb50(%rbp), %rax
movq %rax, -0xb60(%rbp)
jmp 0x893c
movq -0x110(%rbp), %rax
movq %rax, -0xb70(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movq -0xb70(%rbp), %rdi
movq 0x24(%rax), %rax
movq %rax, -0x598(%rbp)
movq -0x598(%rbp), %rsi
callq 0x29870
movq %rax, -0xb68(%rbp)
jmp 0x892c
movq -0xb68(%rbp), %rax
movq %rax, -0xb60(%rbp)
jmp 0x893c
movq -0xb60(%rbp), %rax
movq %rax, -0x588(%rbp)
cmpq $0x0, -0x588(%rbp)
je 0x89bf
movq -0x588(%rbp), %rdi
callq 0xaa90
movl %eax, -0xb7c(%rbp)
movl -0x50c(%rbp), %eax
movl %eax, %esi
leaq -0x378(%rbp), %rdi
callq 0xa790
movl -0xb7c(%rbp), %ecx
movl %ecx, 0x30(%rax)
movq -0x588(%rbp), %rax
movq %rax, -0xb78(%rbp)
cmpq $0x0, %rax
je 0x89b4
movq -0xb78(%rbp), %rdi
callq 0xaab0
movq -0xb78(%rbp), %rdi
movl $0x18, %esi
callq 0x4330
movq $0x0, -0x588(%rbp)
jmp 0x89c1
jmp 0x89c3
jmp 0x89c5
movl -0x50c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50c(%rbp)
jmp 0x81c3
callq 0x36f70
movsd %xmm0, -0xb88(%rbp)
jmp 0x89e8
movsd -0xb88(%rbp), %xmm0
movsd -0x508(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x5a0(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x9ab0
movl %eax, -0xb8c(%rbp)
jmp 0x8a18
movl -0xb8c(%rbp), %eax
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0x335db(%rip), %xmm1    # 0x3c008
mulsd %xmm1, %xmm0
movsd %xmm0, -0x5a8(%rbp)
movq 0x48590(%rip), %rdi     # 0x50fd0
leaq 0x3389d(%rip), %rsi     # 0x3c2e4
callq 0x4300
movq %rax, -0xb98(%rbp)
jmp 0x8a55
leaq -0x378(%rbp), %rdi
callq 0xa810
movq -0xb98(%rbp), %rdi
movq %rax, %rsi
callq 0x40d0
movq %rax, -0xba0(%rbp)
jmp 0x8a79
movq -0xba0(%rbp), %rdi
leaq 0x34431(%rip), %rsi     # 0x3ceb8
callq 0x4300
movq %rax, -0xba8(%rbp)
jmp 0x8a95
leaq -0x378(%rbp), %rdi
callq 0xa810
movq -0xba8(%rbp), %rdi
movq %rax, %xmm0
movaps 0x3356c(%rip), %xmm1    # 0x3c020
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x33570(%rip), %xmm1    # 0x3c030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x5a0(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xbb0(%rbp)
jmp 0x8ae9
movq -0xbb0(%rbp), %rdi
leaq 0x337fd(%rip), %rsi     # 0x3c2f4
callq 0x4300
movq %rax, -0xbb8(%rbp)
jmp 0x8b05
movq -0xbb8(%rbp), %rdi
movq 0x4849d(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8b1a
movq 0x484af(%rip), %rdi     # 0x50fd0
leaq 0x337d4(%rip), %rsi     # 0x3c2fc
callq 0x4300
movq %rax, -0xbc0(%rbp)
jmp 0x8b36
movq -0xbc0(%rbp), %rdi
movsd -0x5a8(%rbp), %xmm0
callq 0x4600
movq %rax, -0xbc8(%rbp)
jmp 0x8b53
movq -0xbc8(%rbp), %rdi
leaq 0x337ab(%rip), %rsi     # 0x3c30c
callq 0x4300
jmp 0x8b68
testb $0x1, -0x13(%rbp)
jne 0x8bca
movq 0x4845b(%rip), %rdi     # 0x50fd0
leaq 0x3433c(%rip), %rsi     # 0x3ceb8
callq 0x4300
movq %rax, -0xbd0(%rbp)
jmp 0x8b8a
movq -0xbd0(%rbp), %rdi
movsd -0x5a8(%rbp), %xmm0
movsd -0x5a0(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xbd8(%rbp)
jmp 0x8bb3
movq -0xbd8(%rbp), %rdi
leaq 0x3374f(%rip), %rsi     # 0x3c310
callq 0x4300
jmp 0x8bc8
jmp 0x8bca
movq 0x483ff(%rip), %rdi     # 0x50fd0
movq 0x483d8(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8bdf
leaq -0x378(%rbp), %rdi
callq 0x9b50
movl %eax, -0xbdc(%rbp)
jmp 0x8bf3
movl -0xbdc(%rbp), %eax
movl %eax, -0x5ac(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x9bd0
movl %eax, -0xbe0(%rbp)
jmp 0x8c13
movl -0xbe0(%rbp), %eax
movl %eax, -0x5b0(%rbp)
movq 0x483aa(%rip), %rdi     # 0x50fd0
leaq 0x336ea(%rip), %rsi     # 0x3c317
callq 0x4300
movq %rax, -0xbe8(%rbp)
jmp 0x8c3b
leaq -0x378(%rbp), %rdi
callq 0x9c50
movl %eax, -0xbec(%rbp)
jmp 0x8c4f
movl -0xbec(%rbp), %esi
movq -0xbe8(%rbp), %rdi
callq 0x4480
movq %rax, -0xbf8(%rbp)
jmp 0x8c6a
movq -0xbf8(%rbp), %rdi
movq 0x48338(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8c7f
movq 0x4834a(%rip), %rdi     # 0x50fd0
leaq 0x3369a(%rip), %rsi     # 0x3c327
callq 0x4300
movq %rax, -0xc00(%rbp)
jmp 0x8c9b
movq -0xc00(%rbp), %rdi
movl -0x5ac(%rbp), %esi
callq 0x4480
jmp 0x8caf
testb $0x1, -0x13(%rbp)
je 0x8dd7
movq 0x48310(%rip), %rdi     # 0x50fd0
leaq 0x341f1(%rip), %rsi     # 0x3ceb8
callq 0x4300
movq %rax, -0xc08(%rbp)
jmp 0x8cd5
movq -0xc08(%rbp), %rdi
movl -0x5ac(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd -0x5a0(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xc10(%rbp)
jmp 0x8d01
movq -0xc10(%rbp), %rdi
leaq 0x335e5(%rip), %rsi     # 0x3c2f4
callq 0x4300
jmp 0x8d16
testb $0x1, -0x15(%rbp)
je 0x8dd5
movq 0x482a9(%rip), %rdi     # 0x50fd0
movq 0x48282(%rip), %rsi     # 0x50fb0
callq 0x4370
movq %rax, -0xc18(%rbp)
jmp 0x8d3c
movq -0xc18(%rbp), %rdi
leaq 0x335ed(%rip), %rsi     # 0x3c337
callq 0x4300
movq %rax, -0xc20(%rbp)
jmp 0x8d58
movq -0xc20(%rbp), %rdi
movl -0x5b0(%rbp), %esi
callq 0x4480
movq %rax, -0xc28(%rbp)
jmp 0x8d73
movq -0xc28(%rbp), %rdi
leaq 0x34137(%rip), %rsi     # 0x3ceb8
callq 0x4300
movq %rax, -0xc30(%rbp)
jmp 0x8d8f
movq -0xc30(%rbp), %rdi
movl -0x5b0(%rbp), %eax
cvtsi2sd %rax, %xmm0
movl -0x5ac(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xc38(%rbp)
jmp 0x8dbe
movq -0xc38(%rbp), %rdi
leaq 0x3357b(%rip), %rsi     # 0x3c347
callq 0x4300
jmp 0x8dd3
jmp 0x8dd5
jmp 0x8dd7
movq 0x481f2(%rip), %rdi     # 0x50fd0
movq 0x481cb(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8dec
testb $0x1, -0x17(%rbp)
je 0x8ec8
leaq -0x378(%rbp), %rdi
callq 0x9ce0
movl %eax, -0xc3c(%rbp)
jmp 0x8e0a
movl -0xc3c(%rbp), %eax
movl %eax, -0x5b4(%rbp)
movq 0x481b3(%rip), %rdi     # 0x50fd0
leaq 0x33532(%rip), %rsi     # 0x3c356
callq 0x4300
movq %rax, -0xc48(%rbp)
jmp 0x8e32
movq -0xc48(%rbp), %rdi
movl -0x5b4(%rbp), %esi
callq 0x4480
movq %rax, -0xc50(%rbp)
jmp 0x8e4d
movq -0xc50(%rbp), %rdi
leaq 0x3405d(%rip), %rsi     # 0x3ceb8
callq 0x4300
movq %rax, -0xc58(%rbp)
jmp 0x8e69
movq -0xc58(%rbp), %rdi
movl -0x5b4(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd -0x5a0(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xc60(%rbp)
jmp 0x8e95
movq -0xc60(%rbp), %rdi
leaq 0x33451(%rip), %rsi     # 0x3c2f4
callq 0x4300
movq %rax, -0xc68(%rbp)
jmp 0x8eb1
movq -0xc68(%rbp), %rdi
movq 0x480f1(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8ec6
jmp 0x8ec8
movq 0x48101(%rip), %rdi     # 0x50fd0
leaq 0x33490(%rip), %rsi     # 0x3c366
callq 0x4300
movq %rax, -0xc70(%rbp)
jmp 0x8ee4
movq -0xc70(%rbp), %rdi
movsd -0x5a0(%rbp), %xmm0
callq 0x4600
movq %rax, -0xc78(%rbp)
jmp 0x8f01
movq -0xc78(%rbp), %rdi
leaq 0x33467(%rip), %rsi     # 0x3c376
callq 0x4300
movq %rax, -0xc80(%rbp)
jmp 0x8f1d
movq -0xc80(%rbp), %rdi
movq 0x48085(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8f32
movq 0x48097(%rip), %rdi     # 0x50fd0
movq 0x48070(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x8f47
testb $0x1, -0x22(%rbp)
je 0x927a
movq -0x38(%rbp), %rax
movq %rax, -0xc90(%rbp)
leaq -0x5d9(%rbp), %rdi
movq %rdi, -0xc88(%rbp)
callq 0x45d0
movq -0xc90(%rbp), %rsi
movq -0xc88(%rbp), %rdx
leaq -0x5d8(%rbp), %rdi
callq 0x9f60
jmp 0x8f8b
leaq -0x5d9(%rbp), %rdi
callq 0x4390
leaq 0x333e1(%rip), %rsi     # 0x3c37f
leaq -0x5d8(%rbp), %rdi
callq 0x42d0
jmp 0x8fac
leaq -0x5d8(%rbp), %rdi
callq 0x4150
movq %rax, %rsi
leaq -0x7e0(%rbp), %rdi
movl $0x4, %edx
callq 0x43a0
jmp 0x8fce
movq -0x7e0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x7e0(%rbp,%rax), %rdi
callq 0x4180
movb %al, -0xc91(%rbp)
jmp 0x8fee
movb -0xc91(%rbp), %al
testb $0x1, %al
jne 0x8ffd
jmp 0x90c8
movq 0x47fec(%rip), %rdi     # 0x50ff0
leaq 0x3337b(%rip), %rsi     # 0x3c386
callq 0x4300
movq %rax, -0xca0(%rbp)
jmp 0x9019
movq -0xca0(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
callq 0x42b0
movq %rax, -0xca8(%rbp)
jmp 0x9035
movq -0xca8(%rbp), %rdi
leaq 0x3335d(%rip), %rsi     # 0x3c3a0
callq 0x4300
movq %rax, -0xcb0(%rbp)
jmp 0x9051
movq -0xcb0(%rbp), %rdi
movq 0x47f51(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x9066
jmp 0x90f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x5d9(%rbp), %rdi
callq 0x4390
jmp 0x970a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9269
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x7e0(%rbp), %rdi
callq 0x44e0
jmp 0x9269
movq -0x4f8(%rbp), %rsi
movl -0xd4(%rbp), %eax
movl %eax, %edx
shlq $0x2, %rdx
leaq -0x7e0(%rbp), %rdi
callq 0x4470
jmp 0x90e9
leaq -0x7e0(%rbp), %rdi
callq 0x44c0
jmp 0x90f7
jmp 0x90f9
movl $0x0, -0x7e4(%rbp)
movl $0x0, -0x7e8(%rbp)
movl $0x0, -0x7ec(%rbp)
movl -0x7ec(%rbp), %eax
cmpl -0xd0(%rbp), %eax
jae 0x9187
movq -0x4f8(%rbp), %rax
movl -0x7ec(%rbp), %ecx
leaq (%rax,%rcx,4), %rsi
leaq -0x7e4(%rbp), %rdi
callq 0xab10
movq %rax, -0xcb8(%rbp)
jmp 0x914b
movq -0xcb8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x7e4(%rbp)
movq -0x4f8(%rbp), %rax
movl -0x7ec(%rbp), %ecx
movl (%rax,%rcx,4), %eax
addl -0x7e8(%rbp), %eax
movl %eax, -0x7e8(%rbp)
movl -0x7ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7ec(%rbp)
jmp 0x9117
movq 0x47e42(%rip), %rdi     # 0x50fd0
leaq 0x3320e(%rip), %rsi     # 0x3c3a3
callq 0x4300
movq %rax, -0xcc0(%rbp)
jmp 0x91a3
movq -0xcc0(%rbp), %rdi
movl -0x7e4(%rbp), %esi
callq 0x4480
movq %rax, -0xcc8(%rbp)
jmp 0x91be
movq -0xcc8(%rbp), %rdi
leaq 0x331e7(%rip), %rsi     # 0x3c3b3
callq 0x4300
movq %rax, -0xcd0(%rbp)
jmp 0x91da
movq -0xcd0(%rbp), %rdi
movl -0x7e8(%rbp), %eax
cvtsi2sd %rax, %xmm0
movl -0xd0(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x4600
movq %rax, -0xcd8(%rbp)
jmp 0x9209
movq -0xcd8(%rbp), %rdi
leaq 0x331a5(%rip), %rsi     # 0x3c3bc
callq 0x4300
movq %rax, -0xce0(%rbp)
jmp 0x9225
movq -0xce0(%rbp), %rdi
movq 0x47d7d(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x923a
movq 0x47d8f(%rip), %rdi     # 0x50fd0
movq 0x47d68(%rip), %rsi     # 0x50fb0
callq 0x4370
jmp 0x924f
leaq -0x7e0(%rbp), %rdi
callq 0x44e0
leaq -0x5d8(%rbp), %rdi
callq 0x4688
jmp 0x927a
leaq -0x5d8(%rbp), %rdi
callq 0x4688
jmp 0x970a
testb $0x1, -0x23(%rbp)
je 0x9474
movq -0x38(%rbp), %rax
movq %rax, -0xcf0(%rbp)
leaq -0x831(%rbp), %rdi
movq %rdi, -0xce8(%rbp)
callq 0x45d0
movq -0xcf0(%rbp), %rsi
movq -0xce8(%rbp), %rdx
leaq -0x830(%rbp), %rdi
callq 0x9f60
jmp 0x92be
leaq 0x33102(%rip), %rdx     # 0x3c3c7
leaq -0x810(%rbp), %rdi
leaq -0x830(%rbp), %rsi
callq 0xab50
jmp 0x92da
leaq -0x378(%rbp), %rdi
leaq -0x810(%rbp), %rsi
xorl %edx, %edx
callq 0x9d60
jmp 0x92f1
leaq -0x810(%rbp), %rdi
callq 0x4688
leaq -0x830(%rbp), %rdi
callq 0x4688
leaq -0x831(%rbp), %rdi
callq 0x4390
movq -0x38(%rbp), %rax
movq %rax, -0xd00(%rbp)
leaq -0x879(%rbp), %rdi
movq %rdi, -0xcf8(%rbp)
callq 0x45d0
movq -0xd00(%rbp), %rsi
movq -0xcf8(%rbp), %rdx
leaq -0x878(%rbp), %rdi
callq 0x9f60
jmp 0x934f
leaq 0x33029(%rip), %rdx     # 0x3c37f
leaq -0x858(%rbp), %rdi
leaq -0x878(%rbp), %rsi
callq 0xab50
jmp 0x936b
leaq -0x378(%rbp), %rdi
leaq -0x858(%rbp), %rsi
movl $0x1, %edx
callq 0x9d60
jmp 0x9385
leaq -0x858(%rbp), %rdi
callq 0x4688
leaq -0x878(%rbp), %rdi
callq 0x4688
leaq -0x879(%rbp), %rdi
callq 0x4390
jmp 0x9474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x93f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x810(%rbp), %rdi
callq 0x4688
leaq -0x830(%rbp), %rdi
callq 0x4688
leaq -0x831(%rbp), %rdi
callq 0x4390
jmp 0x970a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x9457
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x858(%rbp), %rdi
callq 0x4688
leaq -0x878(%rbp), %rdi
callq 0x4688
leaq -0x879(%rbp), %rdi
callq 0x4390
jmp 0x970a
testb $0x1, -0x24(%rbp)
je 0x95c0
leaq -0x378(%rbp), %rdi
movq %rdi, -0xd08(%rbp)
callq 0xa540
movq -0xd08(%rbp), %rdi
movq %rax, -0x888(%rbp)
callq 0xa5b0
movq %rax, -0x890(%rbp)
movq -0x888(%rbp), %rdi
movq -0x890(%rbp), %rsi
leaq 0x48110(%rip), %rdx     # 0x515d0
callq 0xaba0
jmp 0x94c7
movq -0x38(%rbp), %rax
movq %rax, -0xd18(%rbp)
leaq -0x8d1(%rbp), %rdi
movq %rdi, -0xd10(%rbp)
callq 0x45d0
movq -0xd18(%rbp), %rsi
movq -0xd10(%rbp), %rdx
leaq -0x8d0(%rbp), %rdi
callq 0x9f60
jmp 0x9501
leaq 0x32ec9(%rip), %rdx     # 0x3c3d1
leaq -0x8b0(%rbp), %rdi
leaq -0x8d0(%rbp), %rsi
callq 0xab50
jmp 0x951d
leaq -0x378(%rbp), %rdi
leaq -0x8b0(%rbp), %rsi
movl $0x1, %edx
callq 0x9d60
jmp 0x9537
leaq -0x8b0(%rbp), %rdi
callq 0x4688
leaq -0x8d0(%rbp), %rdi
callq 0x4688
leaq -0x8d1(%rbp), %rdi
callq 0x4390
jmp 0x95c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x95af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x95a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x8b0(%rbp), %rdi
callq 0x4688
leaq -0x8d0(%rbp), %rdi
callq 0x4688
leaq -0x8d1(%rbp), %rdi
callq 0x4390
jmp 0x970a
testb $0x1, -0x11(%rbp)
je 0x95d6
movq -0xe0(%rbp), %rdi
callq 0x24da0
jmp 0x95d4
jmp 0x95d6
movq -0x48(%rbp), %rax
movq %rax, -0xd20(%rbp)
cmpq $0x0, %rax
je 0x9604
movq -0xd20(%rbp), %rdi
callq 0x10ba0
movq -0xd20(%rbp), %rdi
movl $0x830, %esi            # imm = 0x830
callq 0x4330
movq $0x0, -0x48(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xd28(%rbp)
cmpq $0x0, %rax
je 0x963d
movq -0xd28(%rbp), %rdi
callq 0x23480
movq -0xd28(%rbp), %rdi
movl $0x30, %esi
callq 0x4330
movq $0x0, -0x98(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xd30(%rbp)
cmpq $0x0, %rax
je 0x9679
movq -0xd30(%rbp), %rdi
callq 0x24b50
movq -0xd30(%rbp), %rdi
movl $0x60, %esi
callq 0x4330
movq $0x0, -0xe0(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0xd38(%rbp)
cmpq $0x0, %rax
je 0x96b5
movq -0xd38(%rbp), %rdi
callq 0x272b0
movq -0xd38(%rbp), %rdi
movl $0x50, %esi
callq 0x4330
movq $0x0, -0x110(%rbp)
movq -0x4f8(%rbp), %rax
movq %rax, -0xd40(%rbp)
cmpq $0x0, %rax
je 0x96e0
movq -0xd40(%rbp), %rdi
callq 0x4450
movq $0x0, -0x4f8(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x1, -0x344(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xa840
jmp 0x9718
leaq -0x378(%rbp), %rdi
callq 0xa840
jmp 0x9726
leaq -0x360(%rbp), %rdi
callq 0xabe0
jmp 0x9734
leaq -0x360(%rbp), %rdi
callq 0xabe0
jmp 0x9742
leaq -0x340(%rbp), %rdi
callq 0x40f0
jmp 0x9750
leaq -0x340(%rbp), %rdi
callq 0x40f0
jmp 0x975c
movl -0x4(%rbp), %eax
addq $0xd40, %rsp            # imm = 0xD40
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x45c0
nopl (%rax,%rax)