// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: checkTreePage
static int checkTreePage(
  IntegrityCk *pCheck,  /* Context for the sanity check */
  int iPage,            /* Page number of the page to check */
  char *zParentContext, /* Parent context */
  i64 *pnParentMinKey, 
  i64 *pnParentMaxKey
){
  MemPage *pPage;
  int i, rc, depth, d2, pgno, cnt;
  int hdr, cellStart;
  int nCell;
  u8 *data;
  BtShared *pBt;
  int usableSize;
  char zContext[100];
  char *hit = 0;
  i64 nMinKey = 0;
  i64 nMaxKey = 0;

  sqlite3_snprintf(sizeof(zContext), zContext, "Page %d: ", iPage);

  /* Check that the page exists
  */
  pBt = pCheck->pBt;
  usableSize = pBt->usableSize;
  if( iPage==0 ) return 0;
  if( checkRef(pCheck, iPage, zParentContext) ) return 0;
  if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
    checkAppendMsg(pCheck, zContext,
       "unable to get the page. error code=%d", rc);
    return 0;
  }

  /* Clear MemPage.isInit to make sure the corruption detection code in
  ** btreeInitPage() is executed.  */
  pPage->isInit = 0;
  if( (rc = btreeInitPage(pPage))!=0 ){
    assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
    checkAppendMsg(pCheck, zContext, 
                   "btreeInitPage() returns error code %d", rc);
    releasePage(pPage);
    return 0;
  }

  /* Check out all the cells.
  */
  depth = 0;
  for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
    u8 *pCell;
    u32 sz;
    CellInfo info;

    /* Check payload overflow pages
    */
    sqlite3_snprintf(sizeof(zContext), zContext,
             "On tree page %d cell %d: ", iPage, i);
    pCell = findCell(pPage,i);
    btreeParseCellPtr(pPage, pCell, &info);
    sz = info.nData;
    if( !pPage->intKey ) sz += (int)info.nKey;
    /* For intKey pages, check that the keys are in order.
    */
    else if( i==0 ) nMinKey = nMaxKey = info.nKey;
    else{
      if( info.nKey <= nMaxKey ){
        checkAppendMsg(pCheck, zContext, 
            "Rowid %lld out of order (previous was %lld)", info.nKey, nMaxKey);
      }
      nMaxKey = info.nKey;
    }
    assert( sz==info.nPayload );
    if( (sz>info.nLocal) 
     && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize])
    ){
      int nPage = (sz - info.nLocal + usableSize - 5)/(usableSize - 4);
      Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
#ifndef SQLITE_OMIT_AUTOVACUUM
      if( pBt->autoVacuum ){
        checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage, zContext);
      }
#endif
      checkList(pCheck, 0, pgnoOvfl, nPage, zContext);
    }

    /* Check sanity of left child page.
    */
    if( !pPage->leaf ){
      pgno = get4byte(pCell);
#ifndef SQLITE_OMIT_AUTOVACUUM
      if( pBt->autoVacuum ){
        checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
      }
#endif
      d2 = checkTreePage(pCheck, pgno, zContext, &nMinKey, i==0 ? NULL : &nMaxKey);
      if( i>0 && d2!=depth ){
        checkAppendMsg(pCheck, zContext, "Child page depth differs");
      }
      depth = d2;
    }
  }

  if( !pPage->leaf ){
    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    sqlite3_snprintf(sizeof(zContext), zContext, 
                     "On page %d at right child: ", iPage);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( pBt->autoVacuum ){
      checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
    }
#endif
    checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey);
  }
 
  /* For intKey leaf pages, check that the min/max keys are in order
  ** with any left/parent/right pages.
  */
  if( pPage->leaf && pPage->intKey ){
    /* if we are a left child page */
    if( pnParentMinKey ){
      /* if we are the left most child page */
      if( !pnParentMaxKey ){
        if( nMaxKey > *pnParentMinKey ){
          checkAppendMsg(pCheck, zContext, 
              "Rowid %lld out of order (max larger than parent min of %lld)",
              nMaxKey, *pnParentMinKey);
        }
      }else{
        if( nMinKey <= *pnParentMinKey ){
          checkAppendMsg(pCheck, zContext, 
              "Rowid %lld out of order (min less than parent min of %lld)",
              nMinKey, *pnParentMinKey);
        }
        if( nMaxKey > *pnParentMaxKey ){
          checkAppendMsg(pCheck, zContext, 
              "Rowid %lld out of order (max larger than parent max of %lld)",
              nMaxKey, *pnParentMaxKey);
        }
        *pnParentMinKey = nMaxKey;
      }
    /* else if we're a right child page */
    } else if( pnParentMaxKey ){
      if( nMinKey <= *pnParentMaxKey ){
        checkAppendMsg(pCheck, zContext, 
            "Rowid %lld out of order (min less than parent max of %lld)",
            nMinKey, *pnParentMaxKey);
      }
    }
  }

  /* Check for complete coverage of the page
  */
  data = pPage->aData;
  hdr = pPage->hdrOffset;
  hit = sqlite3PageMalloc( pBt->pageSize );
  if( hit==0 ){
    pCheck->mallocFailed = 1;
  }else{
    int contentOffset = get2byteNotZero(&data[hdr+5]);
    assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */
    memset(hit+contentOffset, 0, usableSize-contentOffset);
    memset(hit, 1, contentOffset);
    nCell = get2byte(&data[hdr+3]);
    cellStart = hdr + 12 - 4*pPage->leaf;
    for(i=0; i<nCell; i++){
      int pc = get2byte(&data[cellStart+i*2]);
      u32 size = 65536;
      int j;
      if( pc<=usableSize-4 ){
        size = cellSizePtr(pPage, &data[pc]);
      }
      if( (int)(pc+size-1)>=usableSize ){
        checkAppendMsg(pCheck, 0, 
            "Corruption detected in cell %d on page %d",i,iPage);
      }else{
        for(j=pc+size-1; j>=pc; j--) hit[j]++;
      }
    }
    i = get2byte(&data[hdr+1]);
    while( i>0 ){
      int size, j;
      assert( i<=usableSize-4 );     /* Enforced by btreeInitPage() */
      size = get2byte(&data[i+2]);
      assert( i+size<=usableSize );  /* Enforced by btreeInitPage() */
      for(j=i+size-1; j>=i; j--) hit[j]++;
      j = get2byte(&data[i]);
      assert( j==0 || j>i+size );  /* Enforced by btreeInitPage() */
      assert( j<=usableSize-4 );   /* Enforced by btreeInitPage() */
      i = j;
    }
    for(i=cnt=0; i<usableSize; i++){
      if( hit[i]==0 ){
        cnt++;
      }else if( hit[i]>1 ){
        checkAppendMsg(pCheck, 0,
          "Multiple uses for byte %d of page %d", i, iPage);
        break;
      }
    }
    if( cnt!=data[hdr+7] ){
      checkAppendMsg(pCheck, 0, 
          "Fragmentation of %d bytes reported as %d on page %d",
          cnt, data[hdr+7], iPage);
    }
  }
  sqlite3PageFree(hit);
  releasePage(pPage);
  return depth+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
leaq -0xe0(%rbp), %rsi
movl -0x14(%rbp), %ecx
movl $0x64, %edi
leaq 0x671d3(%rip), %rdx     # 0xaed18
movb $0x0, %al
callq 0xc540
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x47b73
movl $0x0, -0x4(%rbp)
jmp 0x484fc
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x48680
cmpl $0x0, %eax
je 0x47b94
movl $0x0, -0x4(%rbp)
jmp 0x484fc
movq -0x70(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x29ed0
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
je 0x47bd6
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl -0x40(%rbp), %ecx
leaq 0x6715f(%rip), %rdx     # 0xaed22
movb $0x0, %al
callq 0x48550
movl $0x0, -0x4(%rbp)
jmp 0x484fc
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rdi
callq 0x24a60
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
je 0x47c1f
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl -0x40(%rbp), %ecx
leaq 0x67145(%rip), %rdx     # 0xaed48
movb $0x0, %al
callq 0x48550
movq -0x38(%rbp), %rdi
callq 0x29fd0
movl $0x0, -0x4(%rbp)
jmp 0x484fc
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movzwl 0x10(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x149(%rbp)
jge 0x47c55
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
setne %al
movb %al, -0x149(%rbp)
movb -0x149(%rbp), %al
testb $0x1, %al
jne 0x47c64
jmp 0x47f2c
leaq -0xe0(%rbp), %rsi
movl -0x14(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl $0x64, %edi
leaq 0x670f0(%rip), %rdx     # 0xaed6e
movb $0x0, %al
callq 0xc540
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x38(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
movq -0x38(%rbp), %rdx
movq 0x60(%rdx), %rdx
movl -0x3c(%rbp), %esi
shll %esi
movslq %esi, %rsi
movzbl (%rdx,%rsi), %edx
shll $0x8, %edx
movq -0x38(%rbp), %rsi
movq 0x60(%rsi), %rsi
movl -0x3c(%rbp), %edi
shll %edi
movslq %edi, %rdi
movzbl 0x1(%rsi,%rdi), %esi
orl %esi, %edx
andl %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x100(%rbp)
movq -0x38(%rbp), %rdi
movq -0x100(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x2c070
movl -0x118(%rbp), %eax
movl %eax, -0x104(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, 0x2(%rax)
jne 0x47d14
movq -0x128(%rbp), %rax
addl -0x104(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0x47d78
cmpl $0x0, -0x3c(%rbp)
jne 0x47d31
movq -0x128(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rax, -0xf0(%rbp)
jmp 0x47d76
movq -0x128(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jg 0x47d68
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0x128(%rbp), %rcx
movq -0xf8(%rbp), %r8
leaq 0x67027(%rip), %rdx     # 0xaed88
movb $0x0, %al
callq 0x48550
movq -0x128(%rbp), %rax
movq %rax, -0xf8(%rbp)
jmp 0x47d78
movl -0x104(%rbp), %eax
movzwl -0x10e(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x47e40
movq -0x100(%rbp), %rax
movzwl -0x10c(%rbp), %ecx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x70(%rbp), %rdx
movl 0x34(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x47e40
movl -0x104(%rbp), %eax
movzwl -0x10e(%rbp), %ecx
subl %ecx, %eax
addl -0x74(%rbp), %eax
subl $0x5, %eax
movl -0x74(%rbp), %ecx
subl $0x4, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x12c(%rbp)
movq -0x100(%rbp), %rdi
movzwl -0x10c(%rbp), %eax
addq %rax, %rdi
callq 0x20a50
movl %eax, -0x130(%rbp)
movq -0x70(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x47e22
movq -0x10(%rbp), %rdi
movl -0x130(%rbp), %esi
movl -0x14(%rbp), %ecx
leaq -0xe0(%rbp), %r8
movl $0x3, %edx
callq 0x47a30
movq -0x10(%rbp), %rdi
movl -0x130(%rbp), %edx
movl -0x12c(%rbp), %ecx
leaq -0xe0(%rbp), %r8
xorl %esi, %esi
callq 0x477f0
movq -0x38(%rbp), %rax
cmpb $0x0, 0x3(%rax)
jne 0x47f1c
movq -0x100(%rbp), %rdi
callq 0x20a50
movl %eax, -0x4c(%rbp)
movq -0x70(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x47e82
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %esi
movl -0x14(%rbp), %ecx
leaq -0xe0(%rbp), %r8
movl $0x5, %edx
callq 0x47a30
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x15c(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x47eb5
xorl %eax, %eax
movq %rax, -0x170(%rbp)
jmp 0x47ec5
leaq -0xf8(%rbp), %rax
movq %rax, -0x170(%rbp)
jmp 0x47ec5
movq -0x158(%rbp), %rdx
movl -0x15c(%rbp), %esi
movq -0x168(%rbp), %rdi
movq -0x170(%rbp), %r8
leaq -0xf0(%rbp), %rcx
callq 0x47af0
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0x47f16
movl -0x48(%rbp), %eax
cmpl -0x44(%rbp), %eax
je 0x47f16
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq 0x66ea5(%rip), %rdx     # 0xaedb4
movb $0x0, %al
callq 0x48550
movl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x47f1e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x47c2d
movq -0x38(%rbp), %rax
cmpb $0x0, 0x3(%rax)
jne 0x48008
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x38(%rbp), %rax
movzbl 0x5(%rax), %eax
addl $0x8, %eax
cltq
addq %rax, %rdi
callq 0x20a50
movl %eax, -0x4c(%rbp)
leaq -0xe0(%rbp), %rsi
movl -0x14(%rbp), %ecx
movl $0x64, %edi
leaq 0x66e5d(%rip), %rdx     # 0xaedcd
movb $0x0, %al
callq 0xc540
movq -0x70(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x47f9c
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %esi
movl -0x14(%rbp), %ecx
leaq -0xe0(%rbp), %r8
movl $0x5, %edx
callq 0x47a30
movq -0x10(%rbp), %rax
movq %rax, -0x188(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x17c(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x38(%rbp), %rax
cmpw $0x0, 0x10(%rax)
jne 0x47fd4
xorl %eax, %eax
movq %rax, -0x190(%rbp)
jmp 0x47fe4
leaq -0xf8(%rbp), %rax
movq %rax, -0x190(%rbp)
jmp 0x47fe4
movq -0x178(%rbp), %rdx
movl -0x17c(%rbp), %esi
movq -0x188(%rbp), %rdi
movq -0x190(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0x47af0
movq -0x38(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0x48137
movq -0x38(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x48137
cmpq $0x0, -0x28(%rbp)
je 0x480f3
cmpq $0x0, -0x30(%rbp)
jne 0x48075
movq -0xf8(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x48073
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0xf8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rax), %r8
leaq 0x66d7d(%rip), %rdx     # 0xaede9
movb $0x0, %al
callq 0x48550
jmp 0x480f1
movq -0xf0(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jg 0x480ac
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0xf0(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rax), %r8
leaq 0x66d81(%rip), %rdx     # 0xaee26
movb $0x0, %al
callq 0x48550
movq -0xf8(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x480e3
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0xf8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r8
leaq 0x66d85(%rip), %rdx     # 0xaee61
movb $0x0, %al
callq 0x48550
movq -0xf8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x48135
cmpq $0x0, -0x30(%rbp)
je 0x48133
movq -0xf0(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jg 0x48131
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0xf0(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r8
leaq 0x66d74(%rip), %rdx     # 0xaee9e
movb $0x0, %al
callq 0x48550
jmp 0x48133
jmp 0x48135
jmp 0x48137
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movzbl 0x5(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x70(%rbp), %rax
movl 0x30(%rax), %edi
callq 0x24fa0
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jne 0x4817b
movq -0x10(%rbp), %rax
movl $0x1, 0x24(%rax)
jmp 0x484de
movq -0x68(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x54(%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, -0x134(%rbp)
movq -0xe8(%rbp), %rdi
movslq -0x134(%rbp), %rax
addq %rax, %rdi
movl -0x74(%rbp), %eax
subl -0x134(%rbp), %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x8200
movq -0xe8(%rbp), %rdi
movslq -0x134(%rbp), %rdx
movl $0x1, %esi
callq 0x8200
movq -0x68(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x5c(%rbp)
movl -0x54(%rbp), %eax
addl $0xc, %eax
movq -0x38(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x2, %ecx
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x48344
movq -0x68(%rbp), %rax
movl -0x58(%rbp), %ecx
movl -0x3c(%rbp), %edx
shll %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x58(%rbp), %edx
movl -0x3c(%rbp), %esi
shll %esi
addl %esi, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x138(%rbp)
movl $0x10000, -0x13c(%rbp)  # imm = 0x10000
movl -0x138(%rbp), %eax
movl -0x74(%rbp), %ecx
subl $0x4, %ecx
cmpl %ecx, %eax
jg 0x482b4
movq -0x38(%rbp), %rdi
movq -0x68(%rbp), %rsi
movslq -0x138(%rbp), %rax
addq %rax, %rsi
callq 0x41c00
movzwl %ax, %eax
movl %eax, -0x13c(%rbp)
movl -0x138(%rbp), %eax
addl -0x13c(%rbp), %eax
subl $0x1, %eax
cmpl -0x74(%rbp), %eax
jl 0x482e7
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %ecx
movl -0x14(%rbp), %r8d
xorl %eax, %eax
movl %eax, %esi
leaq 0x66bfb(%rip), %rdx     # 0xaeed9
movb $0x0, %al
callq 0x48550
jmp 0x48334
movl -0x138(%rbp), %eax
addl -0x13c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x140(%rbp)
movl -0x140(%rbp), %eax
cmpl -0x138(%rbp), %eax
jl 0x48332
movq -0xe8(%rbp), %rax
movslq -0x140(%rbp), %rcx
movb (%rax,%rcx), %dl
addb $0x1, %dl
movb %dl, (%rax,%rcx)
movl -0x140(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x482fc
jmp 0x48334
jmp 0x48336
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x48238
movq -0x68(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0x4841e
movq -0x68(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movl -0x3c(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x144(%rbp)
movl -0x3c(%rbp), %eax
addl -0x144(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x148(%rbp)
movl -0x148(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jl 0x483ec
movq -0xe8(%rbp), %rax
movslq -0x148(%rbp), %rcx
movb (%rax,%rcx), %dl
addb $0x1, %dl
movb %dl, (%rax,%rcx)
movl -0x148(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x483b9
movq -0x68(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x68(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x148(%rbp)
movl -0x148(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x4836f
movl $0x0, -0x50(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x48495
movq -0xe8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x48453
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x48488
movq -0xe8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jle 0x48486
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %ecx
movl -0x14(%rbp), %r8d
xorl %eax, %eax
movl %eax, %esi
leaq 0x66a86(%rip), %rdx     # 0xaef03
movb $0x0, %al
callq 0x48550
jmp 0x48495
jmp 0x48488
jmp 0x4848a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4842c
movl -0x50(%rbp), %eax
movq -0x68(%rbp), %rcx
movl -0x54(%rbp), %edx
addl $0x7, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x484dc
movq -0x10(%rbp), %rdi
movl -0x50(%rbp), %ecx
movq -0x68(%rbp), %rax
movl -0x54(%rbp), %edx
addl $0x7, %edx
movslq %edx, %rdx
movzbl (%rax,%rdx), %r8d
movl -0x14(%rbp), %r9d
xorl %eax, %eax
movl %eax, %esi
leaq 0x66a53(%rip), %rdx     # 0xaef28
movb $0x0, %al
callq 0x48550
jmp 0x484de
movq -0xe8(%rbp), %rdi
callq 0x24ff0
movq -0x38(%rbp), %rdi
callq 0x29fd0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopl (%rax,%rax)