// File: /workspace/github_cpp_makefile_star2_O2/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 $0x5b8, %rsp            # imm = 0x5B8
movq %rsi, %r14
movl %edi, %ebx
movq 0x23977(%rip), %r15     # 0x27fd0
leaq 0x15b2f(%rip), %rsi     # 0x1a18f
movq %r15, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq %r15, %rdi
callq 0x3110
movslq %ebx, %r12
xorl %ebx, %ebx
pushq $0x1
popq %rbp
leaq 0x159b9(%rip), %r13     # 0x1a040
xorl %r15d, %r15d
movq $0x0, 0x10(%rsp)
movq $0x0, 0xa8(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0xc(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x58(%rsp)
cmpq %r12, %rbp
jge 0x481b
movq (%r14,%rbp,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x4744
movzbl 0x1(%rdi), %eax
leal -0x61(%rax), %ecx
cmpl $0x16, %ecx
ja 0x475a
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x1, %al
movq %rax, 0x58(%rsp)
jmp 0x4755
testq %r15, %r15
je 0x4752
testq %rbx, %rbx
cmoveq %rdi, %rbx
jmp 0x4755
movq %rdi, %r15
incq %rbp
jmp 0x4713
cmpl $0x4c, %eax
je 0x47eb
cmpl $0x53, %eax
je 0x47fa
cmpl $0x57, %eax
jne 0x4f00
movb $0x1, %al
movq %rax, 0xa8(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x30(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x90(%rsp)
jmp 0x4755
cmpb $0x74, 0x2(%rdi)
jne 0x4806
movb $0x1, %al
movq %rax, 0xa0(%rsp)
pushq $0x1
popq %rax
jmp 0x480f
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x38(%rsp)
jmp 0x4755
addq $0x2, %rdi
callq 0x33c0
movl %eax, 0x24(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x60(%rsp)
jmp 0x4755
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0x4755
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x88(%rsp)
jmp 0x4755
movb $0x1, %al
movq %rax, 0x18(%rsp)
jmp 0x4755
addq $0x2, %rdi
callq 0x33c0
movl %eax, 0x80(%rsp)
jmp 0x4755
testq %r15, %r15
je 0x488a
movq 0x237a9(%rip), %rdi     # 0x27fd0
leaq 0x1597d(%rip), %rsi     # 0x1a1ab
callq 0x3240
movl 0x24(%rsp), %r13d
movl %r13d, %r14d
testl %r13d, %r13d
je 0x485e
movq 0x23789(%rip), %rdi     # 0x27fd0
leaq 0x15966(%rip), %rsi     # 0x1a1b4
callq 0x3240
movq %rax, %rdi
movq %r14, %rsi
callq 0x3180
movq %r14, 0xf0(%rsp)
testb $0x1, 0xa0(%rsp)
movq 0x38(%rsp), %r12
je 0x4896
movq 0x23754(%rip), %rdi     # 0x27fd0
leaq 0x1593c(%rip), %rsi     # 0x1a1bf
callq 0x3240
jmp 0x48c2
callq 0x5e22
pushq $0x2
jmp 0x4dc5
cmpl $0x0, 0x80(%rsp)
je 0x48c2
movq 0x23729(%rip), %rdi     # 0x27fd0
leaq 0x1591d(%rip), %rsi     # 0x1a1cb
callq 0x3240
movl 0x80(%rsp), %esi
movq %rax, %rdi
callq 0x3180
movq 0x88(%rsp), %rcx
xorb $0x1, %cl
movq 0x18(%rsp), %rsi
orb %sil, %cl
movzbl 0x58(%rsp), %edx
xorl %eax, %eax
testb $0x1, %sil
cmovnel %eax, %edx
movl %edx, 0x58(%rsp)
movzbl %r12b, %ebp
cmovnel %eax, %ebp
movzbl 0x30(%rsp), %edx
cmovnel %eax, %edx
movl %edx, 0x30(%rsp)
movq %rcx, 0x88(%rsp)
testb $0x1, %cl
je 0x495a
movl $0x0, 0x6c(%rsp)
testb $0x1, 0x60(%rsp)
je 0x49a6
movq 0x236af(%rip), %rdi     # 0x27fd0
leaq 0x158cc(%rip), %rsi     # 0x1a1f4
callq 0x3240
testb $0x1, 0x58(%rsp)
je 0x4a56
movq 0x23691(%rip), %rdi     # 0x27fd0
leaq 0x164fd(%rip), %rsi     # 0x1ae43
callq 0x3240
movb $0x1, %bpl
leaq 0x158a7(%rip), %rsi     # 0x1a1fc
jmp 0x4a67
movq 0x2366f(%rip), %rdi     # 0x27fd0
leaq 0x1586c(%rip), %rsi     # 0x1a1d4
callq 0x3240
testb $0x1, %r12b
je 0x49c6
movq 0x23656(%rip), %r14     # 0x27fd0
leaq 0x164c2(%rip), %rsi     # 0x1ae43
movq %r14, %rdi
callq 0x3240
leaq 0x1584d(%rip), %rsi     # 0x1a1dd
movq %r14, %rdi
callq 0x3240
testb $0x1, 0xc(%rsp)
movq 0x10(%rsp), %r14
jne 0x49e5
jmp 0x49f8
movl $0x0, 0x58(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x30(%rsp)
movl $0x0, 0xc(%rsp)
jmp 0x4a4f
testb $0x1, 0xc(%rsp)
movq 0x10(%rsp), %r14
je 0x4a0b
movq 0x235f7(%rip), %rdi     # 0x27fd0
leaq 0x16463(%rip), %rsi     # 0x1ae43
callq 0x3240
movq 0x235e4(%rip), %rdi     # 0x27fd0
leaq 0x157f2(%rip), %rsi     # 0x1a1e5
callq 0x3240
movq 0x235d1(%rip), %rdi     # 0x27fd0
leaq 0x157eb(%rip), %rsi     # 0x1a1f1
callq 0x3240
movl $0x0, 0x58(%rsp)
testb $0x1, %r14b
je 0x4a36
leaq 0x157e6(%rip), %r14     # 0x1a206
movl %r12d, %ebp
movq $0x0, 0x60(%rsp)
movl $0x0, 0x30(%rsp)
jmp 0x4aaf
movl $0x0, 0x6c(%rsp)
movq $0x0, 0x60(%rsp)
movl $0x0, 0x30(%rsp)
xorl %ebp, %ebp
jmp 0x4ae5
testb $0x1, %bpl
je 0x4f79
leaq 0x163dc(%rip), %rsi     # 0x1ae43
movq 0x23562(%rip), %rdi     # 0x27fd0
callq 0x3240
movq 0x23556(%rip), %rdi     # 0x27fd0
leaq 0x1575c(%rip), %rsi     # 0x1a1dd
callq 0x3240
leaq 0x15764(%rip), %r14     # 0x1a1f1
testb $0x1, 0x30(%rsp)
je 0x4ab9
movq 0x23535(%rip), %rdi     # 0x27fd0
leaq 0x15748(%rip), %rsi     # 0x1a1ea
callq 0x3240
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
jmp 0x4ac1
movl $0x0, 0xc(%rsp)
movq 0x88(%rsp), %rax
xorb $0x1, %al
movl %eax, 0x6c(%rsp)
movq 0x234fa(%rip), %rdi     # 0x27fd0
movq %r14, %rsi
callq 0x3240
movl %ebp, %r12d
movl 0x8(%rsp), %ebp
testb $0x1, 0x90(%rsp)
je 0x4b02
movq 0x234da(%rip), %rdi     # 0x27fd0
leaq 0x15718(%rip), %rsi     # 0x1a215
callq 0x3240
testb $0x1, 0x18(%rsp)
je 0x4b1c
movq 0x234c0(%rip), %rdi     # 0x27fd0
leaq 0x15705(%rip), %rsi     # 0x1a21c
callq 0x3240
testb $0x1, 0xa8(%rsp)
je 0x4b39
movq 0x234a3(%rip), %rdi     # 0x27fd0
leaq 0x156ec(%rip), %rsi     # 0x1a220
callq 0x3240
testb $0x1, %bpl
je 0x4b52
movq 0x2348a(%rip), %rdi     # 0x27fd0
leaq 0x156e3(%rip), %rsi     # 0x1a230
callq 0x3240
movq 0x23477(%rip), %r14     # 0x27fd0
movq %r14, %rdi
callq 0x3110
leaq 0x156cf(%rip), %rsi     # 0x1a237
movq %r14, %rdi
callq 0x3240
movq %rax, %rdi
movq %r15, %rsi
callq 0x3240
movq %rax, %rdi
callq 0x3110
testq %rbx, %rbx
je 0x4bae
movq 0x23441(%rip), %rdi     # 0x27fd0
leaq 0x156ad(%rip), %rsi     # 0x1a243
callq 0x3240
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x2341b(%rip), %rdi     # 0x27fd0
callq 0x3110
testb $0x1, 0x18(%rsp)
je 0x4c4d
pushq $0x30
popq %rdi
callq 0x3260
movq %rax, %r14
leaq 0x3b0(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
movq %r15, %rsi
callq 0x622c
leaq 0x3b0(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xf8d4
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
cmpb $0x0, (%r14)
je 0x4d9e
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x10214
movq $0x0, 0x10(%rsp)
testq %rbx, %rbx
je 0x4ec4
movq %r12, 0x38(%rsp)
movl 0x28(%r14), %r12d
movq %r14, 0x78(%rsp)
subl 0x2c(%r14), %r12d
movl %r12d, 0x9c(%rsp)
jmp 0x4ce2
movq %r12, 0x38(%rsp)
movl $0x830, %edi            # imm = 0x830
callq 0x3260
movq %rax, %r12
leaq 0x3b0(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
movq %r15, %rsi
callq 0x622c
leaq 0x3b0(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x75c4
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
cmpb $0x0, (%r12)
je 0x4dae
movq %r12, %rdi
callq 0xa1d0
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0xa00c
testq %rbx, %rbx
je 0x4ec9
movq $0x0, 0x78(%rsp)
movl 0x4(%r12), %eax
movl %eax, 0x9c(%rsp)
movq %r12, 0x10(%rsp)
movq 0x828(%r12), %rax
movl (%rax), %r12d
testb $0x1, 0x58(%rsp)
je 0x4dda
pushq $0x60
popq %rdi
callq 0x3260
movq %rax, %r14
leaq 0x3b0(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
movq %r15, %rsi
callq 0x622c
leaq 0x3b0(%rsp), %rdx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x10370
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
movq %r14, %rdi
callq 0x10914
movq %r14, 0x70(%rsp)
cmpb $0x0, 0x58(%r14)
jne 0x4de3
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x3270
movq 0x78(%rsp), %r14
testq %r14, %r14
je 0x4d76
movq %r14, %rdi
callq 0xfcf4
pushq $0x4
popq %rbx
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x3270
movq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x107fa
pushq $0x60
popq %rsi
movq %r14, %rdi
callq 0x3270
jmp 0x4dc6
movq %r14, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %r14, %rdi
jmp 0x4dbe
movq %r12, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %r12, %rdi
callq 0x3270
pushq $0x3
popq %rbx
movl %ebx, %eax
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x70(%rsp)
testb $0x1, 0x88(%rsp)
je 0x4df8
movq $0x0, 0x28(%rsp)
jmp 0x4e1d
pushq $0x50
popq %rdi
callq 0x3260
testb $0x1, 0x38(%rsp)
movq %rax, 0x28(%rsp)
je 0x4fae
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x116aa
leaq 0x3b0(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3490
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x3d0(%rsp,%rax)
je 0x4f3b
movq 0x231a1(%rip), %rdi     # 0x27ff0
leaq 0x153f8(%rip), %rsi     # 0x1a24e
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x4e75
movq %rbx, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x3270
movq 0x78(%rsp), %rbx
testq %rbx, %rbx
je 0x4e94
movq %rbx, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x70(%rsp), %rbx
testq %rbx, %rbx
je 0x4eb1
movq %rbx, %rdi
callq 0x107fa
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x3270
pushq $0x6
popq %rbx
jmp 0x5c7c
xorl %r12d, %r12d
jmp 0x4ed4
movq %r12, %rdi
callq 0x8846
xorl %r14d, %r14d
movl $0x830, %esi            # imm = 0x830
movq %r12, %rdi
callq 0x3270
testq %r14, %r14
je 0x4eee
movq %r14, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x3270
xorl %ebx, %ebx
jmp 0x4dc6
movq 0x230c9(%rip), %rdi     # 0x27fd0
leaq 0x1528c(%rip), %rsi     # 0x1a19a
callq 0x3240
movq (%r14,%rbp,8), %rsi
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq %rax, %rdi
callq 0x3110
callq 0x5e22
pushq $0x1
jmp 0x4dc5
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
testb $0x1, 0x90(%rsp)
je 0x5084
leaq 0x3b0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1854e
jmp 0x509c
movl $0x0, 0x6c(%rsp)
testb $0x1, 0x30(%rsp)
je 0x5147
movq 0x2303d(%rip), %rdi     # 0x27fd0
leaq 0x15ea9(%rip), %rsi     # 0x1ae43
callq 0x3240
testb $0x1, %bpl
jne 0x4a73
jmp 0x4a86
leaq 0x3b0(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
movq %r15, %rsi
callq 0x622c
leaq 0x3b0(%rsp), %rdx
pushq $0x1
popq %rcx
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x11b32
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1302c
cmpb $0x1, 0x48(%r14)
jne 0x5011
movq 0x28(%rsp), %rax
cmpb $0x0, 0x49(%rax)
jne 0x4e1d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x3270
movq 0x78(%rsp), %rbx
testq %rbx, %rbx
je 0x503d
movq %rbx, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x70(%rsp), %rbx
testq %rbx, %rbx
je 0x505a
movq %rbx, %rdi
callq 0x107fa
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x11dc8
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x3270
pushq $0x5
jmp 0x4dc5
leaq 0x3b0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x184c6
leaq 0x3b0(%rsp), %rdi
callq 0x3080
movq 0xb8(%rsp), %rax
cmpq 0xb0(%rsp), %rax
je 0x52ee
xorpd %xmm0, %xmm0
leaq 0x40(%rsp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movzbl 0xa0(%rsp), %edx
andl $0x1, %edx
leaq 0xb0(%rsp), %rdi
movl 0x80(%rsp), %ecx
callq 0x5fc2
leaq 0xb0(%rsp), %rdi
callq 0x635c
testl %r13d, %r13d
je 0x52b8
leaq 0xf8(%rsp), %rdi
pushq $0x8
popq %rsi
movl $0x100000, %edx         # imm = 0x100000
callq 0x169b2
xorl %r15d, %r15d
movq 0x40(%rsp), %r13
leaq 0xf8(%rsp), %r14
cmpq 0x48(%rsp), %r13
je 0x5157
movq %r14, %rdi
movl %r15d, %esi
callq 0x16a22
addl 0x20(%r13), %r15d
addq $0x38, %r13
jmp 0x512b
movl %ebp, %r12d
movl $0x0, 0xc(%rsp)
jmp 0x4ae1
leaq 0xf8(%rsp), %rdi
callq 0x16a2e
leaq 0x168(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
movl %r15d, %edx
callq 0x166bc
xorpd %xmm0, %xmm0
leaq 0xd0(%rsp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0xf0(%rsp), %rsi
callq 0x6364
leaq 0x1b0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x166d4
movl $0xdeadbeef, %edi       # imm = 0xDEADBEEF
callq 0x3230
leaq 0x1b0(%rsp), %r13
leaq 0xd0(%rsp), %r14
subl $0x1, 0x24(%rsp)
jb 0x51ff
callq 0x30b0
xorl %edx, %edx
divl %r15d
movq %r13, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x166e0
decl %eax
imulq $0x38, %rax, %rsi
addq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x6406
jmp 0x51cd
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x6432
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq %r14, %rdi
callq 0x69a8
leaq 0xd0(%rsp), %rdi
callq 0x6432
movq 0x22d98(%rip), %rdi     # 0x27fd0
leaq 0x1503e(%rip), %rsi     # 0x1a27d
callq 0x3240
movq %rax, %rdi
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
movq %rax, %rsi
callq 0x3180
leaq 0x151c5(%rip), %rsi     # 0x1a42d
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x22d51(%rip), %rdi     # 0x27fd0
callq 0x3110
leaq 0x1b0(%rsp), %rdi
callq 0x166da
leaq 0xd0(%rsp), %rdi
callq 0x643a
leaq 0x168(%rsp), %rdi
callq 0x166c2
leaq 0xf8(%rsp), %rdi
callq 0x169ba
movl %r12d, %r14d
movl %ebp, 0x8(%rsp)
testb $0x1, %bpl
je 0x536a
leaq (,%r14,4), %rdi
callq 0x3030
movq %rax, %rbp
xorl %eax, %eax
cmpq %rax, %r14
je 0x536c
andl $0x0, (%rbp,%rax,4)
incq %rax
jmp 0x52db
movq 0x22cfb(%rip), %rdi     # 0x27ff0
leaq 0x14f6e(%rip), %rsi     # 0x1a26a
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x531b
movq %rbx, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x3270
movq 0x78(%rsp), %rbx
testq %rbx, %rbx
je 0x533a
movq %rbx, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x70(%rsp), %rbx
testq %rbx, %rbx
je 0x5357
movq %rbx, %rdi
callq 0x107fa
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x3270
pushq $0x7
popq %rbx
jmp 0x5c6f
xorl %ebp, %ebp
movq %r14, 0x90(%rsp)
callq 0x186c4
movsd %xmm0, 0x80(%rsp)
xorl %r12d, %r12d
movzbl 0x30(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x24(%rsp)
movl %r12d, %r12d
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
subq %rsi, %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %r12, %rax
jbe 0x55ea
imulq $0x38, %r12, %r13
addq %r13, %rsi
testb $0x1, 0x18(%rsp)
je 0x53cc
movq 0x78(%rsp), %rdi
callq 0xfedc
jmp 0x53d6
movq 0x10(%rsp), %rdi
callq 0x8bfe
movq 0x40(%rsp), %rcx
movq %rax, 0x24(%rcx,%r13)
testb $0x1, 0x60(%rsp)
je 0x5503
leaq (%rcx,%r13), %rax
addq $0x24, %rax
movq (%rax), %rsi
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x5503
testb $0x1, 0x58(%rsp)
je 0x541c
movq 0x70(%rsp), %rdi
movl 0x24(%rsp), %edx
callq 0x10d16
jmp 0x5448
testb $0x1, 0x18(%rsp)
je 0x5432
movq 0x78(%rsp), %rdi
callq 0x1005e
xorl %r15d, %r15d
jmp 0x544d
movzbl 0x38(%rsp), %edx
andl $0x1, %edx
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %ecx
callq 0x8f30
movq %rax, %r15
xorl %eax, %eax
testb $0x1, 0x30(%rsp)
je 0x5488
movq 0x40(%rsp), %rdx
andl $0x0, 0x2c(%rdx,%r13)
leaq (%rdx,%r13), %rcx
movq 0x24(%rdx,%r13), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
subl %esi, %edx
incl %edx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rdx, %rdi
jae 0x5488
addl (%r15,%rdi,4), %esi
movl %esi, 0x2c(%rcx)
incq %rdi
jmp 0x5477
testb $0x1, 0x8(%rsp)
je 0x54e9
movq 0x40(%rsp), %rcx
addq %r13, %rcx
testb $0x1, 0x18(%rsp)
je 0x54c3
xorl %edx, %edx
movq 0x24(%rcx), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
subl %esi, %edi
incl %edi
cmpq %rdi, %rdx
jae 0x54e9
movl 0x20(%rcx), %esi
movl (%rax,%rdx,4), %edi
addl %esi, (%rbp,%rdi,4)
incq %rdx
jmp 0x54a0
xorl %edx, %edx
movq 0x24(%rcx), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
subl %esi, %edi
incl %edi
cmpq %rdi, %rdx
jae 0x54e9
movl 0x20(%rcx), %esi
movl (%r15,%rdx,4), %edi
addl %esi, (%rbp,%rdi,4)
incq %rdx
jmp 0x54c5
testq %rax, %rax
je 0x54f6
movq %rax, %rdi
callq 0x32f0
testq %r15, %r15
je 0x5503
movq %r15, %rdi
callq 0x32f0
testb $0x1, 0x88(%rsp)
jne 0x55e2
movq 0x40(%rsp), %rax
movq 0x24(%rax,%r13), %rsi
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x55e2
testb $0x1, 0xc(%rsp)
je 0x5544
testb $0x1, 0x38(%rsp)
je 0x5557
movq 0x28(%rsp), %rdi
callq 0x132f6
jmp 0x5561
testb $0x1, 0x38(%rsp)
je 0x55a8
movq 0x28(%rsp), %rdi
callq 0x1329c
jmp 0x55b2
movq 0x28(%rsp), %rdi
callq 0x13268
movq %rax, %r15
testq %rax, %rax
je 0x55a3
movq 0x40(%rsp), %rax
addq %r13, %rax
addq $0x30, %rax
andl $0x0, (%rax)
movq (%r15), %rcx
movq 0x8(%r15), %rdx
xorl %esi, %esi
cmpq %rdx, %rcx
je 0x559b
movq (%rcx), %rdi
subl %edi, %esi
shrq $0x20, %rdi
addl %edi, %esi
incl %esi
movl %esi, (%rax)
addq $0x8, %rcx
jmp 0x5581
movq %r15, %rdi
callq 0x6c02
movq %r15, %rdi
jmp 0x55da
movq 0x28(%rsp), %rdi
callq 0x1321c
movq %rax, %r14
testq %rax, %rax
je 0x55e2
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x2, %rax
movq 0x40(%rsp), %rcx
movl %eax, 0x30(%rcx,%r13)
movq %r14, %rdi
callq 0x6c36
movq %r14, %rdi
pushq $0x18
popq %rsi
callq 0x3270
incl %r12d
jmp 0x5391
callq 0x186c4
movsd %xmm0, 0x18(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x6031
movl %eax, %r15d
movq 0x229c7(%rip), %rdi     # 0x27fd0
leaq 0x14c78(%rip), %rsi     # 0x1a288
callq 0x3240
movq 0x90(%rsp), %r12
movq %rax, %rdi
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
movq %rax, %rsi
callq 0x3180
leaq 0x15801(%rip), %rsi     # 0x1ae42
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
movsd 0x18(%rsp), %xmm2
subsd 0x80(%rsp), %xmm2
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
movq %rax, %xmm1
punpckldq 0x149a6(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x149ae(%rip), %xmm1    # 0x1a030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd %xmm2, 0x18(%rsp)
divsd %xmm2, %xmm0
callq 0x33f0
leaq 0x14bf4(%rip), %rsi     # 0x1a298
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x22915(%rip), %rdi     # 0x27fd0
leaq 0x14bde(%rip), %rsi     # 0x1a2a0
callq 0x3240
movl %r15d, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x14931(%rip), %xmm0    # 0x1a008
movq %rax, %rdi
movsd %xmm0, 0x38(%rsp)
callq 0x33f0
leaq 0x14bc4(%rip), %rsi     # 0x1a2b0
movq %rax, %rdi
callq 0x3240
testb $0x1, 0x60(%rsp)
jne 0x5731
movq 0x228ce(%rip), %rdi     # 0x27fd0
leaq 0x15739(%rip), %rsi     # 0x1ae42
callq 0x3240
movsd 0x38(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movq %rax, %rdi
callq 0x33f0
leaq 0x14b8b(%rip), %rsi     # 0x1a2b4
movq %rax, %rdi
callq 0x3240
movq 0x22898(%rip), %rdi     # 0x27fd0
callq 0x3110
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x6079
movl %eax, %r13d
movq %r14, %rdi
callq 0x60ad
movl %eax, %r15d
movq 0x22871(%rip), %rdi     # 0x27fd0
leaq 0x14b55(%rip), %rsi     # 0x1a2bb
callq 0x3240
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x60d5
movl %eax, %esi
movq %r14, %rdi
callq 0x3180
movq %rax, %rdi
callq 0x3110
movq 0x2283f(%rip), %rdi     # 0x27fd0
leaq 0x14b33(%rip), %rsi     # 0x1a2cb
callq 0x3240
movl %r13d, %r14d
movq %rax, %rdi
movq %r14, %rsi
callq 0x3180
testb $0x1, 0x60(%rsp)
je 0x5852
movq 0x22813(%rip), %rdi     # 0x27fd0
leaq 0x1567e(%rip), %rsi     # 0x1ae42
callq 0x3240
cvtsi2sd %r14, %xmm0
movsd %xmm0, 0x60(%rsp)
divsd 0x18(%rsp), %xmm0
movq %rax, %rdi
callq 0x33f0
leaq 0x14aaf(%rip), %rsi     # 0x1a298
movq %rax, %rdi
callq 0x3240
testb $0x1, 0x30(%rsp)
je 0x5852
movq 0x227d1(%rip), %rdi     # 0x27fd0
callq 0x3110
leaq 0x14ad0(%rip), %rsi     # 0x1a2db
movq %rax, %rdi
callq 0x3240
movl %r15d, %r14d
movq %rax, %rdi
movq %r14, %rsi
callq 0x3180
leaq 0x1561a(%rip), %rsi     # 0x1ae42
movq %rax, %rdi
callq 0x3240
cvtsi2sd %r14, %xmm0
divsd 0x60(%rsp), %xmm0
movq %rax, %rdi
callq 0x33f0
leaq 0x14aa1(%rip), %rsi     # 0x1a2eb
movq %rax, %rdi
callq 0x3240
movq 0x22777(%rip), %rdi     # 0x27fd0
callq 0x3110
testb $0x1, 0x88(%rsp)
jne 0x58cf
leaq 0x40(%rsp), %rdi
callq 0x6114
movl %eax, %r14d
movq 0x22754(%rip), %rdi     # 0x27fd0
leaq 0x14a77(%rip), %rsi     # 0x1a2fa
callq 0x3240
movl %r14d, %r14d
movq %rax, %rdi
movq %r14, %rsi
callq 0x3180
leaq 0x155a5(%rip), %rsi     # 0x1ae42
movq %rax, %rdi
callq 0x3240
cvtsi2sd %r14, %xmm0
divsd 0x18(%rsp), %xmm0
movq %rax, %rdi
callq 0x33f0
leaq 0x149d9(%rip), %rsi     # 0x1a298
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x226fa(%rip), %rdi     # 0x27fd0
leaq 0x14a2d(%rip), %rsi     # 0x1a30a
callq 0x3240
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x33f0
leaq 0x14a23(%rip), %rsi     # 0x1a31a
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x226c2(%rip), %rdi     # 0x27fd0
callq 0x3110
testb $0x1, 0x8(%rsp)
je 0x5a83
leaq 0xf8(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
movq %rbx, %rsi
callq 0x622c
leaq 0x149e6(%rip), %rsi     # 0x1a323
leaq 0xf8(%rsp), %rdi
callq 0x34a0
movq 0xf8(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x32a0
movq 0x1b0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x1d0(%rsp,%rax)
je 0x59b4
movq 0x22671(%rip), %rdi     # 0x27ff0
leaq 0x149a4(%rip), %rsi     # 0x1a32a
callq 0x3240
leaq 0xf8(%rsp), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0x149a2(%rip), %rsi     # 0x1a344
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
jmp 0x59d8
shlq $0x2, %r12
leaq 0x1b0(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x3320
leaq 0x1b0(%rsp), %rdi
callq 0x3360
movl 0x9c(%rsp), %r14d
xorl %eax, %eax
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpq %rax, %r14
je 0x5a00
movl (%rbp,%rax,4), %ecx
cmpl %ecx, %r12d
cmovbel %ecx, %r12d
addl %ecx, %r15d
incq %rax
jmp 0x59e8
movq 0x225c9(%rip), %rdi     # 0x27fd0
leaq 0x14939(%rip), %rsi     # 0x1a347
callq 0x3240
movl %r12d, %esi
movq %rax, %rdi
callq 0x3180
leaq 0x14932(%rip), %rsi     # 0x1a357
movq %rax, %rdi
callq 0x3240
movl %r15d, %ecx
cvtsi2sd %rcx, %xmm0
cvtsi2sd %r14, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x33f0
leaq 0x14913(%rip), %rsi     # 0x1a360
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3110
movq 0x2256c(%rip), %rdi     # 0x27fd0
callq 0x3110
leaq 0x1b0(%rsp), %rdi
callq 0x3380
leaq 0xf8(%rsp), %rdi
callq 0x34e8
testb $0x1, 0xa8(%rsp)
je 0x5b56
leaq 0xf8(%rsp), %rdi
leaq 0x168(%rsp), %rdx
movq %rbx, %rsi
callq 0x622c
leaq 0x148bb(%rip), %rdx     # 0x1a36b
leaq 0x1b0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x645b
leaq 0x40(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
xorl %edx, %edx
callq 0x613c
leaq 0x1b0(%rsp), %rdi
callq 0x34e8
leaq 0xf8(%rsp), %rdi
callq 0x34e8
leaq 0xf8(%rsp), %rdi
leaq 0x168(%rsp), %rdx
movq %rbx, %rsi
callq 0x622c
leaq 0x14811(%rip), %rdx     # 0x1a323
leaq 0x1b0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x645b
leaq 0x40(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x613c
leaq 0x1b0(%rsp), %rdi
callq 0x34e8
leaq 0xf8(%rsp), %rdi
callq 0x34e8
testb $0x1, 0x6c(%rsp)
je 0x5bcf
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x6c69
leaq 0xf8(%rsp), %rdi
leaq 0x168(%rsp), %rdx
movq %rbx, %rsi
callq 0x622c
leaq 0x147ea(%rip), %rdx     # 0x1a375
leaq 0x1b0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x645b
leaq 0x40(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x613c
leaq 0x1b0(%rsp), %rdi
callq 0x34e8
leaq 0xf8(%rsp), %rdi
callq 0x34e8
testb $0x1, 0x58(%rsp)
je 0x5be0
movq 0x70(%rsp), %rdi
callq 0x10914
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x5bf2
movq %rbx, %rdi
callq 0x8846
movl $0x830, %esi            # imm = 0x830
movq %rbx, %rdi
callq 0x3270
movq 0x78(%rsp), %rbx
testq %rbx, %rbx
je 0x5c11
movq %rbx, %rdi
callq 0xfcf4
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x70(%rsp), %rbx
testq %rbx, %rbx
je 0x5c2e
movq %rbx, %rdi
callq 0x107fa
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x3270
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x5c4b
movq %rbx, %rdi
callq 0x11dc8
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0x3270
testq %rbp, %rbp
je 0x5c63
movq %rbp, %rdi
callq 0x32f0
leaq 0x40(%rsp), %rdi
callq 0x643a
xorl %ebx, %ebx
leaq 0xb0(%rsp), %rdi
callq 0x647a
leaq 0x3b0(%rsp), %rdi
callq 0x30a0
jmp 0x4dc6
jmp 0x5ca0
jmp 0x5cbb
jmp 0x5ca0
jmp 0x5dba
jmp 0x5cbb
jmp 0x5dba
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x34e8
jmp 0x5d2d
jmp 0x5cbb
jmp 0x5dba
jmp 0x5cbb
movq %rax, %rbx
jmp 0x5d2d
jmp 0x5dba
jmp 0x5dba
jmp 0x5ccc
movq %rax, %rbx
jmp 0x5dcf
jmp 0x5db5
jmp 0x5db5
jmp 0x5dba
jmp 0x5dba
jmp 0x5dba
jmp 0x5dba
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
jmp 0x5d09
jmp 0x5d06
movq %rax, %rbx
pushq $0x50
popq %rsi
movq 0x28(%rsp), %rdi
jmp 0x5daa
jmp 0x5d1d
jmp 0x5dba
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x3380
leaq 0xf8(%rsp), %rdi
callq 0x34e8
jmp 0x5df6
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
jmp 0x5d54
movq %rax, %rbx
pushq $0x60
jmp 0x5da6
jmp 0x5dbf
jmp 0x5dba
jmp 0x5dba
movq %rax, %rbx
jmp 0x5e00
movq %rax, %rbx
jmp 0x5e0d
jmp 0x5dba
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
jmp 0x5d97
movq %rax, %rbx
leaq 0x3b0(%rsp), %rdi
callq 0x34e8
jmp 0x5da4
movq %rax, %rbx
movl $0x830, %esi            # imm = 0x830
movq %r12, %rdi
jmp 0x5daa
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x3270
jmp 0x5e1a
jmp 0x5dba
jmp 0x5dba
movq %rax, %rbx
jmp 0x5de9
movq %rax, %rbx
jmp 0x5df6
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x166da
leaq 0xd0(%rsp), %rdi
callq 0x643a
leaq 0x168(%rsp), %rdi
callq 0x166c2
leaq 0xf8(%rsp), %rdi
callq 0x169ba
leaq 0x40(%rsp), %rdi
callq 0x643a
leaq 0xb0(%rsp), %rdi
callq 0x647a
leaq 0x3b0(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3470