LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x234c02
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 0x234bff
testb %r8b, %r8b
js 0x234bd8
addq %rdx, %rcx
cmpb $0x0, 0x2(%rdi)
je 0x234c23
pushq $0x1
popq %rdx
leaq 0x1(%rdx), %r8
cmpq $0x8, %rdx
ja 0x234c1e
cmpb $0x0, (%rcx,%rdx)
movq %r8, %rdx
js 0x234c0b
addq %r8, %rcx
jmp 0x234c26
incq %rcx
movzwl 0xe(%rdi), %r8d
cmpl %r8d, %eax
jbe 0x234c59
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 0x234c66
subl %esi, %ecx
addl %ecx, %eax
cmpl $0x5, %eax
pushq $0x4
popq %rcx
cmovael %eax, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x234dab
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 0x234da8
testb %r9b, %r9b
js 0x234d81
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 0x234ddc
subl %esi, %eax
addl %ecx, %eax
testw $0xfffc, %ax            # imm = 0xFFFC
pushq $0x4
popq %rsi
cmovnel %eax, %esi
movw %si, 0x16(%rdx)
movw %cx, 0x14(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x208df5(%rip)    # 0x43ddbc
jl 0x235036
movq 0x208e10(%rip), %rbx    # 0x43dde0
testq %rbx, %rbx
je 0x235036
movq (%rbx), %rax
movq %rax, 0x208e01(%rip)    # 0x43dde0
movl 0x208e03(%rip), %eax    # 0x43dde8
leal -0x1(%rax), %ecx
movl %ecx, 0x208dfa(%rip)    # 0x43dde8
xorl %ecx, %ecx
cmpl 0x208dce(%rip), %eax    # 0x43ddc4
setle %cl
movl %ecx, 0x208ded(%rip)    # 0x43ddec
movslq %edi, %rax
cmpq %rax, 0x208b27(%rip)    # 0x43db30
jge 0x235012
movq %rax, 0x208b1e(%rip)    # 0x43db30
movq 0x208a97(%rip), %rcx    # 0x43dab0
leaq 0x1(%rcx), %rax
movq %rax, 0x208a8c(%rip)    # 0x43dab0
cmpq 0x208ad5(%rip), %rcx    # 0x43db00
jl 0x235086
movq %rax, 0x208acc(%rip)    # 0x43db00
jmp 0x235086
movslq %edi, %r14
movq %r14, %rdi
callq 0x21f6df
testq %rax, %rax
je 0x235084
movq %rax, %rbx
movq %rax, %rdi
callq *0x2055f6(%rip)         # 0x43a648
cmpq %r14, 0x208ad7(%rip)    # 0x43db30
jge 0x235062
movq %r14, 0x208ace(%rip)    # 0x43db30
cltq
addq 0x208a4d(%rip), %rax    # 0x43dab8
movq %rax, 0x208a46(%rip)    # 0x43dab8
cmpq 0x208a8f(%rip), %rax    # 0x43db08
jle 0x235086
movq %rax, 0x208a86(%rip)    # 0x43db08
jmp 0x235086
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
cmpb $0x0, 0x10(%rdi)
je 0x2350ab
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x0, 0x1c(%rdi)
je 0x2350a3
movq 0x48(%rdi), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x2350a3
pushq $0x14
popq %rsi
leaq 0xc(%rsp), %rdx
callq *0x50(%rax)
cmpl $0xc, %eax
je 0x2350a3
cmpl $0x0, 0xc(%rsp)
movl $0x408, %ebx            # imm = 0x408
cmovel %eax, %ebx
testl %eax, %eax
cmovnel %eax, %ebx
jmp 0x2350a3
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x2d8(%rdi)
jne 0x235d81
cmpq $0x0, 0x2e0(%r14)
jne 0x235d81
movq %r14, %rdi
callq 0x22d0af
movq %rbx, 0x2d8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: freeTempSpace
static void freeTempSpace(BtShared *pBt){
  if( pBt->pTmpSpace ){
    pBt->pTmpSpace -= 4;
    sqlite3PageFree(pBt->pTmpSpace);
    pBt->pTmpSpace = 0;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x23647f
addq $-0x4, %rdi
movq %rdi, 0x88(%rbx)
callq 0x232a10
andq $0x0, 0x88(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pagerPagecount
static int pagerPagecount(Pager *pPager, Pgno *pnPage){
  Pgno nPage;                     /* Value to return via *pnPage */

  /* Query the WAL sub-system for the database size. The WalDbsize()
  ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
  ** if the database size is not available. The database size is not
  ** available from the WAL sub-system if the log file is empty or
  ** contains no valid committed transactions.
  */
  assert( pPager->eState==PAGER_OPEN );
  assert( pPager->eLock>=SHARED_LOCK );
  assert( isOpen(pPager->fd) );
  assert( pPager->tempFile==0 );
  nPage = sqlite3WalDbsize(pPager->pWal);

  /* If the number of pages in the database is not available from the
  ** WAL sub-system, determine the page count based on the size of
  ** the database file.  If the size of the database file is not an
  ** integer multiple of the page-size, round up the result.
  */
  if( nPage==0 && ALWAYS(isOpen(pPager->fd)) ){
    i64 n = 0;                    /* Size of db file in bytes */
    int rc = sqlite3OsFileSize(pPager->fd, &n);
    if( rc!=SQLITE_OK ){
      return rc;
    }
    nPage = (Pgno)((n+pPager->pageSize-1) / pPager->pageSize);
  }

  /* If the current number of pages in the file is greater than the
  ** configured maximum pager number, increase the allowed limit so
  ** that the file can be read.
  */
  if( nPage>pPager->mxPgno ){
    pPager->mxPgno = (Pgno)nPage;
  }

  *pnPage = nPage;
  return SQLITE_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x120(%rdi), %rax
testq %rax, %rax
je 0x2364a5
cmpw $0x0, 0x3c(%rax)
js 0x2364a5
movl 0x5c(%rax), %eax
testl %eax, %eax
jne 0x2364d5
movq 0x48(%r14), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x2364e7
movq %rsp, %rsi
andq $0x0, (%rsi)
callq *0x30(%rax)
testl %eax, %eax
jne 0x2364ed
movq (%rsp), %rax
movslq 0xbc(%r14), %rcx
addq %rcx, %rax
decq %rax
cqto
idivq %rcx
cmpl 0xc0(%r14), %eax
jbe 0x2364e9
movl %eax, 0xc0(%r14)
jmp 0x2364e9
xorl %eax, %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreePageFromDbPage
static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
  MemPage *pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);
  if( pgno!=pPage->pgno ){
    pPage->aData = sqlite3PagerGetData(pDbPage);
    pPage->pDbPage = pDbPage;
    pPage->pBt = pBt;
    pPage->pgno = pgno;
    pPage->hdrOffset = pgno==1 ? 100 : 0;
  }
  assert( pPage->aData==sqlite3PagerGetData(pDbPage) );
  return pPage;
}

// Assembly:
movq 0x10(%rdi), %rax
cmpl %esi, 0x4(%rax)
je 0x23651f
movq 0x8(%rdi), %rcx
movq %rcx, 0x50(%rax)
movq %rdi, 0x70(%rax)
movq %rdx, 0x48(%rax)
movl %esi, 0x4(%rax)
xorl %ecx, %ecx
cmpl $0x1, %esi
pushq $0x64
popq %rdx
cmovnel %ecx, %edx
movb %dl, 0x9(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: zeroPage
static void zeroPage(MemPage *pPage, int flags){
  unsigned char *data = pPage->aData;
  BtShared *pBt = pPage->pBt;
  u8 hdr = pPage->hdrOffset;
  u16 first;

  assert( sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno );
  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
  assert( sqlite3PagerGetData(pPage->pDbPage) == data );
  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
  assert( sqlite3_mutex_held(pBt->mutex) );
  if( pBt->btsFlags & BTS_FAST_SECURE ){
    memset(&data[hdr], 0, pBt->usableSize - hdr);
  }
  data[hdr] = (char)flags;
  first = hdr + ((flags&PTF_LEAF)==0 ? 12 : 8);
  memset(&data[hdr+1], 0, 4);
  data[hdr+7] = 0;
  put2byte(&data[hdr+5], pBt->usableSize);
  pPage->nFree = (u16)(pBt->usableSize - first);
  decodeFlags(pPage, flags);
  pPage->cellOffset = first;
  pPage->aDataEnd = &data[pBt->usableSize];
  pPage->aCellIdx = &data[first];
  pPage->aDataOfst = &data[pPage->childPtrSize];
  pPage->nOverflow = 0;
  assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
  pPage->maskPage = (u16)(pBt->pageSize - 1);
  pPage->nCell = 0;
  pPage->isInit = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x48(%rdi), %r14
movq 0x50(%rdi), %r15
movzbl 0x9(%rdi), %r12d
testb $0xc, 0x28(%r14)
je 0x2366f5
leaq (%r15,%r12), %rdi
movl 0x38(%r14), %edx
subl %r12d, %edx
xorl %esi, %esi
callq 0x17380
movb %bpl, (%r15,%r12)
xorl %eax, %eax
testb $0x8, %bpl
sete %al
andl $0x0, 0x1(%r15,%r12)
leal (%r12,%rax,4), %ecx
movq %rcx, (%rsp)
leal (%r12,%rax,4), %r13d
addl $0x8, %r13d
xorl %eax, %eax
movb %al, 0x7(%r15,%r12)
movb 0x39(%r14), %al
movb %al, 0x5(%r15,%r12)
movb 0x38(%r14), %al
movb %al, 0x6(%r15,%r12)
movl 0x38(%r14), %eax
subl %r13d, %eax
movzwl %ax, %eax
movl %eax, 0x14(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x234a71
movw %r13w, 0x12(%rbx)
movl 0x38(%r14), %eax
addq %r15, %rax
movq %rax, 0x58(%rbx)
movq (%rsp), %rax
addq %r15, %rax
addq $0x8, %rax
movq %rax, 0x60(%rbx)
movzbl 0xa(%rbx), %eax
addq %r15, %rax
movq %rax, 0x68(%rbx)
xorl %eax, %eax
movb %al, 0xc(%rbx)
movl 0x34(%r14), %eax
decl %eax
movw %ax, 0x1a(%rbx)
andw $0x0, 0x18(%rbx)
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pagerAddPageToRollbackJournal
static SQLITE_NOINLINE int pagerAddPageToRollbackJournal(PgHdr *pPg){
  Pager *pPager = pPg->pPager;
  int rc;
  u32 cksum;
  char *pData2;
  i64 iOff = pPager->journalOff;

  /* We should never write to the journal file the page that
  ** contains the database locks.  The following assert verifies
  ** that we do not. */
  assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );

  assert( pPager->journalHdr<=pPager->journalOff );
  pData2 = pPg->pData;
  cksum = pager_cksum(pPager, (u8*)pData2);

  /* Even if an IO or diskfull error occurs while journalling the
  ** page in the block above, set the need-sync flag for the page.
  ** Otherwise, when the transaction is rolled back, the logic in
  ** playback_one_page() will think that the page needs to be restored
  ** in the database file. And if an IO error occurs while doing so,
  ** then corruption may follow.
  */
  pPg->flags |= PGHDR_NEED_SYNC;

  rc = write32bits(pPager->jfd, iOff, pPg->pgno);
  if( rc!=SQLITE_OK ) return rc;
  rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
  if( rc!=SQLITE_OK ) return rc;
  rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
  if( rc!=SQLITE_OK ) return rc;

  IOTRACE(("JOUT %p %d %lld %d\n", pPager, pPg->pgno,
           pPager->journalOff, pPager->pageSize));
  PAGER_INCR(sqlite3_pager_writej_count);
  PAGERTRACE(("JOURNAL %d page %d needSync=%d hash(%08x)\n",
       PAGERID(pPager), pPg->pgno,
       ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));

  pPager->journalOff += 8 + pPager->pageSize;
  pPager->nRec++;
  assert( pPager->pInJournal!=0 );
  rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);
  testcase( rc==SQLITE_NOMEM );
  assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
  rc |= addToSavepointBitvecs(pPager, pPg->pgno);
  assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq 0x28(%rdi), %rbx
movq 0x60(%rbx), %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x23456c
orb $0x8, 0x34(%r14)
movl %eax, %ebp
movq 0x50(%rbx), %rdi
movl 0x30(%r14), %edx
movq %r15, %rsi
callq 0x230c64
testl %eax, %eax
jne 0x236c3b
movq 0x50(%rbx), %rdi
movl 0xbc(%rbx), %edx
addq $0x4, %r15
movq (%rdi), %rax
movq %r12, %rsi
movq %r15, %rcx
callq *0x18(%rax)
testl %eax, %eax
jne 0x236c3b
movq 0x50(%rbx), %rdi
movslq 0xbc(%rbx), %rax
addq %rax, %r15
movq %r15, %rsi
movl %ebp, %edx
callq 0x230c64
testl %eax, %eax
jne 0x236c3b
movslq 0xbc(%rbx), %rax
movq 0x40(%rbx), %rdi
movq 0x60(%rbx), %rcx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x60(%rbx)
incl 0x30(%rbx)
movl 0x30(%r14), %esi
callq 0x23101a
movl %eax, %ebp
movl 0x30(%r14), %esi
movq %rbx, %rdi
callq 0x230c7c
orl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: saveAllCursors
static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
  BtCursor *p;
  assert( sqlite3_mutex_held(pBt->mutex) );
  assert( pExcept==0 || pExcept->pBt==pBt );
  for(p=pBt->pCursor; p; p=p->pNext){
    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ) break;
  }
  if( p ) return saveCursorsOnList(p, iRoot, pExcept);
  if( pExcept ) pExcept->curFlags &= ~BTCF_Multiple;
  return SQLITE_OK;
}

// Assembly:
addq $0x10, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x236e3a
cmpq %rdx, %rdi
je 0x236e34
testl %esi, %esi
je 0x23700e
cmpl %esi, 0x50(%rdi)
je 0x23700e
addq $0x28, %rdi
jmp 0x236e16
testq %rdx, %rdx
je 0x236e43
andb $-0x21, 0x1(%rdx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: saveCursorsOnList
static int SQLITE_NOINLINE saveCursorsOnList(
  BtCursor *p,         /* The first cursor that needs saving */
  Pgno iRoot,          /* Only save cursor with this iRoot. Save all if zero */
  BtCursor *pExcept    /* Do not save this cursor */
){
  do{
    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ){
      if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){
        int rc = saveCursorPosition(p);
        if( SQLITE_OK!=rc ){
          return rc;
        }
      }else{
        testcase( p->iPage>=0 );
        btreeReleaseAllCursorPages(p);
      }
    }
    p = p->pNext;
  }while( p );
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
cmpq %rbx, %r14
je 0x237044
testl %ebp, %ebp
je 0x237029
cmpl %ebp, 0x50(%r14)
jne 0x237044
movzbl (%r14), %eax
movq %r14, %rdi
testb $-0x3, %al
jne 0x23703f
callq 0x237054
testl %eax, %eax
je 0x237044
jmp 0x23704f
callq 0x237099
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x23701a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: saveCursorPosition
static int saveCursorPosition(BtCursor *pCur){
  int rc;

  assert( CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState );
  assert( 0==pCur->pKey );
  assert( cursorHoldsMutex(pCur) );

  if( pCur->curFlags & BTCF_Pinned ){
    return SQLITE_CONSTRAINT_PINNED;
  }
  if( pCur->eState==CURSOR_SKIPNEXT ){
    pCur->eState = CURSOR_VALID;
  }else{
    pCur->skipNext = 0;
  }

  rc = saveCursorKey(pCur);
  if( rc==SQLITE_OK ){
    btreeReleaseAllCursorPages(pCur);
    pCur->eState = CURSOR_REQUIRESEEK;
  }

  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl|BTCF_AtLast);
  return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0xb13, %ebp            # imm = 0xB13
testb $0x40, 0x1(%rdi)
jne 0x237090
movq %rdi, %rbx
cmpb $0x2, (%rdi)
jne 0x23706f
movb $0x0, (%rbx)
jmp 0x237073
andl $0x0, 0x4(%rbx)
movq %rbx, %rdi
callq 0x2370e0
movl %eax, %ebp
testl %eax, %eax
jne 0x23708c
movq %rbx, %rdi
callq 0x237099
movb $0x3, (%rbx)
andb $-0xf, 0x1(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeReleaseAllCursorPages
static void btreeReleaseAllCursorPages(BtCursor *pCur){
  int i;
  if( pCur->iPage>=0 ){
    for(i=0; i<pCur->iPage; i++){
      releasePageNotNull(pCur->apPage[i]);
    }
    releasePageNotNull(pCur->pPage);
    pCur->iPage = -1;
  }
}

// Assembly:
movb 0x54(%rdi), %al
testb %al, %al
js 0x2370df
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movsbq %al, %rax
cmpq %rax, %r14
jge 0x2370c8
movq 0x90(%rbx,%r14,8), %rdi
callq 0x2376cc
incq %r14
movb 0x54(%rbx), %al
jmp 0x2370aa
movq 0x88(%rbx), %rdi
callq 0x2376cc
movb $-0x1, 0x54(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: saveCursorKey
static int saveCursorKey(BtCursor *pCur){
  int rc = SQLITE_OK;
  assert( CURSOR_VALID==pCur->eState );
  assert( 0==pCur->pKey );
  assert( cursorHoldsMutex(pCur) );

  if( pCur->curIntKey ){
    /* Only the rowid is required for a table btree */
    pCur->nKey = sqlite3BtreeIntegerKey(pCur);
  }else{
    /* For an index btree, save the complete key content. It is possible
    ** that the current key is corrupt. In that case, it is possible that
    ** the sqlite3VdbeRecordUnpack() function may overread the buffer by
    ** up to the size of 1 varint plus 1 8-byte value when the cursor
    ** position is restored. Hence the 17 bytes of padding allocated
    ** below. */
    void *pKey;
    pCur->nKey = sqlite3BtreePayloadSize(pCur);
    pKey = sqlite3Malloc( pCur->nKey + 9 + 8 );
    if( pKey ){
      rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);
      if( rc==SQLITE_OK ){
        memset(((u8*)pKey)+pCur->nKey, 0, 9+8);
        pCur->pKey = pKey;
      }else{
        sqlite3_free(pKey);
      }
    }else{
      rc = SQLITE_NOMEM_BKPT;
    }
  }
  assert( !pCur->curIntKey || !pCur->pKey );
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x55(%rdi)
je 0x23710b
movq %rbx, %rdi
callq 0x23716d
movq %rax, 0x48(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x23717c
movl %eax, %edi
movq %rdi, 0x48(%rbx)
addq $0x11, %rdi
callq 0x21f6df
testq %rax, %rax
je 0x237150
movq %rax, %r14
movl 0x48(%rbx), %edx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x23718a
testl %eax, %eax
je 0x237155
movl %eax, %r15d
movq %r14, %rdi
callq 0x21f7f9
movl %r15d, %ebp
jmp 0x2370fe
pushq $0x7
popq %rbp
jmp 0x2370fe
movq 0x48(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%r14,%rax)
movb $0x0, 0x10(%r14,%rax)
movq %r14, 0x18(%rbx)
jmp 0x2370fe
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeGetUnusedPage
static int btreeGetUnusedPage(
  BtShared *pBt,       /* The btree */
  Pgno pgno,           /* Number of the page to fetch */
  MemPage **ppPage,    /* Return the page in this parameter */
  int flags            /* PAGER_GET_NOCONTENT or PAGER_GET_READONLY */
){
  int rc = btreeGetPage(pBt, pgno, ppPage, flags);
  if( rc==SQLITE_OK ){
    if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
      releasePage(*ppPage);
      *ppPage = 0;
      return SQLITE_CORRUPT_BKPT;
    }
    (*ppPage)->isInit = 0;
  }else{
    *ppPage = 0;
  }
  return rc;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x23639b
testl %eax, %eax
je 0x238203
andq $0x0, (%rbx)
jmp 0x23822a
movq (%rbx), %rdi
movq 0x70(%rdi), %rax
cmpw $0x2, 0x36(%rax)
jl 0x238225
callq 0x2376c6
andq $0x0, (%rbx)
movl $0x104bb, %edi          # imm = 0x104BB
popq %rbx
jmp 0x232547
movb $0x0, (%rdi)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: setChildPtrmaps
static int setChildPtrmaps(MemPage *pPage){
  int i;                             /* Counter variable */
  int nCell;                         /* Number of cells in page pPage */
  int rc;                            /* Return code */
  BtShared *pBt = pPage->pBt;
  Pgno pgno = pPage->pgno;

  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
  if( rc!=SQLITE_OK ) return rc;
  nCell = pPage->nCell;

  for(i=0; i<nCell; i++){
    u8 *pCell = findCell(pPage, i);

    ptrmapPutOvflPtr(pPage, pPage, pCell, &rc);

    if( !pPage->leaf ){
      Pgno childPgno = get4byte(pCell);
      ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
    }
  }

  if( !pPage->leaf ){
    Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
  }

  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x48(%rdi), %r14
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsp)
cmpb $0x0, (%rdi)
je 0x2382f0
andl $0x0, (%rsp)
movzwl 0x18(%r15), %ebp
xorl %ebx, %ebx
movq %rsp, %r12
cmpq %rbx, %rbp
je 0x2382ba
movzwl 0x1a(%r15), %eax
movq 0x60(%r15), %rcx
movzbl (%rcx,%rbx,2), %edx
shll $0x8, %edx
movzbl 0x1(%rcx,%rbx,2), %r13d
orl %edx, %r13d
andl %eax, %r13d
addq 0x50(%r15), %r13
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x238515
cmpb $0x0, 0x8(%r15)
jne 0x2382b5
movq %r13, %rdi
callq 0x22fc59
movq %r14, %rdi
movl %eax, %esi
pushq $0x5
popq %rdx
movl 0x4(%rsp), %ecx
movq %r12, %r8
callq 0x238312
incq %rbx
jmp 0x23825c
cmpb $0x0, 0x8(%r15)
jne 0x2382eb
movq 0x50(%r15), %rax
movzbl 0x9(%r15), %ecx
leaq (%rax,%rcx), %rdi
addq $0x8, %rdi
callq 0x22fc59
pushq $0x5
popq %rdx
movq %rsp, %r8
movq %r14, %rdi
movl %eax, %esi
movl 0x4(%rsp), %ecx
callq 0x238312
movl (%rsp), %eax
jmp 0x238303
movq %r15, %rdi
callq 0x23499e
movl %eax, (%rsp)
testl %eax, %eax
je 0x238252
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: ptrmapPut
static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
  DbPage *pDbPage;  /* The pointer map page */
  u8 *pPtrmap;      /* The pointer map data */
  Pgno iPtrmap;     /* The pointer map page number */
  int offset;       /* Offset in pointer map page */
  int rc;           /* Return code from subfunctions */

  if( *pRC ) return;

  assert( sqlite3_mutex_held(pBt->mutex) );
  /* The super-journal page number must never be used as a pointer map page */
  assert( 0==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)) );

  assert( pBt->autoVacuum );
  if( key==0 ){
    *pRC = SQLITE_CORRUPT_BKPT;
    return;
  }
  iPtrmap = PTRMAP_PAGENO(pBt, key);
  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);
  if( rc!=SQLITE_OK ){
    *pRC = rc;
    return;
  }
  if( ((char*)sqlite3PagerGetExtra(pDbPage))[0]!=0 ){
    /* The first byte of the extra data is the MemPage.isInit byte.
    ** If that byte is set, it means this page is also being used
    ** as a btree page. */
    *pRC = SQLITE_CORRUPT_BKPT;
    goto ptrmap_exit;
  }
  offset = PTRMAP_PTROFFSET(iPtrmap, key);
  if( offset<0 ){
    *pRC = SQLITE_CORRUPT_BKPT;
    goto ptrmap_exit;
  }
  assert( offset <= (int)pBt->usableSize-5 );
  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);

  if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){
    TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent));
    *pRC= rc = sqlite3PagerWrite(pDbPage);
    if( rc==SQLITE_OK ){
      pPtrmap[offset] = eType;
      put4byte(&pPtrmap[offset+1], parent);
    }
  }

ptrmap_exit:
  sqlite3PagerUnref(pDbPage);
}

// Assembly:
cmpl $0x0, (%r8)
je 0x238319
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %esi, %r14d
testl %esi, %esi
je 0x238379
movl %edx, %ebp
movq %rdi, %r15
movl %ecx, %r13d
movl %r14d, %esi
callq 0x236d49
movl %eax, %r12d
movq (%r15), %rdi
movq %rsp, %rdx
movl %eax, %esi
xorl %ecx, %ecx
callq *0x108(%rdi)
testl %eax, %eax
jne 0x238383
movq (%rsp), %r15
movq 0x10(%r15), %rax
cmpb $0x0, (%rax)
je 0x238394
movl $0xffd9, %edi           # imm = 0xFFD9
callq 0x232547
movl %eax, (%rbx)
movq (%rsp), %rdi
callq 0x2235a4
jmp 0x238385
movl $0xffcc, %edi           # imm = 0xFFCC
callq 0x232547
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
notl %r12d
addl %r14d, %r12d
leal (%r12,%r12,4), %eax
testl %eax, %eax
js 0x2383f7
movq 0x8(%r15), %rcx
movl %eax, %eax
leaq (%rcx,%rax), %r14
cmpb %bpl, (%rcx,%rax)
jne 0x2383c0
leaq 0x1(%r14), %rdi
callq 0x22fc59
cmpl %r13d, %eax
je 0x23836e
movq %r15, %rdi
callq 0x2236f2
movl %eax, (%rbx)
testl %eax, %eax
jne 0x23836e
movq %r14, %rdx
movb %bpl, (%r14)
movl %r13d, %ecx
movl %r13d, %eax
shrl $0x18, %eax
movb %al, 0x1(%r14)
movl %r13d, %eax
shrl $0x10, %eax
movb %al, 0x2(%r14)
movb %ch, 0x3(%rdx)
movb %cl, 0x4(%r14)
jmp 0x23836e
movl $0xffde, %edi           # imm = 0xFFDE
jmp 0x238367
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheMove
SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
  PCache *pCache = p->pCache;
  assert( p->nRef>0 );
  assert( newPgno>0 );
  assert( sqlite3PcachePageSanity(p) );
  pcacheTrace(("%p.MOVE %d -> %d\n",pCache,p->pgno,newPgno));
  sqlite3GlobalConfig.pcache2.xRekey(pCache->pCache, p->pPage, p->pgno,newPgno);
  p->pgno = newPgno;
  if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){
    pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x18(%rdi), %rax
movq 0x40(%rax), %rdi
movl 0x30(%rbx), %edx
movl %ebp, %ecx
callq *0x2022e1(%rip)         # 0x43a700
movl %ebp, 0x30(%rbx)
movl 0x34(%rbx), %eax
notl %eax
testb $0xa, %al
jne 0x23843c
pushq $0x3
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x232965
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: ptrmapPutOvflPtr
static void ptrmapPutOvflPtr(MemPage *pPage, MemPage *pSrc, u8 *pCell,int *pRC){
  CellInfo info;
  if( *pRC ) return;
  assert( pCell!=0 );
  pPage->xParseCell(pPage, pCell, &info);
  if( info.nLocal<info.nPayload ){
    Pgno ovfl;
    if( SQLITE_WITHIN(pSrc->aDataEnd, pCell, pCell+info.nLocal) ){
      testcase( pSrc!=pPage );
      *pRC = SQLITE_CORRUPT_BKPT;
      return;
    }
    ovfl = get4byte(&pCell[info.nSize-4]);
    ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);
  }
}

// Assembly:
cmpl $0x0, (%rcx)
je 0x23851b
retq
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x8(%rsp), %r13
movq %rdx, %rsi
movq %r13, %rdx
callq *0x80(%rdi)
movzwl 0x14(%r13), %eax
cmpl %eax, 0x10(%r13)
jbe 0x238597
movq 0x58(%r12), %rcx
cmpq %r15, %rcx
jb 0x238570
addq %r15, %rax
cmpq %rax, %rcx
jae 0x238570
movl $0x1014d, %edi          # imm = 0x1014D
callq 0x232547
movl %eax, (%rbx)
jmp 0x238597
movzwl 0x1e(%rsp), %eax
leaq (%r15,%rax), %rdi
addq $-0x4, %rdi
callq 0x22fc59
movq 0x48(%r14), %rdi
movl 0x4(%r14), %ecx
pushq $0x3
popq %rdx
movl %eax, %esi
movq %rbx, %r8
callq 0x238312
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeTripAllCursors
SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){
  BtCursor *p;
  int rc = SQLITE_OK;

  assert( (writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1 );
  if( pBtree ){
    sqlite3BtreeEnter(pBtree);
    for(p=pBtree->pBt->pCursor; p; p=p->pNext){
      if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){
        if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){
          rc = saveCursorPosition(p);
          if( rc!=SQLITE_OK ){
            (void)sqlite3BtreeTripAllCursors(pBtree, rc, 0);
            break;
          }
        }
      }else{
        sqlite3BtreeClearCursor(p);
        p->eState = CURSOR_FAULT;
        p->skipNext = errCode;
      }
      btreeReleaseAllCursorPages(p);
    }
    sqlite3BtreeLeave(pBtree);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
testl %edx, %edx
sete %r13b
xorl %ebx, %ebx
xorl %r12d, %r12d
testq %r14, %r14
je 0x238641
movq (%r14), %rax
movq 0x8(%r14), %r15
movq %rax, 0x8(%r15)
addq $0x10, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x238636
testb $0x1, %r13b
jne 0x2385ff
testb $0x1, 0x1(%r15)
jne 0x2385ff
movzbl (%r15), %eax
testb $-0x3, %al
jne 0x23860f
movq %r15, %rdi
callq 0x237054
testl %eax, %eax
je 0x23860f
jmp 0x23861d
movq %r15, %rdi
callq 0x238672
movb $0x4, (%r15)
movl %ebp, 0x4(%r15)
movq %r15, %rdi
callq 0x237099
addq $0x28, %r15
jmp 0x2385d4
testb $0x1, %r12b
movl 0x4(%rsp), %ecx
cmovel %eax, %ecx
movl %ecx, 0x4(%rsp)
movb $0x1, %r13b
movl %eax, %ebp
movb $0x1, %r12b
jmp 0x2385c0
xorl %ebx, %ebx
testb $0x1, %r12b
cmovnel 0x4(%rsp), %ebx
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_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeSetNPage
static void btreeSetNPage(BtShared *pBt, MemPage *pPage1){
  int nPage = get4byte(&pPage1->aData[28]);
  testcase( nPage==0 );
  if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
  testcase( pBt->nPage!=nPage );
  pBt->nPage = nPage;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rsi), %rdi
addq $0x1c, %rdi
callq 0x22fc59
testl %eax, %eax
jne 0x23866d
movq (%rbx), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: releaseMemArray
static void releaseMemArray(Mem *p, int N){
  if( p && N ){
    Mem *pEnd = &p[N];
    sqlite3 *db = p->db;
    if( db->pnBytesFreed ){
      do{
        if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);
      }while( (++p)<pEnd );
      return;
    }
    do{
      assert( (&p[1])==pEnd || p[0].db==p[1].db );
      assert( sqlite3VdbeCheckMemInvariants(p) );

      /* This block is really an inlined version of sqlite3VdbeMemRelease()
      ** that takes advantage of the fact that the memory cell value is
      ** being set to NULL after releasing any dynamic resources.
      **
      ** The justification for duplicating code is that according to
      ** callgrind, this causes a certain test case to hit the CPU 4.7
      ** percent less (x86 linux, gcc version 4.1.2, -O6) than if
      ** sqlite3MemRelease() were called from here. With -O2, this jumps
      ** to 6.6 percent. The test case is inserting 1000 rows into a table
      ** with no indexes using a single prepared INSERT statement, bind()
      ** and reset(). Inserts are grouped into a transaction.
      */
      testcase( p->flags & MEM_Agg );
      testcase( p->flags & MEM_Dyn );
      testcase( p->xDel==sqlite3VdbeFrameMemDel );
      if( p->flags&(MEM_Agg|MEM_Dyn) ){
        sqlite3VdbeMemRelease(p);
      }else if( p->szMalloc ){
        sqlite3DbFreeNN(db, p->zMalloc);
        p->szMalloc = 0;
      }

      p->flags = MEM_Undefined;
    }while( (++p)<pEnd );
  }
}

// Assembly:
testq %rdi, %rdi
sete %al
testl %esi, %esi
sete %cl
orb %al, %cl
jne 0x23870f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %rax
imulq $0x38, %rax, %r15
addq %rdi, %r15
movq 0x28(%rdi), %r14
cmpq $0x0, 0x2d0(%r14)
je 0x2386d5
cmpl $0x0, 0x20(%rbx)
je 0x2386ca
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x21f26b
addq $0x38, %rbx
cmpq %r15, %rbx
jb 0x2386b8
jmp 0x23870a
testb $0x24, 0x9(%rbx)
je 0x2386e5
movq %rbx, %rdi
callq 0x224336
jmp 0x2386fb
cmpl $0x0, 0x20(%rbx)
je 0x2386fb
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x22d0fc
andl $0x0, 0x20(%rbx)
movw $0x80, 0x8(%rbx)
addq $0x38, %rbx
cmpq %r15, %rbx
jb 0x2386d5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeFreeOpArray
static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
  if( aOp ){
    Op *pOp;
    for(pOp=&aOp[nOp-1]; pOp>=aOp; pOp--){
      if( pOp->p4type <= P4_FREE_IF_LE ) freeP4(db, pOp->p4type, pOp->p4.p);
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
      sqlite3DbFree(db, pOp->zComment);
#endif
    }
    sqlite3DbFreeNN(db, aOp);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x238760
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %rax
imulq $0x18, %rax, %rax
leaq (%rax,%rsi), %r15
addq $-0x18, %r15
cmpq %rbx, %r15
jb 0x238750
movsbl 0x1(%r15), %esi
cmpl $-0x6, %esi
jge 0x23874a
movq 0x10(%r15), %rdx
movq %r14, %rdi
callq 0x238761
addq $-0x18, %r15
jmp 0x23872f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x22d0fc
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3KeyInfoUnref
SQLITE_PRIVATE void sqlite3KeyInfoUnref(KeyInfo *p){
  if( p ){
    assert( p->nRef>0 );
    p->nRef--;
    if( p->nRef==0 ) sqlite3DbFreeNN(p->db, p);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x2387f5
movq %rdi, %rsi
decl (%rdi)
je 0x2387f6
retq
movq 0x10(%rsi), %rdi
jmp 0x22d0fc
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VtabModuleUnref
SQLITE_PRIVATE void sqlite3VtabModuleUnref(sqlite3 *db, Module *pMod){
  assert( pMod->nRefModule>0 );
  pMod->nRefModule--;
  if( pMod->nRefModule==0 ){
    if( pMod->xDestroy ){
      pMod->xDestroy(pMod->pAux);
    }
    assert( pMod->pEpoTab==0 );
    sqlite3DbFree(db, pMod);
  }
}

// Assembly:
decl 0x10(%rsi)
je 0x238882
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x23889b
movq 0x18(%rbx), %rdi
callq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21f26b
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeDelete
SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){
  sqlite3 *db;

  assert( p!=0 );
  db = p->db;
  assert( sqlite3_mutex_held(db->mutex) );
  sqlite3VdbeClearObject(db, p);
  if( p->pPrev ){
    p->pPrev->pNext = p->pNext;
  }else{
    assert( db->pVdbe==p );
    db->pVdbe = p->pNext;
  }
  if( p->pNext ){
    p->pNext->pPrev = p->pPrev;
  }
  p->magic = VDBE_MAGIC_DEAD;
  p->db = 0;
  sqlite3DbFreeNN(db, p);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21f1a4
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x8(%r14), %rdx
leaq 0x10(%rax), %rsi
testq %rax, %rax
cmoveq %rdx, %rsi
movq %rcx, (%rsi)
testq %rcx, %rcx
je 0x23892f
movq %rax, 0x8(%rcx)
movl $0x5606c3c8, 0x24(%rbx) # imm = 0x5606C3C8
andq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22d0fc
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeTransferError
SQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p){
  sqlite3 *db = p->db;
  int rc = p->rc;
  if( p->zErrMsg ){
    db->bBenignMalloc++;
    sqlite3BeginBenignMalloc();
    if( db->pErr==0 ) db->pErr = sqlite3ValueNew(db);
    sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);
    sqlite3EndBenignMalloc();
    db->bBenignMalloc--;
  }else if( db->pErr ){
    sqlite3ValueSetNull(db->pErr);
  }
  db->errCode = rc;
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movl 0x38(%rdi), %ebp
cmpq $0x0, 0xa8(%rdi)
je 0x2392ac
movq %rdi, %r14
incb 0x62(%rbx)
movq 0x204b96(%rip), %rax    # 0x43ddf8
testq %rax, %rax
je 0x239269
callq *%rax
movq 0x160(%rbx), %rdi
testq %rdi, %rdi
jne 0x239287
movq %rbx, %rdi
callq 0x22998f
movq %rax, %rdi
movq %rax, 0x160(%rbx)
movq 0xa8(%r14), %rsi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rcx
callq 0x2299ac
movq 0x204b60(%rip), %rax    # 0x43de00
testq %rax, %rax
je 0x2392a7
callq *%rax
decb 0x62(%rbx)
jmp 0x2392bd
movq 0x160(%rbx), %rdi
testq %rdi, %rdi
je 0x2392bd
callq 0x224946
movl %ebp, 0x50(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeEnter
SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){
  int i;
  sqlite3 *db;
  Db *aDb;
  int nDb;
  if( DbMaskAllZero(p->lockMask) ) return;  /* The common case */
  db = p->db;
  aDb = db->aDb;
  nDb = db->nDb;
  for(i=0; i<nDb; i++){
    if( i!=1 && DbMaskTest(p->lockMask,i) && ALWAYS(aDb[i].pBt!=0) ){
      sqlite3BtreeEnter(aDb[i].pBt);
    }
  }
}

// Assembly:
movl 0xcc(%rdi), %eax
testl %eax, %eax
je 0x239312
movq (%rdi), %rdx
movq 0x20(%rdx), %rcx
movl 0x28(%rdx), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
addq $0x8, %rcx
cmpq %rsi, %rdx
je 0x239312
cmpq $0x1, %rsi
je 0x239309
btl %esi, %eax
jae 0x239309
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x239309
movq (%rdi), %r8
movq 0x8(%rdi), %rdi
movq %r8, 0x8(%rdi)
incq %rsi
addq $0x20, %rcx
jmp 0x2392e6
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeCheckFk
SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
  sqlite3 *db = p->db;
  if( (deferred && (db->nDeferredCons+db->nDeferredImmCons)>0)
   || (!deferred && p->nFkConstraint>0)
  ){
    p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
    p->errorAction = OE_Abort;
    sqlite3VdbeError(p, "FOREIGN KEY constraint failed");
    return SQLITE_ERROR;
  }
  return SQLITE_OK;
}

// Assembly:
testl %esi, %esi
je 0x23947e
movq (%rdi), %rax
movq 0x2c8(%rax), %rcx
addq 0x2c0(%rax), %rcx
jle 0x239485
pushq %rax
movl $0x313, 0x38(%rdi)      # imm = 0x313
movb $0x2, 0xc2(%rdi)
leaq 0x13cd26(%rip), %rsi    # 0x376195
xorl %eax, %eax
callq 0x239bc2
pushq $0x1
popq %rax
addq $0x8, %rsp
retq
cmpq $0x0, 0x50(%rdi)
jg 0x239459
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeFrameRestore
SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
  Vdbe *v = pFrame->v;
  closeCursorsInFrame(v);
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
  v->anExec = pFrame->anExec;
#endif
  v->aOp = pFrame->aOp;
  v->nOp = pFrame->nOp;
  v->aMem = pFrame->aMem;
  v->nMem = pFrame->nMem;
  v->apCsr = pFrame->apCsr;
  v->nCursor = pFrame->nCursor;
  v->db->lastRowid = pFrame->lastRowid;
  v->nChange = pFrame->nChange;
  v->db->nChange = pFrame->nDbChange;
  sqlite3VdbeDeleteAuxData(v->db, &v->pAuxData, -1, 0);
  v->pAuxData = pFrame->pAuxData;
  pFrame->pAuxData = 0;
  return pFrame->pc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
callq 0x2396dd
movq 0x10(%rbx), %rax
movq %rax, 0x88(%r14)
movl 0x58(%rbx), %eax
movl %eax, 0x90(%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x68(%r14)
movl 0x5c(%rbx), %eax
movl %eax, 0x28(%r14)
movq 0x28(%rbx), %rax
movq %rax, 0x78(%r14)
movl 0x50(%rbx), %eax
movl %eax, 0x2c(%r14)
movq 0x40(%rbx), %rax
movq (%r14), %rdi
movq %rax, 0x38(%rdi)
movl 0x68(%rbx), %eax
movl %eax, 0x3c(%r14)
movl 0x6c(%rbx), %eax
movl %eax, 0x74(%rdi)
leaq 0x120(%r14), %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
callq 0x239722
movq 0x48(%rbx), %rax
movq %rax, 0x120(%r14)
andq $0x0, 0x48(%rbx)
movl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: closeCursorsInFrame
static void closeCursorsInFrame(Vdbe *p){
  if( p->apCsr ){
    int i;
    for(i=0; i<p->nCursor; i++){
      VdbeCursor *pC = p->apCsr[i];
      if( pC ){
        sqlite3VdbeFreeCursor(p, pC);
        p->apCsr[i] = 0;
      }
    }
  }
}

// Assembly:
cmpq $0x0, 0x78(%rdi)
je 0x239721
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x2c(%rbx), %rax
cmpq %rax, %r14
jge 0x23971a
movq 0x78(%rbx), %rax
movq (%rax,%r14,8), %rsi
testq %rsi, %rsi
je 0x239715
movq %rbx, %rdi
callq 0x239791
movq 0x78(%rbx), %rax
andq $0x0, (%rax,%r14,8)
incq %r14
jmp 0x2396ee
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeDeleteAuxData
SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(sqlite3 *db, AuxData **pp, int iOp, int mask){
  while( *pp ){
    AuxData *pAux = *pp;
    if( (iOp<0)
     || (pAux->iAuxOp==iOp
          && pAux->iAuxArg>=0
          && (pAux->iAuxArg>31 || !(mask & MASKBIT32(pAux->iAuxArg))))
    ){
      testcase( pAux->iAuxArg==31 );
      if( pAux->xDeleteAux ){
        pAux->xDeleteAux(pAux->pAux);
      }
      *pp = pAux->pNextAux;
      sqlite3DbFree(db, pAux);
    }else{
      pp= &pAux->pNextAux;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq (%r15), %r12
testq %r12, %r12
je 0x239788
testl %ebp, %ebp
js 0x239759
cmpl %ebp, (%r12)
jne 0x23977f
movl 0x4(%r12), %eax
testl %eax, %eax
js 0x23977f
cmpl $0x1f, %eax
ja 0x239759
btl %eax, %ebx
jb 0x23977f
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x23976a
movq 0x8(%r12), %rdi
callq *%rax
movq 0x18(%r12), %rax
movq %rax, (%r15)
movq %r14, %rdi
movq %r12, %rsi
callq 0x22d0fc
jmp 0x239734
addq $0x18, %r12
movq %r12, %r15
jmp 0x239734
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq