LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheMakeClean
SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
  assert( sqlite3PcachePageSanity(p) );
  assert( (p->flags & PGHDR_DIRTY)!=0 );
  assert( (p->flags & PGHDR_CLEAN)==0 );
  pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
  p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC|PGHDR_WRITEABLE);
  p->flags |= PGHDR_CLEAN;
  pcacheTrace(("%p.CLEAN %d\n",p->pCache,p->pgno));
  assert( sqlite3PcachePageSanity(p) );
  if( p->nRef==0 ){
    pcacheUnpin(p);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x288c8c
movl 0x34(%rbx), %eax
andl $-0x10, %eax
incl %eax
movw %ax, 0x34(%rbx)
cmpw $0x0, 0x36(%rbx)
je 0x286b47
popq %rbx
retq
movq 0x18(%rbx), %rax
cmpb $0x0, 0x2c(%rax)
je 0x286b45
movq 0x234bf0(%rip), %rcx    # 0x4bb748
movq 0x40(%rax), %rdi
movq (%rbx), %rsi
xorl %edx, %edx
popq %rbx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BitvecTestNotNull
SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
  assert( p!=0 );
  i--;
  if( i>=p->iSize ) return 0;
  while( p->iDivisor ){
    u32 bin = i/p->iDivisor;
    i = i%p->iDivisor;
    p = p->u.apSub[bin];
    if (!p) {
      return 0;
    }
  }
  if( p->iSize<=BITVEC_NBIT ){
    return (p->u.aBitmap[i/BITVEC_SZELEM] & (1<<(i&(BITVEC_SZELEM-1))))!=0;
  } else{
    u32 h = BITVEC_HASH(i++);
    while( p->u.aHash[h] ){
      if( p->u.aHash[h]==i ) return 1;
      h = (h+1) % BITVEC_NINT;
    }
    return 0;
  }
}

// Assembly:
movl %esi, %edx
decl %edx
xorl %eax, %eax
cmpl (%rdi), %edx
jae 0x286b89
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x286b8a
movl %edx, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
xorl %eax, %eax
movq 0x10(%rdi,%rcx,8), %rdi
testq %rdi, %rdi
jne 0x286b6e
retq
cmpl $0xf80, (%rdi)          # imm = 0xF80
ja 0x286ba8
movl %edx, %eax
shrl $0x3, %eax
movzbl 0x10(%rdi,%rax), %ecx
andl $0x7, %edx
xorl %eax, %eax
btl %edx, %ecx
setb %al
retq
movl %edx, %eax
shrl $0x2, %eax
imulq $0x21084211, %rax, %rax # imm = 0x21084211
shrq $0x22, %rax
imull $0x7c, %eax, %eax
movl %edx, %ecx
subl %eax, %ecx
movl 0x10(%rdi,%rcx,4), %esi
movl $0x0, %eax
testl %esi, %esi
je 0x286b89
incl %edx
xorl %eax, %eax
cmpl %edx, %esi
je 0x286be6
incl %ecx
cmpl $0x7c, %ecx
cmovel %eax, %ecx
movl 0x10(%rdi,%rcx,4), %esi
testl %esi, %esi
jne 0x286bd0
jmp 0x286b89
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memjrnlRead
static int memjrnlRead(
  sqlite3_file *pJfd,    /* The journal file from which to read */
  void *zBuf,            /* Put the results here */
  int iAmt,              /* Number of bytes to read */
  sqlite_int64 iOfst     /* Begin reading at this offset */
){
  MemJournal *p = (MemJournal *)pJfd;
  u8 *zOut = zBuf;
  int nRead = iAmt;
  int iChunkOffset;
  FileChunk *pChunk;

  if( (iAmt+iOfst)>p->endpoint.iOffset ){
    return SQLITE_IOERR_SHORT_READ;
  }
  assert( p->readpoint.iOffset==0 || p->readpoint.pChunk!=0 );
  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){
    sqlite3_int64 iOff = 0;
    for(pChunk=p->pFirst;
        ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;
        pChunk=pChunk->pNext
    ){
      iOff += p->nChunkSize;
    }
  }else{
    pChunk = p->readpoint.pChunk;
    assert( pChunk!=0 );
  }

  iChunkOffset = (int)(iOfst%p->nChunkSize);
  do {
    int iSpace = p->nChunkSize - iChunkOffset;
    int nCopy = MIN(nRead, (p->nChunkSize - iChunkOffset));
    memcpy(zOut, (u8*)pChunk->zChunk + iChunkOffset, nCopy);
    zOut += nCopy;
    nRead -= iSpace;
    iChunkOffset = 0;
  } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 );
  p->readpoint.iOffset = pChunk ? iOfst+iAmt : 0;
  p->readpoint.pChunk = pChunk;

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movslq %edx, %rdx
addq %rcx, %rdx
movl $0x20a, %eax            # imm = 0x20A
cmpq 0x20(%rdi), %rdx
jg 0x286d11
movq %rsi, %r14
movq %rdi, %rbx
testq %rcx, %rcx
movq %rdx, (%rsp)
je 0x286c92
cmpq %rcx, 0x30(%rbx)
jne 0x286c92
movq 0x38(%rbx), %r13
jmp 0x286cb2
leaq 0x18(%rbx), %r13
xorl %eax, %eax
movq (%r13), %r13
testq %r13, %r13
je 0x286caf
movslq 0x8(%rbx), %rdx
addq %rdx, %rax
cmpq %rcx, %rax
jle 0x286c98
jmp 0x286cb2
xorl %r13d, %r13d
movslq 0x8(%rbx), %rsi
movq %rcx, %rax
cqto
idivq %rsi
movl 0x8(%rbx), %r12d
subl %edx, %r12d
cmpl %r12d, %ebp
movl %r12d, %eax
cmovll %ebp, %eax
movslq %edx, %rcx
leaq (%rcx,%r13), %rsi
addq $0x8, %rsi
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x17660
subl %r12d, %ebp
js 0x286cfc
movq (%r13), %r13
je 0x286cfc
addq %r15, %r14
xorl %edx, %edx
testq %r13, %r13
jne 0x286cbe
testq %r13, %r13
movq (%rsp), %rax
cmoveq %r13, %rax
movq %rax, 0x30(%rbx)
movq %r13, 0x38(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memjrnlTruncate
static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
  MemJournal *p = (MemJournal *)pJfd;
  if( ALWAYS(size==0) ){
    memjrnlFreeChunks(p);
    p->nSize = 0;
    p->endpoint.pChunk = 0;
    p->endpoint.iOffset = 0;
    p->readpoint.pChunk = 0;
    p->readpoint.iOffset = 0;
  }
  return SQLITE_OK;
}

// Assembly:
testq %rsi, %rsi
jne 0x286f40
pushq %rbx
movq %rdi, %rbx
callq 0x286f50
movl $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memjrnlFreeChunks
static void memjrnlFreeChunks(MemJournal *p){
  FileChunk *pIter;
  FileChunk *pNext;
  for(pIter=p->pFirst; pIter; pIter=pNext){
    pNext = pIter->pNext;
    sqlite3_free(pIter);
  }
  p->pFirst = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0x286f97
movq (%r14), %r15
cmpl $0x0, 0x2346f5(%rip)    # 0x4bb660
je 0x286f86
movq %r14, %rdi
callq *0x234722(%rip)         # 0x4bb698
cltq
subq %rax, 0x237b79(%rip)    # 0x4beaf8
decq 0x237bba(%rip)          # 0x4beb40
movq %r14, %rdi
callq *0x2346f9(%rip)         # 0x4bb688
movq %r15, %r14
testq %r15, %r15
jne 0x286f61
movq $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walWriteOneFrame
static int walWriteOneFrame(
  WalWriter *p,               /* Where to write the frame */
  PgHdr *pPage,               /* The page of the frame to be written */
  int nTruncate,              /* The commit flag.  Usually 0.  >0 for commit */
  sqlite3_int64 iOffset       /* Byte offset at which to write */
){
  int rc;                         /* Result code from subfunctions */
  void *pData;                    /* Data actually written */
  u8 aFrame[WAL_FRAME_HDRSIZE];   /* Buffer to assemble frame-header in */
  pData = pPage->pData;
  walEncodeFrame(p->pWal, pPage->pgno, nTruncate, pData, aFrame);
  rc = walWriteToLog(p, aFrame, sizeof(aFrame), iOffset);
  if( rc ) return rc;
  /* Write the page data */
  rc = walWriteToLog(p, pData, p->szPage, iOffset+sizeof(aFrame));
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
movq %rsp, %r12
movl %edx, %esi
movl %ecx, %edx
movq %r14, %rcx
movq %r12, %r8
callq 0x288887
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
movq %rbx, %rcx
callq 0x288934
testl %eax, %eax
jne 0x287397
movl 0x1c(%r15), %edx
addq $0x18, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x288934
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walIndexWriteHdr
static SQLITE_NO_TSAN void walIndexWriteHdr(Wal *pWal){
  volatile WalIndexHdr *aHdr = walIndexHdr(pWal);
  const int nCksum = offsetof(WalIndexHdr, aCksum);

  assert( pWal->writeLock );
  pWal->hdr.isInit = 1;
  pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
  walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
  /* Possible TSAN false-positive.  See tag-20200519-1 */
  memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
  walShmBarrier(pWal);
  memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq (%rax), %rbx
leaq 0x48(%rdi), %r14
movb $0x1, 0x54(%rdi)
movl $0x2de218, 0x48(%rdi)   # imm = 0x2DE218
xorl %eax, %eax
movl $0x40, %ecx
xorl %edx, %edx
addl %eax, %edx
addl 0x8(%rdi,%rcx), %edx
addl 0xc(%rdi,%rcx), %eax
addl %edx, %eax
addq $0x8, %rcx
cmpq $0x68, %rcx
jb 0x287547
movl %edx, 0x70(%rdi)
movl %eax, 0x74(%rdi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x50(%rbx)
movups %xmm1, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
cmpb $0x2, 0x3f(%rdi)
je 0x28758d
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walIndexClose
static void walIndexClose(Wal *pWal, int isDelete){
  if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE || pWal->bShmUnreliable ){
    int i;
    for(i=0; i<pWal->nWiData; i++){
      sqlite3_free((void *)pWal->apWiData[i]);
      pWal->apWiData[i] = 0;
    }
  }
  if( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE ){
    sqlite3OsShmUnmap(pWal->pDbFd, isDelete);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movb 0x3f(%rdi), %al
cmpb $0x2, %al
je 0x288574
cmpb $0x0, 0x46(%r14)
je 0x2885b1
cmpl $0x0, 0x28(%r14)
jle 0x2885a7
xorl %r15d, %r15d
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x272c00
movq 0x30(%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
movslq 0x28(%r14), %rax
cmpq %rax, %r15
jl 0x28857e
movb 0x3f(%r14), %al
cmpb $0x2, %al
jne 0x2885b1
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x80(%rax), %rax
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WalEndWriteTransaction
SQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal){
  if( pWal->writeLock ){
    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
    pWal->writeLock = 0;
    pWal->iReCksum = 0;
    pWal->truncateOnCommit = 0;
  }
  return SQLITE_OK;
}

// Assembly:
cmpb $0x0, 0x40(%rdi)
je 0x28881c
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x3f(%rdi)
jne 0x28880c
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
xorl %eax, %eax
movb %al, 0x40(%rbx)
movl $0x0, 0x7c(%rbx)
movb %al, 0x43(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walHashGet
static int walHashGet(
  Wal *pWal,                      /* WAL handle */
  int iHash,                      /* Find the iHash'th table */
  WalHashLoc *pLoc                /* OUT: Hash table location */
){
  int rc;                         /* Return code */

  rc = walIndexPage(pWal, iHash, &pLoc->aPgno);
  assert( rc==SQLITE_OK || iHash>0 );

  if( rc==SQLITE_OK ){
    pLoc->aHash = (volatile ht_slot *)&pLoc->aPgno[HASHTABLE_NPAGE];
    if( iHash==0 ){
      pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
      pLoc->iZero = 0;
    }else{
      pLoc->iZero = HASHTABLE_NPAGE_ONE + (iHash-1)*HASHTABLE_NPAGE;
    }
    pLoc->aPgno = &pLoc->aPgno[-1];
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
leaq 0x8(%rdx), %r14
cmpl %esi, 0x28(%rdi)
jle 0x288842
movq 0x30(%rdi), %rax
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%r14)
testq %rax, %rax
jne 0x288853
movl %ebp, %esi
movq %r14, %rdx
callq 0x2885c8
testl %eax, %eax
jne 0x288882
movq (%r14), %rax
leaq 0x4000(%rax), %rcx
movq %rcx, (%rbx)
movl %ebp, %ecx
shll $0xc, %ecx
addl $-0x22, %ecx
leaq 0x88(%rax), %rdx
testl %ebp, %ebp
cmovneq %rax, %rdx
cmovel %ebp, %ecx
movl %ecx, 0x10(%rbx)
addq $-0x4, %rdx
movq %rdx, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walEncodeFrame
static void walEncodeFrame(
  Wal *pWal,                      /* The write-ahead log */
  u32 iPage,                      /* Database page number for frame */
  u32 nTruncate,                  /* New db size (or 0 for non-commit frames) */
  u8 *aData,                      /* Pointer to page data */
  u8 *aFrame                      /* OUT: Write encoded frame here */
){
  int nativeCksum;                /* True for native byte-order checksums */
  u32 *aCksum = pWal->hdr.aFrameCksum;
  assert( WAL_FRAME_HDRSIZE==24 );
  sqlite3Put4byte(&aFrame[0], iPage);
  sqlite3Put4byte(&aFrame[4], nTruncate);
  if( pWal->iReCksum==0 ){
    memcpy(&aFrame[8], pWal->hdr.aSalt, 8);

    nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
    walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
    walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);

    sqlite3Put4byte(&aFrame[16], aCksum[0]);
    sqlite3Put4byte(&aFrame[20], aCksum[1]);
  }else{
    memset(&aFrame[8], 0, 16);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movl %esi, %eax
movl %esi, %ecx
shrl $0x18, %ecx
movb %cl, (%r8)
movl %esi, %ecx
shrl $0x10, %ecx
movb %cl, 0x1(%r8)
movb %ah, 0x2(%rbx)
movb %al, 0x3(%r8)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%r8)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x5(%r8)
movb %dh, 0x6(%rbx)
movb %dl, 0x7(%r8)
cmpl $0x0, 0x7c(%rdi)
je 0x2888d7
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
jmp 0x28892b
movq %rdi, %r14
leaq 0x60(%rdi), %r12
movq 0x68(%rdi), %rax
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
cmpb $0x0, 0x55(%rdi)
sete %bpl
movl %ebp, %edi
movq %rbx, %rsi
movl $0x8, %edx
movq %r12, %rcx
movq %r12, %r8
callq 0x28717d
movl 0x38(%r14), %edx
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rcx
movq %r12, %r8
callq 0x28717d
movl 0x60(%r14), %eax
bswapl %eax
movl %eax, 0x10(%rbx)
movl 0x64(%r14), %eax
bswapl %eax
movl %eax, 0x14(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: backupUpdate
static SQLITE_NOINLINE void backupUpdate(
  sqlite3_backup *p,
  Pgno iPage,
  const u8 *aData
){
  assert( p!=0 );
  do{
    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
    if( !isFatalError(p->rc) && iPage<p->iNext ){
      /* The backup process p has already copied page iPage. But now it
      ** has been modified by a transaction on the source pager. Copy
      ** the new data into the backup.
      */
      int rc;
      assert( p->pDestDb );
      sqlite3_mutex_enter(p->pDestDb->mutex);
      rc = backupOnePage(p, iPage, aData, 1);
      sqlite3_mutex_leave(p->pDestDb->mutex);
      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
      if( rc!=SQLITE_OK ){
        p->rc = rc;
      }
    }
  }while( (p = p->pNext)!=0 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x61, %r15d
movl 0x30(%r14), %eax
cmpl $0x6, %eax
ja 0x288a8e
btl %eax, %r15d
jae 0x288a8e
cmpl %ebp, 0x18(%r14)
jbe 0x288a8e
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x2771c4
testl %eax, %eax
je 0x288a8e
movl %eax, 0x30(%r14)
movq 0x40(%r14), %r14
testq %r14, %r14
jne 0x288a5f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PagerExclusiveLock
SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager *pPager){
  int rc = pPager->errCode;
  assert( assert_pager_state(pPager) );
  if( rc==SQLITE_OK ){
    assert( pPager->eState==PAGER_WRITER_CACHEMOD
         || pPager->eState==PAGER_WRITER_DBMOD
         || pPager->eState==PAGER_WRITER_LOCKED
    );
    assert( assert_pager_state(pPager) );
    if( 0==pagerUseWal(pPager) ){
      rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
    }
  }
  return rc;
}

// Assembly:
movl 0x2c(%rdi), %eax
testl %eax, %eax
je 0x288aaa
retq
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x0, 0x120(%rdi)
jne 0x288ae6
jmp 0x288acd
movq 0xe8(%rbx), %rdi
callq *0xe0(%rbx)
testl %eax, %eax
je 0x288ae1
movq %rbx, %rdi
movl $0x4, %esi
callq 0x288c38
cmpl $0x5, %eax
je 0x288abc
jmp 0x288ae6
movl $0x5, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pagerLockDb
static int pagerLockDb(Pager *pPager, int eLock){
  int rc = SQLITE_OK;

  assert( eLock==SHARED_LOCK || eLock==RESERVED_LOCK || eLock==EXCLUSIVE_LOCK );
  if( pPager->eLock<eLock || pPager->eLock==UNKNOWN_LOCK ){
    rc = pPager->noLock ? SQLITE_OK : sqlite3OsLock(pPager->fd, eLock);
    if( rc==SQLITE_OK && (pPager->eLock!=UNKNOWN_LOCK||eLock==EXCLUSIVE_LOCK) ){
      pPager->eLock = (u8)eLock;
      IOTRACE(("LOCK %p %d\n", pPager, eLock))
    }
  }
  return rc;
}

// Assembly:
movzbl 0x15(%rdi), %eax
cmpl $0x5, %eax
setne %cl
cmpl %esi, %eax
setge %dl
testb %dl, %cl
jne 0x288c6b
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x0, 0x11(%rdi)
je 0x288c6e
cmpl $0x4, %ebx
je 0x288c63
cmpb $0x5, %al
je 0x288c67
movb %bl, 0x15(%r14)
xorl %eax, %eax
jmp 0x288c7e
xorl %eax, %eax
retq
movq 0x48(%r14), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x38(%rax)
testl %eax, %eax
je 0x288c86
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb 0x15(%r14), %al
jmp 0x288c5a
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Free
static void pcache1Free(void *p){
  if( p==0 ) return;
  if( SQLITE_WITHIN(p, pcache1.pStart, pcache1.pEnd) ){
    PgFreeslot *pSlot;
    sqlite3_mutex_enter(pcache1.mutex);
    sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_USED, 1);
    pSlot = (PgFreeslot*)p;
    pSlot->pNext = pcache1.pFree;
    pcache1.pFree = pSlot;
    pcache1.nFreeSlot++;
    pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve;
    assert( pcache1.nFreeSlot<=pcache1.nSlot );
    sqlite3_mutex_leave(pcache1.mutex);
  }else{
    assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
    sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
    {
      int nFreed = 0;
      nFreed = sqlite3MallocSize(p);
      sqlite3_mutex_enter(pcache1.mutex);
      sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
      sqlite3_mutex_leave(pcache1.mutex);
    }
#endif
    sqlite3_free(p);
  }
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x288d6f
movq %rdi, %rbx
cmpq %rdi, 0x2360eb(%rip)    # 0x4bee18
ja 0x288d71
cmpq %rbx, 0x2360ea(%rip)    # 0x4bee20
jbe 0x288d71
decq 0x235dc1(%rip)          # 0x4beb00
movq 0x2360ea(%rip), %rax    # 0x4bee30
movq %rax, (%rbx)
movq %rbx, 0x2360e0(%rip)    # 0x4bee30
movl 0x2360e2(%rip), %eax    # 0x4bee38
incl %eax
movl %eax, 0x2360da(%rip)    # 0x4bee38
xorl %ecx, %ecx
cmpl 0x2360ae(%rip), %eax    # 0x4bee14
setl %cl
movl %ecx, 0x2360cd(%rip)    # 0x4bee3c
popq %rbx
retq
movq %rbx, %rdi
callq *0x23291e(%rip)         # 0x4bb698
cltq
subq %rax, 0x235d85(%rip)    # 0x4beb08
cmpl $0x0, 0x2328d6(%rip)    # 0x4bb660
je 0x288da5
movq %rbx, %rdi
callq *0x232903(%rip)         # 0x4bb698
cltq
subq %rax, 0x235d5a(%rip)    # 0x4beaf8
decq 0x235d9b(%rip)          # 0x4beb40
movq %rbx, %rdi
popq %rbx
jmpq *0x2328d9(%rip)         # 0x4bb688
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PagerLookup
SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
  sqlite3_pcache_page *pPage;
  assert( pPager!=0 );
  assert( pgno!=0 );
  assert( pPager->pPCache!=0 );
  pPage = sqlite3PcacheFetch(pPager->pPCache, pgno, 0);
  assert( pPage==0 || pPager->hasHeldSharedLock );
  if( pPage==0 ) return 0;
  return sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pPage);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x118(%rdi), %rax
movq 0x40(%rax), %rdi
xorl %edx, %edx
callq *0x2324eb(%rip)         # 0x4bb740
testq %rax, %rax
je 0x28926f
movq 0x118(%r14), %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x289279
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheDrop
SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
  assert( p->nRef==1 );
  assert( sqlite3PcachePageSanity(p) );
  if( p->flags&PGHDR_DIRTY ){
    pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
  }
  p->pCache->nRefSum--;
  sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x2, 0x34(%rdi)
je 0x2893bb
movq %rbx, %rdi
movl $0x1, %esi
callq 0x288c8c
movq 0x18(%rbx), %rax
decl 0x18(%rax)
movq 0x23237f(%rip), %rcx    # 0x4bb748
movq 0x40(%rax), %rdi
movq (%rbx), %rsi
movl $0x1, %edx
popq %rbx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheRelease
SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
  assert( p->nRef>0 );
  p->pCache->nRefSum--;
  if( (--p->nRef)==0 ){
    if( p->flags&PGHDR_CLEAN ){
      pcacheUnpin(p);
    }else{
      pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
    }
  }
}

// Assembly:
movq 0x18(%rdi), %rax
decl 0x18(%rax)
decw 0x36(%rdi)
je 0x28abde
retq
testb $0x1, 0x34(%rdi)
jne 0x28abee
movl $0x3, %esi
jmp 0x288c8c
cmpb $0x0, 0x2c(%rax)
je 0x28abdd
movq 0x230b4d(%rip), %rcx    # 0x4bb748
movq 0x40(%rax), %rax
movq (%rdi), %rsi
movq %rax, %rdi
xorl %edx, %edx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheMakeDirty
SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
  assert( p->nRef>0 );
  assert( sqlite3PcachePageSanity(p) );
  if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){    /*OPTIMIZATION-IF-FALSE*/
    p->flags &= ~PGHDR_DONT_WRITE;
    if( p->flags & PGHDR_CLEAN ){
      p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);
      pcacheTrace(("%p.DIRTY %d\n",p->pCache,p->pgno));
      assert( (p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY );
      pcacheManageDirtyList(p, PCACHE_DIRTYLIST_ADD);
    }
    assert( sqlite3PcachePageSanity(p) );
  }
}

// Assembly:
movzwl 0x34(%rdi), %eax
testb $0x11, %al
je 0x28ac4e
movl %eax, %ecx
andl $0xffef, %ecx           # imm = 0xFFEF
movw %cx, 0x34(%rdi)
testb $0x1, %al
jne 0x28ac4f
retq
xorl $0x3, %ecx
movw %cx, 0x34(%rdi)
movl $0x2, %esi
jmp 0x288c8c
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: readSuperJournal
static int readSuperJournal(sqlite3_file *pJrnl, char *zSuper, u32 nSuper){
  int rc;                    /* Return code */
  u32 len;                   /* Length in bytes of super-journal name */
  i64 szJ;                   /* Total size in bytes of journal file pJrnl */
  u32 cksum;                 /* MJ checksum value read from journal */
  u32 u;                     /* Unsigned loop counter */
  unsigned char aMagic[8];   /* A buffer to hold the magic header */
  zSuper[0] = '\0';

  if( SQLITE_OK!=(rc = sqlite3OsFileSize(pJrnl, &szJ))
   || szJ<16
   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))
   || len>=nSuper
   || len>szJ-16
   || len==0
   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))
   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))
   || memcmp(aMagic, aJournalMagic, 8)
   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, zSuper, len, szJ-16-len))
  ){
    return rc;
  }

  /* See if the checksum matches the super-journal name */
  for(u=0; u<len; u++){
    cksum -= zSuper[u];
  }
  if( cksum ){
    /* If the checksum doesn't add up, then one or more of the disk sectors
    ** containing the super-journal filename is corrupted. This means
    ** definitely roll back, so just return SQLITE_OK and report a (nul)
    ** super-journal filename.
    */
    len = 0;
  }
  zSuper[len] = '\0';
  zSuper[len+1] = '\0';

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r15
movb $0x0, (%rsi)
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq *0x30(%rax)
movl %eax, %ebp
testl %eax, %eax
setne %al
movq (%r14), %rsi
cmpq $0x10, %rsi
setl %cl
orb %al, %cl
jne 0x28acd9
addq $-0x10, %rsi
leaq 0x14(%rsp), %rdx
movq %r15, %rdi
callq 0x28ac09
testl %eax, %eax
je 0x28acb4
movl %eax, %ebp
jmp 0x28acd9
movl 0x14(%rsp), %r14d
xorl %ebp, %ebp
cmpl %r12d, %r14d
jae 0x28acd9
movq 0x8(%rsp), %rsi
leaq -0x10(%rsi), %rax
cmpq %r14, %rax
setl %al
testq %r14, %r14
sete %cl
orb %al, %cl
je 0x28ace8
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $-0xc, %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x28ac09
testl %eax, %eax
jne 0x28acb0
movq 0x8(%rsp), %rcx
addq $-0x8, %rcx
movq (%r15), %rax
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq *0x10(%rax)
testl %eax, %eax
jne 0x28acb0
movabsq $-0x289c5edf06fa2a27, %rax # imm = 0xD763A120F905D5D9
cmpq %rax, 0x18(%rsp)
jne 0x28acd9
movq 0x8(%rsp), %rcx
subq %r14, %rcx
addq $-0x10, %rcx
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq *0x10(%rax)
testl %eax, %eax
jne 0x28acb0
movl 0x10(%rsp), %eax
xorl %ecx, %ecx
movsbl (%rbx,%rcx), %edx
subl %edx, %eax
incq %rcx
cmpq %rcx, %r14
jne 0x28ad57
xorl %ebp, %ebp
testl %eax, %eax
cmovnel %ebp, %r14d
movb %bpl, (%rbx,%r14)
incl %r14d
movb %bpl, (%rbx,%r14)
jmp 0x28acd9
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheTruncate
SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
  if( pCache->pCache ){
    PgHdr *p;
    PgHdr *pNext;
    pcacheTrace(("%p.TRUNCATE %d\n",pCache,pgno));
    for(p=pCache->pDirty; p; p=pNext){
      pNext = p->pDirtyNext;
      /* This routine never gets call with a positive pgno except right
      ** after sqlite3PcacheCleanAll().  So if there are dirty pages,
      ** it must be that pgno==0.
      */
      assert( p->pgno>0 );
      if( p->pgno>pgno ){
        assert( p->flags&PGHDR_DIRTY );
        sqlite3PcacheMakeClean(p);
      }
    }
    if( pgno==0 && pCache->nRefSum ){
      sqlite3_pcache_page *pPage1;
      pPage1 = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache,1,0);
      if( ALWAYS(pPage1) ){  /* Page 1 is always available in cache, because
                             ** pCache->nRefSum>0 */
        memset(pPage1->pBuf, 0, pCache->szPage);
        pgno = 1;
      }
    }
    sqlite3GlobalConfig.pcache2.xTruncate(pCache->pCache, pgno+1);
  }
}

// Assembly:
cmpq $0x0, 0x40(%rdi)
je 0x28ae9c
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x28ae83
movq 0x38(%rdi), %r14
cmpl %ebp, 0x30(%rdi)
jbe 0x28ae7b
callq 0x286b24
movq %r14, %rdi
testq %r14, %r14
jne 0x28ae6d
testl %ebp, %ebp
je 0x28ae9d
movq 0x2308ca(%rip), %rax    # 0x4bb758
movq 0x40(%rbx), %rdi
incl %ebp
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
retq
cmpl $0x0, 0x18(%rbx)
je 0x28aed0
movq 0x40(%rbx), %rdi
xorl %ebp, %ebp
movl $0x1, %esi
xorl %edx, %edx
callq *0x23088a(%rip)         # 0x4bb740
testq %rax, %rax
je 0x28ae87
movq (%rax), %rdi
movslq 0x24(%rbx), %rdx
xorl %esi, %esi
callq 0x173a0
movl $0x1, %ebp
jmp 0x28ae87
xorl %ebp, %ebp
jmp 0x28ae87
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: releaseAllSavepoints
static void releaseAllSavepoints(Pager *pPager){
  int ii;               /* Iterator for looping through Pager.aSavepoint */
  for(ii=0; ii<pPager->nSavepoint; ii++){
    sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
  }
  if( !pPager->exclusiveMode || sqlite3JournalIsInMemory(pPager->sjfd) ){
    sqlite3OsClose(pPager->sjfd);
  }
  sqlite3_free(pPager->aSavepoint);
  pPager->aSavepoint = 0;
  pPager->nSavepoint = 0;
  pPager->nSubRec = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x80(%rdi)
jle 0x28af0e
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x78(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x28a41d
incq %r15
movslq 0x80(%rbx), %rax
addq $0x30, %r14
cmpq %rax, %r15
jl 0x28aeee
cmpb $0x0, 0x8(%rbx)
movq 0x58(%rbx), %r14
movq (%r14), %rax
je 0x28af59
leaq 0x22bbee(%rip), %rcx    # 0x4b6b10
cmpq %rcx, %rax
movq %rcx, %rax
jne 0x28af37
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, (%r14)
movq 0x78(%rbx), %rdi
callq 0x272c00
movq $0x0, 0x78(%rbx)
xorl %eax, %eax
movl %eax, 0x80(%rbx)
movl %eax, 0x38(%rbx)
popq %rbx
popq %r14
popq %r15
retq
testq %rax, %rax
jne 0x28af2a
jmp 0x28af37
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pagerFlushOnCommit
static int pagerFlushOnCommit(Pager *pPager, int bCommit){
  if( pPager->tempFile==0 ) return 1;
  if( !bCommit ) return 0;
  if( !isOpen(pPager->fd) ) return 0;
  return (sqlite3PCachePercentDirty(pPager->pPCache)>=25);
}

// Assembly:
cmpb $0x0, 0x10(%rdi)
je 0x28afb9
xorl %eax, %eax
testl %esi, %esi
je 0x28afbe
movq 0x48(%rdi), %rcx
cmpq $0x0, (%rcx)
je 0x28afbe
movq 0x118(%rdi), %rsi
movslq 0x1c(%rsi), %rcx
testq %rcx, %rcx
jns 0x28afa3
shlq $0xa, %rcx
negq %rcx
movslq 0x24(%rsi), %rax
movslq 0x28(%rsi), %rdi
addq %rax, %rdi
movq %rcx, %rax
cqto
idivq %rdi
movq %rax, %rcx
movq (%rsi), %rsi
xorl %eax, %eax
xorl %edx, %edx
testq %rsi, %rsi
je 0x28afbf
movq 0x38(%rsi), %rsi
addq $0x64, %rdx
jmp 0x28afaa
movl $0x1, %eax
retq
testl %ecx, %ecx
je 0x28afbe
movslq %ecx, %rcx
movq %rdx, %rax
cqto
idivq %rcx
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x19, %ecx
setge %al
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pagerUnlockDb
static int pagerUnlockDb(Pager *pPager, int eLock){
  int rc = SQLITE_OK;

  assert( !pPager->exclusiveMode || pPager->eLock==eLock );
  assert( eLock==NO_LOCK || eLock==SHARED_LOCK );
  assert( eLock!=NO_LOCK || pagerUseWal(pPager)==0 );
  if( isOpen(pPager->fd) ){
    assert( pPager->eLock>=eLock );
    rc = pPager->noLock ? SQLITE_OK : sqlite3OsUnlock(pPager->fd, eLock);
    if( pPager->eLock!=UNKNOWN_LOCK ){
      pPager->eLock = (u8)eLock;
    }
    IOTRACE(("UNLOCK %p %d\n", pPager, eLock))
  }
  pPager->changeCountDone = pPager->tempFile; /* ticket fb3b3024ea238d5c */
  return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x28b003
movl %esi, %ebp
cmpb $0x0, 0x11(%rbx)
jne 0x28aff9
movl %ebp, %esi
callq *0x40(%rax)
cmpb $0x5, 0x15(%rbx)
je 0x28b003
movb %bpl, 0x15(%rbx)
movb 0x10(%rbx), %al
movb %al, 0x16(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: decodeFlags
static int decodeFlags(MemPage *pPage, int flagByte){
  BtShared *pBt;     /* A copy of pPage->pBt */

  assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );
  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  pPage->leaf = (u8)(flagByte>>3);  assert( PTF_LEAF == 1<<3 );
  flagByte &= ~PTF_LEAF;
  pPage->childPtrSize = 4-4*pPage->leaf;
  pPage->xCellSize = cellSizePtr;
  pBt = pPage->pBt;
  if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
    /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an
    ** interior table b-tree page. */
    assert( (PTF_LEAFDATA|PTF_INTKEY)==5 );
    /* EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) means the page is a
    ** leaf table b-tree page. */
    assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 );
    pPage->intKey = 1;
    if( pPage->leaf ){
      pPage->intKeyLeaf = 1;
      pPage->xParseCell = btreeParseCellPtr;
    }else{
      pPage->intKeyLeaf = 0;
      pPage->xCellSize = cellSizePtrNoPayload;
      pPage->xParseCell = btreeParseCellPtrNoPayload;
    }
    pPage->maxLocal = pBt->maxLeaf;
    pPage->minLocal = pBt->minLeaf;
  }else if( flagByte==PTF_ZERODATA ){
    /* EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an
    ** interior index b-tree page. */
    assert( (PTF_ZERODATA)==2 );
    /* EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a
    ** leaf index b-tree page. */
    assert( (PTF_ZERODATA|PTF_LEAF)==10 );
    pPage->intKey = 0;
    pPage->intKeyLeaf = 0;
    pPage->xParseCell = btreeParseCellPtrIndex;
    pPage->maxLocal = pBt->maxLocal;
    pPage->minLocal = pBt->minLocal;
  }else{
    /* EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is
    ** an error. */
    return SQLITE_CORRUPT_PAGE(pPage);
  }
  pPage->max1bytePayload = pBt->max1bytePayload;
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movl %esi, %r8d
shrl $0x3, %r8d
movb %r8b, 0x8(%rdi)
andl $-0x9, %esi
movl %r8d, %eax
shll $0x2, %eax
movb $0x4, %cl
subb %al, %cl
movb %cl, 0xa(%rdi)
leaq 0x179(%rip), %rax       # 0x28b2bc
movq %rax, 0x78(%rdi)
movq 0x48(%rdi), %rax
cmpl $0x2, %esi
je 0x28b174
cmpl $0x5, %esi
jne 0x28b18b
movb $0x1, 0x2(%rdi)
movl $0x30, %ecx
movl $0x2e, %edx
testb %r8b, %r8b
je 0x28b1b8
leaq 0x1f7(%rip), %rsi       # 0x28b366
movb $0x1, %r8b
jmp 0x28b1cd
movb $0x0, 0x2(%rdi)
movl $0x2c, %ecx
movl $0x2a, %edx
leaq 0x2eb(%rip), %rsi       # 0x28b474
jmp 0x28b1ca
leaq 0x14aa39(%rip), %rsi    # 0x3d5bcb
leaq 0x14ab43(%rip), %rdx    # 0x3d5cdc
leaq 0x14a891(%rip), %r8     # 0x3d5a31
movl $0xb, %ebx
movl $0xb, %edi
movl $0x10325, %ecx          # imm = 0x10325
xorl %eax, %eax
callq 0x274d08
jmp 0x28b1f0
leaq 0x26c(%rip), %rsi       # 0x28b42b
movq %rsi, 0x78(%rdi)
leaq 0x27a(%rip), %rsi       # 0x28b444
xorl %r8d, %r8d
movb %r8b, 0x3(%rdi)
movq %rsi, 0x80(%rdi)
movzwl (%rax,%rdx), %edx
movw %dx, 0xe(%rdi)
movzwl (%rax,%rcx), %ecx
movw %cx, 0x10(%rdi)
movb 0x25(%rax), %al
movb %al, 0xb(%rdi)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeCellSizeCheck
static SQLITE_NOINLINE int btreeCellSizeCheck(MemPage *pPage){
  int iCellFirst;    /* First allowable cell or freeblock offset */
  int iCellLast;     /* Last possible cell or freeblock offset */
  int i;             /* Index into the cell pointer array */
  int sz;            /* Size of a cell */
  int pc;            /* Address of a freeblock within pPage->aData[] */
  u8 *data;          /* Equal to pPage->aData */
  int usableSize;    /* Maximum usable space on the page */
  int cellOffset;    /* Start of cell content area */

  iCellFirst = pPage->cellOffset + 2*pPage->nCell;
  usableSize = pPage->pBt->usableSize;
  iCellLast = usableSize - 4;
  data = pPage->aData;
  cellOffset = pPage->cellOffset;
  if( !pPage->leaf ) iCellLast--;
  for(i=0; i<pPage->nCell; i++){
    pc = get2byteAligned(&data[cellOffset+i*2]);
    testcase( pc==iCellFirst );
    testcase( pc==iCellLast );
    if( pc<iCellFirst || pc>iCellLast ){
      return SQLITE_CORRUPT_PAGE(pPage);
    }
    sz = pPage->xCellSize(pPage, &data[pc]);
    testcase( pc+sz==usableSize );
    if( pc+sz>usableSize ){
      return SQLITE_CORRUPT_PAGE(pPage);
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzwl 0x18(%rdi), %eax
movq 0x48(%rdi), %rcx
movl 0x38(%rcx), %r14d
cmpb $0x1, 0x8(%rdi)
movl %r14d, 0x4(%rsp)
sbbl $0x0, %r14d
testl %eax, %eax
je 0x28b27c
movq %rdi, %rbx
movzwl 0x12(%rdi), %ecx
addl $-0x4, %r14d
leal (%rcx,%rax,2), %eax
movl %eax, (%rsp)
movq 0x50(%rdi), %r12
leaq (%rcx,%r12), %r13
incq %r13
xorl %ebp, %ebp
movzwl -0x1(%r13,%rbp,2), %eax
rolw $0x8, %ax
movzwl %ax, %r15d
movl $0x10396, %ecx          # imm = 0x10396
cmpl (%rsp), %r15d
jb 0x28b285
cmpl %r14d, %r15d
jg 0x28b285
movl %r15d, %esi
addq %r12, %rsi
movq %rbx, %rdi
callq *0x78(%rbx)
movzwl %ax, %eax
addl %r15d, %eax
cmpl 0x4(%rsp), %eax
jg 0x28b280
incq %rbp
movzwl 0x18(%rbx), %eax
cmpq %rax, %rbp
jb 0x28b23a
xorl %ebx, %ebx
jmp 0x28b2ab
movl $0x1039b, %ecx          # imm = 0x1039B
leaq 0x14a93f(%rip), %rsi    # 0x3d5bcb
leaq 0x14aa49(%rip), %rdx    # 0x3d5cdc
leaq 0x14a797(%rip), %r8     # 0x3d5a31
movl $0xb, %ebx
movl $0xb, %edi
xorl %eax, %eax
callq 0x274d08
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: cellSizePtr
static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
  u8 *pIter = pCell + pPage->childPtrSize; /* For looping over bytes of pCell */
  u8 *pEnd;                                /* End mark for a varint */
  u32 nSize;                               /* Size value to return */

#ifdef SQLITE_DEBUG
  /* The value returned by this function should always be the same as
  ** the (CellInfo.nSize) value found by doing a full parse of the
  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
  ** this function verifies that this invariant is not violated. */
  CellInfo debuginfo;
  pPage->xParseCell(pPage, pCell, &debuginfo);
#endif

  nSize = *pIter;
  if( nSize>=0x80 ){
    pEnd = &pIter[8];
    nSize &= 0x7f;
    do{
      nSize = (nSize<<7) | (*++pIter & 0x7f);
    }while( *(pIter)>=0x80 && pIter<pEnd );
  }
  pIter++;
  if( pPage->intKey ){
    /* pIter now points at the 64-bit integer key value, a variable length
    ** integer. The following block moves pIter to point at the first byte
    ** past the end of the key value. */
    pEnd = &pIter[9];
    while( (*pIter++)&0x80 && pIter<pEnd );
  }
  testcase( nSize==pPage->maxLocal );
  testcase( nSize==pPage->maxLocal+1 );
  if( nSize<=pPage->maxLocal ){
    nSize += (u32)(pIter - pCell);
    if( nSize<4 ) nSize = 4;
  }else{
    int minLocal = pPage->minLocal;
    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);
    testcase( nSize==pPage->maxLocal );
    testcase( nSize==pPage->maxLocal+1 );
    if( nSize>pPage->maxLocal ){
      nSize = minLocal;
    }
    nSize += 4 + (u16)(pIter - pCell);
  }
  assert( nSize==debuginfo.nSize || CORRUPT_DB );
  return (u16)nSize;
}

// Assembly:
movzbl 0xa(%rdi), %eax
leaq (%rsi,%rax), %rcx
movzbl (%rsi,%rax), %eax
testb %al, %al
jns 0x28b2fb
andl $0x7f, %eax
xorl %edx, %edx
movq %rdx, %r9
movl %eax, %r10d
shll $0x7, %r10d
movzbl 0x1(%rcx,%rdx), %r8d
incq %rdx
movl %r8d, %eax
andl $0x7f, %eax
orl %r10d, %eax
cmpq $0x6, %r9
ja 0x28b2f8
testb %r8b, %r8b
js 0x28b2d1
addq %rdx, %rcx
cmpb $0x0, 0x2(%rdi)
je 0x28b31e
movl $0x1, %edx
leaq 0x1(%rdx), %r8
cmpq $0x8, %rdx
ja 0x28b319
cmpb $0x0, (%rcx,%rdx)
movq %r8, %rdx
js 0x28b306
addq %r8, %rcx
jmp 0x28b321
incq %rcx
movzwl 0xe(%rdi), %r8d
cmpl %r8d, %eax
jbe 0x28b354
movzwl 0x10(%rdi), %r9d
subl %r9d, %eax
movq 0x48(%rdi), %rdx
movl 0x38(%rdx), %edi
addl $-0x4, %edi
xorl %edx, %edx
divl %edi
addl %r9d, %edx
cmpl %r8d, %edx
cmoval %r9d, %edx
subl %esi, %ecx
addl %edx, %ecx
addl $0x4, %ecx
jmp 0x28b363
subl %esi, %ecx
addl %ecx, %eax
cmpl $0x5, %eax
movl $0x4, %ecx
cmovael %eax, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeParseCellPtrIndex
static void btreeParseCellPtrIndex(
  MemPage *pPage,         /* Page containing the cell */
  u8 *pCell,              /* Pointer to the cell text. */
  CellInfo *pInfo         /* Fill in this structure */
){
  u8 *pIter;              /* For scanning through pCell */
  u32 nPayload;           /* Number of bytes of cell payload */

  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  assert( pPage->leaf==0 || pPage->leaf==1 );
  assert( pPage->intKeyLeaf==0 );
  pIter = pCell + pPage->childPtrSize;
  nPayload = *pIter;
  if( nPayload>=0x80 ){
    u8 *pEnd = &pIter[8];
    nPayload &= 0x7f;
    do{
      nPayload = (nPayload<<7) | (*++pIter & 0x7f);
    }while( *(pIter)>=0x80 && pIter<pEnd );
  }
  pIter++;
  pInfo->nKey = nPayload;
  pInfo->nPayload = nPayload;
  pInfo->pPayload = pIter;
  testcase( nPayload==pPage->maxLocal );
  testcase( nPayload==pPage->maxLocal+1 );
  if( nPayload<=pPage->maxLocal ){
    /* This is the (easy) common case where the entire payload fits
    ** on the local page.  No overflow is required.
    */
    pInfo->nSize = nPayload + (u16)(pIter - pCell);
    if( pInfo->nSize<4 ) pInfo->nSize = 4;
    pInfo->nLocal = (u16)nPayload;
  }else{
    btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
  }
}

// Assembly:
movzbl 0xa(%rdi), %ecx
leaq (%rsi,%rcx), %rax
movzbl (%rsi,%rcx), %ecx
testb %cl, %cl
jns 0x28b4b4
andl $0x7f, %ecx
xorl %r8d, %r8d
movq %r8, %r10
movl %ecx, %r11d
shll $0x7, %r11d
movzbl 0x1(%rax,%r8), %r9d
incq %r8
movl %r9d, %ecx
andl $0x7f, %ecx
orl %r11d, %ecx
cmpq $0x6, %r10
ja 0x28b4b1
testb %r9b, %r9b
js 0x28b48a
addq %r8, %rax
incq %rax
movl %ecx, %r8d
movq %r8, (%rdx)
movl %ecx, 0x10(%rdx)
movq %rax, 0x8(%rdx)
movzwl 0xe(%rdi), %r8d
cmpl %r8d, %ecx
ja 0x28b4e8
subl %esi, %eax
addl %ecx, %eax
testl $0xfffc, %eax           # imm = 0xFFFC
movl $0x4, %esi
cmovnel %eax, %esi
movw %si, 0x16(%rdx)
movw %cx, 0x14(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Alloc
static void *pcache1Alloc(int nByte){
  void *p = 0;
  assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
  if( nByte<=pcache1.szSlot ){
    sqlite3_mutex_enter(pcache1.mutex);
    p = (PgHdr1 *)pcache1.pFree;
    if( p ){
      pcache1.pFree = pcache1.pFree->pNext;
      pcache1.nFreeSlot--;
      pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve;
      assert( pcache1.nFreeSlot>=0 );
      sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
      sqlite3StatusUp(SQLITE_STATUS_PAGECACHE_USED, 1);
    }
    sqlite3_mutex_leave(pcache1.mutex);
  }
  if( p==0 ){
    /* Memory is not available in the SQLITE_CONFIG_PAGECACHE pool.  Get
    ** it from sqlite3Malloc instead.
    */
    p = sqlite3Malloc(nByte);
#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
    if( p ){
      int sz = sqlite3MallocSize(p);
      sqlite3_mutex_enter(pcache1.mutex);
      sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
      sqlite3StatusUp(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);
      sqlite3_mutex_leave(pcache1.mutex);
    }
#endif
    sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);
  }
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl %edi, 0x233729(%rip)    # 0x4bee0c
jl 0x28b752
movq 0x233744(%rip), %rbx    # 0x4bee30
testq %rbx, %rbx
je 0x28b752
movq (%rbx), %rax
movq %rax, 0x233735(%rip)    # 0x4bee30
movl 0x233737(%rip), %eax    # 0x4bee38
leal -0x1(%rax), %ecx
movl %ecx, 0x23372e(%rip)    # 0x4bee38
xorl %ecx, %ecx
cmpl 0x233702(%rip), %eax    # 0x4bee14
setle %cl
movl %ecx, 0x233721(%rip)    # 0x4bee3c
movslq %edi, %rax
cmpq %rax, 0x23345b(%rip)    # 0x4beb80
jge 0x28b72e
movq %rax, 0x233452(%rip)    # 0x4beb80
movq 0x2333cb(%rip), %rcx    # 0x4beb00
leaq 0x1(%rcx), %rax
movq %rax, 0x2333c0(%rip)    # 0x4beb00
cmpq 0x233409(%rip), %rcx    # 0x4beb50
jl 0x28b7a2
movq %rax, 0x233400(%rip)    # 0x4beb50
jmp 0x28b7a2
movslq %edi, %r14
movq %r14, %rdi
callq 0x272ae6
testq %rax, %rax
je 0x28b7a0
movq %rax, %rbx
movq %rax, %rdi
callq *0x22ff2a(%rip)         # 0x4bb698
cmpq %r14, 0x23340b(%rip)    # 0x4beb80
jge 0x28b77e
movq %r14, 0x233402(%rip)    # 0x4beb80
cltq
addq 0x233381(%rip), %rax    # 0x4beb08
movq %rax, 0x23337a(%rip)    # 0x4beb08
cmpq 0x2333c3(%rip), %rax    # 0x4beb58
jle 0x28b7a2
movq %rax, 0x2333ba(%rip)    # 0x4beb58
jmp 0x28b7a2
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: databaseIsUnmoved
static int databaseIsUnmoved(Pager *pPager){
  int bHasMoved = 0;
  int rc;

  if( pPager->tempFile ) return SQLITE_OK;
  if( pPager->dbSize==0 ) return SQLITE_OK;
  assert( pPager->zFilename && pPager->zFilename[0] );
  rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_HAS_MOVED, &bHasMoved);
  if( rc==SQLITE_NOTFOUND ){
    /* If the HAS_MOVED file-control is unimplemented, assume that the file
    ** has not been moved.  That is the historical behavior of SQLite: prior to
    ** version 3.8.3, it never checked */
    rc = SQLITE_OK;
  }else if( rc==SQLITE_OK && bHasMoved ){
    rc = SQLITE_READONLY_DBMOVED;
  }
  return rc;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
cmpb $0x0, 0x10(%rdi)
je 0x28b7ca
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x0, 0x1c(%rdi)
je 0x28b7c2
movq 0x48(%rdi), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x28b7c2
leaq 0xc(%rsp), %rdx
movl $0x14, %esi
callq *0x50(%rax)
cmpl $0xc, %eax
je 0x28b7c2
cmpl $0x0, 0xc(%rsp)
movl $0x408, %ebx            # imm = 0x408
cmovel %eax, %ebx
testl %eax, %eax
cmovnel %eax, %ebx
jmp 0x28b7c2
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ConnectionBlocked
SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
  enterMutex();
  if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){
    addToBlockedList(db);
  }
  db->pBlockingConnection = pBlocker;
  leaveMutex();
}

// Assembly:
cmpq $0x0, 0x2d8(%rdi)
jne 0x28c8f6
cmpq $0x0, 0x2e0(%rdi)
jne 0x28c8f6
movq 0x2325af(%rip), %rax    # 0x4bee58
leaq 0x2325a8(%rip), %rcx    # 0x4bee58
testq %rax, %rax
je 0x28c8df
movq 0x2f0(%rdi), %rdx
cmpq %rdx, 0x2f0(%rax)
je 0x28c8ec
movq %rax, %rcx
movq 0x2f8(%rax), %rax
testq %rax, %rax
je 0x28c8e3
cmpq %rdx, 0x2f0(%rax)
jne 0x28c8c5
jmp 0x28c8e5
xorl %eax, %eax
jmp 0x28c8ec
xorl %eax, %eax
addq $0x2f8, %rcx            # imm = 0x2F8
movq %rax, 0x2f8(%rdi)
movq %rdi, (%rcx)
movq %rsi, 0x2d8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: releasePageOne
SQLITE_PRIVATE void sqlite3PagerUnrefPageOne(DbPage *pPg){
  Pager *pPager;
  assert( pPg!=0 );
  assert( pPg->pgno==1 );
  assert( (pPg->flags & PGHDR_MMAP)==0 ); /* Page1 is never memory mapped */
  pPager = pPg->pPager;
  sqlite3PcacheRelease(pPg);
  pagerUnlockIfUnused(pPager);
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rbx
callq 0x28abd0
movq 0x118(%rbx), %rax
cmpl $0x0, 0x18(%rax)
je 0x28cfce
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x2893d8