// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: checkTreePage
static int checkTreePage(
  IntegrityCk *pCheck,  /* Context for the sanity check */
  Pgno iPage,           /* Page number of the page to check */
  i64 *piMinKey,        /* Write minimum integer primary key here */
  i64 maxKey            /* Error if integer primary key greater than this */
){
  MemPage *pPage = 0;      /* The page being analyzed */
  int i;                   /* Loop counter */
  int rc;                  /* Result code from subroutine call */
  int depth = -1, d2;      /* Depth of a subtree */
  int pgno;                /* Page number */
  int nFrag;               /* Number of fragmented bytes on the page */
  int hdr;                 /* Offset to the page header */
  int cellStart;           /* Offset to the start of the cell pointer array */
  int nCell;               /* Number of cells */
  int doCoverageCheck = 1; /* True if cell coverage checking should be done */
  int keyCanBeEqual = 1;   /* True if IPK can be equal to maxKey
                           ** False if IPK must be strictly less than maxKey */
  u8 *data;                /* Page content */
  u8 *pCell;               /* Cell content */
  u8 *pCellIdx;            /* Next element of the cell pointer array */
  BtShared *pBt;           /* The BtShared object that owns pPage */
  u32 pc;                  /* Address of a cell */
  u32 usableSize;          /* Usable size of the page */
  u32 contentOffset;       /* Offset to the start of the cell content area */
  u32 *heap = 0;           /* Min-heap used for checking cell coverage */
  u32 x, prev = 0;         /* Next and previous entry on the min-heap */
  const char *saved_zPfx = pCheck->zPfx;
  int saved_v1 = pCheck->v1;
  int saved_v2 = pCheck->v2;
  u8 savedIsInit = 0;

  /* Check that the page exists
  */
  pBt = pCheck->pBt;
  usableSize = pBt->usableSize;
  if( iPage==0 ) return 0;
  if( checkRef(pCheck, iPage) ) return 0;
  pCheck->zPfx = "Page %u: ";
  pCheck->v1 = iPage;
  if( (rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0 ){
    checkAppendMsg(pCheck,
       "unable to get the page. error code=%d", rc);
    goto end_of_check;
  }

  /* Clear MemPage.isInit to make sure the corruption detection code in
  ** btreeInitPage() is executed.  */
  savedIsInit = pPage->isInit;
  pPage->isInit = 0;
  if( (rc = btreeInitPage(pPage))!=0 ){
    assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
    checkAppendMsg(pCheck,
                   "btreeInitPage() returns error code %d", rc);
    goto end_of_check;
  }
  if( (rc = btreeComputeFreeSpace(pPage))!=0 ){
    assert( rc==SQLITE_CORRUPT );
    checkAppendMsg(pCheck, "free space corruption", rc);
    goto end_of_check;
  }
  data = pPage->aData;
  hdr = pPage->hdrOffset;

  /* Set up for cell analysis */
  pCheck->zPfx = "On tree page %u cell %d: ";
  contentOffset = get2byteNotZero(&data[hdr+5]);
  assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */

  /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
  ** number of cells on the page. */
  nCell = get2byte(&data[hdr+3]);
  assert( pPage->nCell==nCell );

  /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page
  ** immediately follows the b-tree page header. */
  cellStart = hdr + 12 - 4*pPage->leaf;
  assert( pPage->aCellIdx==&data[cellStart] );
  pCellIdx = &data[cellStart + 2*(nCell-1)];

  if( !pPage->leaf ){
    /* Analyze the right-child page of internal pages */
    pgno = get4byte(&data[hdr+8]);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( pBt->autoVacuum ){
      pCheck->zPfx = "On page %u at right child: ";
      checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
    }
#endif
    depth = checkTreePage(pCheck, pgno, &maxKey, maxKey);
    keyCanBeEqual = 0;
  }else{
    /* For leaf pages, the coverage check will occur in the same loop
    ** as the other cell checks, so initialize the heap.  */
    heap = pCheck->heap;
    heap[0] = 0;
  }

  /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte
  ** integer offsets to the cell contents. */
  for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
    CellInfo info;

    /* Check cell size */
    pCheck->v2 = i;
    assert( pCellIdx==&data[cellStart + i*2] );
    pc = get2byteAligned(pCellIdx);
    pCellIdx -= 2;
    if( pc<contentOffset || pc>usableSize-4 ){
      checkAppendMsg(pCheck, "Offset %d out of range %d..%d",
                             pc, contentOffset, usableSize-4);
      doCoverageCheck = 0;
      continue;
    }
    pCell = &data[pc];
    pPage->xParseCell(pPage, pCell, &info);
    if( pc+info.nSize>usableSize ){
      checkAppendMsg(pCheck, "Extends off end of page");
      doCoverageCheck = 0;
      continue;
    }

    /* Check for integer primary key out of range */
    if( pPage->intKey ){
      if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
        checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
      }
      maxKey = info.nKey;
      keyCanBeEqual = 0;     /* Only the first key on the page may ==maxKey */
    }

    /* Check the content overflow list */
    if( info.nPayload>info.nLocal ){
      u32 nPage;       /* Number of pages on the overflow chain */
      Pgno pgnoOvfl;   /* First page of the overflow chain */
      assert( pc + info.nSize - 4 <= usableSize );
      nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);
      pgnoOvfl = get4byte(&pCell[info.nSize - 4]);
#ifndef SQLITE_OMIT_AUTOVACUUM
      if( pBt->autoVacuum ){
        checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage);
      }
#endif
      checkList(pCheck, 0, pgnoOvfl, nPage);
    }

    if( !pPage->leaf ){
      /* Check sanity of left child page for internal pages */
      pgno = get4byte(pCell);
#ifndef SQLITE_OMIT_AUTOVACUUM
      if( pBt->autoVacuum ){
        checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
      }
#endif
      d2 = checkTreePage(pCheck, pgno, &maxKey, maxKey);
      keyCanBeEqual = 0;
      if( d2!=depth ){
        checkAppendMsg(pCheck, "Child page depth differs");
        depth = d2;
      }
    }else{
      /* Populate the coverage-checking heap for leaf pages */
      btreeHeapInsert(heap, (pc<<16)|(pc+info.nSize-1));
    }
  }
  *piMinKey = maxKey;

  /* Check for complete coverage of the page
  */
  pCheck->zPfx = 0;
  if( doCoverageCheck && pCheck->mxErr>0 ){
    /* For leaf pages, the min-heap has already been initialized and the
    ** cells have already been inserted.  But for internal pages, that has
    ** not yet been done, so do it now */
    if( !pPage->leaf ){
      heap = pCheck->heap;
      heap[0] = 0;
      for(i=nCell-1; i>=0; i--){
        u32 size;
        pc = get2byteAligned(&data[cellStart+i*2]);
        size = pPage->xCellSize(pPage, &data[pc]);
        btreeHeapInsert(heap, (pc<<16)|(pc+size-1));
      }
    }
    /* Add the freeblocks to the min-heap
    **
    ** EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header
    ** is the offset of the first freeblock, or zero if there are no
    ** freeblocks on the page.
    */
    i = get2byte(&data[hdr+1]);
    while( i>0 ){
      int size, j;
      assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
      size = get2byte(&data[i+2]);
      assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
      btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
      /* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
      ** big-endian integer which is the offset in the b-tree page of the next
      ** freeblock in the chain, or zero if the freeblock is the last on the
      ** chain. */
      j = get2byte(&data[i]);
      /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
      ** increasing offset. */
      assert( j==0 || j>i+size );     /* Enforced by btreeComputeFreeSpace() */
      assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
      i = j;
    }
    /* Analyze the min-heap looking for overlap between cells and/or
    ** freeblocks, and counting the number of untracked bytes in nFrag.
    **
    ** Each min-heap entry is of the form:    (start_address<<16)|end_address.
    ** There is an implied first entry the covers the page header, the cell
    ** pointer index, and the gap between the cell pointer index and the start
    ** of cell content.
    **
    ** The loop below pulls entries from the min-heap in order and compares
    ** the start_address against the previous end_address.  If there is an
    ** overlap, that means bytes are used multiple times.  If there is a gap,
    ** that gap is added to the fragmentation count.
    */
    nFrag = 0;
    prev = contentOffset - 1;   /* Implied first min-heap entry */
    while( btreeHeapPull(heap,&x) ){
      if( (prev&0xffff)>=(x>>16) ){
        checkAppendMsg(pCheck,
          "Multiple uses for byte %u of page %u", x>>16, iPage);
        break;
      }else{
        nFrag += (x>>16) - (prev&0xffff) - 1;
        prev = x;
      }
    }
    nFrag += usableSize - (prev&0xffff) - 1;
    /* EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments
    ** is stored in the fifth field of the b-tree page header.
    ** EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the
    ** number of fragmented free bytes within the cell content area.
    */
    if( heap[0]==0 && nFrag!=data[hdr+7] ){
      checkAppendMsg(pCheck,
          "Fragmentation of %d bytes reported as %d on page %u",
          nFrag, data[hdr+7], iPage);
    }
  }

end_of_check:
  if( !doCoverageCheck ) pPage->isInit = savedIsInit;
  releasePage(pPage);
  pCheck->zPfx = saved_zPfx;
  pCheck->v1 = saved_v1;
  pCheck->v2 = saved_v2;
  return depth+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x58(%rbp)
movl $0x1, -0x5c(%rbp)
movq $0x0, -0x98(%rbp)
movl $0x0, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0xac(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0xb0(%rbp)
movb $0x0, -0xb1(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x40d266
movl $0x0, -0x4(%rbp)
jmp 0x40da38
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x40da90
cmpl $0x0, %eax
je 0x40d283
movl $0x0, -0x4(%rbp)
jmp 0x40da38
movq -0x10(%rbp), %rax
leaq 0x19eb4f(%rip), %rcx    # 0x5abddd
movq %rcx, 0x28(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x80(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x30(%rbp), %rdx
xorl %ecx, %ecx
callq 0x3e6f40
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
je 0x40d2d0
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %edx
leaq 0x19eb23(%rip), %rsi    # 0x5abde7
movb $0x0, %al
callq 0x40cfd0
jmp 0x40d9eb
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0xb1(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rdi
callq 0x3e4130
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
je 0x40d30e
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %edx
leaq 0x19eb0b(%rip), %rsi    # 0x5abe0d
movb $0x0, %al
callq 0x40cfd0
jmp 0x40d9eb
movq -0x30(%rbp), %rdi
callq 0x403790
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
je 0x40d339
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %edx
leaq 0x19eb06(%rip), %rsi    # 0x5abe33
movb $0x0, %al
callq 0x40cfd0
jmp 0x40d9eb
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
leaq 0x19eaee(%rip), %rcx    # 0x5abe49
movq %rcx, 0x28(%rax)
movq -0x68(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x4c(%rbp), %edx
addl $0x5, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
subl $0x1, %eax
andl $0xffff, %eax           # imm = 0xFFFF
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movq -0x68(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x4c(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
addl $0xc, %eax
movq -0x30(%rbp), %rcx
movzbl 0x8(%rcx), %ecx
shll $0x2, %ecx
subl %ecx, %eax
movl %eax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movl -0x50(%rbp), %ecx
movl -0x54(%rbp), %edx
subl $0x1, %edx
shll %edx
addl %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x40d462
movq -0x68(%rbp), %rdi
movl -0x4c(%rbp), %eax
addl $0x8, %eax
cltq
addq %rax, %rdi
callq 0x3db720
movl %eax, -0x44(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x40d442
movq -0x10(%rbp), %rax
leaq 0x19ea39(%rip), %rcx    # 0x5abe63
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x14(%rbp), %ecx
movl $0x5, %edx
callq 0x40d110
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x40d1c0
movl %eax, -0x3c(%rbp)
movl $0x0, -0x5c(%rbp)
jmp 0x40d47e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl $0x0, (%rax)
movl -0x54(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x34(%rbp)
movb %al, -0xe5(%rbp)
jl 0x40d4a6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
setne %al
movb %al, -0xe5(%rbp)
movb -0xe5(%rbp), %al
testb $0x1, %al
jne 0x40d4b5
jmp 0x40d737
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x78(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x84(%rbp)
movq -0x78(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x78(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jb 0x40d506
movl -0x84(%rbp), %eax
movl -0x88(%rbp), %ecx
subl $0x4, %ecx
cmpl %ecx, %eax
jbe 0x40d53b
movq -0x10(%rbp), %rdi
movl -0x84(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x88(%rbp), %r8d
subl $0x4, %r8d
leaq 0x19e957(%rip), %rsi    # 0x5abe7f
movb $0x0, %al
callq 0x40cfd0
movl $0x0, -0x58(%rbp)
jmp 0x40d729
movq -0x68(%rbp), %rax
movl -0x84(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq *%rax
movl -0x84(%rbp), %eax
movzwl -0xba(%rbp), %ecx
addl %ecx, %eax
cmpl -0x88(%rbp), %eax
jbe 0x40d59d
movq -0x10(%rbp), %rdi
leaq 0x19e913(%rip), %rsi    # 0x5abe9d
movb $0x0, %al
callq 0x40cfd0
movl $0x0, -0x58(%rbp)
jmp 0x40d729
movq -0x30(%rbp), %rax
cmpb $0x0, 0x2(%rax)
je 0x40d5f4
cmpl $0x0, -0x5c(%rbp)
je 0x40d5bc
movq -0xd0(%rbp), %rax
cmpq -0x28(%rbp), %rax
jg 0x40d5c9
jmp 0x40d5e2
movq -0xd0(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x40d5e2
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0x19e8da(%rip), %rsi    # 0x5abeb5
movb $0x0, %al
callq 0x40cfd0
movq -0xd0(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0xc0(%rbp), %eax
movzwl -0xbc(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x40d68a
movl -0xc0(%rbp), %eax
movzwl -0xbc(%rbp), %ecx
subl %ecx, %eax
addl -0x88(%rbp), %eax
subl $0x5, %eax
movl -0x88(%rbp), %ecx
subl $0x4, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0xd4(%rbp)
movq -0x70(%rbp), %rdi
movzwl -0xba(%rbp), %eax
subl $0x4, %eax
cltq
addq %rax, %rdi
callq 0x3db720
movl %eax, -0xd8(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x40d673
movq -0x10(%rbp), %rdi
movl -0xd8(%rbp), %esi
movl -0x14(%rbp), %ecx
movl $0x3, %edx
callq 0x40d110
movq -0x10(%rbp), %rdi
movl -0xd8(%rbp), %edx
movl -0xd4(%rbp), %ecx
xorl %esi, %esi
callq 0x40cda0
movq -0x30(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x40d6fe
movq -0x70(%rbp), %rdi
callq 0x3db720
movl %eax, -0x44(%rbp)
movq -0x80(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x40d6be
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x14(%rbp), %ecx
movl $0x5, %edx
callq 0x40d110
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x40d1c0
movl %eax, -0x40(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
je 0x40d6fc
movq -0x10(%rbp), %rdi
leaq 0x19e7de(%rip), %rsi    # 0x5abecd
movb $0x0, %al
callq 0x40cfd0
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x40d727
movq -0x98(%rbp), %rdi
movl -0x84(%rbp), %esi
shll $0x10, %esi
movl -0x84(%rbp), %eax
movzwl -0xba(%rbp), %ecx
addl %ecx, %eax
subl $0x1, %eax
orl %eax, %esi
callq 0x40db40
jmp 0x40d729
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x40d487
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
cmpl $0x0, -0x58(%rbp)
je 0x40d9e9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jle 0x40d9e9
movq -0x30(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x40d833
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl $0x0, (%rax)
movl -0x54(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x40d831
movq -0x68(%rbp), %rax
movl -0x50(%rbp), %ecx
movl -0x34(%rbp), %edx
shll %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x50(%rbp), %edx
movl -0x34(%rbp), %esi
shll %esi
addl %esi, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x84(%rbp)
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movl -0x84(%rbp), %ecx
addq %rcx, %rsi
callq *%rax
movzwl %ax, %eax
movl %eax, -0xdc(%rbp)
movq -0x98(%rbp), %rdi
movl -0x84(%rbp), %esi
shll $0x10, %esi
movl -0x84(%rbp), %eax
addl -0xdc(%rbp), %eax
subl $0x1, %eax
orl %eax, %esi
callq 0x40db40
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x40d799
jmp 0x40d833
movq -0x68(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x4c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x40d8e8
movq -0x68(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0xe0(%rbp)
movq -0x98(%rbp), %rdi
movl -0x34(%rbp), %esi
shll $0x10, %esi
movl -0x34(%rbp), %eax
addl -0xe0(%rbp), %eax
subl $0x1, %eax
orl %eax, %esi
callq 0x40db40
movq -0x68(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x40d85e
movl $0x0, -0x48(%rbp)
movl -0x8c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0x40dbe0
cmpl $0x0, %eax
je 0x40d97c
movl -0xa0(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl -0x9c(%rbp), %ecx
shrl $0x10, %ecx
cmpl %ecx, %eax
jb 0x40d94e
movq -0x10(%rbp), %rdi
movl -0x9c(%rbp), %edx
shrl $0x10, %edx
movl -0x14(%rbp), %ecx
leaq 0x19e5a1(%rip), %rsi    # 0x5abee6
movb $0x0, %al
callq 0x40cfd0
jmp 0x40d97c
movl -0x9c(%rbp), %eax
shrl $0x10, %eax
movl -0xa0(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
subl %ecx, %eax
subl $0x1, %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0xa0(%rbp)
jmp 0x40d8fe
movl -0x88(%rbp), %eax
movl -0xa0(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
subl %ecx, %eax
subl $0x1, %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x40d9e7
movl -0x48(%rbp), %eax
movq -0x68(%rbp), %rcx
movl -0x4c(%rbp), %edx
addl $0x7, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x40d9e7
movq -0x10(%rbp), %rdi
movl -0x48(%rbp), %edx
movq -0x68(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x7, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ecx
movl -0x14(%rbp), %r8d
leaq 0x19e52b(%rip), %rsi    # 0x5abf0b
movb $0x0, %al
callq 0x40cfd0
jmp 0x40d9e9
jmp 0x40d9eb
cmpl $0x0, -0x58(%rbp)
jne 0x40d9fd
movb -0xb1(%rbp), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rdi
callq 0x3e9b70
movq -0xa8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0xac(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0xb0(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)