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: sqlite3VdbeFreeCursor
SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
  if( pCx==0 ){
    return;
  }
  assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
  switch( pCx->eCurType ){
    case CURTYPE_SORTER: {
      sqlite3VdbeSorterClose(p->db, pCx);
      break;
    }
    case CURTYPE_BTREE: {
      if( pCx->isEphemeral ){
        if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx);
        /* The pCx->pCursor will be close automatically, if it exists, by
        ** the call above. */
      }else{
        assert( pCx->uc.pCursor!=0 );
        sqlite3BtreeCloseCursor(pCx->uc.pCursor);
      }
      break;
    }
#ifndef SQLITE_OMIT_VIRTUALTABLE
    case CURTYPE_VTAB: {
      sqlite3_vtab_cursor *pVCur = pCx->uc.pVCur;
      const sqlite3_module *pModule = pVCur->pVtab->pModule;
      assert( pVCur->pVtab->nRef>0 );
      pVCur->pVtab->nRef--;
      pModule->xClose(pVCur);
      break;
    }
#endif
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x23981a
movq %rsi, %rbx
movzbl (%rsi), %eax
testl %eax, %eax
je 0x2397f6
cmpl $0x2, %eax
je 0x2397e1
cmpl $0x1, %eax
jne 0x23981a
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x23981a
movq (%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x23997f
movq 0x40(%r14), %rdi
callq 0x21f7f9
movq %r15, %rdi
movq %r14, %rsi
callq 0x22d0fc
andq $0x0, 0x30(%rbx)
jmp 0x23981a
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movq (%rax), %rcx
decl 0x8(%rax)
popq %rbx
popq %r14
popq %r15
jmpq *0x38(%rcx)
testb $0x1, 0x5(%rbx)
jne 0x23980a
movq 0x30(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x239904
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x23981a
popq %rbx
popq %r14
popq %r15
jmp 0x239820
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: sqlite3BtreeCloseCursor
SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
  Btree *pBtree = pCur->pBtree;
  if( pBtree ){
    BtShared *pBt = pCur->pBt;
    sqlite3BtreeEnter(pBtree);
    assert( pBt->pCursor!=0 );
    if( pBt->pCursor==pCur ){
      pBt->pCursor = pCur->pNext;
    }else{
      BtCursor *pPrev = pBt->pCursor;
      do{
        if( pPrev->pNext==pCur ){
          pPrev->pNext = pCur->pNext;
          break;
        }
        pPrev = pPrev->pNext;
      }while( ALWAYS(pPrev) );
    }
    btreeReleaseAllCursorPages(pCur);
    unlockBtreeIfUnused(pBt);
    sqlite3_free(pCur->aOverflow);
    sqlite3_free(pCur->pKey);
    sqlite3BtreeLeave(pBtree);
    pCur->pBtree = 0;
  }
  return SQLITE_OK;
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x23997e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%r14), %rax
cmpq %rdi, %rax
je 0x23993f
movq 0x28(%rax), %rcx
cmpq %rbx, %rcx
je 0x239945
movq %rcx, %rax
testq %rcx, %rcx
jne 0x23992c
jmp 0x239950
leaq 0x10(%r14), %rax
jmp 0x239949
addq $0x28, %rax
movq 0x28(%rbx), %rcx
movq %rcx, (%rax)
movq %rbx, %rdi
callq 0x237099
movq %r14, %rdi
callq 0x235ece
movq 0x10(%rbx), %rdi
callq 0x21f7f9
movq 0x18(%rbx), %rdi
callq 0x21f7f9
andq $0x0, 0x8(%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: sqlite3VdbeSorterReset
SQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *db, VdbeSorter *pSorter){
  int i;
  (void)vdbeSorterJoinAll(pSorter, SQLITE_OK);
  assert( pSorter->bUseThreads || pSorter->pReader==0 );
#if SQLITE_MAX_WORKER_THREADS>0
  if( pSorter->pReader ){
    vdbePmaReaderClear(pSorter->pReader);
    sqlite3DbFree(db, pSorter->pReader);
    pSorter->pReader = 0;
  }
#endif
  vdbeMergeEngineFree(pSorter->pMerger);
  pSorter->pMerger = 0;
  for(i=0; i<pSorter->nTask; i++){
    SortSubtask *pTask = &pSorter->aTask[i];
    vdbeSortSubtaskCleanup(db, pTask);
    pTask->pSorter = pSorter;
  }
  if( pSorter->list.aMemory==0 ){
    vdbeSorterRecordFree(0, pSorter->list.pList);
  }
  pSorter->list.pList = 0;
  pSorter->list.szPMA = 0;
  pSorter->bUsePMA = 0;
  pSorter->iMemory = 0;
  pSorter->mxKeysize = 0;
  sqlite3DbFree(db, pSorter->pUnpacked);
  pSorter->pUnpacked = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rdi
callq 0x239a54
andq $0x0, 0x18(%rbx)
leaq 0x60(%rbx), %r15
xorl %r12d, %r12d
movzbl 0x5b(%rbx), %eax
cmpq %rax, %r12
jae 0x239a10
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x21f26b
movq 0x20(%r15), %rsi
xorl %edi, %edi
callq 0x239a91
movq 0x48(%r15), %rdi
testq %rdi, %rdi
je 0x2399d0
callq 0x239b21
movq 0x58(%r15), %rdi
testq %rdi, %rdi
je 0x2399de
callq 0x239b21
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x50(%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
andq $0x0, 0x60(%r15)
movups %xmm0, (%r15)
movq %rbx, 0x10(%r15)
incq %r12
addq $0x68, %r15
jmp 0x2399a2
cmpq $0x0, 0x40(%rbx)
jne 0x239a22
movq 0x38(%rbx), %rsi
xorl %edi, %edi
callq 0x239a91
andq $0x0, 0x38(%rbx)
andl $0x0, 0x48(%rbx)
movb $0x0, 0x58(%rbx)
andl $0x0, 0x50(%rbx)
andl $0x0, 0x8(%rbx)
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x21f26b
andq $0x0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeMergeEngineFree
static void vdbeMergeEngineFree(MergeEngine *pMerger){
  int i;
  if( pMerger ){
    for(i=0; i<pMerger->nTree; i++){
      vdbePmaReaderClear(&pMerger->aReadr[i]);
    }
  }
  sqlite3_free(pMerger);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x239a84
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x239a84
movq 0x18(%rbx), %rdi
addq %r14, %rdi
callq 0x239ab6
incq %r15
addq $0x50, %r14
jmp 0x239a67
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21f7f9
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterRecordFree
static void vdbeSorterRecordFree(sqlite3 *db, SorterRecord *pRecord){
  SorterRecord *p;
  SorterRecord *pNext;
  for(p=pRecord; p; p=pNext){
    pNext = p->u.pNext;
    sqlite3DbFree(db, p);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x239aae
movq 0x8(%rsi), %r14
movq %rbx, %rdi
callq 0x22d0fc
movq %r14, %rsi
jmp 0x239a98
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: vdbePmaReaderClear
static void vdbePmaReaderClear(PmaReader *pReadr){
  sqlite3_free(pReadr->aAlloc);
  sqlite3_free(pReadr->aBuffer);
  if( pReadr->aMap ) sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);
  vdbeIncrFree(pReadr->pIncr);
  memset(pReadr, 0, sizeof(PmaReader));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x21f7f9
movq 0x30(%rbx), %rdi
callq 0x21f7f9
movq 0x40(%rbx), %rdx
testq %rdx, %rdx
je 0x239ae4
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x90(%rax)
movq 0x48(%rbx), %rdi
callq 0x239b05
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: callFinaliser
static void callFinaliser(sqlite3 *db, int offset){
  int i;
  if( db->aVTrans ){
    VTable **aVTrans = db->aVTrans;
    db->aVTrans = 0;
    for(i=0; i<db->nVTrans; i++){
      VTable *pVTab = aVTrans[i];
      sqlite3_vtab *p = pVTab->pVtab;
      if( p ){
        int (*x)(sqlite3_vtab *);
        x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);
        if( x ) x(p);
      }
      pVTab->iSavepoint = 0;
      sqlite3VtabUnlock(pVTab);
    }
    sqlite3DbFree(db, aVTrans);
    db->nVTrans = 0;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x210(%rdi), %r14
testq %r14, %r14
je 0x239bb8
movq %rdi, %rbx
andq $0x0, 0x210(%rdi)
movl %esi, %r12d
xorl %r13d, %r13d
movslq 0x1ec(%rbx), %rax
cmpq %rax, %r13
jge 0x239ba6
movq (%r14,%r13,8), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x239b94
movq (%rdi), %rax
movq (%rax,%r12), %rax
testq %rax, %rax
je 0x239b94
callq *%rax
andl $0x0, 0x20(%r15)
movq %r15, %rdi
callq 0x238838
incq %r13
jmp 0x239b6d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22d0fc
andl $0x0, 0x1ec(%rbx)
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: sqlite3VdbeError
SQLITE_PRIVATE void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){
  va_list ap;
  sqlite3DbFree(p->db, p->zErrMsg);
  va_start(ap, zFormat);
  p->zErrMsg = sqlite3VMPrintf(p->db, zFormat, ap);
  va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x239c24
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq (%rdi), %rdi
movq 0xa8(%r14), %rsi
callq 0x21f26b
movq %rsp, %rdx
movq %r15, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x22efaa
movq %rax, 0xa8(%r14)
addq $0xd0, %rsp
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: sqlite3OsOpenMalloc
SQLITE_PRIVATE int sqlite3OsOpenMalloc(
  sqlite3_vfs *pVfs,
  const char *zFile,
  sqlite3_file **ppFile,
  int flags,
  int *pOutFlags
){
  int rc;
  sqlite3_file *pFile;
  pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
  if( pFile ){
    rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
    if( rc!=SQLITE_OK ){
      sqlite3_free(pFile);
    }else{
      *ppFile = pFile;
    }
  }else{
    rc = SQLITE_NOMEM_BKPT;
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
movslq 0x4(%rdi), %rdi
callq 0x2227e2
testq %rax, %rax
je 0x239ccf
movq %rax, %r14
andl $0x1087f7f, %ebp        # imm = 0x1087F7F
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
movl %ebp, %ecx
movq %r15, %r8
callq *0x28(%r12)
testl %eax, %eax
je 0x239cd4
movl %eax, %ebp
movq %r14, %rdi
callq 0x21f7f9
jmp 0x239cd9
pushq $0x7
popq %rbp
jmp 0x239cd9
movq %r14, (%rbx)
xorl %ebp, %ebp
movl %ebp, %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: sqlite3VtabImportErrmsg
SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
  if( pVtab->zErrMsg ){
    sqlite3 *db = p->db;
    sqlite3DbFree(db, p->zErrMsg);
    p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
    sqlite3_free(pVtab->zErrMsg);
    pVtab->zErrMsg = 0;
  }
}

// Assembly:
cmpq $0x0, 0x10(%rsi)
je 0x239d34
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0xa8(%rdi), %rsi
movq %r15, %rdi
callq 0x21f26b
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x22572a
movq %rax, 0xa8(%r14)
movq 0x10(%rbx), %rdi
callq 0x21f7f9
andq $0x0, 0x10(%rbx)
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: vdbeCloseStatement
static SQLITE_NOINLINE int vdbeCloseStatement(Vdbe *p, int eOp){
  sqlite3 *const db = p->db;
  int rc = SQLITE_OK;
  int i;
  const int iSavepoint = p->iStatement-1;

  assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
  assert( db->nStatement>0 );
  assert( p->iStatement==(db->nStatement+db->nSavepoint) );

  for(i=0; i<db->nDb; i++){
    int rc2 = SQLITE_OK;
    Btree *pBt = db->aDb[i].pBt;
    if( pBt ){
      if( eOp==SAVEPOINT_ROLLBACK ){
        rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);
      }
      if( rc2==SQLITE_OK ){
        rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);
      }
      if( rc==SQLITE_OK ){
        rc = rc2;
      }
    }
  }
  db->nStatement--;
  p->iStatement = 0;

  if( rc==SQLITE_OK ){
    if( eOp==SAVEPOINT_ROLLBACK ){
      rc = sqlite3VtabSavepoint(db, SAVEPOINT_ROLLBACK, iSavepoint);
    }
    if( rc==SQLITE_OK ){
      rc = sqlite3VtabSavepoint(db, SAVEPOINT_RELEASE, iSavepoint);
    }
  }

  /* If the statement transaction is being rolled back, also restore the
  ** database handles deferred constraint counter to the value it had when
  ** the statement transaction was opened.  */
  if( eOp==SAVEPOINT_ROLLBACK ){
    db->nDeferredCons = p->nStmtDefCons;
    db->nDeferredImmCons = p->nStmtDefImmCons;
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
movq (%rdi), %rbx
movq %rdi, 0x10(%rsp)
movl 0x40(%rdi), %r15d
decl %r15d
xorl %r14d, %r14d
pushq $0x8
popq %rbp
xorl %r12d, %r12d
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jge 0x239dac
movq 0x20(%rbx), %rax
movq (%rax,%rbp), %r13
testq %r13, %r13
je 0x239da3
cmpl $0x2, 0xc(%rsp)
jne 0x239d8e
movq %r13, %rdi
pushq $0x2
popq %rsi
movl %r15d, %edx
callq 0x239e13
testl %eax, %eax
jne 0x239d9c
movq %r13, %rdi
pushq $0x1
popq %rsi
movl %r15d, %edx
callq 0x239e13
testl %r12d, %r12d
cmovel %eax, %r12d
incq %r14
addq $0x20, %rbp
jmp 0x239d5f
decl 0x2bc(%rbx)
movq 0x10(%rsp), %r14
andl $0x0, 0x40(%r14)
testl %r12d, %r12d
jne 0x239dee
cmpl $0x2, 0xc(%rsp)
jne 0x239ddd
pushq $0x2
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x239e85
movl %eax, %r12d
testl %eax, %eax
jne 0x239df5
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x239e85
movl %eax, %r12d
cmpl $0x2, 0xc(%rsp)
jne 0x239e01
movups 0x58(%r14), %xmm0
movups %xmm0, 0x2c0(%rbx)
movl %r12d, %eax
addq $0x18, %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: sqlite3BtreeSavepoint
SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
  int rc = SQLITE_OK;
  if( p && p->inTrans==TRANS_WRITE ){
    BtShared *pBt = p->pBt;
    assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
    sqlite3BtreeEnter(p);
    if( op==SAVEPOINT_ROLLBACK ){
      rc = saveAllCursors(pBt, 0, 0);
    }
    if( rc==SQLITE_OK ){
      rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
    }
    if( rc==SQLITE_OK ){
      if( iSavepoint<0 && (pBt->btsFlags & BTS_INITIALLY_EMPTY)!=0 ){
        pBt->nPage = 0;
      }
      rc = newDatabase(pBt);
      btreeSetNPage(pBt, pBt->pPage1);

      /* pBt->nPage might be zero if the database was corrupt when
      ** the transaction was started. Otherwise, it must be at least 1.  */
      assert( CORRUPT_DB || pBt->nPage>0 );
    }
    sqlite3BtreeLeave(p);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
testq %rdi, %rdi
je 0x239e80
cmpb $0x2, 0x10(%rdi)
jne 0x239e80
movl %edx, %ebp
movl %esi, %r14d
movq (%rdi), %rax
movq 0x8(%rdi), %rbx
movq %rax, 0x8(%rbx)
cmpl $0x2, %esi
jne 0x239e49
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x236e12
testl %eax, %eax
jne 0x239e80
movq (%rbx), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x2334bb
testl %eax, %eax
jne 0x239e80
testl %ebp, %ebp
jns 0x239e68
testb $0x10, 0x28(%rbx)
je 0x239e68
andl $0x0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x235e0d
movl %eax, %ebp
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
callq 0x238652
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: vdbeMemClear
static SQLITE_NOINLINE void vdbeMemClear(Mem *p){
  if( VdbeMemDynamic(p) ){
    vdbeMemClearExternAndSetNull(p);
  }
  if( p->szMalloc ){
    sqlite3DbFreeNN(p->db, p->zMalloc);
    p->szMalloc = 0;
  }
  p->z = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x24, 0x9(%rdi)
je 0x239f64
movq %rbx, %rdi
callq 0x239f82
cmpl $0x0, 0x20(%rbx)
je 0x239f7b
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdi
callq 0x22d0fc
andl $0x0, 0x20(%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeMemClearExternAndSetNull
static SQLITE_NOINLINE void vdbeMemClearExternAndSetNull(Mem *p){
  assert( p->db==0 || sqlite3_mutex_held(p->db->mutex) );
  assert( VdbeMemDynamic(p) );
  if( p->flags&MEM_Agg ){
    sqlite3VdbeMemFinalize(p, p->u.pDef);
    assert( (p->flags & MEM_Agg)==0 );
    testcase( p->flags & MEM_Dyn );
  }
  if( p->flags&MEM_Dyn ){
    assert( p->xDel!=SQLITE_DYNAMIC && p->xDel!=0 );
    p->xDel((void *)p->z);
  }
  p->flags = MEM_Null;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
btl $0xd, %eax
jae 0x239f9e
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x239fb3
movzwl 0x8(%rbx), %eax
btl $0xa, %eax
jae 0x239fab
movq 0x10(%rbx), %rdi
callq *0x30(%rbx)
movw $0x1, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemFinalize
SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
  sqlite3_context ctx;
  Mem t;
  assert( pFunc!=0 );
  assert( pFunc->xFinalize!=0 );
  assert( (pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef );
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  memset(&ctx, 0, sizeof(ctx));
  memset(&t, 0, sizeof(t));
  t.flags = MEM_Null;
  t.db = pMem->db;
  ctx.pOut = &t;
  ctx.pMem = pMem;
  ctx.pFunc = pFunc;
  pFunc->xFinalize(&ctx); /* IMP: R-24505-23230 */
  assert( (pMem->flags & MEM_Dyn)==0 );
  if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);
  memcpy(pMem, &t, sizeof(t));
  return ctx.isError;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x38(%rsp), %rdi
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %rsp, %rax
movaps %xmm0, (%rax)
andq $0x0, 0x30(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movw $0x1, 0x8(%rax)
movq 0x28(%rbx), %rcx
movq %rcx, 0x28(%rax)
movq %rax, (%rdi)
movq %rbx, 0x10(%rdi)
movq %rsi, 0x8(%rdi)
callq *0x20(%rsi)
cmpl $0x0, 0x20(%rbx)
jle 0x23a00d
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdi
callq 0x22d0fc
movq 0x30(%rsp), %rax
movq %rax, 0x30(%rbx)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movl 0x5c(%rsp), %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemGrow
int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){
  assert( sqlite3VdbeCheckMemInvariants(pMem) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  testcase( pMem->db==0 );

  /* If the bPreserve flag is set to true, then the memory cell must already
  ** contain a valid string or blob value.  */
  assert( bPreserve==0 || pMem->flags&(MEM_Blob|MEM_Str) );
  testcase( bPreserve && pMem->z==0 );

  assert( pMem->szMalloc==0
       || pMem->szMalloc==sqlite3DbMallocSize(pMem->db, pMem->zMalloc) );
  if( pMem->szMalloc>0 && bPreserve && pMem->z==pMem->zMalloc ){
    if( pMem->db ){
      pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);
    }else{
      pMem->zMalloc = sqlite3Realloc(pMem->z, n);
      if( pMem->zMalloc==0 ) sqlite3_free(pMem->z);
      pMem->z = pMem->zMalloc;
    }
    bPreserve = 0;
  }else{
    if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);
    pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);
  }
  if( pMem->zMalloc==0 ){
    sqlite3VdbeMemSetNull(pMem);
    pMem->z = 0;
    pMem->szMalloc = 0;
    return SQLITE_NOMEM_BKPT;
  }else{
    pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc);
  }

  if( bPreserve && pMem->z ){
    assert( pMem->z!=pMem->zMalloc );
    memcpy(pMem->zMalloc, pMem->z, pMem->n);
  }
  if( (pMem->flags&MEM_Dyn)!=0 ){
    assert( pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC );
    pMem->xDel((void *)(pMem->z));
  }

  pMem->z = pMem->zMalloc;
  pMem->flags &= ~(MEM_Dyn|MEM_Ephem|MEM_Static);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl 0x20(%rdi), %eax
testl %eax, %eax
setle %cl
testl %edx, %edx
sete %dl
orb %cl, %dl
jne 0x23a081
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rax
cmpq %rax, %rsi
jne 0x23a089
movq 0x28(%rbx), %rdi
movslq %r14d, %rdx
testq %rdi, %rdi
je 0x23a11c
callq 0x23a149
movq %rax, 0x18(%rbx)
jmp 0x23a13d
testl %eax, %eax
jle 0x23a095
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdi
movq %rax, %rsi
callq 0x22d0fc
movq 0x28(%rbx), %rdi
movslq %r14d, %rsi
callq 0x22809f
movq %rax, 0x18(%rbx)
testl %ebp, %ebp
sete %bpl
testq %rax, %rax
je 0x23a103
movq 0x28(%rbx), %rdi
movq %rax, %rsi
callq 0x22103d
movl %eax, 0x20(%rbx)
testb %bpl, %bpl
jne 0x23a0da
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x23a0da
movq 0x18(%rbx), %rdi
movslq 0xc(%rbx), %rdx
callq 0x17630
movl 0x8(%rbx), %eax
btl $0xa, %eax
jae 0x23a0ee
movq 0x10(%rbx), %rdi
callq *0x30(%rbx)
movzwl 0x8(%rbx), %eax
movq 0x18(%rbx), %rcx
movq %rcx, 0x10(%rbx)
andl $0xe3ff, %eax           # imm = 0xE3FF
movw %ax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x23a117
movq %rbx, %rdi
callq 0x224946
andq $0x0, 0x10(%rbx)
andl $0x0, 0x20(%rbx)
pushq $0x7
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x21f85c
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x23a13d
movq 0x10(%rbx), %rdi
callq 0x21f7f9
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movb $0x1, %bpl
jmp 0x23a0ab
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbReallocOrFree
SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, u64 n){
  void *pNew;
  pNew = sqlite3DbRealloc(db, p, n);
  if( !pNew ){
    sqlite3DbFree(db, p);
  }
  return pNew;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x22d1b5
movq %rax, %r15
testq %rax, %rax
jne 0x23a16c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21f26b
movq %r15, %rax
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: valueToText
static SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){
  assert( pVal!=0 );
  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
  assert( !sqlite3VdbeMemIsRowSet(pVal) );
  assert( (pVal->flags & (MEM_Null))==0 );
  if( pVal->flags & (MEM_Blob|MEM_Str) ){
    if( ExpandBlob(pVal) ) return 0;
    pVal->flags |= MEM_Str;
    if( pVal->enc != (enc & ~SQLITE_UTF16_ALIGNED) ){
      sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
    }
    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
      assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
      if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
        return 0;
      }
    }
    sqlite3VdbeMemNulTerminate(pVal); /* IMP: R-31275-44060 */
  }else{
    sqlite3VdbeMemStringify(pVal, enc, 0);
    assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
  }
  assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
              || pVal->db->mallocFailed );
  if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
    assert( sqlite3VdbeMemValidStrRep(pVal) );
    return pVal->z;
  }else{
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
movzwl %ax, %ecx
testb $0x12, %cl
je 0x23a1f6
btl $0xe, %ecx
jae 0x23a1b6
movq %rbx, %rdi
callq 0x224391
testl %eax, %eax
jne 0x23a214
movzwl 0x8(%rbx), %eax
orl $0x2, %eax
movw %ax, 0x8(%rbx)
movzbl 0xa(%rbx), %eax
movzbl %bpl, %esi
andl $-0x9, %esi
cmpl %eax, %esi
je 0x23a1d4
movq %rbx, %rdi
callq 0x23a21d
testb $0x8, %bpl
je 0x23a1ec
testb $0x1, 0x10(%rbx)
je 0x23a1ec
movq %rbx, %rdi
callq 0x2245b6
testl %eax, %eax
jne 0x23a214
movq %rbx, %rdi
callq 0x23a237
jmp 0x23a204
movzbl %bpl, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x23a24b
andb $-0x9, %bpl
cmpb %bpl, 0xa(%rbx)
jne 0x23a214
movq 0x10(%rbx), %rax
jmp 0x23a216
xorl %eax, %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: sqlite3VdbeMemStringify
SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
  const int nByte = 32;

  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( !(pMem->flags&MEM_Zero) );
  assert( !(pMem->flags&(MEM_Str|MEM_Blob)) );
  assert( pMem->flags&(MEM_Int|MEM_Real|MEM_IntReal) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );


  if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
    pMem->enc = 0;
    return SQLITE_NOMEM_BKPT;
  }

  vdbeMemRenderNum(nByte, pMem->z, pMem);
  assert( pMem->z!=0 );
  pMem->n = sqlite3Strlen30NN(pMem->z);
  pMem->enc = SQLITE_UTF8;
  pMem->flags |= MEM_Str|MEM_Term;
  if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal);
  sqlite3VdbeChangeEncoding(pMem, enc);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x20
popq %rsi
callq 0x23a881
testl %eax, %eax
je 0x23a277
movb $0x0, 0xa(%rbx)
pushq $0x7
popq %rax
jmp 0x23a315
movq 0x10(%rbx), %r15
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x23a2ab
movq %r15, 0x8(%rsp)
andq $0x0, (%rsp)
movl $0x20, 0x10(%rsp)
andw $0x0, 0x1c(%rsp)
andq $0x0, 0x14(%rsp)
testb $0x20, %al
jne 0x23a2b8
movsd (%rbx), %xmm0
jmp 0x23a2bd
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x23a89d
jmp 0x23a2db
cvtsi2sdq (%rbx), %xmm0
leaq 0x13bf25(%rip), %rsi    # 0x3761e9
movq %rsp, %r12
movq %r12, %rdi
movb $0x1, %al
callq 0x221594
movl 0x18(%r12), %eax
movb $0x0, (%r15,%rax)
movq 0x10(%rbx), %rdi
callq 0x172d0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, 0xc(%rbx)
movb $0x1, 0xa(%rbx)
movl $0x202, %eax            # imm = 0x202
orl 0x8(%rbx), %eax
movl %eax, %ecx
andl $-0x2d, %ecx
testb %r14b, %r14b
cmovel %eax, %ecx
movw %cx, 0x8(%rbx)
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x23a21d
xorl %eax, %eax
addq $0x20, %rsp
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: vdbeMemAddTerminator
static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
  if( sqlite3VdbeMemGrow(pMem, pMem->n+3, 1) ){
    return SQLITE_NOMEM_BKPT;
  }
  pMem->z[pMem->n] = 0;
  pMem->z[pMem->n+1] = 0;
  pMem->z[pMem->n+2] = 0;
  pMem->flags |= MEM_Term;
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %esi
addl $0x3, %esi
pushq $0x1
popq %rdx
callq 0x23a039
testl %eax, %eax
je 0x23a856
pushq $0x7
popq %rax
jmp 0x23a87f
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
xorl %eax, %eax
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movb %al, 0x1(%rcx,%rdx)
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movb %al, 0x2(%rcx,%rdx)
orb $0x2, 0x9(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3Int64ToText
SQLITE_PRIVATE void sqlite3Int64ToText(i64 v, char *zOut){
  int i;
  u64 x;
  char zTemp[22];
  if( v<0 ){
    x = (v==SMALLEST_INT64) ? ((u64)1)<<63 : (u64)-v;
  }else{
    x = v;
  }
  i = sizeof(zTemp)-2;
  zTemp[sizeof(zTemp)-1] = 0;
  do{
    zTemp[i--] = (x%10) + '0';
    x = x/10;
  }while( x );
  if( v<0 ) zTemp[i--] = '-';
  memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r8
movq %rdi, %rcx
negq %rcx
cmovsq %rdi, %rcx
movb $0x0, 0x15(%rsp)
pushq $0x14
popq %r9
pushq $0x13
popq %rsi
movabsq $0x1400000000, %r10     # imm = 0x1400000000
pushq $0xa
popq %r11
movabsq $-0x100000000, %rbx     # imm = 0xFFFFFFFF00000000
movq %rcx, %rax
xorl %edx, %edx
divq %r11
orb $0x30, %dl
movb %dl, (%rsp,%r9)
decq %r9
decl %esi
addq %rbx, %r10
cmpq $0x9, %rcx
movq %rax, %rcx
ja 0x23a8d3
testq %rdi, %rdi
js 0x23a8fd
movl %r9d, %esi
jmp 0x23a906
sarq $0x20, %r10
movb $0x2d, (%rsp,%r10)
movslq %esi, %rax
movq %rsp, %rcx
leaq (%rax,%rcx), %rsi
incq %rsi
pushq $0x15
popq %rdx
subq %rax, %rdx
movq %r8, %rdi
callq 0x17630
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memRealValue
static SQLITE_NOINLINE double memRealValue(Mem *pMem){
  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
  double val = (double)0;
  sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
  return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq 0x10(%rdi), %rax
movl 0xc(%rdi), %edx
movzbl 0xa(%rdi), %ecx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x23a955
movsd (%rbx), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: out2Prerelease
static Mem *out2Prerelease(Vdbe *p, VdbeOp *pOp){
  Mem *pOut;
  assert( pOp->p2>0 );
  assert( pOp->p2<=(p->nMem+1 - p->nCursor) );
  pOut = &p->aMem[pOp->p2];
  memAboutToChange(p, pOut);
  if( VdbeMemDynamic(pOut) ){ /*OPTIMIZATION-IF-FALSE*/
    return out2PrereleaseWithClear(pOut);
  }else{
    pOut->flags = MEM_Int;
    return pOut;
  }
}

// Assembly:
pushq %rbx
movq 0x68(%rdi), %rax
movslq 0x8(%rsi), %rcx
imulq $0x38, %rcx, %rcx
leaq (%rax,%rcx), %rbx
testb $0x24, 0x9(%rax,%rcx)
je 0x24223f
movq %rbx, %rdi
callq 0x244ee9
jmp 0x242245
movw $0x4, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemMove
SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
  assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
  assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
  assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );

  sqlite3VdbeMemRelease(pTo);
  memcpy(pTo, pFrom, sizeof(Mem));
  pFrom->flags = MEM_Null;
  pFrom->szMalloc = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x224336
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movw $0x1, 0x8(%rbx)
andl $0x0, 0x20(%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: sqlite3VdbeMemShallowCopy
SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
  assert( !sqlite3VdbeMemIsRowSet(pFrom) );
  assert( pTo->db==pFrom->db );
  if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
  memcpy(pTo, pFrom, MEMCELLSIZE);
  if( (pFrom->flags&MEM_Static)==0 ){
    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
    assert( srcType==MEM_Ephem || srcType==MEM_Static );
    pTo->flags |= srcType;
  }
}

// Assembly:
testb $0x24, 0x9(%rdi)
jne 0x244efd
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
testb $0x8, 0x9(%rsi)
jne 0x2422db
movl $0xffffe3ff, %eax       # imm = 0xFFFFE3FF
andl 0x8(%rdi), %eax
orl %edx, %eax
movw %ax, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3AddInt64
SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){
#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
  return __builtin_add_overflow(*pA, iB, pA);
#else
  i64 iA = *pA;
  testcase( iA==0 ); testcase( iA==1 );
  testcase( iB==-1 ); testcase( iB==0 );
  if( iB>=0 ){
    testcase( iA>0 && LARGEST_INT64 - iA == iB );
    testcase( iA>0 && LARGEST_INT64 - iA == iB - 1 );
    if( iA>0 && LARGEST_INT64 - iA < iB ) return 1;
  }else{
    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 1 );
    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 2 );
    if( iA<0 && -(iA + LARGEST_INT64) > iB + 1 ) return 1;
  }
  *pA += iB;
  return 0;
#endif
}

// Assembly:
movq (%rdi), %rax
testq %rsi, %rsi
js 0x24231d
testq %rax, %rax
setg %cl
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
subq %rax, %rdx
cmpq %rsi, %rdx
setb %dl
testb %dl, %cl
je 0x24233c
pushq $0x1
popq %rax
retq
testq %rax, %rax
jns 0x24233c
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
subq %rax, %rcx
addq $0x2, %rcx
leaq 0x1(%rsi), %rdx
cmpq %rdx, %rcx
jg 0x242319
addq %rsi, %rax
movq %rax, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemIntegerify
SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );

  pMem->u.i = sqlite3VdbeIntValue(pMem);
  MemSetTypeFlag(pMem, MEM_Int);
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x224451
movq %rax, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x4, %eax
movw %ax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: applyAffinity
static void applyAffinity(
  Mem *pRec,          /* The value to apply affinity to */
  char affinity,      /* The affinity to be applied */
  u8 enc              /* Use this text encoding */
){
  if( affinity>=SQLITE_AFF_NUMERIC ){
    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
             || affinity==SQLITE_AFF_NUMERIC );
    if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
      if( (pRec->flags & MEM_Real)==0 ){
        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
      }else{
        sqlite3VdbeIntegerAffinity(pRec);
      }
    }
  }else if( affinity==SQLITE_AFF_TEXT ){
    /* Only attempt the conversion to TEXT if there is an integer or real
    ** representation (blob and NULL do not get converted) but no string
    ** representation.  It would be harmless to repeat the conversion if
    ** there is already a string rep, but it is pointless to waste those
    ** CPU cycles. */
    if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
      if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){
        testcase( pRec->flags & MEM_Int );
        testcase( pRec->flags & MEM_Real );
        testcase( pRec->flags & MEM_IntReal );
        sqlite3VdbeMemStringify(pRec, enc, 1);
      }
    }
    pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x43, %sil
jl 0x242389
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x2423c0
testb $0x8, %al
jne 0x2423c2
testb $0x2, %al
je 0x2423c0
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2265a5
cmpb $0x42, %sil
jne 0x2423c0
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0x2, %ecx
shrl %ecx
testb $0x2c, %al
sete %sil
orb %cl, %sil
jne 0x2423b7
movzbl %dl, %esi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x23a24b
movzwl 0x8(%rbx), %eax
andl $0xffd3, %eax           # imm = 0xFFD3
movw %ax, 0x8(%rbx)
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x244f9c
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemRealify
SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );

  pMem->u.r = sqlite3VdbeRealValue(pMem);
  MemSetTypeFlag(pMem, MEM_Real);
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22442c
movsd %xmm0, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x8, %eax
movw %ax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemCast
SQLITE_PRIVATE int sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){
  if( pMem->flags & MEM_Null ) return SQLITE_OK;
  switch( aff ){
    case SQLITE_AFF_BLOB: {   /* Really a cast to BLOB */
      if( (pMem->flags & MEM_Blob)==0 ){
        sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
        assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
        if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);
      }else{
        pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
      }
      break;
    }
    case SQLITE_AFF_NUMERIC: {
      sqlite3VdbeMemNumerify(pMem);
      break;
    }
    case SQLITE_AFF_INTEGER: {
      sqlite3VdbeMemIntegerify(pMem);
      break;
    }
    case SQLITE_AFF_REAL: {
      sqlite3VdbeMemRealify(pMem);
      break;
    }
    default: {
      assert( aff==SQLITE_AFF_TEXT );
      assert( MEM_Str==(MEM_Blob>>3) );
      pMem->flags |= (pMem->flags&MEM_Blob)>>3;
      sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
      assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
      pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal|MEM_Blob|MEM_Zero);
      return sqlite3VdbeChangeEncoding(pMem, encoding);
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movzwl 0x8(%rdi), %eax
testb $0x1, %al
jne 0x242497
movq %rdi, %rbx
movzbl %sil, %ecx
addl $-0x41, %ecx
cmpl $0x4, %ecx
ja 0x24245a
leaq 0x12e52d(%rip), %rsi    # 0x37093c
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
testb $0x10, %al
jne 0x24248e
movzbl %dl, %edx
pushq $0x42
popq %rsi
movq %rbx, %rdi
callq 0x242363
movzwl 0x8(%rbx), %eax
testb $0x2, %al
je 0x242497
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x10, %eax
jmp 0x242493
movq %rbx, %rdi
callq 0x242345
jmp 0x242497
movq %rbx, %rdi
callq 0x244ff7
jmp 0x242497
movq %rbx, %rdi
callq 0x2423cb
jmp 0x242497
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x2, %ecx
orl %eax, %ecx
movw %cx, 0x8(%rbx)
movzbl %dl, %ebp
pushq $0x42
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x242363
andw $0xbfc3, 0x8(%rbx)      # imm = 0xBFC3
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x23a21d
andl $0x3e50, %eax           # imm = 0x3E50
movw %ax, 0x8(%rbx)
xorl %eax, %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: sqlite3VdbeBooleanValue
SQLITE_PRIVATE int sqlite3VdbeBooleanValue(Mem *pMem, int ifNull){
  testcase( pMem->flags & MEM_IntReal );
  if( pMem->flags & (MEM_Int|MEM_IntReal) ) return pMem->u.i!=0;
  if( pMem->flags & MEM_Null ) return ifNull;
  return sqlite3VdbeRealValue(pMem)!=0.0;
}

// Assembly:
movzwl 0x8(%rdi), %ecx
testb $0x24, %cl
je 0x2425af
xorl %eax, %eax
cmpq $0x0, (%rdi)
setne %al
retq
movl %esi, %eax
testb $0x1, %cl
jne 0x2425ae
pushq %rax
callq 0x22442c
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemFromBtree
SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
  u32 offset,       /* Offset from the start of data to return bytes from. */
  u32 amt,          /* Number of bytes to return. */
  Mem *pMem         /* OUT: Return data in this Mem structure. */
){
  int rc;
  pMem->flags = MEM_Null;
  if( sqlite3BtreeMaxRecordSize(pCur)<offset+amt ){
    return SQLITE_CORRUPT_BKPT;
  }
  if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+1)) ){
    rc = sqlite3BtreePayload(pCur, offset, amt, pMem->z);
    if( rc==SQLITE_OK ){
      pMem->z[amt] = 0;   /* Overrun area used when reading malformed records */
      pMem->flags = MEM_Blob;
      pMem->n = (int)amt;
    }else{
      sqlite3VdbeMemRelease(pMem);
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r15d
movw $0x1, 0x8(%rcx)
movq 0x20(%rdi), %rax
movl 0x34(%rax), %ecx
movl 0x40(%rax), %eax
imulq %rcx, %rax
leal (%r14,%r15), %ecx
cmpq %rcx, %rax
jae 0x242843
movl $0x12cd7, %edi          # imm = 0x12CD7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x232547
movq %rdi, %r12
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x23a881
movl %eax, %ebp
testl %eax, %eax
jne 0x242891
movq 0x10(%rbx), %rcx
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x23718a
testl %eax, %eax
je 0x24287a
movl %eax, %ebp
movq %rbx, %rdi
callq 0x224336
jmp 0x242891
movq 0x10(%rbx), %rax
movl %r14d, %ecx
movb $0x0, (%rax,%rcx)
movw $0x10, 0x8(%rbx)
movl %r14d, 0xc(%rbx)
xorl %ebp, %ebp
movl %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: sqlite3PutVarint
SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
  if( v<=0x7f ){
    p[0] = v&0x7f;
    return 1;
  }
  if( v<=0x3fff ){
    p[0] = ((v>>7)&0x7f)|0x80;
    p[1] = v&0x7f;
    return 2;
  }
  return putVarint64(p,v);
}

// Assembly:
cmpq $0x7f, %rsi
ja 0x2428be
movb %sil, (%rdi)
pushq $0x1
jmp 0x2428de
cmpq $0x3fff, %rsi           # imm = 0x3FFF
ja 0x2453f7
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, (%rdi)
andb $0x7f, %sil
movb %sil, 0x1(%rdi)
pushq $0x2
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeRowCountEst
SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor *pCur){
  i64 n;
  u8 i;

  assert( cursorOwnsBtShared(pCur) );
  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );

  /* Currently this interface is only called by the OP_IfSmaller
  ** opcode, and it that case the cursor will always be valid and
  ** will always point to a leaf node. */
  if( NEVER(pCur->eState!=CURSOR_VALID) ) return -1;
  if( NEVER(pCur->pPage->leaf==0) ) return -1;

  n = pCur->pPage->nCell;
  for(i=0; i<pCur->iPage; i++){
    n *= pCur->apPage[i]->nCell;
  }
  return n;
}

// Assembly:
pushq $-0x1
popq %rax
cmpb $0x0, (%rdi)
je 0x2428e9
retq
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x2428e8
movzwl 0x18(%rcx), %eax
movl 0x54(%rdi), %edx
xorl %ecx, %ecx
testb %dl, %dl
cmovlel %ecx, %edx
movzbl %dl, %edx
cmpq %rcx, %rdx
je 0x2428e8
movq 0x90(%rdi,%rcx,8), %rsi
movzwl 0x18(%rsi), %esi
imulq %rsi, %rax
incq %rcx
jmp 0x242907
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ResetOneSchema
SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3 *db, int iDb){
  int i;
  assert( iDb<db->nDb );

  if( iDb>=0 ){
    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
    DbSetProperty(db, iDb, DB_ResetWanted);
    DbSetProperty(db, 1, DB_ResetWanted);
    db->mDbFlags &= ~DBFLAG_SchemaKnownOk;
  }

  if( db->nSchemaLock==0 ){
    for(i=0; i<db->nDb; i++){
      if( DbHasProperty(db, i, DB_ResetWanted) ){
        sqlite3SchemaClear(db->aDb[i].pSchema);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
js 0x24294e
movq 0x20(%rbx), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rcx
orw $0x8, 0x72(%rcx)
movq 0x38(%rax), %rax
orw $0x8, 0x72(%rax)
andb $-0x11, 0x2c(%rbx)
cmpl $0x0, 0x48(%rbx)
je 0x24295a
popq %rbx
popq %r14
popq %r15
retq
pushq $0x18
popq %r14
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x242954
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
testb $0x8, 0x72(%rdi)
je 0x24297d
callq 0x24401a
incq %r15
addq $0x20, %r14
jmp 0x242961
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreePrevious
SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int flags){
  assert( cursorOwnsBtShared(pCur) );
  assert( flags==0 || flags==1 );
  UNUSED_PARAMETER( flags );  /* Used in COMDB2 but not native SQLite */
  pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey);
  pCur->info.nSize = 0;
  if( pCur->eState!=CURSOR_VALID
   || pCur->ix==0
   || pCur->pPage->leaf==0
  ){
    return btreePrevious(pCur);
  }
  pCur->ix--;
  return SQLITE_OK;
}

// Assembly:
andb $-0xf, 0x1(%rdi)
andw $0x0, 0x46(%rdi)
cmpb $0x0, (%rdi)
jne 0x2466ae
movzwl 0x56(%rdi), %eax
testw %ax, %ax
je 0x2466ae
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x2466ae
decl %eax
movw %ax, 0x56(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeAllocUnpackedRecord
SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(
  KeyInfo *pKeyInfo               /* Description of the record */
){
  UnpackedRecord *p;              /* Unpacked record to return */
  int nByte;                      /* Number of bytes required for *p */
  nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nKeyField+1);
  p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);
  if( !p ) return 0;
  p->aMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
  assert( pKeyInfo->aSortFlags!=0 );
  p->pKeyInfo = pKeyInfo;
  p->nField = pKeyInfo->nKeyField + 1;
  return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
imulq $0x38, %rax, %rsi
addq $0x50, %rsi
movq 0x10(%rdi), %rdi
callq 0x22809f
testq %rax, %rax
je 0x243363
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq %rbx, (%rax)
movzwl 0x6(%rbx), %ecx
incl %ecx
movw %cx, 0x10(%rax)
popq %rbx
retq