// File: /workspace/github_cpp_makefile_star2_O3/cpearce[P]OggIndex/src/OggIndex.cpp
// Function: main
int main(int argc, char** argv) 
{
  if (!gOptions.Parse(argc, argv)) {
    return -1;
  }

  string filename = gOptions.GetInputFilename();
  ifstream input(filename.c_str(), ios::in | ios::binary);
  ogg_sync_state state;
  ogg_int32_t ret = ogg_sync_init(&state);
  assert(ret==0);
 
  DecoderMap decoders;
  
  ogg_page page;
  memset(&page, 0, sizeof(ogg_page));

  ogg_uint64_t bytesRead = 0;
  ogg_int64_t offset = 0;
  ogg_uint32_t pageNumber = 0;
  bool gotAllHeaders = false;
  ogg_uint64_t endOfHeaders = 0;
  ogg_uint64_t oldSkeletonLength = 0;

  
  // We store all non-skeleton header pages in the order in which we read them,
  // so that we can rewrite them easily.
  vector<ogg_page*> headerPages;

  while (ReadPage(&state, &page, input, bytesRead)) {
    assert(IsPageAtOffset(filename, offset, &page));
    pageNumber++;
    ogg_uint32_t serial = ogg_page_serialno(&page);
    Decoder* decoder = 0;
    if (ogg_page_bos(&page)) {
      decoder = Decoder::Create(&page);
      decoders[serial] = decoder;
    } else {
      decoder = decoders[serial];
    }
    if (!decoder) {
      cerr << "FAIL: Unhandled stream type, serialno="
           << serial << " aborting indexing!" << endl;
      return -1;
    }

    ogg_uint32_t length = page.body_len + page.header_len;

    if (gOptions.GetDumpPages()) {
      ogg_int64_t granulepos = ogg_page_granulepos(&page);
      cout << "[" << decoder->TypeStr() << "] page @" << offset
           << " length=" << length << " granulepos=" << granulepos 
           << " end_time=" << decoder->GranuleposToTime(granulepos) << "ms"
           << " s=" << serial << " packet_starts=" << CountPacketStarts(&page)
           << " packet_ends=" << ogg_page_packets(&page)
           << " checksum=" << GetChecksum(&page) << endl;
    }

    decoder->Decode(&page, offset);
    
    if (!gotAllHeaders) {
      gotAllHeaders = true;
      DecoderMap::iterator itr = decoders.begin();
      while (itr != decoders.end()) {
        Decoder* d = itr->second;
        if (!d->GotAllHeaders()) {
          gotAllHeaders = false;
          break;
        }
        itr++;
      }
      if (decoder->Type() == TYPE_SKELETON) {
        oldSkeletonLength += length;
      } else {
        // Record all header pages except skeleton. We'll just rewrite the
        // skeleton, and the skeleton decoder will remember its packets.
        headerPages.push_back(Clone(&page));
      }
      if (gotAllHeaders) {
        endOfHeaders = offset + length;
      }
    }

    offset += length;
    memset(&page, 0, sizeof(ogg_page));
  }
  if (!gotAllHeaders) {
    // We've not completely read all the headers, assume the end of the last
    // page we've read is the end of headers. This will turn into the content
    // offset. The input file is probably corrupt.
    cout << "WARNING: Couldn't successfully read all header packets!" << endl;
    endOfHeaders = offset;
  }

  const ogg_int64_t fileLength = bytesRead;
  assert(input.eof());
  if (offset != fileLength) {
    cerr << "WARNING: Ogg page lengths don't sum to file length!" << endl;
  }  
  
  assert(fileLength == InputFileLength());
  
  ogg_sync_clear(&state);
  
  SkeletonEncoder encoder(decoders, fileLength, oldSkeletonLength, endOfHeaders);

  // Reopen the file so we can write it out with the index.
  input.close();
  input.clear();
  input.open(filename.c_str(), ios::in | ios::binary);
  assert(input.good());
  
  // Open output file.
  ofstream output(gOptions.GetOutputFilename().c_str(), ios::out | ios::binary);
  
  // Encode the new skeleton track.
  encoder.Encode();
  
  // Write out the new skeleton BOS page.
  encoder.WriteBosPage(output);
  if (!output.good()) {
    cerr << "ERROR: Failed to write new skeleton BOS page." << endl;
    return -1;
  }
  
  // Write out all the other tracks' header pages.
  for (ogg_uint32_t i=0; i<headerPages.size(); i++) {
    WritePage(output, *headerPages[i]);
    if (!output.good()) {
      cerr << "ERROR: Failed to write other tracks' header pages." << endl;
      return -1;
    }
    FreeClone(headerPages[i]);
  }

  // Write out remaining skeleton pages.
  encoder.WritePages(output);
  if (!output.good()) {
    cerr << "ERROR: Failed to write new skeleton index pages." << endl;
    return -1;
  }

  assert(encoder.ContentOffset() == output.tellp());

  // Copy content pages.
  input.seekg((std::streamoff)endOfHeaders);
  CopyFileData(input, output, fileLength - endOfHeaders);
  if (!output.good()) {
    cerr << "ERROR: Failed to write remaining content pages." << endl;
    return -1;
  }
  
  output.close();
  input.close();

  ogg_int64_t trackLength = encoder.GetTrackLength();
  cout << "Skeleton " << SKELETON_VERSION_MAJOR << "." << SKELETON_VERSION_MINOR 
       << " track with keyframe indexes uses " << trackLength << " bytes, "
       << ((float)trackLength / (float)(fileLength + trackLength)) * 100.0
       << "% overhead" << endl;

  int retval = 0;
  if (gOptions.GetVerifyIndex()) {
    cout << "Validating keyframe indexes..." << endl;
    if (!ValidateIndexedOgg(gOptions.GetOutputFilename())) {
      cerr << "FAIL: Verification of the index failed!" << endl;
      retval = -1;
    } else {
      cout << "SUCCESS: index is valid." << endl;
    }
  }

  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x568, %rsp            # imm = 0x568
movq %rsi, %rdx
movl %edi, %esi
leaq 0xfa6b(%rip), %rdi      # 0x17410
callq 0x8fec
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x81df
leaq 0xfa52(%rip), %rsi      # 0x17410
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x8aee
movq (%rbx), %rsi
leaq 0x360(%rsp), %rdi
movl $0xc, %edx
callq 0x4720
leaq 0x140(%rsp), %rdi
callq 0x4180
testl %eax, %eax
jne 0x84b0
leaq 0x88(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
xorpd %xmm0, %xmm0
leaq 0xb0(%rsp), %r12
movapd %xmm0, 0x10(%r12)
movapd %xmm0, (%r12)
leaq 0x58(%rsp), %rax
movq %rcx, (%rax)
leaq 0x10(%rsp), %rdx
movl $0x0, %eax
movq %rax, 0x8(%rsp)
movq %rcx, 0x10(%rdx)
movapd %xmm0, (%rdx)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x4(%rsp)
xorl %r15d, %r15d
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
leaq 0x360(%rsp), %rdx
leaq 0x58(%rsp), %rcx
callq 0xc184
testb %al, %al
je 0x7dd5
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xc447
testb %al, %al
je 0x8491
movq %r12, %rdi
callq 0x42d0
movl %eax, 0xd0(%rsp)
movq %r12, %rdi
callq 0x46e0
testl %eax, %eax
je 0x7ade
movq %r12, %rdi
callq 0x5296
movq %rax, %r14
leaq 0x80(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x8656
movq %r14, (%rax)
jmp 0x7af6
leaq 0x80(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x8656
movq (%rax), %r14
testq %r14, %r14
je 0x7ff6
movq 0xb8(%rsp), %rbp
addq 0xc8(%rsp), %rbp
leaq 0xf8fa(%rip), %rdi      # 0x17410
callq 0x8b3e
testb %al, %al
je 0x7d08
movq %r12, %rdi
callq 0x4610
movq %rax, %r13
movl $0x1, %edx
movq 0xf496(%rip), %rdi      # 0x16fd0
leaq 0xa170(%rip), %rsi      # 0x11cb1
callq 0x4410
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
movq %rax, %rbx
testq %rax, %rax
je 0x7b73
movq %rbx, %rdi
callq 0x4170
movq 0xf46a(%rip), %rdi      # 0x16fd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4410
jmp 0x7b91
movq 0xf456(%rip), %rcx      # 0x16fd0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x1, %esi
callq 0x4680
movl $0x8, %edx
movq 0xf433(%rip), %rdi      # 0x16fd0
leaq 0x8d9e(%rip), %rsi      # 0x10942
callq 0x4410
movq 0xf420(%rip), %rdi      # 0x16fd0
movq %r15, %rsi
callq 0x4340
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x8d81(%rip), %rsi      # 0x1094b
callq 0x4410
movl %ebp, %esi
movq %rbx, %rdi
callq 0x4240
movq %rax, %rbx
movl $0xc, %edx
movq %rax, %rdi
leaq 0x89e9(%rip), %rsi      # 0x105d4
callq 0x4410
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4340
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x8d47(%rip), %rsi      # 0x10954
callq 0x4410
movq (%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
callq *0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4340
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x94e3(%rip), %rsi      # 0x1111e
callq 0x4410
movl $0x3, %edx
movq %r13, %rdi
leaq 0x9e7b(%rip), %rsi      # 0x11aca
callq 0x4410
movl 0xd0(%rsp), %esi
movq %r13, %rdi
callq 0x4240
movq %rax, %rbx
movl $0xf, %edx
movq %rax, %rdi
leaq 0x8cea(%rip), %rsi      # 0x1095f
callq 0x4410
movq %r12, %rdi
callq 0xc84d
movq %rbx, %rdi
movl %eax, %esi
callq 0x4690
movq %rax, %rbx
movl $0xd, %edx
movq %rax, %rdi
leaq 0x8cd1(%rip), %rsi      # 0x1096f
callq 0x4410
movq %r12, %rdi
callq 0x4700
movq %rbx, %rdi
movl %eax, %esi
callq 0x4690
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x8cb6(%rip), %rsi      # 0x1097d
callq 0x4410
movq %r12, %rdi
callq 0xc766
movl %eax, %esi
movq %rbx, %rdi
callq 0x4240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x10(%rax)
testb $0x1, 0x4(%rsp)
je 0x7d28
movl %ebp, %eax
addq %r15, %rax
jmp 0x7db7
movq 0x98(%rsp), %rbx
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x88(%rsp), %rax
cmpq %rax, %rbx
je 0x7d66
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
je 0x7d5e
movq %rbx, %rdi
callq 0x4260
movq %rax, %rbx
jmp 0x7d36
movl $0x0, 0x4(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
cmpl $0x4, %eax
jne 0x7d7d
movl %ebp, %eax
addq %rax, 0x30(%rsp)
jmp 0x7da1
movq %r12, %rdi
callq 0xbeec
movq %rax, 0x160(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x8910
movl %ebp, %eax
addq %r15, %rax
cmpb $0x0, 0x4(%rsp)
movq 0x8(%rsp), %rcx
cmovneq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movq %rax, %r15
jmp 0x7a61
testb $0x1, 0x4(%rsp)
jne 0x7e27
movq 0xf1ed(%rip), %rbx      # 0x16fd0
leaq 0x8b9e(%rip), %rsi      # 0x10988
movl $0x37, %edx
movq %rbx, %rdi
callq 0x4410
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq 0xf1bb(%rip), %rdi      # 0x16fd0
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq %r15, 0x8(%rsp)
movq 0x360(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x380(%rsp,%rax)
je 0x84cf
movq 0x58(%rsp), %r14
cmpq %r14, %r15
je 0x7e91
movq 0xf19e(%rip), %rbx      # 0x16ff0
leaq 0x8b73(%rip), %rsi      # 0x109cc
movl $0x33, %edx
movq %rbx, %rdi
callq 0x4410
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq 0xf16c(%rip), %rdi      # 0x16ff0
callq 0x4040
movq %rax, %rdi
callq 0x4250
leaq 0xf578(%rip), %rsi      # 0x17410
leaq 0x160(%rsp), %rdi
callq 0x8aee
movq 0x160(%rsp), %rdi
callq 0xc08c
movq %rax, %rbx
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ed6
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x43a0
cmpq %rbx, %r14
jne 0x84ee
leaq 0x140(%rsp), %rdi
callq 0x4750
leaq 0xd0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq %r14, %rdx
movq 0x30(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x9528
leaq 0x360(%rsp), %rbx
movq %rbx, %rdi
callq 0x40a0
movq 0x360(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4680
movq 0x60(%rsp), %rsi
leaq 0x360(%rsp), %rdi
movl $0xc, %edx
callq 0x4200
movq 0x360(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x380(%rsp,%rax)
jne 0x850d
leaq 0xf4a4(%rip), %rsi      # 0x17410
leaq 0x38(%rsp), %rdi
callq 0x8b12
movq 0x38(%rsp), %rsi
leaq 0x160(%rsp), %rdi
movl $0x14, %edx
callq 0x43e0
leaq 0x48(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x7fa9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0xd0(%rsp), %rdi
callq 0x98dc
leaq 0xd0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xadce
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x180(%rsp,%rax)
je 0x8069
movl $0x2d, %edx
leaq 0x8a3c(%rip), %rsi      # 0x10a2d
jmp 0x810f
movq 0xeff3(%rip), %rdi      # 0x16ff0
leaq 0x8903(%rip), %rsi      # 0x10907
movl $0x26, %edx
callq 0x4410
movl 0xd0(%rsp), %esi
movq 0xefd4(%rip), %rdi      # 0x16ff0
callq 0x4240
movq %rax, %rbx
leaq 0x8903(%rip), %rsi      # 0x1092e
movl $0x13, %edx
movq %rax, %rdi
callq 0x4410
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x8193
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x80d4
movl $0x1, %ebx
xorl %r13d, %r13d
leaq 0x160(%rsp), %r15
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq 0xc05f
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x180(%rsp,%rax)
jne 0x81f3
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rdi
callq 0xc040
movl %ebx, %r13d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %ebx
cmpq %r13, %rcx
ja 0x8085
leaq 0xd0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xae06
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x180(%rsp,%rax)
je 0x8243
movl $0x30, %edx
leaq 0x897f(%rip), %rsi      # 0x10a8e
movq 0xeeda(%rip), %rbx      # 0x16ff0
movq %rbx, %rdi
callq 0x4410
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq 0xeeb4(%rip), %rdi      # 0x16ff0
callq 0x4040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x4250
movq 0xee73(%rip), %rax      # 0x16fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x168(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x160(%rsp,%rcx)
callq 0x42e0
leaq 0x258(%rsp), %rdi
callq 0x4120
leaq 0xd0(%rsp), %rdi
callq 0x969a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x81aa
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x43a0
leaq 0x80(%rsp), %rdi
callq 0x86bc
leaq 0x360(%rsp), %rdi
callq 0x40c0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x81df
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
movl %ebx, %eax
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xedf6(%rip), %rbx      # 0x16ff0
leaq 0x885a(%rip), %rsi      # 0x10a5b
movl $0x32, %edx
movq %rbx, %rdi
callq 0x4410
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4360
movsbl %al, %esi
movq 0xedc4(%rip), %rdi      # 0x16ff0
callq 0x4040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x4250
jmp 0x814e
movq 0x138(%rsp), %rbx
leaq 0x160(%rsp), %rdi
callq 0x42f0
cmpq %rax, %rbx
jne 0x852c
leaq 0x360(%rsp), %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x4480
movq %r14, %rdx
subq 0x8(%rsp), %rdx
leaq 0x360(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc637
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x180(%rsp,%rax)
je 0x82d6
movq 0xed41(%rip), %rdi      # 0x16ff0
leaq 0x8833(%rip), %rsi      # 0x10ae9
movl $0x2f, %edx
callq 0x4410
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0xed24(%rip), %rdi      # 0x16ff0
callq 0x41c0
jmp 0x814e
leaq 0x160(%rsp), %rdi
callq 0x44f0
leaq 0x360(%rsp), %rdi
callq 0x40a0
leaq 0xd0(%rsp), %rdi
callq 0xad7c
movq %rax, %rbx
movq 0xecc9(%rip), %rdi      # 0x16fd0
leaq 0x88b8(%rip), %rsi      # 0x10bc6
movl $0x9, %edx
callq 0x4410
movq 0xecb1(%rip), %rdi      # 0x16fd0
movl $0x4, %esi
callq 0x4690
movq %rax, %r15
leaq 0x883a(%rip), %rsi      # 0x10b6d
movl $0x1, %edx
movq %rax, %rdi
callq 0x4410
movq %r15, %rdi
xorl %esi, %esi
callq 0x4690
movq %rax, %r15
leaq 0x87c5(%rip), %rsi      # 0x10b19
movl $0x22, %edx
movq %rax, %rdi
callq 0x4410
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4340
movq %rax, %r15
leaq 0x87c6(%rip), %rsi      # 0x10b3c
movl $0x8, %edx
movq %rax, %rdi
callq 0x4410
cvtsi2ss %rbx, %xmm0
addq %rbx, %r14
cvtsi2ss %r14, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x8508(%rip), %xmm0     # 0x108a8
movq %r15, %rdi
callq 0x4600
movq %rax, %rbx
leaq 0x8793(%rip), %rsi      # 0x10b45
movl $0xa, %edx
movq %rax, %rdi
callq 0x4410
movq %rbx, %rdi
callq 0x41c0
leaq 0xf042(%rip), %rdi      # 0x17410
callq 0x8b36
xorl %ebx, %ebx
testb %al, %al
je 0x814e
movq 0xebec(%rip), %rdi      # 0x16fd0
leaq 0x8765(%rip), %rsi      # 0x10b50
movl $0x1e, %edx
callq 0x4410
movq 0xebd4(%rip), %rdi      # 0x16fd0
callq 0x41c0
leaq 0xf008(%rip), %rsi      # 0x17410
leaq 0x38(%rsp), %rdi
callq 0x8b12
leaq 0x38(%rsp), %rdi
callq 0xcdbc
movl %eax, %ebp
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x8435
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x8463
movq 0xeb8f(%rip), %rdi      # 0x16fd0
leaq 0x874f(%rip), %rsi      # 0x10b97
movl $0x18, %edx
callq 0x4410
movq 0xeb77(%rip), %rdi      # 0x16fd0
callq 0x41c0
jmp 0x814e
movq 0xeb86(%rip), %rdi      # 0x16ff0
leaq 0x86fe(%rip), %rsi      # 0x10b6f
movl $0x27, %edx
callq 0x4410
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0xeb69(%rip), %rdi      # 0x16ff0
callq 0x41c0
jmp 0x814e
leaq 0x8447(%rip), %rdi      # 0x108df
leaq 0x8418(%rip), %rsi      # 0x108b7
leaq 0x8422(%rip), %rcx      # 0x108c8
movl $0x5a, %edx
callq 0x4210
leaq 0x83f9(%rip), %rdi      # 0x108b0
leaq 0x83f9(%rip), %rsi      # 0x108b7
leaq 0x8403(%rip), %rcx      # 0x108c8
movl $0x46, %edx
callq 0x4210
leaq 0x84ea(%rip), %rdi      # 0x109c0
leaq 0x83da(%rip), %rsi      # 0x108b7
leaq 0x83e4(%rip), %rcx      # 0x108c8
movl $0x9b, %edx
callq 0x4210
leaq 0x850b(%rip), %rdi      # 0x10a00
leaq 0x83bb(%rip), %rsi      # 0x108b7
leaq 0x83c5(%rip), %rcx      # 0x108c8
movl $0xa0, %edx
callq 0x4210
leaq 0x850c(%rip), %rdi      # 0x10a20
leaq 0x839c(%rip), %rsi      # 0x108b7
leaq 0x83a6(%rip), %rcx      # 0x108c8
movl $0xaa, %edx
callq 0x4210
leaq 0x858c(%rip), %rdi      # 0x10abf
leaq 0x837d(%rip), %rsi      # 0x108b7
leaq 0x8387(%rip), %rcx      # 0x108c8
movl $0xca, %edx
callq 0x4210
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x85d5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x85d5
jmp 0x85d2
jmp 0x85d2
jmp 0x85d2
jmp 0x85d2
jmp 0x85d2
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85e2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x85e2
jmp 0x85c7
jmp 0x85ff
movq %rax, %rbx
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8602
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x8602
movq %rax, %rbx
jmp 0x8626
movq %rax, %rbx
jmp 0x8633
jmp 0x85ff
movq %rax, %rbx
jmp 0x85e2
jmp 0x85ff
jmp 0x85d2
jmp 0x85ff
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x4520
leaq 0xd0(%rsp), %rdi
callq 0x969a
jmp 0x8602
jmp 0x85ff
jmp 0x85ff
jmp 0x85ff
jmp 0x85ff
jmp 0x85ff
jmp 0x85ff
jmp 0x85ff
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8619
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x43a0
leaq 0x80(%rsp), %rdi
callq 0x86bc
leaq 0x360(%rsp), %rdi
callq 0x40c0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x864e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x46d0