// File: cpearce[P]OggIndex/src/Decoder.cpp
// Function: TheoraDecoder::Decode(ogg_page*, long)
bool Decode(ogg_page* page, ogg_int64_t offset) {
    assert((ogg_uint32_t)ogg_page_serialno(page) == mSerial);
    if (GotAllHeaders()) {
      Page record;
      record.num_packets = CountPacketStarts(page);
      record.offset = offset;
      mPages.push_back(record);
    }
 
    int ret = ogg_stream_pagein(&mState, page);
    ogg_int64_t page_granulepos = ogg_page_granulepos(page);
    assert(ret == 0);

    ogg_packet packet;
    int num_packets = 0;
    vector<Frame> frames;
    while ((ret = ogg_stream_packetout(&mState, &packet)) != 0) {
      if (ret == -1) {
        cerr << "WARNING: Lost sync decoding packets on theora page "
             << mPages.size() << endl;
        continue;
      }
      num_packets++;
      if (!GotAllHeaders()) {
        // Read Headers...
        ret = th_decode_headerin(&mInfo,
                                 &mComment,
                                 &mSetup,
                                 &packet);
        assert(ret > 0);
        if (ret > 0) {
          // Read Theora header.
          mHeadersRead++;
        }
        if (GotAllHeaders()) {
          // Read all headers, setup decoder context.
          mCtx = th_decode_alloc(&mInfo, mSetup);
          assert(mCtx != NULL);
        }
        if (gOptions.GetDumpPackets()) {
          cout << "[T] ver="
               << (int)mInfo.version_major << "."
               << (int)mInfo.version_minor << "."
               << (int)mInfo.version_subminor << " "
               << TheoraHeaderType(&packet) << " packet"
               << (packet.e_o_s ? " eos" : "")
               << endl;
        }
        continue;
      }      

      if (mFirstPacketno == -1) {
        mFirstPacketno = packet.packetno;
      }
      
      const int shift = mInfo.keyframe_granule_shift;

      // Packet should only have a granulepos if the page does.
      assert(page_granulepos != -1 || packet.granulepos == -1);
      assert(packet.granulepos == -1 || packet.granulepos == page_granulepos);
      
      // We've not yet determined the granulepos of the first (or previous)
      // packet. Remember the packet, even if it's not a keyframe so that
      // we can backtrack to get all packets' start time.
      frames.push_back(Frame(packet));

      if (packet.granulepos == -1) {
        // We've stored the packet, once we find one with a non -1 granulepos
        // we can find the first packet's granulepos.
        continue;
      }
        
      // We know a packet's granulepos, use it to tag the packets buffered
      // before it so that they have valid granulepos.
      for (int i=(int)frames.size()-2; i>=0; i--) {
        ogg_int64_t prev_granulepos = frames[i+1].granulepos;
        assert(prev_granulepos != -1);
        ogg_int64_t granulepos = -1;
        if (frames[i].is_keyframe) {
          ogg_int64_t frame = th_granule_frame(mCtx, prev_granulepos) +
                              TheoraVersion(&mInfo,3,2,1) - 1;
          // 3.2.0 streams store the frame index in the granule position.
          // 3.2.1 and later store the frame count. th_granule_frame() returns
          // the frame index, so |frame| can be 0 when we're theora version
          // 3.2.0 or less.
          assert(frame > 0 || !TheoraVersion(&mInfo,3,2,1));
          granulepos = frame << shift;
        } else {
          if (frames[i+1].is_keyframe) {
            // The successor frame is a keyframe, so we can't just subtract 1
            // from the "keyframe offset" part of its granulepos, as it
            // doesn't have one! So fake it, take the keyframe offset as the
            // max possible keyframe offset. This means the granulepos (probably)
            // overshoots and claims that it depends on a frame before its actual
            // keyframe but at least its granule number will be correct, so the
            // times we calculate from this granulepos will also be correct.
            ogg_int64_t frameno = th_granule_frame(mCtx, prev_granulepos);
            ogg_int64_t max_offset = min((frameno - 1),
                                          (ogg_int64_t)(1 << shift) - 1);
            ogg_int64_t granule = frameno +
                                  TheoraVersion(&mInfo,3,2,1) -
                                  1 - max_offset;
            assert(granule > 0); // We must have positive granulepos...
            granulepos = (granule << shift) + max_offset;
          } else {
            // We must be offset by more than 1 frame for this to work.
            assert((prev_granulepos & ((1 << shift) - 1)) > 0);
            granulepos = prev_granulepos - 1;
          }
        }
        // This frame's granule number should be one less than the previous.
        assert(th_granule_frame(mCtx, granulepos) ==
                th_granule_frame(mCtx, prev_granulepos) - 1);
        frames[i].granulepos = granulepos;
      }
      // Now all packets have a known time.
      if (mStartTime == -1) {
        mStartTime = StartTime(frames.front().granulepos);
      }
      assert(mStartTime >= 0);
      mEndTime = EndTime(frames.back().granulepos);
      assert(mEndTime >= mStartTime);

      // Print/log packets before we remove non-keyframe packets.
      for (unsigned i=0; i<frames.size(); i++) {
        DumpPacket(frames[i]);
      }

      // Add keyframes to the final frame list.
      for (unsigned i=0; i<frames.size(); i++) {
        if (frames[i].is_keyframe) {
          mFrames.push_back(frames[i]);
        }
      }
    } // end while packetout


    if (num_packets != ogg_page_packets(page)) {
      cerr << "WARNING: Fewer packets finished on theora page "
           << mPages.size() << " than expected." << endl;
    }
    return true;
  }

// Assembly:
subq $0x238, %rsp            # imm = 0x238
movq %rdi, 0x230(%rsp)
movq %rsi, 0x228(%rsp)
movq %rdx, 0x220(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x228(%rsp), %rdi
callq 0x5350
movq 0x130(%rsp), %rcx
cmpl 0x1a0(%rcx), %eax
jne 0x77ee
jmp 0x780d
leaq 0x15b2d(%rip), %rdi     # 0x1d322
leaq 0x15811(%rip), %rsi     # 0x1d00d
movl $0xdb, %edx
leaq 0x15b4b(%rip), %rcx     # 0x1d353
callq 0x5280
movq 0x130(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb $0x1, %al
jne 0x7821
jmp 0x7861
movq 0x228(%rsp), %rdi
callq 0x16a30
movq 0x130(%rsp), %rdi
movl %eax, 0x218(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x210(%rsp)
addq $0x248, %rdi            # imm = 0x248
leaq 0x210(%rsp), %rsi
callq 0x8ea0
movq 0x130(%rsp), %rdi
addq $0x8, %rdi
movq 0x228(%rsp), %rsi
callq 0x5620
movl %eax, 0x20c(%rsp)
movq 0x228(%rsp), %rdi
callq 0x56e0
movq %rax, 0x200(%rsp)
cmpl $0x0, 0x20c(%rsp)
jne 0x78a2
jmp 0x78c1
leaq 0x1575b(%rip), %rdi     # 0x1d004
leaq 0x1575d(%rip), %rsi     # 0x1d00d
movl $0xe5, %edx
leaq 0x15a97(%rip), %rcx     # 0x1d353
callq 0x5280
movl $0x0, 0x1cc(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x7610
movq 0x130(%rsp), %rdi
addq $0x8, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x5680
movl %eax, 0x12c(%rsp)
jmp 0x78fb
movl 0x12c(%rsp), %eax
movl %eax, 0x20c(%rsp)
cmpl $0x0, %eax
je 0x8417
cmpl $-0x1, 0x20c(%rsp)
jne 0x79ac
movq 0x206c9(%rip), %rdi     # 0x27ff0
leaq 0x15a61(%rip), %rsi     # 0x1d38f
callq 0x53d0
movq %rax, 0x120(%rsp)
jmp 0x793d
movq 0x130(%rsp), %rdi
addq $0x248, %rdi            # imm = 0x248
callq 0x8f10
movq 0x120(%rsp), %rdi
movq %rax, %rsi
callq 0x50c0
movq %rax, 0x118(%rsp)
jmp 0x796b
movq 0x118(%rsp), %rdi
movq 0x20646(%rip), %rsi     # 0x27fc0
callq 0x5430
jmp 0x7981
jmp 0x78d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x7620
jmp 0x84c7
movq 0x130(%rsp), %rdi
movl 0x1cc(%rsp), %eax
incl %eax
movl %eax, 0x1cc(%rsp)
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, 0x117(%rsp)
jmp 0x79d6
movb 0x117(%rsp), %al
testb $0x1, %al
jne 0x7cc8
jmp 0x79e7
movq 0x130(%rsp), %rdx
movq %rdx, %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movq %rdx, %rsi
addq $0x1f8, %rsi            # imm = 0x1F8
addq $0x218, %rdx            # imm = 0x218
leaq 0x1d0(%rsp), %rcx
callq 0x56d0
movl %eax, 0x110(%rsp)
jmp 0x7a20
movl 0x110(%rsp), %eax
movl %eax, 0x20c(%rsp)
cmpl $0x0, 0x20c(%rsp)
jle 0x7a3a
jmp 0x7a59
leaq 0x15982(%rip), %rdi     # 0x1d3c3
leaq 0x155c5(%rip), %rsi     # 0x1d00d
movl $0xf7, %edx
leaq 0x158ff(%rip), %rcx     # 0x1d353
callq 0x5280
cmpl $0x0, 0x20c(%rsp)
jle 0x7a7a
movq 0x130(%rsp), %rax
movl 0x228(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x228(%rax)
movq 0x130(%rsp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, 0x10f(%rsp)
jmp 0x7a94
movb 0x10f(%rsp), %al
testb $0x1, %al
jne 0x7aa1
jmp 0x7b0d
movq 0x130(%rsp), %rax
movq %rax, %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movq 0x218(%rax), %rsi
callq 0x54d0
movq %rax, 0x100(%rsp)
jmp 0x7ac9
movq 0x130(%rsp), %rax
movq 0x100(%rsp), %rcx
movq %rcx, 0x220(%rax)
cmpq $0x0, 0x220(%rax)
je 0x7aec
jmp 0x7b0b
leaq 0x158d8(%rip), %rdi     # 0x1d3cb
leaq 0x15513(%rip), %rsi     # 0x1d00d
movl $0xff, %edx
leaq 0x1584d(%rip), %rcx     # 0x1d353
callq 0x5280
jmp 0x7b0d
leaq 0x209cc(%rip), %rdi     # 0x284e0
callq 0x10970
movb %al, 0xff(%rsp)
jmp 0x7b22
movb 0xff(%rsp), %al
testb $0x1, %al
jne 0x7b32
jmp 0x7cc3
movq 0x20497(%rip), %rdi     # 0x27fd0
leaq 0x15898(%rip), %rsi     # 0x1d3d8
callq 0x53d0
movq %rax, 0xf0(%rsp)
jmp 0x7b4f
movq 0xf0(%rsp), %rdi
movq 0x130(%rsp), %rax
movzbl 0x1b8(%rax), %esi
callq 0x57a0
movq %rax, 0xe8(%rsp)
jmp 0x7b75
movq 0xe8(%rsp), %rdi
leaq 0x15fc9(%rip), %rsi     # 0x1db4d
callq 0x53d0
movq %rax, 0xe0(%rsp)
jmp 0x7b93
movq 0xe0(%rsp), %rdi
movq 0x130(%rsp), %rax
movzbl 0x1b9(%rax), %esi
callq 0x57a0
movq %rax, 0xd8(%rsp)
jmp 0x7bb9
movq 0xd8(%rsp), %rdi
leaq 0x15f85(%rip), %rsi     # 0x1db4d
callq 0x53d0
movq %rax, 0xd0(%rsp)
jmp 0x7bd7
movq 0xd0(%rsp), %rdi
movq 0x130(%rsp), %rax
movzbl 0x1ba(%rax), %esi
callq 0x57a0
movq %rax, 0xc8(%rsp)
jmp 0x7bfd
movq 0xc8(%rsp), %rdi
leaq 0x16998(%rip), %rsi     # 0x1e5a4
callq 0x53d0
movq %rax, 0xc0(%rsp)
jmp 0x7c1b
movq 0x130(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x8f30
movq %rax, 0xb8(%rsp)
jmp 0x7c3a
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0x53d0
movq %rax, 0xb0(%rsp)
jmp 0x7c59
movq 0xb0(%rsp), %rdi
leaq 0x15779(%rip), %rsi     # 0x1d3e1
callq 0x53d0
movq %rax, 0xa8(%rsp)
jmp 0x7c77
movq 0xa8(%rsp), %rdi
movq 0x1e8(%rsp), %rax
testq %rax, %rax
leaq 0x15758(%rip), %rax     # 0x1d3e9
leaq 0x16734(%rip), %rsi     # 0x1e3cc
cmovneq %rax, %rsi
callq 0x53d0
movq %rax, 0xa0(%rsp)
jmp 0x7cab
movq 0xa0(%rsp), %rdi
movq 0x20306(%rip), %rsi     # 0x27fc0
callq 0x5430
jmp 0x7cc1
jmp 0x7cc3
jmp 0x78d9
movq 0x130(%rsp), %rax
cmpq $-0x1, 0x240(%rax)
jne 0x7cf1
movq 0x130(%rsp), %rax
movq 0x1f8(%rsp), %rcx
movq %rcx, 0x240(%rax)
movq 0x130(%rsp), %rax
movl 0x1f4(%rax), %eax
movl %eax, 0x1a0(%rsp)
movb $0x1, %al
cmpq $-0x1, 0x200(%rsp)
movb %al, 0x9f(%rsp)
jne 0x7d2d
cmpq $-0x1, 0x1f0(%rsp)
sete %al
movb %al, 0x9f(%rsp)
movb 0x9f(%rsp), %al
testb $0x1, %al
jne 0x7d3a
jmp 0x7d3c
jmp 0x7d5b
leaq 0x156ab(%rip), %rdi     # 0x1d3ee
leaq 0x152c3(%rip), %rsi     # 0x1d00d
movl $0x114, %edx            # imm = 0x114
leaq 0x155fd(%rip), %rcx     # 0x1d353
callq 0x5280
movb $0x1, %al
cmpq $-0x1, 0x1f0(%rsp)
movb %al, 0x9e(%rsp)
je 0x7d89
movq 0x1f0(%rsp), %rax
cmpq 0x200(%rsp), %rax
sete %al
movb %al, 0x9e(%rsp)
movb 0x9e(%rsp), %al
testb $0x1, %al
jne 0x7d96
jmp 0x7d98
jmp 0x7db7
leaq 0x15680(%rip), %rdi     # 0x1d41f
leaq 0x15267(%rip), %rsi     # 0x1d00d
movl $0x115, %edx            # imm = 0x115
leaq 0x155a1(%rip), %rcx     # 0x1d353
callq 0x5280
leaq 0x188(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x8fe0
jmp 0x7dce
leaq 0x1b0(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x8fb0
jmp 0x7de5
cmpq $-0x1, 0x1f0(%rsp)
jne 0x7df5
jmp 0x78d9
leaq 0x1b0(%rsp), %rdi
callq 0x9050
subl $0x2, %eax
movl %eax, 0x184(%rsp)
cmpl $0x0, 0x184(%rsp)
jl 0x821d
movl 0x184(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
movq 0x8(%rax), %rax
movq %rax, 0x178(%rsp)
cmpq $-0x1, 0x178(%rsp)
je 0x7e4d
jmp 0x7e6c
leaq 0x1560b(%rip), %rdi     # 0x1d45f
leaq 0x151b2(%rip), %rsi     # 0x1d00d
movl $0x126, %edx            # imm = 0x126
leaq 0x154ec(%rip), %rcx     # 0x1d353
callq 0x5280
movq $-0x1, 0x170(%rsp)
movslq 0x184(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
testb $0x1, 0x10(%rax)
je 0x7fad
movq 0x130(%rsp), %rax
movq 0x220(%rax), %rdi
movq 0x178(%rsp), %rsi
callq 0x50b0
movq %rax, 0x90(%rsp)
jmp 0x7ebd
movq 0x130(%rsp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movl $0x3, %esi
movl $0x2, %edx
movl $0x1, %ecx
callq 0x169b0
movl %eax, 0x8c(%rsp)
jmp 0x7ee9
movq 0x90(%rsp), %rax
movl 0x8c(%rsp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
subq $0x1, %rax
movq %rax, 0x168(%rsp)
movb $0x1, %al
cmpq $0x0, 0x168(%rsp)
movb %al, 0x8b(%rsp)
jg 0x7f60
movq 0x130(%rsp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movl $0x3, %esi
movl $0x2, %edx
movl $0x1, %ecx
callq 0x169b0
movl %eax, 0x84(%rsp)
jmp 0x7f4a
movl 0x84(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0x8b(%rsp)
movb 0x8b(%rsp), %al
testb $0x1, %al
jne 0x7f6d
jmp 0x7f6f
jmp 0x7f8e
leaq 0x154ff(%rip), %rdi     # 0x1d475
leaq 0x15090(%rip), %rsi     # 0x1d00d
movl $0x12f, %edx            # imm = 0x12F
leaq 0x153ca(%rip), %rcx     # 0x1d353
callq 0x5280
movq 0x168(%rsp), %rax
movl 0x1a0(%rsp), %ecx
shlq %cl, %rax
movq %rax, 0x170(%rsp)
jmp 0x8162
movl 0x184(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
testb $0x1, 0x10(%rax)
je 0x8104
movq 0x130(%rsp), %rax
movq 0x220(%rax), %rdi
movq 0x178(%rsp), %rsi
callq 0x50b0
movq %rax, 0x78(%rsp)
jmp 0x7ff4
movq 0x78(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x160(%rsp), %rax
decq %rax
movq %rax, 0x150(%rsp)
movb 0x1a0(%rsp), %cl
movl $0x1, %eax
shll %cl, %eax
cltq
decq %rax
movq %rax, 0x148(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x9090
movq %rax, 0x70(%rsp)
jmp 0x804b
movq 0x130(%rsp), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x158(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x60(%rsp)
addq $0x1b8, %rdi            # imm = 0x1B8
movl $0x3, %esi
movl $0x2, %edx
movl $0x1, %ecx
callq 0x169b0
movl %eax, 0x6c(%rsp)
jmp 0x8091
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
subq $0x1, %rax
subq 0x158(%rsp), %rax
movq %rax, 0x140(%rsp)
cmpq $0x0, 0x140(%rsp)
jle 0x80c1
jmp 0x80e0
leaq 0x153d7(%rip), %rdi     # 0x1d49f
leaq 0x14f3e(%rip), %rsi     # 0x1d00d
movl $0x140, %edx            # imm = 0x140
leaq 0x15278(%rip), %rcx     # 0x1d353
callq 0x5280
movq 0x140(%rsp), %rax
movl 0x1a0(%rsp), %ecx
shlq %cl, %rax
addq 0x158(%rsp), %rax
movq %rax, 0x170(%rsp)
jmp 0x8160
movq 0x178(%rsp), %rax
movl 0x1a0(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jle 0x812d
jmp 0x814c
leaq 0x15377(%rip), %rdi     # 0x1d4ab
leaq 0x14ed2(%rip), %rsi     # 0x1d00d
movl $0x144, %edx            # imm = 0x144
leaq 0x1520c(%rip), %rcx     # 0x1d353
callq 0x5280
movq 0x178(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x170(%rsp)
jmp 0x8162
movq 0x130(%rsp), %rax
movq 0x220(%rax), %rdi
movq 0x170(%rsp), %rsi
callq 0x50b0
movq %rax, 0x58(%rsp)
jmp 0x8185
movq 0x130(%rsp), %rax
movq 0x220(%rax), %rdi
movq 0x178(%rsp), %rsi
callq 0x50b0
movq %rax, 0x50(%rsp)
jmp 0x81a8
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x81bd
jmp 0x81dc
leaq 0x15312(%rip), %rdi     # 0x1d4d6
leaq 0x14e42(%rip), %rsi     # 0x1d00d
movl $0x14a, %edx            # imm = 0x14A
leaq 0x1517c(%rip), %rcx     # 0x1d353
callq 0x5280
movq 0x170(%rsp), %rax
movq %rax, 0x48(%rsp)
movslq 0x184(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x184(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x7e0c
movq 0x130(%rsp), %rax
cmpq $-0x1, 0x1a8(%rax)
jne 0x8268
leaq 0x1b0(%rsp), %rdi
callq 0x9120
movq 0x130(%rsp), %rdi
movq 0x8(%rax), %rsi
callq 0x90d0
movq %rax, 0x40(%rsp)
jmp 0x8254
movq 0x130(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x1a8(%rax)
movq 0x130(%rsp), %rax
cmpq $0x0, 0x1a8(%rax)
jl 0x827c
jmp 0x829b
leaq 0x152a5(%rip), %rdi     # 0x1d528
leaq 0x14d83(%rip), %rsi     # 0x1d00d
movl $0x151, %edx            # imm = 0x151
leaq 0x150bd(%rip), %rcx     # 0x1d353
callq 0x5280
leaq 0x1b0(%rsp), %rdi
callq 0x91b0
movq 0x130(%rsp), %rdi
movq 0x8(%rax), %rsi
callq 0x9150
movq %rax, 0x38(%rsp)
jmp 0x82c0
movq 0x130(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rax, 0x1b0(%rcx)
movq 0x1b0(%rcx), %rax
cmpq 0x1a8(%rcx), %rax
jl 0x82e6
jmp 0x8305
leaq 0x1524b(%rip), %rdi     # 0x1d538
leaq 0x14d19(%rip), %rsi     # 0x1d00d
movl $0x153, %edx            # imm = 0x153
leaq 0x15053(%rip), %rcx     # 0x1d353
callq 0x5280
movl $0x0, 0x13c(%rsp)
movl 0x13c(%rsp), %eax
movq %rax, 0x30(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x9050
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x8373
movl 0x13c(%rsp), %eax
movl %eax, %esi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
movq 0x130(%rsp), %rdi
movq %rax, %rsi
callq 0x91f0
jmp 0x835e
jmp 0x8360
movl 0x13c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x13c(%rsp)
jmp 0x8310
movl $0x0, 0x138(%rsp)
movl 0x138(%rsp), %eax
movq %rax, 0x28(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x9050
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x8412
movl 0x138(%rsp), %eax
movl %eax, %esi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
testb $0x1, 0x10(%rax)
je 0x83fa
movq 0x130(%rsp), %rax
addq $0x260, %rax            # imm = 0x260
movq %rax, 0x20(%rsp)
movl 0x138(%rsp), %eax
movl %eax, %esi
leaq 0x1b0(%rsp), %rdi
callq 0x9070
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x9360
jmp 0x83f8
jmp 0x83fa
jmp 0x83fc
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
jmp 0x837e
jmp 0x78d9
movl 0x1cc(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x228(%rsp), %rdi
callq 0x5820
movl %eax, 0x1c(%rsp)
jmp 0x8435
movl 0x18(%rsp), %eax
movl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
je 0x84ae
movq 0x1fba8(%rip), %rdi     # 0x27ff0
leaq 0x15100(%rip), %rsi     # 0x1d54f
callq 0x53d0
movq %rax, 0x10(%rsp)
jmp 0x845b
movq 0x130(%rsp), %rdi
addq $0x248, %rdi            # imm = 0x248
callq 0x8f10
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x50c0
movq %rax, 0x8(%rsp)
jmp 0x8483
movq 0x8(%rsp), %rdi
leaq 0x150f0(%rip), %rsi     # 0x1d57f
callq 0x53d0
movq %rax, (%rsp)
jmp 0x849a
movq (%rsp), %rdi
movq 0x1fb1b(%rip), %rsi     # 0x27fc0
callq 0x5430
jmp 0x84ac
jmp 0x84ae
leaq 0x1b0(%rsp), %rdi
callq 0x7620
movb $0x1, %al
andb $0x1, %al
addq $0x238, %rsp            # imm = 0x238
retq
movq 0x1a8(%rsp), %rdi
callq 0x57d0
nopw %cs:(%rax,%rax)
nop