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: findBtree
static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
  int i = sqlite3FindDbName(pDb, zDb);

  if( i==1 ){
    Parse sParse;
    int rc = 0;
    memset(&sParse, 0, sizeof(sParse));
    sParse.db = pDb;
    if( sqlite3OpenTempDatabase(&sParse) ){
      sqlite3ErrorWithMsg(pErrorDb, sParse.rc, "%s", sParse.zErrMsg);
      rc = SQLITE_ERROR;
    }
    sqlite3DbFree(pErrorDb, sParse.zErrMsg);
    sqlite3ParserReset(&sParse);
    if( rc ){
      return 0;
    }
  }

  if( i<0 ){
    sqlite3ErrorWithMsg(pErrorDb, SQLITE_ERROR, "unknown database %s", zDb);
    return 0;
  }

  return pDb->aDb[i].pBt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x22b0a8
movl %eax, %ebp
cmpl $0x1, %eax
jne 0x2228a3
leaq 0x10(%rsp), %r15
movl $0x1a0, %edx            # imm = 0x1A0
movq %r15, %rdi
xorl %esi, %esi
callq 0x17380
movq %r14, -0x8(%r15)
leaq 0x8(%rsp), %rdi
callq 0x22f03a
leaq 0x8(%rsp), %r15
testl %eax, %eax
je 0x2228c3
movl 0x18(%r15), %esi
movq 0x8(%r15), %r12
leaq 0x14662b(%rip), %rdx    # 0x368ea9
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2226f3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21f26b
movq %r15, %rdi
callq 0x22767e
jmp 0x2228e6
testl %ebp, %ebp
jns 0x2228d7
leaq 0x1537b5(%rip), %rdx    # 0x376063
xorl %r14d, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2226f3
jmp 0x2228e6
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x21f26b
movq %r15, %rdi
callq 0x22767e
movq 0x20(%r14), %rax
movl %ebp, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r14
movq %r14, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
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: sqlite3ResetAllSchemasOfConnection
SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
  int i;
  sqlite3BtreeEnterAll(db);
  for(i=0; i<db->nDb; i++){
    Db *pDb = &db->aDb[i];
    if( pDb->pSchema ){
      if( db->nSchemaLock==0 ){
        sqlite3SchemaClear(pDb->pSchema);
      }else{
        DbSetProperty(db, i, DB_ResetWanted);
      }
    }
  }
  db->mDbFlags &= ~(DBFLAG_SchemaChange|DBFLAG_SchemaKnownOk);
  sqlite3VtabUnlockList(db);
  sqlite3BtreeLeaveAll(db);
  if( db->nSchemaLock==0 ){
    sqlite3CollapseDatabaseArray(db);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x21f0e2
pushq $0x18
popq %r14
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x22363d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0x223634
cmpl $0x0, 0x48(%rbx)
je 0x22362f
orb $0x8, 0x72(%rdi)
jmp 0x223634
callq 0x24401a
incq %r15
addq $0x20, %r14
jmp 0x22360d
andb $-0x12, 0x2c(%rbx)
movq %rbx, %rdi
callq 0x24b12d
cmpl $0x0, 0x48(%rbx)
je 0x223655
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x24e082
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PagerWrite
SQLITE_PRIVATE int sqlite3PagerWrite(PgHdr *pPg){
  Pager *pPager = pPg->pPager;
  assert( (pPg->flags & PGHDR_MMAP)==0 );
  assert( pPager->eState>=PAGER_WRITER_LOCKED );
  assert( assert_pager_state(pPager) );
  if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
    if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
    return SQLITE_OK;
  }else if( pPager->errCode ){
    return pPager->errCode;
  }else if( pPager->sectorSize > (u32)pPager->pageSize ){
    assert( pPager->tempFile==0 );
    return pagerWriteLargeSector(pPg);
  }else{
    return pager_write(pPg);
  }
}

// Assembly:
movq 0x28(%rdi), %rcx
testb $0x4, 0x34(%rdi)
je 0x223704
movl 0x1c(%rcx), %eax
cmpl 0x30(%rdi), %eax
jae 0x223723
movl 0x2c(%rcx), %eax
testl %eax, %eax
je 0x22370c
retq
movl 0xb8(%rcx), %eax
cmpl 0xbc(%rcx), %eax
ja 0x236882
jmp 0x2369ff
cmpl $0x0, 0x80(%rcx)
jne 0x2300e4
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PagerSync
SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager, const char *zSuper){
  int rc = SQLITE_OK;
  void *pArg = (void*)zSuper;
  rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC, pArg);
  if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;
  if( rc==SQLITE_OK && !pPager->noSync ){
    assert( !MEMDB );
    rc = sqlite3OsSync(pPager->fd, pPager->syncFlags);
  }
  return rc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x223a7b
movq %rsi, %rdx
pushq $0x15
popq %rsi
callq *0x50(%rax)
cmpl $0xc, %eax
je 0x223a7b
testl %eax, %eax
jne 0x223a83
xorl %eax, %eax
cmpb $0x0, 0xb(%rbx)
je 0x223a85
popq %rbx
retq
movzbl 0xe(%rbx), %esi
testl %esi, %esi
je 0x223a83
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
popq %rbx
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeCommitPhaseOne
SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zSuperJrnl){
  int rc = SQLITE_OK;
  if( p->inTrans==TRANS_WRITE ){
    BtShared *pBt = p->pBt;
    sqlite3BtreeEnter(p);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( pBt->autoVacuum ){
      rc = autoVacuumCommit(pBt);
      if( rc!=SQLITE_OK ){
        sqlite3BtreeLeave(p);
        return rc;
      }
    }
    if( pBt->bDoTruncate ){
      sqlite3PagerTruncateImage(pBt->pPager, pBt->nPage);
    }
#endif
    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zSuperJrnl, 0);
    sqlite3BtreeLeave(p);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r13d, %r13d
cmpb $0x2, 0x10(%rdi)
jne 0x223cd1
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %r14
movq %rax, 0x8(%r14)
cmpb $0x0, 0x21(%r14)
je 0x223b83
movq (%r14), %r15
movq %r14, %rdi
callq 0x236d32
cmpb $0x0, 0x22(%r14)
je 0x223bac
cmpb $0x0, 0x23(%r14)
movq (%r14), %rdi
je 0x223b94
movl 0x40(%r14), %eax
movl %eax, 0x1c(%rdi)
movq %rbx, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x223733
movl 0x40(%r14), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x236d49
cmpl %ebp, %eax
je 0x223bd0
movl 0x216eac(%rip), %eax    # 0x43aa70
xorl %edx, %edx
divl 0x34(%r14)
incl %eax
cmpl %eax, %ebp
jne 0x223be8
movl $0x10b44, %edi          # imm = 0x10B44
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x232547
movq 0x18(%r14), %rax
movq 0x50(%rax), %rdi
addq $0x24, %rdi
callq 0x22fc59
movl %eax, %r13d
movq %r14, %rdi
movl %ebp, %esi
movl %eax, %edx
callq 0x236d85
cmpl %ebp, %eax
jbe 0x223c13
movl $0x10b49, %edi          # imm = 0x10B49
jmp 0x223bd5
movl %eax, %r12d
movl %r13d, 0xc(%rsp)
movq %r15, 0x10(%rsp)
xorl %r13d, %r13d
cmpl %ebp, %eax
jae 0x223c36
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x236e12
movl %eax, %r13d
pushq $0x1
popq %r15
cmpl %r12d, %ebp
jbe 0x223c5b
testl %r13d, %r13d
jne 0x223c5b
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x236e46
movl %eax, %r13d
decl %ebp
jmp 0x223c3a
testl %r13d, %r13d
sete %al
cmpl $0x65, %r13d
sete %cl
cmpl $0x0, 0xc(%rsp)
je 0x223cbb
orb %al, %cl
movq 0x10(%rsp), %r15
je 0x223cc0
movq 0x18(%r14), %rax
movq 0x70(%rax), %rdi
callq 0x2236f2
movq 0x18(%r14), %rcx
movq 0x50(%rcx), %rcx
andl $0x0, 0x20(%rcx)
movq 0x18(%r14), %rcx
movq 0x50(%rcx), %rcx
andl $0x0, 0x24(%rcx)
movl %eax, %r13d
movq 0x18(%r14), %rax
movq 0x50(%rax), %rax
movl %r12d, %ecx
bswapl %ecx
movl %ecx, 0x1c(%rax)
movb $0x1, 0x23(%r14)
movl %r12d, 0x40(%r14)
jmp 0x223cc0
movq 0x10(%rsp), %r15
testl %r13d, %r13d
je 0x223b83
movq %r15, %rdi
callq 0x23304c
movl %r13d, %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: sqlite3BtreeRollback
SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode, int writeOnly){
  int rc;
  BtShared *pBt = p->pBt;
  MemPage *pPage1;

  assert( writeOnly==1 || writeOnly==0 );
  assert( tripCode==SQLITE_ABORT_ROLLBACK || tripCode==SQLITE_OK );
  sqlite3BtreeEnter(p);
  if( tripCode==SQLITE_OK ){
    rc = tripCode = saveAllCursors(pBt, 0, 0);
    if( rc ) writeOnly = 0;
  }else{
    rc = SQLITE_OK;
  }
  if( tripCode ){
    int rc2 = sqlite3BtreeTripAllCursors(p, tripCode, writeOnly);
    assert( rc==SQLITE_OK || (writeOnly==0 && rc2==SQLITE_OK) );
    if( rc2!=SQLITE_OK ) rc = rc2;
  }
  btreeIntegrity(p);

  if( p->inTrans==TRANS_WRITE ){
    int rc2;

    assert( TRANS_WRITE==pBt->inTransaction );
    rc2 = sqlite3PagerRollback(pBt->pPager);
    if( rc2!=SQLITE_OK ){
      rc = rc2;
    }

    /* The rollback may have destroyed the pPage1->aData value.  So
    ** call btreeGetPage() on page 1 again to make
    ** sure pPage1->aData is set correctly. */
    if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
      btreeSetNPage(pBt, pPage1);
      releasePageOne(pPage1);
    }
    assert( countValidCursors(pBt, 1)==0 );
    pBt->inTransaction = TRANS_READ;
    btreeClearHasContent(pBt);
  }

  btreeEndTransaction(p);
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r15d
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq (%rdi), %rax
movq %rax, 0x8(%r14)
testl %esi, %esi
jne 0x223dc2
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x236e12
movl %eax, %esi
testl %eax, %eax
je 0x223dcd
movq %rbx, %rdi
movl %r15d, %edx
callq 0x2385a5
cmpb $0x2, 0x10(%rbx)
jne 0x223e16
movq (%r14), %rdi
callq 0x23304c
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x23639b
testl %eax, %eax
jne 0x223e09
movq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x238652
movq %r15, %rdi
callq 0x236440
movb $0x1, 0x24(%r14)
movq %r14, %rdi
callq 0x236c44
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x236c58
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: invokeProfileCallback
static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){
  sqlite3_int64 iNow;
  sqlite3_int64 iElapse;
  assert( p->startTime>0 );
  assert( (db->mTrace & (SQLITE_TRACE_PROFILE|SQLITE_TRACE_XPROFILE))!=0 );
  assert( db->init.busy==0 );
  assert( p->zSql!=0 );
  sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
  iElapse = (iNow - p->startTime)*1000000;
#ifndef SQLITE_OMIT_DEPRECATED
  if( db->xProfile ){
    db->xProfile(db->pProfileArg, p->zSql, iElapse);
  }
#endif
  if( db->mTrace & SQLITE_TRACE_PROFILE ){
    db->trace.xV2(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse);
  }
  p->startTime = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2388ad
movq (%r15), %rax
subq 0xb8(%rbx), %rax
imulq $0xf4240, %rax, %rdx    # imm = 0xF4240
movq %rdx, (%rsp)
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x224119
movq 0xf8(%r14), %rdi
movq 0xf0(%rbx), %rsi
callq *%rax
testb $0x2, 0x68(%r14)
je 0x224137
movq 0xe8(%r14), %rsi
pushq $0x2
popq %rdi
movq %rsp, %rcx
movq %rbx, %rdx
callq *0xe0(%r14)
andq $0x0, 0xb8(%rbx)
addq $0x10, %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: sqlite3ApiExit
SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
  /* If the db handle must hold the connection handle mutex here.
  ** Otherwise the read (and possible write) of db->mallocFailed
  ** is unsafe, as is the call to sqlite3Error().
  */
  assert( db!=0 );
  assert( sqlite3_mutex_held(db->mutex) );
  if( db->mallocFailed || rc==SQLITE_IOERR_NOMEM ){
    return apiOomError(db);
  }
  return rc & db->errMask;
}

// Assembly:
cmpl $0xc0a, %esi            # imm = 0xC0A
je 0x224191
cmpb $0x0, 0x61(%rdi)
jne 0x224191
movl %esi, %eax
andl 0x54(%rdi), %eax
retq
pushq %rax
callq 0x23894c
pushq $0x7
popq %rax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_reset
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3 *db = v->db;
    sqlite3_mutex_enter(db->mutex);
    checkProfileCallback(db, v);
    rc = sqlite3VdbeReset(v);
    sqlite3VdbeRewind(v);
    assert( (rc & (db->errMask))==rc );
    rc = sqlite3ApiExit(db, rc);
    sqlite3_mutex_leave(db->mutex);
  }
  return rc;
}

// Assembly:
testq %rdi, %rdi
je 0x2241e0
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpq $0x0, 0xb8(%rdi)
jle 0x2241c3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240c9
movq %rbx, %rdi
callq 0x2241e3
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2242a6
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x22417d
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_clear_bindings
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
  int i;
  int rc = SQLITE_OK;
  Vdbe *p = (Vdbe*)pStmt;
#if SQLITE_THREADSAFE
  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
  sqlite3_mutex_enter(mutex);
  for(i=0; i<p->nVar; i++){
    sqlite3VdbeMemRelease(&p->aVar[i]);
    p->aVar[i].flags = MEM_Null;
  }
  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || p->expmask==0 );
  if( p->expmask ){
    p->expired = 1;
  }
  sqlite3_mutex_leave(mutex);
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movswq 0x20(%rbx), %rax
cmpq %rax, %r15
jge 0x224312
movq 0x80(%rbx), %rdi
addq %r14, %rdi
callq 0x224336
movq 0x80(%rbx), %rax
movw $0x1, 0x8(%rax,%r14)
incq %r15
addq $0x38, %r14
jmp 0x2242e1
cmpl $0x0, 0x114(%rbx)
je 0x22432e
movzwl 0xc6(%rbx), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%rbx)
xorl %eax, %eax
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: sqlite3_value_blob
SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
  Mem *p = (Mem*)pVal;
  if( p->flags & (MEM_Blob|MEM_Str) ){
    if( ExpandBlob(p)!=SQLITE_OK ){
      assert( p->flags==MEM_Null && p->z==0 );
      return 0;
    }
    p->flags |= MEM_Blob;
    return p->n ? p->z : 0;
  }else{
    return sqlite3_value_text(pVal);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
movzwl %ax, %ecx
testb $0x12, %cl
je 0x224384
btl $0xe, %ecx
jae 0x224371
movq %rbx, %rdi
callq 0x224391
testl %eax, %eax
jne 0x22438d
movzwl 0x8(%rbx), %eax
orl $0x10, %eax
movw %ax, 0x8(%rbx)
cmpl $0x0, 0xc(%rbx)
je 0x22438d
movq 0x10(%rbx), %rax
jmp 0x22438f
movq %rbx, %rdi
popq %rbx
jmp 0x2243e3
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: sqlite3VdbeMemExpandBlob
SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
  int nByte;
  assert( pMem->flags & MEM_Zero );
  assert( (pMem->flags&MEM_Blob)!=0 || MemNullNochng(pMem) );
  testcase( sqlite3_value_nochange(pMem) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );

  /* Set nByte to the number of bytes required to store the expanded blob. */
  nByte = pMem->n + pMem->u.nZero;
  if( nByte<=0 ){
    if( (pMem->flags & MEM_Blob)==0 ) return SQLITE_OK;
    nByte = 1;
  }
  if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
    return SQLITE_NOMEM_BKPT;
  }

  memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
  pMem->n += pMem->u.nZero;
  pMem->flags &= ~(MEM_Zero|MEM_Term);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %esi
addl 0xc(%rdi), %esi
jg 0x2243a9
xorl %ebp, %ebp
testb $0x10, 0x8(%rbx)
je 0x2243da
pushq $0x1
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x23a039
testl %eax, %eax
je 0x2243bd
pushq $0x7
popq %rbp
jmp 0x2243da
movslq 0xc(%rbx), %rdi
addq 0x10(%rbx), %rdi
movslq (%rbx), %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x17380
movl (%rbx), %eax
addl %eax, 0xc(%rbx)
andb $-0x43, 0x9(%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: sqlite3ValueBytes
SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
  Mem *p = (Mem*)pVal;
  assert( (p->flags & MEM_Null)==0 || (p->flags & (MEM_Str|MEM_Blob))==0 );
  if( (p->flags & MEM_Str)!=0 && pVal->enc==enc ){
    return p->n;
  }
  if( (p->flags & MEM_Blob)!=0 ){
    if( p->flags & MEM_Zero ){
      return p->n + p->u.nZero;
    }else{
      return p->n;
    }
  }
  if( p->flags & MEM_Null ) return 0;
  return valueBytes(pVal, enc);
}

// Assembly:
movzwl 0x8(%rdi), %ecx
testb $0x2, %cl
je 0x224403
cmpb %sil, 0xa(%rdi)
jne 0x224403
movl 0xc(%rdi), %eax
retq
testb $0x10, %cl
jne 0x224418
xorl %eax, %eax
testb $0x1, %cl
jne 0x224421
movzbl %sil, %esi
jmp 0x23a175
btl $0xe, %ecx
movl 0xc(%rdi), %eax
jb 0x224422
retq
addl (%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeIntValue
SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
  int flags;
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
  flags = pMem->flags;
  if( flags & (MEM_Int|MEM_IntReal) ){
    testcase( flags & MEM_IntReal );
    return pMem->u.i;
  }else if( flags & MEM_Real ){
    return doubleToInt64(pMem->u.r);
  }else if( (flags & (MEM_Str|MEM_Blob))!=0 && pMem->z!=0 ){
    return memIntValue(pMem);
  }else{
    return 0;
  }
}

// Assembly:
movzwl 0x8(%rdi), %eax
testb $0x24, %al
je 0x22445d
movq (%rdi), %rax
retq
testb $0x8, %al
jne 0x224471
testb $0x12, %al
je 0x22447a
cmpq $0x0, 0x10(%rdi)
je 0x22447a
jmp 0x23ad70
movsd (%rdi), %xmm0
jmp 0x23ad44
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_value_pointer
SQLITE_API void *sqlite3_value_pointer(sqlite3_value *pVal, const char *zPType){
  Mem *p = (Mem*)pVal;
  if( (p->flags&(MEM_TypeMask|MEM_Term|MEM_Subtype)) ==
                 (MEM_Null|MEM_Term|MEM_Subtype)
   && zPType!=0
   && p->eSubtype=='p'
   && strcmp(p->u.zPType, zPType)==0
  ){
    return (void*)p->z;
  }else{
    return 0;
  }
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x2244bf
pushq %rbx
movq %rdi, %rbx
movzwl 0x8(%rdi), %ecx
andl $0xc3bf, %ecx           # imm = 0xC3BF
cmpw $0x8201, %cx            # imm = 0x8201
jne 0x2244be
cmpb $0x70, 0xb(%rbx)
jne 0x2244bc
movq (%rbx), %rdi
callq 0x179e0
testl %eax, %eax
je 0x2244c0
xorl %eax, %eax
popq %rbx
retq
movq 0x10(%rbx), %rax
jmp 0x2244be
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ValueText
SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
  if( !pVal ) return 0;
  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
  assert( !sqlite3VdbeMemIsRowSet(pVal) );
  if( (pVal->flags&(MEM_Str|MEM_Term))==(MEM_Str|MEM_Term) && pVal->enc==enc ){
    assert( sqlite3VdbeMemValidStrRep(pVal) );
    return pVal->z;
  }
  if( pVal->flags&MEM_Null ){
    return 0;
  }
  return valueToText(pVal, enc);
}

// Assembly:
testq %rdi, %rdi
je 0x2244f1
movl 0x8(%rdi), %eax
movl %eax, %ecx
notl %ecx
testw $0x202, %cx             # imm = 0x202
jne 0x2244e4
cmpb %sil, 0xa(%rdi)
jne 0x2244e4
movq 0x10(%rdi), %rax
retq
testb $0x1, %al
jne 0x2244f1
movzbl %sil, %esi
jmp 0x23a18c
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_value_dup
SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
  sqlite3_value *pNew;
  if( pOrig==0 ) return 0;
  pNew = sqlite3_malloc( sizeof(*pNew) );
  if( pNew==0 ) return 0;
  memset(pNew, 0, sizeof(*pNew));
  memcpy(pNew, pOrig, MEMCELLSIZE);
  pNew->flags &= ~MEM_Dyn;
  pNew->db = 0;
  if( pNew->flags&(MEM_Str|MEM_Blob) ){
    pNew->flags &= ~(MEM_Static|MEM_Dyn);
    pNew->flags |= MEM_Ephem;
    if( sqlite3VdbeMemMakeWriteable(pNew)!=SQLITE_OK ){
      sqlite3ValueFree(pNew);
      pNew = 0;
    }
  }
  return pNew;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2245a9
movq %rdi, %r14
pushq $0x38
popq %rdi
callq 0x21f6c0
testq %rax, %rax
je 0x2245a9
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
andq $0x0, 0x30(%rax)
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0xfbff, %ecx           # imm = 0xFBFF
movw %cx, 0x8(%rbx)
andq $0x0, 0x28(%rbx)
testb $0x12, %al
je 0x2245ab
andl $0xffffe3ff, %eax       # imm = 0xFFFFE3FF
orl $0x1000, %eax           # imm = 0x1000
movw %ax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x2245b6
testl %eax, %eax
je 0x2245ab
movq %rbx, %rdi
callq 0x2245fd
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: sqlite3VdbeMemMakeWriteable
SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  if( (pMem->flags & (MEM_Str|MEM_Blob))!=0 ){
    if( ExpandBlob(pMem) ) return SQLITE_NOMEM;
    if( pMem->szMalloc==0 || pMem->z!=pMem->zMalloc ){
      int rc = vdbeMemAddTerminator(pMem);
      if( rc ) return rc;
    }
  }
  pMem->flags &= ~MEM_Ephem;
#ifdef SQLITE_DEBUG
  pMem->pScopyFrom = 0;
#endif

  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
testb $0x12, %al
je 0x2245f5
btl $0xe, %eax
jae 0x2245d9
movq %rbx, %rdi
callq 0x224391
testl %eax, %eax
je 0x2245d9
pushq $0x7
popq %rax
jmp 0x2245fb
cmpl $0x0, 0x20(%rbx)
je 0x2245e9
movq 0x10(%rbx), %rax
cmpq 0x18(%rbx), %rax
je 0x2245f5
movq %rbx, %rdi
callq 0x23a83b
testl %eax, %eax
jne 0x2245fb
andb $-0x11, 0x9(%rbx)
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: sqlite3VdbeMemSetDouble
SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
  sqlite3VdbeMemSetNull(pMem);
  if( !sqlite3IsNaN(val) ){
    pMem->u.r = val;
    pMem->flags = MEM_Real;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x224946
movq 0x8(%rsp), %xmm0
movq %xmm0, %rax
movq %rax, %rcx
notq %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
testq %rdx, %rcx
sete %cl
shlq $0xc, %rax
setne %al
testb %al, %cl
jne 0x2246cd
movq %xmm0, (%rbx)
movw $0x8, 0x8(%rbx)
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: sqlite3_result_pointer
SQLITE_API void sqlite3_result_pointer(
  sqlite3_context *pCtx,
  void *pPtr,
  const char *zPType,
  void (*xDestructor)(void*)
){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  sqlite3VdbeMemRelease(pOut);
  pOut->flags = MEM_Null;
  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %r12
movq %r12, %rdi
callq 0x224336
testq %r14, %r14
leaq 0x145bf3(%rip), %rax    # 0x36a570
cmovneq %r14, %rax
movq %rax, (%r12)
movq %r15, 0x10(%r12)
movw $0x8601, 0x8(%r12)      # imm = 0x8601
movb $0x70, 0xb(%r12)
testq %rbx, %rbx
leaq 0x165c6(%rip), %rax     # 0x23af68
cmovneq %rbx, %rax
movq %rax, 0x30(%r12)
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: sqlite3_result_text64
SQLITE_API void sqlite3_result_text64(
  sqlite3_context *pCtx,
  const char *z,
  sqlite3_uint64 n,
  void (*xDel)(void *),
  unsigned char enc
){
  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
  assert( xDel!=SQLITE_DYNAMIC );
  if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
  if( n>0x7fffffff ){
    (void)invokeValueDestructor(z, xDel, pCtx);
  }else{
    setResultStrOrError(pCtx, z, (int)n, enc, xDel);
  }
}

// Assembly:
movq %rcx, %r9
movq %rdi, %rax
movq %rdx, %rcx
shrq $0x1f, %rcx
je 0x2249eb
movq %rsi, %rdi
movq %r9, %rsi
movq %rax, %rdx
jmp 0x22465f
cmpb $0x4, %r8b
movzbl %r8b, %ecx
pushq $0x2
popq %rdi
cmovnel %ecx, %edi
movzbl %dil, %ecx
movq %rax, %rdi
movq %r9, %r8
jmp 0x224622
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemCopy
SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
  int rc = SQLITE_OK;

  assert( !sqlite3VdbeMemIsRowSet(pFrom) );
  if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);
  memcpy(pTo, pFrom, MEMCELLSIZE);
  pTo->flags &= ~MEM_Dyn;
  if( pTo->flags&(MEM_Str|MEM_Blob) ){
    if( 0==(pFrom->flags&MEM_Static) ){
      pTo->flags |= MEM_Ephem;
      rc = sqlite3VdbeMemMakeWriteable(pTo);
    }
  }

  return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testb $0x24, 0x9(%rdi)
je 0x224a46
movq %rbx, %rdi
callq 0x239f82
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movzwl 0x8(%rbx), %ecx
movl %ecx, %eax
andl $0xfbff, %eax           # imm = 0xFBFF
movw %ax, 0x8(%rbx)
testb $0x12, %cl
je 0x224a88
testb $0x8, 0x9(%r14)
jne 0x224a88
orl $0x1000, %eax           # imm = 0x1000
movw %ax, 0x8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2245b6
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: sqlite3VdbeMemSetZeroBlob
SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
  sqlite3VdbeMemRelease(pMem);
  pMem->flags = MEM_Blob|MEM_Zero;
  pMem->n = 0;
  if( n<0 ) n = 0;
  pMem->u.nZero = n;
  pMem->enc = SQLITE_UTF8;
  pMem->z = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x224336
movw $0x4010, 0x8(%r14)      # imm = 0x4010
andl $0x0, 0xc(%r14)
xorl %eax, %eax
testl %ebx, %ebx
cmovgl %ebx, %eax
movl %eax, (%r14)
movb $0x1, 0xa(%r14)
andq $0x0, 0x10(%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: sqlite3_result_error_code
SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
  pCtx->isError = errCode ? errCode : -1;
#ifdef SQLITE_DEBUG
  if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
#endif
  if( pCtx->pOut->flags & MEM_Null ){
    sqlite3VdbeMemSetStr(pCtx->pOut, sqlite3ErrStr(errCode), -1,
                         SQLITE_UTF8, SQLITE_STATIC);
  }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
cmpl $0x1, %esi
sbbl %eax, %eax
orl %esi, %eax
movl %eax, 0x24(%rdi)
movq (%rdi), %rbx
testb $0x1, 0x8(%rbx)
jne 0x224b06
popq %rbx
retq
movl %esi, %edi
callq 0x224b22
pushq $-0x1
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
popq %rbx
jmp 0x2246e6
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_result_error_nomem
SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
  sqlite3VdbeMemSetNull(pCtx->pOut);
  pCtx->isError = SQLITE_NOMEM_BKPT;
  sqlite3OomFault(pCtx->pOut->db);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x224946
movl $0x7, 0x24(%rbx)
movq (%rbx), %rax
movq 0x28(%rax), %rdi
popq %rbx
jmp 0x224bb1
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3OomFault
SQLITE_PRIVATE void sqlite3OomFault(sqlite3 *db){
  if( db->mallocFailed==0 && db->bBenignMalloc==0 ){
    db->mallocFailed = 1;
    if( db->nVdbeExec>0 ){
      AtomicStore(&db->u1.isInterrupted, 1);
    }
    DisableLookaside;
    if( db->pParse ){
      db->pParse->rc = SQLITE_NOMEM_BKPT;
    }
  }
}

// Assembly:
cmpb $0x0, 0x61(%rdi)
je 0x224bb8
retq
cmpb $0x0, 0x62(%rdi)
jne 0x224bb7
movb $0x1, 0x61(%rdi)
cmpl $0x0, 0xcc(%rdi)
jle 0x224bd5
movl $0x1, 0x168(%rdi)
incl 0x170(%rdi)
andw $0x0, 0x174(%rdi)
movq 0x130(%rdi), %rax
testq %rax, %rax
je 0x224bb7
movl $0x7, 0x18(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbStrDup
SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
  char *zNew;
  size_t n;
  if( z==0 ){
    return 0;
  }
  n = strlen(z) + 1;
  zNew = sqlite3DbMallocRaw(db, n);
  if( zNew ){
    memcpy(zNew, z, n);
  }
  return zNew;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x22576b
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x172d0
movq %rax, %r14
incq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x22809f
testq %rax, %rax
je 0x22576b
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x17630
xorl %eax, %eax
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: createAggContext
static SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){
  Mem *pMem = p->pMem;
  assert( (pMem->flags & MEM_Agg)==0 );
  if( nByte<=0 ){
    sqlite3VdbeMemSetNull(pMem);
    pMem->z = 0;
  }else{
    sqlite3VdbeMemClearAndResize(pMem, nByte);
    pMem->flags = MEM_Agg;
    pMem->u.pDef = p->pFunc;
    if( pMem->z ){
      memset(pMem->z, 0, nByte);
    }
  }
  return (void*)pMem->z;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rbx
testl %esi, %esi
jle 0x2257e4
movl %esi, %ebp
movq %rdi, %r14
movq %rbx, %rdi
callq 0x23a881
movw $0x2000, 0x8(%rbx)      # imm = 0x2000
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2257f1
movl %ebp, %edx
xorl %esi, %esi
callq 0x17380
movq 0x10(%rbx), %rax
jmp 0x2257f3
movq %rbx, %rdi
callq 0x224946
andq $0x0, 0x10(%rbx)
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: sqlite3_get_auxdata
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
  AuxData *pAuxData;

  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
#if SQLITE_ENABLE_STAT4
  if( pCtx->pVdbe==0 ) return 0;
#else
  assert( pCtx->pVdbe!=0 );
#endif
  for(pAuxData=pCtx->pVdbe->pAuxData; pAuxData; pAuxData=pAuxData->pNextAux){
    if(  pAuxData->iAuxArg==iArg && (pAuxData->iAuxOp==pCtx->iOp || iArg<0) ){
      return pAuxData->pAux;
    }
  }
  return 0;
}

// Assembly:
movl $0x120, %ecx            # imm = 0x120
addq 0x18(%rdi), %rcx
xorl %eax, %eax
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x225825
cmpl %esi, 0x4(%rcx)
jne 0x22581b
testl %esi, %esi
js 0x225821
movl 0x20(%rdi), %edx
cmpl %edx, (%rcx)
je 0x225821
addq $0x18, %rcx
jmp 0x225803
movq 0x8(%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_set_auxdata
SQLITE_API void sqlite3_set_auxdata(
  sqlite3_context *pCtx,
  int iArg,
  void *pAux,
  void (*xDelete)(void*)
){
  AuxData *pAuxData;
  Vdbe *pVdbe = pCtx->pVdbe;

  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
#ifdef SQLITE_ENABLE_STAT4
  if( pVdbe==0 ) goto failed;
#else
  assert( pVdbe!=0 );
#endif

  for(pAuxData=pVdbe->pAuxData; pAuxData; pAuxData=pAuxData->pNextAux){
    if( pAuxData->iAuxArg==iArg && (pAuxData->iAuxOp==pCtx->iOp || iArg<0) ){
      break;
    }
  }
  if( pAuxData==0 ){
    pAuxData = sqlite3DbMallocZero(pVdbe->db, sizeof(AuxData));
    if( !pAuxData ) goto failed;
    pAuxData->iAuxOp = pCtx->iOp;
    pAuxData->iAuxArg = iArg;
    pAuxData->pNextAux = pVdbe->pAuxData;
    pVdbe->pAuxData = pAuxData;
    if( pCtx->isError==0 ) pCtx->isError = -1;
  }else if( pAuxData->xDeleteAux ){
    pAuxData->xDeleteAux(pAuxData->pAux);
  }

  pAuxData->pAux = pAux;
  pAuxData->xDeleteAux = xDelete;
  return;

failed:
  if( xDelete ){
    xDelete(pAux);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq 0x18(%rdi), %rax
leaq 0x120(%rax), %r12
movq %r12, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x225868
cmpl %ebp, 0x4(%r14)
jne 0x225862
testl %ebp, %ebp
js 0x2258a6
movl 0x20(%r15), %edx
cmpl %edx, (%r14)
je 0x2258a6
addq $0x18, %r14
jmp 0x225847
movq %rcx, %r13
movq (%rax), %rdi
pushq $0x20
popq %rsi
callq 0x2258ed
testq %rax, %rax
je 0x2258d2
movq %rax, %r14
movl 0x20(%r15), %eax
movl %eax, (%r14)
movl %ebp, 0x4(%r14)
movq (%r12), %rax
movq %rax, 0x18(%r14)
movq %r14, (%r12)
cmpl $0x0, 0x24(%r15)
movq %r13, %rcx
jne 0x2258bb
orl $-0x1, 0x24(%r15)
jmp 0x2258bb
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2258bb
movq 0x8(%r14), %rdi
movq %rcx, %r15
callq *%rax
movq %r15, %rcx
movq %rbx, 0x8(%r14)
movq %rcx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r13, %r13
je 0x2258c3
movq %r13, %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbMallocZero
SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, u64 n){
  void *p;
  testcase( db==0 );
  p = sqlite3DbMallocRaw(db, n);
  if( p ) memset(p, 0, (size_t)n);
  return p;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x22809f
testq %rax, %rax
je 0x225909
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x17380
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: columnMem
static Mem *columnMem(sqlite3_stmt *pStmt, int i){
  Vdbe *pVm;
  Mem *pOut;

  pVm = (Vdbe *)pStmt;
  if( pVm==0 ) return (Mem*)columnNullValue();
  assert( pVm->db );
  sqlite3_mutex_enter(pVm->db->mutex);
  if( pVm->pResultSet!=0 && i<pVm->nResColumn && i>=0 ){
    pOut = &pVm->pResultSet[i];
  }else{
    sqlite3Error(pVm->db, SQLITE_RANGE);
    pOut = (Mem*)columnNullValue();
  }
  return pOut;
}

// Assembly:
pushq %rbx
leaq 0x14c9b2(%rip), %rbx    # 0x372320
testq %rdi, %rdi
je 0x2259a3
movq 0xa0(%rdi), %rax
testq %rax, %rax
je 0x225998
movzwl 0xc0(%rdi), %ecx
cmpl %esi, %ecx
jbe 0x225998
movl %esi, %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, %rbx
jmp 0x2259a3
movq (%rdi), %rdi
pushq $0x19
popq %rsi
callq 0x222800
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: sqlite3_bind_blob64
SQLITE_API int sqlite3_bind_blob64(
  sqlite3_stmt *pStmt,
  int i,
  const void *zData,
  sqlite3_uint64 nData,
  void (*xDel)(void*)
){
  assert( xDel!=SQLITE_DYNAMIC );
  if( nData>0x7fffffff ){
    return invokeValueDestructor(zData, xDel, 0);
  }else{
    return bindText(pStmt, i, zData, (int)nData, xDel, 0);
  }
}

// Assembly:
movq %rcx, %rax
shrq $0x1f, %rax
je 0x225ca5
leaq 0x1(%r8), %rax
cmpq $0x2, %rax
jb 0x225ca1
pushq %rax
movq %rdx, %rdi
callq *%r8
addq $0x8, %rsp
pushq $0x12
popq %rax
retq
xorl %r9d, %r9d
jmp 0x225bb3
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeUnbind
static int vdbeUnbind(Vdbe *p, int i){
  Mem *pVar;
  if( vdbeSafetyNotNull(p) ){
    return SQLITE_MISUSE_BKPT;
  }
  sqlite3_mutex_enter(p->db->mutex);
  if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
    sqlite3Error(p->db, SQLITE_MISUSE);
    sqlite3_mutex_leave(p->db->mutex);
    sqlite3_log(SQLITE_MISUSE,
        "bind on a busy prepared statement: [%s]", p->zSql);
    return SQLITE_MISUSE_BKPT;
  }
  if( i<1 || i>p->nVar ){
    sqlite3Error(p->db, SQLITE_RANGE);
    sqlite3_mutex_leave(p->db->mutex);
    return SQLITE_RANGE;
  }
  i--;
  pVar = &p->aVar[i];
  sqlite3VdbeMemRelease(pVar);
  pVar->flags = MEM_Null;
  p->db->errCode = SQLITE_OK;

  /* If the bit corresponding to this variable in Vdbe.expmask is set, then
  ** binding a new value to this variable invalidates the current query plan.
  **
  ** IMPLEMENTATION-OF: R-57496-20354 If the specific value bound to a host
  ** parameter in the WHERE clause might influence the choice of query plan
  ** for a statement, then the statement will be automatically recompiled,
  ** as if there had been a schema change, on the first sqlite3_step() call
  ** following any change to the bindings of that parameter.
  */
  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || p->expmask==0 );
  if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
    p->expired = 1;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x22570a
testl %eax, %eax
je 0x225d18
movl $0x14960, %edi          # imm = 0x14960
jmp 0x225d50
cmpl $0x2df20da3, 0x24(%rbx) # imm = 0x2DF20DA3
jne 0x225d27
cmpl $0x0, 0x34(%rbx)
js 0x225d63
movq (%rbx), %rdi
pushq $0x15
popq %rbp
movl %ebp, %esi
callq 0x222800
movq 0xf0(%rbx), %rdx
leaq 0x151484(%rip), %rsi    # 0x3771c6
movl %ebp, %edi
xorl %eax, %eax
callq 0x2214a3
movl $0x14968, %edi          # imm = 0x14968
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21ec3c
testl %r14d, %r14d
jle 0x225d71
movswl 0x20(%rbx), %eax
cmpl %r14d, %eax
jge 0x225d8f
movq (%rbx), %rdi
pushq $0x19
popq %rbp
movl %ebp, %esi
callq 0x222800
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal -0x1(%r14), %r15d
movq 0x80(%rbx), %r12
imulq $0x38, %r15, %r13
leaq (%r12,%r13), %rdi
callq 0x224336
movw $0x1, 0x8(%r12,%r13)
movq (%rbx), %rax
andl $0x0, 0x50(%rax)
movl 0x114(%rbx), %eax
xorl %ebp, %ebp
testl %eax, %eax
je 0x225d7e
pushq $0x1
popq %rdx
movl %r15d, %ecx
shll %cl, %edx
cmpl $0x20, %r14d
movl $0x80000000, %ecx       # imm = 0x80000000
cmovbl %edx, %ecx
testl %ecx, %eax
je 0x225d7e
movzwl 0xc6(%rbx), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%rbx)
jmp 0x225d7e
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_bind_pointer
SQLITE_API int sqlite3_bind_pointer(
  sqlite3_stmt *pStmt,
  int i,
  void *pPtr,
  const char *zPTtype,
  void (*xDestructor)(void*)
){
  int rc;
  Vdbe *p = (Vdbe*)pStmt;
  rc = vdbeUnbind(p, i);
  if( rc==SQLITE_OK ){
    sqlite3VdbeMemSetPointer(&p->aVar[i-1], pPtr, zPTtype, xDestructor);
    sqlite3_mutex_leave(p->db->mutex);
  }else if( xDestructor ){
    xDestructor(pPtr);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r13
callq 0x225cf7
movl %eax, %ebp
testl %eax, %eax
je 0x225e73
testq %rbx, %rbx
je 0x225eb8
movq %r14, %rdi
callq *%rbx
jmp 0x225eb8
movq 0x80(%r13), %rax
movslq %r12d, %rcx
imulq $0x38, %rcx, %rcx
testq %r15, %r15
leaq 0x1446e5(%rip), %rdx    # 0x36a570
cmovneq %r15, %rdx
movq %rdx, -0x38(%rax,%rcx)
movq %r14, -0x28(%rax,%rcx)
movw $0x8601, -0x30(%rax,%rcx) # imm = 0x8601
movb $0x70, -0x2d(%rax,%rcx)
testq %rbx, %rbx
leaq 0x150b9(%rip), %rdx     # 0x23af68
cmovneq %rbx, %rdx
movq %rdx, -0x8(%rax,%rcx)
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: sqlite3_bind_text64
SQLITE_API int sqlite3_bind_text64(
  sqlite3_stmt *pStmt,
  int i,
  const char *zData,
  sqlite3_uint64 nData,
  void (*xDel)(void*),
  unsigned char enc
){
  assert( xDel!=SQLITE_DYNAMIC );
  if( nData>0x7fffffff ){
    return invokeValueDestructor(zData, xDel, 0);
  }else{
    if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
    return bindText(pStmt, i, zData, (int)nData, xDel, enc);
  }
}

// Assembly:
movq %rcx, %rax
shrq $0x1f, %rax
je 0x225ef4
leaq 0x1(%r8), %rax
cmpq $0x2, %rax
jb 0x225ef0
pushq %rax
movq %rdx, %rdi
callq *%r8
addq $0x8, %rsp
pushq $0x12
popq %rax
retq
cmpb $0x4, %r9b
movzbl %r9b, %eax
pushq $0x2
popq %r9
cmovnel %eax, %r9d
movzbl %r9b, %r9d
jmp 0x225bb3
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_bind_value
SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
  int rc;
  switch( sqlite3_value_type((sqlite3_value*)pValue) ){
    case SQLITE_INTEGER: {
      rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
      break;
    }
    case SQLITE_FLOAT: {
      rc = sqlite3_bind_double(pStmt, i, pValue->u.r);
      break;
    }
    case SQLITE_BLOB: {
      if( pValue->flags & MEM_Zero ){
        rc = sqlite3_bind_zeroblob(pStmt, i, pValue->u.nZero);
      }else{
        rc = sqlite3_bind_blob(pStmt, i, pValue->z, pValue->n,SQLITE_TRANSIENT);
      }
      break;
    }
    case SQLITE_TEXT: {
      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT,
                              pValue->enc);
      break;
    }
    default: {
      rc = sqlite3_bind_null(pStmt, i);
      break;
    }
  }
  return rc;
}

// Assembly:
movzwl 0x8(%rdx), %eax
movl %eax, %ecx
andl $0x3f, %ecx
leaq 0x14b8ca(%rip), %r8     # 0x3717f0
movzbl (%rcx,%r8), %ecx
decl %ecx
cmpl $0x3, %ecx
ja 0x225cf7
leaq 0x14a5e3(%rip), %r8     # 0x370520
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movq (%rdx), %rdx
jmp 0x225df7
movq 0x10(%rdx), %rax
movl 0xc(%rdx), %ecx
movzbl 0xa(%rdx), %r9d
pushq $-0x1
popq %r8
movq %rax, %rdx
jmp 0x225bb3
btl $0xe, %eax
jb 0x225f88
movq 0x10(%rdx), %rax
movl 0xc(%rdx), %ecx
pushq $-0x1
popq %r8
movq %rax, %rdx
jmp 0x225bae
movsd (%rdx), %xmm0
jmp 0x225cad
movl (%rdx), %edx
jmp 0x225f8f
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_bind_zeroblob64
SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
  int rc;
  Vdbe *p = (Vdbe *)pStmt;
  sqlite3_mutex_enter(p->db->mutex);
  if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
    rc = SQLITE_TOOBIG;
  }else{
    assert( (n & 0x7FFFFFFF)==n );
    rc = sqlite3_bind_zeroblob(pStmt, i, n);
  }
  rc = sqlite3ApiExit(p->db, rc);
  sqlite3_mutex_leave(p->db->mutex);
  return rc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movslq 0x7c(%rdi), %rax
cmpq %rdx, %rax
jae 0x225fe8
pushq $0x12
popq %rsi
jmp 0x225ff5
movq %rbx, %rdi
callq 0x225f8f
movl %eax, %esi
movq (%rbx), %rdi
popq %rbx
jmp 0x22417d
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VListNumToName
SQLITE_PRIVATE const char *sqlite3VListNumToName(VList *pIn, int iVal){
  int i, mx;
  if( pIn==0 ) return 0;
  mx = pIn[1];
  i = 2;
  do{
    if( pIn[i]==iVal ) return (char*)&pIn[i+2];
    i += pIn[i+1];
  }while( i<mx );
  return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x226036
movl 0x4(%rdi), %ecx
pushq $0x2
popq %rdx
movslq %edx, %rax
leaq (%rdi,%rax,4), %rax
cmpl %esi, (%rax)
je 0x226039
addl 0x4(%rax), %edx
cmpl %ecx, %edx
jl 0x226024
xorl %eax, %eax
retq
addq $0x8, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_transfer_bindings
SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
  Vdbe *pFrom = (Vdbe*)pFromStmt;
  Vdbe *pTo = (Vdbe*)pToStmt;
  if( pFrom->nVar!=pTo->nVar ){
    return SQLITE_ERROR;
  }
  assert( (pTo->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || pTo->expmask==0 );
  if( pTo->expmask ){
    pTo->expired = 1;
  }
  assert( (pFrom->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || pFrom->expmask==0 );
  if( pFrom->expmask ){
    pFrom->expired = 1;
  }
  return sqlite3TransferBindings(pFromStmt, pToStmt);
}

// Assembly:
movzwl 0x20(%rdi), %eax
cmpw 0x20(%rsi), %ax
jne 0x2260cf
cmpl $0x0, 0x114(%rsi)
je 0x2260a6
movzwl 0xc6(%rsi), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%rsi)
cmpl $0x0, 0x114(%rdi)
je 0x2260c2
movzwl 0xc6(%rdi), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%rdi)
pushq %rax
callq 0x2260d3
xorl %eax, %eax
addq $0x8, %rsp
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_stmt_status
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
  Vdbe *pVdbe = (Vdbe*)pStmt;
  u32 v;
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !pStmt
   || (op!=SQLITE_STMTSTATUS_MEMUSED && (op<0||op>=ArraySize(pVdbe->aCounter)))
  ){
    (void)SQLITE_MISUSE_BKPT;
    return 0;
  }
#endif
  if( op==SQLITE_STMTSTATUS_MEMUSED ){
    sqlite3 *db = pVdbe->db;
    sqlite3_mutex_enter(db->mutex);
    v = 0;
    db->pnBytesFreed = (int*)&v;
    sqlite3VdbeClearObject(db, pVdbe);
    sqlite3DbFree(db, pVdbe);
    db->pnBytesFreed = 0;
    sqlite3_mutex_leave(db->mutex);
  }else{
    v = pVdbe->aCounter[op];
    if( resetFlag ) pVdbe->aCounter[op] = 0;
  }
  return (int)v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x63, %esi
jne 0x2261cb
movq (%rbx), %r14
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %r15, 0x2d0(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21f1a4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22d0fc
andq $0x0, 0x2d0(%r14)
movl (%r15), %eax
jmp 0x2261e1
movslq %esi, %rcx
movl 0xd0(%rbx,%rcx,4), %eax
testl %edx, %edx
je 0x2261e1
andl $0x0, 0xd0(%rbx,%rcx,4)
addq $0x10, %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: sqlite3_value_numeric_type
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
  int eType = sqlite3_value_type(pVal);
  if( eType==SQLITE_TEXT ){
    Mem *pMem = (Mem*)pVal;
    applyNumericAffinity(pMem, 0);
    eType = sqlite3_value_type(pVal);
  }
  return eType;
}

// Assembly:
movzwl 0x8(%rdi), %eax
andl $0x3f, %eax
movabsq $0x4000400040004, %rcx  # imm = 0x4000400040004
btq %rax, %rcx
jae 0x226599
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2265a5
movzwl 0x8(%rbx), %eax
andl $0x3f, %eax
popq %rbx
leaq 0x14b250(%rip), %rcx    # 0x3717f0
movzbl (%rax,%rcx), %eax
retq