// File: adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::sampleLCP(unsigned int, std::pair<unsigned int, unsigned int>*&, bool) const
usint
RLCSA::sampleLCP(usint sample_rate, pair_type*& sampled_values, bool report) const
{
  if(sample_rate == 0)
  {
    sample_rate = this->data_size + 1;
  }

  PsiVector::Iterator** iters = this->getIterators();

  usint runs = this->countRuns();
  usint samples = 0, minimal_sum = 0, nonstrict_minimal_sum = 0, minimal_samples = 0;
  usint max_samples = runs + (this->data_size - runs) / sample_rate;
  sampled_values = new pair_type[max_samples];

  std::list<Triple> matches;
  for(usint j = 0; j < this->number_of_sequences; j++)
  {
    pair_type seq_range = this->getSequenceRange(j);
    usint first_sample = samples; // First minimal sample of the current sequence.
    usint i, x = this->sa_samples->inverseSA(seq_range.first).second, next_x;

    // Invariant: x == inverseSA(i)
    for(i = seq_range.first; i <= seq_range.second; i++, x = next_x)
    {
      usint c = this->getCharacter(x);

      // T[i,n] is lexicographically the first suffix beginning with c.
      if(x == this->alphabet->cumulative(c))
      {
        if(!matches.empty())
        {
          for(std::list<Triple>::iterator iter = matches.begin(); iter != matches.end(); ++iter)
          {
            nonstrict_minimal_sum += i - (*iter).first;
          }
          matches.clear();
        }

        // Minimal sample: SA[x] = i, LCP[x] = 0
        sampled_values[samples] = pair_type(x, 0);
        samples++; minimal_samples++;
        next_x = this->psiUnsafe(x, c, *(iters[c])) - this->number_of_sequences;
        continue;
      }

      // Process the previous left matches we are still following.
      usint low = this->alphabet->cumulative(c) + this->number_of_sequences;
      pair_type potential_sample(this->data_size, this->data_size);
      for(std::list<Triple>::iterator iter = matches.begin(); iter != matches.end();)
      {
        Triple match = *iter;
        if(match.second < low)  // These no longer match the current character.
        {
          if(potential_sample.first != this->data_size) { nonstrict_minimal_sum += potential_sample.second; }

          // Potential minimal sample: SA[match.third] = match.first, LCP[match.third] = i - match.first
          potential_sample = pair_type(match.third, i - match.first);
          iter = matches.erase(iter);
        }
        else
        {
          (*iter).second = this->psiUnsafe(match.second - this->number_of_sequences, c, *(iters[c]));
          ++iter;
        }
      }
      if(potential_sample.first != this->data_size)
      {
        // Last potential sample is minimal.
        sampled_values[samples] = potential_sample;
        samples++; minimal_sum += potential_sample.second; minimal_samples++;
      }

      // If PLCP[i] is minimal, we add the left match to the list.
      // We add triples of type (j, inverseSA(j) + n_of_s, x) as inverseSA is < 0 for end markers.
      // x is the original minimal position.
      usint next_y = this->psiUnsafe(x - 1, c, *(iters[c]));
      next_x = this->psiUnsafeNext(c, *(iters[c]));
      if(next_y != next_x - 1 || next_x < this->number_of_sequences)
      {
        matches.push_back(Triple(i, next_y, x));
      }
      next_x -= this->number_of_sequences;
    }

    // Are we still following something?
    if(!matches.empty())
    {
      pair_type potential_sample(this->data_size, this->data_size);
      for(std::list<Triple>::iterator iter = matches.begin(); iter != matches.end(); ++iter)
      {
        Triple match = *iter;
        if(potential_sample.first != this->data_size) { nonstrict_minimal_sum += potential_sample.second; }

        // Potential minimal sample: SA[match.third] = match.first, LCP[match.third] = i - match.first
        potential_sample = pair_type(match.third, i - match.first);
      }
      matches.clear();
      if(potential_sample.first != this->data_size)
      {
        // Last potential sample is minimal.
        sampled_values[samples] = potential_sample;
        samples++; minimal_sum += potential_sample.second; minimal_samples++;
      }
    }

    // Add the non-minimal samples.
    if(sample_rate <= this->data_size)
    {
      usint last_sample = samples - 1;
      i = seq_range.first; x = this->sa_samples->inverseSA(seq_range.first).second;
      for(usint current_sample = first_sample; current_sample <= last_sample; current_sample++)
      {
        // Find the next minimal sample and add nonminimal samples if needed.
        pair_type first_nonminimal(i + sample_rate - 1, samples);
        pair_type next_nonminimal = first_nonminimal;
        while(x != sampled_values[current_sample].first)
        {
          if(i == next_nonminimal.first)
          {
            sampled_values[samples] = pair_type(x, 0); samples++;
            next_nonminimal.first += sample_rate; next_nonminimal.second++;
          }
          i++; x = this->psi(x, iters) - this->number_of_sequences;
        }

        // Reduce the nonminimal samples to the current minimal sample.
        for(next_nonminimal = first_nonminimal; next_nonminimal.second < samples; next_nonminimal.first += sample_rate, next_nonminimal.second++)
        {
          sampled_values[next_nonminimal.second].second = sampled_values[current_sample].second + i - next_nonminimal.first;
        }
        i++; x = this->psi(x, iters) - this->number_of_sequences;
      }
    }
  }

  std::sort(sampled_values, sampled_values + samples);

  if(report)
  {
    std::cout << "Samples: " << samples << " (total) / " << minimal_samples << " (minimal)" << std::endl;
    std::cout << "Upper bounds: " << max_samples << " (total) / " << runs << " (minimal)" << std::endl;
    std::cout << "Sum of minimal samples: " << (minimal_sum + nonstrict_minimal_sum) << " (total) / " << minimal_sum << " (strict)" << std::endl;
    std::cout << std::endl;
  }

  this->deleteIterators(iters);

  return samples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x168(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xc4ce
movq -0x168(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x168(%rbp), %rdi
callq 0x9860
movq -0x168(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0xb690
movl %eax, %ecx
movq -0x168(%rbp), %rax
movl %ecx, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x2c(%rbp), %ecx
movl %ecx, -0x184(%rbp)
movl 0x4(%rax), %eax
subl -0x2c(%rbp), %eax
xorl %edx, %edx
divl -0xc(%rbp)
movl %eax, %ecx
movl -0x184(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq %rax, -0x178(%rbp)
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x180(%rbp)
callq 0x3030
movq %rax, %rcx
movq -0x178(%rbp), %rax
movq %rcx, -0x170(%rbp)
cmpq $0x0, %rax
je 0xc5d5
movq -0x170(%rbp), %rax
movq -0x178(%rbp), %rdx
shlq $0x3, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x198(%rbp)
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0xe530
jmp 0xc5b7
movq -0x198(%rbp), %rcx
movq -0x1a0(%rbp), %rax
addq $0x8, %rax
cmpq %rcx, %rax
movq %rax, -0x190(%rbp)
jne 0xc5a2
movq -0x170(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0x68(%rbp), %rdi
callq 0xe890
movl $0x0, -0x6c(%rbp)
movq -0x168(%rbp), %rcx
movl -0x6c(%rbp), %eax
cmpl 0x820(%rcx), %eax
jae 0xceb4
movq -0x168(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0xa540
movq %rax, -0x1a8(%rbp)
jmp 0xc621
movq -0x168(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movq %rcx, -0x74(%rbp)
movl -0x30(%rbp), %ecx
movl %ecx, -0x78(%rbp)
movq 0x810(%rax), %rdi
movl -0x74(%rbp), %esi
callq 0x14b50
movq %rax, -0x1b0(%rbp)
jmp 0xc651
movq -0x1b0(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x70(%rbp), %eax
ja 0xcb21
movq -0x168(%rbp), %rdi
movl -0x80(%rbp), %esi
callq 0xe0c0
movl %eax, -0x1b4(%rbp)
jmp 0xc691
movq -0x168(%rbp), %rax
movl -0x1b4(%rbp), %ecx
movl %ecx, -0x90(%rbp)
movl -0x80(%rbp), %ecx
movl %ecx, -0x1bc(%rbp)
movq 0x808(%rax), %rdi
movl -0x90(%rbp), %esi
callq 0xdc20
movl %eax, -0x1b8(%rbp)
jmp 0xc6c7
movl -0x1bc(%rbp), %eax
movl -0x1b8(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc834
leaq -0x68(%rbp), %rdi
callq 0xe8b0
testb $0x1, %al
jne 0xc7a0
leaq -0x68(%rbp), %rdi
callq 0xe8d0
movq %rax, -0x98(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xe930
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xe900
testb $0x1, %al
jne 0xc725
jmp 0xc797
movl -0x7c(%rbp), %eax
movl %eax, -0x1c0(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xe960
movq %rax, %rcx
movl -0x1c0(%rbp), %eax
subl (%rcx), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xe980
jmp 0xc6fc
movq -0x180(%rbp), %rsi
movq -0x170(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x3590
jmp 0xd0eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xebb0
jmp 0xd0eb
leaq -0x68(%rbp), %rdi
callq 0xe9a0
movl $0x0, -0xac(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xac(%rbp), %rdx
callq 0xe9d0
jmp 0xc7c3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
leaq (%rax,%rcx,8), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xdb70
movq -0x168(%rbp), %rdi
movl -0x30(%rbp), %eax
incl %eax
movl %eax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
incl %eax
movl %eax, -0x3c(%rbp)
movl -0x80(%rbp), %esi
movl -0x90(%rbp), %eax
movl %eax, %ecx
movl %ecx, %edx
movq -0x28(%rbp), %rax
movq (%rax,%rcx,8), %rcx
callq 0xe210
movl %eax, -0x1c4(%rbp)
jmp 0xc816
movq -0x168(%rbp), %rcx
movl -0x1c4(%rbp), %eax
subl 0x820(%rcx), %eax
movl %eax, -0x8c(%rbp)
jmp 0xcb0a
movq -0x168(%rbp), %rax
movq 0x808(%rax), %rdi
movl -0x90(%rbp), %esi
callq 0xdc20
movl %eax, -0x1c8(%rbp)
jmp 0xc855
movq -0x168(%rbp), %rdx
movl -0x1c8(%rbp), %eax
movl 0x820(%rdx), %ecx
addl %ecx, %eax
movl %eax, -0xb0(%rbp)
addq $0x4, %rdx
leaq -0xb8(%rbp), %rdi
movq %rdx, %rsi
callq 0xea00
jmp 0xc885
leaq -0x68(%rbp), %rdi
callq 0xe8d0
movq %rax, -0xc0(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xe930
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xe900
testb $0x1, %al
jne 0xc8c1
jmp 0xc9e4
leaq -0xc0(%rbp), %rdi
callq 0xe960
movq (%rax), %rcx
movq %rcx, -0xd4(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0xcc(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jae 0xc98a
movq -0x168(%rbp), %rcx
movl -0xb8(%rbp), %eax
cmpl 0x4(%rcx), %eax
je 0xc910
movl -0xb4(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0xcc(%rbp), %rsi
movl -0x7c(%rbp), %eax
movl -0xd4(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xe0(%rbp)
leaq -0xdc(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0xea30
jmp 0xc93d
leaq -0xb8(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
callq 0xdb70
leaq -0xf0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xeab0
movq -0xf0(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0xea60
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0xc9df
movq -0x168(%rbp), %rdi
movl -0xd0(%rbp), %esi
movl 0x820(%rdi), %eax
subl %eax, %esi
movl -0x90(%rbp), %eax
movl %eax, %ecx
movl %ecx, %edx
movq -0x28(%rbp), %rax
movq (%rax,%rcx,8), %rcx
callq 0xe210
movl %eax, -0x1cc(%rbp)
jmp 0xc9be
leaq -0xc0(%rbp), %rdi
callq 0xe960
movl -0x1cc(%rbp), %ecx
movl %ecx, 0x4(%rax)
leaq -0xc0(%rbp), %rdi
callq 0xe980
jmp 0xc895
movq -0x168(%rbp), %rcx
movl -0xb8(%rbp), %eax
cmpl 0x4(%rcx), %eax
je 0xca30
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
leaq (%rax,%rcx,8), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xe630
jmp 0xca12
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0xb4(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x168(%rbp), %rdi
movl -0x80(%rbp), %esi
decl %esi
movl -0x90(%rbp), %eax
movl %eax, %ecx
movl %ecx, %edx
movq -0x28(%rbp), %rax
movq (%rax,%rcx,8), %rcx
callq 0xe210
movl %eax, -0x1d0(%rbp)
jmp 0xca5b
movq -0x168(%rbp), %rdi
movl -0x1d0(%rbp), %eax
movl %eax, -0xf4(%rbp)
movl -0x90(%rbp), %eax
movl %eax, %ecx
movl %ecx, %esi
movq -0x28(%rbp), %rax
movq (%rax,%rcx,8), %rdx
callq 0xe7f0
movl %eax, -0x1d4(%rbp)
jmp 0xca8d
movl -0x1d4(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0xf4(%rbp), %eax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0xcac1
movq -0x168(%rbp), %rcx
movl -0x8c(%rbp), %eax
cmpl 0x820(%rcx), %eax
jae 0xcaef
movl -0x7c(%rbp), %esi
movl -0xf4(%rbp), %edx
movl -0x80(%rbp), %ecx
leaq -0x100(%rbp), %rdi
callq 0xeb10
jmp 0xcadb
leaq -0x68(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xead0
jmp 0xcaed
jmp 0xcaef
movq -0x168(%rbp), %rax
movl 0x820(%rax), %ecx
movl -0x8c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x8c(%rbp)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0xc66e
leaq -0x68(%rbp), %rdi
callq 0xe8b0
testb $0x1, %al
jne 0xcc6f
movq -0x168(%rbp), %rdx
addq $0x4, %rdx
leaq -0x108(%rbp), %rdi
movq %rdx, %rsi
callq 0xea00
jmp 0xcb4e
leaq -0x68(%rbp), %rdi
callq 0xe8d0
movq %rax, -0x110(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xe930
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xe900
testb $0x1, %al
jne 0xcb8a
jmp 0xcc18
leaq -0x110(%rbp), %rdi
callq 0xe960
movq -0x168(%rbp), %rcx
movq (%rax), %rdx
movq %rdx, -0x124(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x11c(%rbp)
movl -0x108(%rbp), %eax
cmpl 0x4(%rcx), %eax
je 0xcbc7
movl -0x104(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x11c(%rbp), %rsi
movl -0x7c(%rbp), %eax
movl -0x124(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x130(%rbp)
leaq -0x12c(%rbp), %rdi
leaq -0x130(%rbp), %rdx
callq 0xea30
jmp 0xcbf4
leaq -0x108(%rbp), %rdi
leaq -0x12c(%rbp), %rsi
callq 0xdb70
leaq -0x110(%rbp), %rdi
callq 0xe980
jmp 0xcb5e
leaq -0x68(%rbp), %rdi
callq 0xe9a0
movq -0x168(%rbp), %rcx
movl -0x108(%rbp), %eax
cmpl 0x4(%rcx), %eax
je 0xcc6d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
leaq (%rax,%rcx,8), %rdi
leaq -0x108(%rbp), %rsi
callq 0xe630
jmp 0xcc4f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x104(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xcc6f
movq -0x168(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4(%rcx), %eax
ja 0xcea4
movq -0x168(%rbp), %rax
movl -0x30(%rbp), %ecx
decl %ecx
movl %ecx, -0x134(%rbp)
movl -0x74(%rbp), %ecx
movl %ecx, -0x7c(%rbp)
movq 0x810(%rax), %rdi
movl -0x74(%rbp), %esi
callq 0x14b50
movq %rax, -0x1e0(%rbp)
jmp 0xccb2
movq -0x1e0(%rbp), %rax
movq %rax, -0x13c(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x140(%rbp), %eax
cmpl -0x134(%rbp), %eax
ja 0xcea2
movl -0x7c(%rbp), %edx
movl -0xc(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movl %eax, -0x14c(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xeb40
jmp 0xcd11
movq -0x148(%rbp), %rax
movq %rax, -0x154(%rbp)
movl -0x80(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movl -0x140(%rbp), %edx
cmpl (%rcx,%rdx,8), %eax
je 0xcde8
movl -0x7c(%rbp), %eax
cmpl -0x154(%rbp), %eax
jne 0xcdaa
movl $0x0, -0x160(%rbp)
leaq -0x15c(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x160(%rbp), %rdx
callq 0xe9d0
jmp 0xcd66
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x30(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rdi
leaq -0x15c(%rbp), %rsi
callq 0xdb70
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0xc(%rbp), %eax
addl -0x154(%rbp), %eax
movl %eax, -0x154(%rbp)
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
movq -0x168(%rbp), %rdi
movl -0x7c(%rbp), %eax
incl %eax
movl %eax, -0x7c(%rbp)
movl -0x80(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0xe1a0
movl %eax, -0x1e4(%rbp)
jmp 0xcdcd
movq -0x168(%rbp), %rcx
movl -0x1e4(%rbp), %eax
subl 0x820(%rcx), %eax
movl %eax, -0x80(%rbp)
jmp 0xcd1f
leaq -0x154(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xe630
jmp 0xcdfd
jmp 0xcdff
movl -0x150(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0xce55
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x140(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %edx
addl -0x7c(%rbp), %edx
subl -0x154(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x150(%rbp), %ecx
movl %edx, 0x4(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl -0x154(%rbp), %eax
movl %eax, -0x154(%rbp)
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
jmp 0xcdff
movq -0x168(%rbp), %rdi
movl -0x7c(%rbp), %eax
incl %eax
movl %eax, -0x7c(%rbp)
movl -0x80(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0xe1a0
movl %eax, -0x1e8(%rbp)
jmp 0xce78
movq -0x168(%rbp), %rcx
movl -0x1e8(%rbp), %eax
subl 0x820(%rcx), %eax
movl %eax, -0x80(%rbp)
movl -0x140(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0xccd2
jmp 0xcea4
jmp 0xcea6
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0xc5f3
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x30(%rbp), %eax
leaq (%rdi,%rax,8), %rsi
callq 0xeb70
jmp 0xcec9
testb $0x1, -0x19(%rbp)
je 0xd0ba
movq 0x2b0f6(%rip), %rdi     # 0x37fd0
leaq 0x1c769(%rip), %rsi     # 0x2964a
callq 0x32a0
movq %rax, -0x1f0(%rbp)
jmp 0xceef
movq -0x1f0(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x3400
movq %rax, -0x1f8(%rbp)
jmp 0xcf07
movq -0x1f8(%rbp), %rdi
leaq 0x1c73f(%rip), %rsi     # 0x29654
callq 0x32a0
movq %rax, -0x200(%rbp)
jmp 0xcf23
movq -0x200(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x3400
movq %rax, -0x208(%rbp)
jmp 0xcf3b
movq -0x208(%rbp), %rdi
leaq 0x1c717(%rip), %rsi     # 0x29660
callq 0x32a0
movq %rax, -0x210(%rbp)
jmp 0xcf57
movq -0x210(%rbp), %rdi
movq 0x2b04b(%rip), %rsi     # 0x37fb0
callq 0x3300
jmp 0xcf6c
movq 0x2b05d(%rip), %rdi     # 0x37fd0
leaq 0x1c6f1(%rip), %rsi     # 0x2966b
callq 0x32a0
movq %rax, -0x218(%rbp)
jmp 0xcf88
movq -0x218(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x3400
movq %rax, -0x220(%rbp)
jmp 0xcfa0
movq -0x220(%rbp), %rdi
leaq 0x1c6a6(%rip), %rsi     # 0x29654
callq 0x32a0
movq %rax, -0x228(%rbp)
jmp 0xcfbc
movq -0x228(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x3400
movq %rax, -0x230(%rbp)
jmp 0xcfd4
movq -0x230(%rbp), %rdi
leaq 0x1c67e(%rip), %rsi     # 0x29660
callq 0x32a0
movq %rax, -0x238(%rbp)
jmp 0xcff0
movq -0x238(%rbp), %rdi
movq 0x2afb2(%rip), %rsi     # 0x37fb0
callq 0x3300
jmp 0xd005
movq 0x2afc4(%rip), %rdi     # 0x37fd0
leaq 0x1c667(%rip), %rsi     # 0x2967a
callq 0x32a0
movq %rax, -0x240(%rbp)
jmp 0xd021
movq -0x240(%rbp), %rdi
movl -0x34(%rbp), %esi
movl -0x38(%rbp), %eax
addl %eax, %esi
callq 0x3400
movq %rax, -0x248(%rbp)
jmp 0xd03e
movq -0x248(%rbp), %rdi
leaq 0x1c608(%rip), %rsi     # 0x29654
callq 0x32a0
movq %rax, -0x250(%rbp)
jmp 0xd05a
movq -0x250(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3400
movq %rax, -0x258(%rbp)
jmp 0xd072
movq -0x258(%rbp), %rdi
leaq 0x1c613(%rip), %rsi     # 0x29693
callq 0x32a0
movq %rax, -0x260(%rbp)
jmp 0xd08e
movq -0x260(%rbp), %rdi
movq 0x2af14(%rip), %rsi     # 0x37fb0
callq 0x3300
jmp 0xd0a3
movq 0x2af26(%rip), %rdi     # 0x37fd0
movq 0x2aeff(%rip), %rsi     # 0x37fb0
callq 0x3300
jmp 0xd0b8
jmp 0xd0ba
movq -0x168(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9930
movl -0x30(%rbp), %eax
movl %eax, -0x264(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xebb0
movl -0x264(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3530
nopw %cs:(%rax,%rax)