LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_next_stmt
SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
  sqlite3_stmt *pNext;
  sqlite3_mutex_enter(pDb->mutex);
  if( pStmt==0 ){
    pNext = (sqlite3_stmt*)pDb->pVdbe;
  }else{
    pNext = (sqlite3_stmt*)((Vdbe*)pStmt)->pNext;
  }
  sqlite3_mutex_leave(pDb->mutex);
  return pNext;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x114fb
callq *0x78e40(%rip)          # 0x8a318
movq 0x18(%rbx), %rdi
addq $0x8, %rbx
leaq 0x68(%r14), %rax
testq %r14, %r14
cmoveq %rbx, %rax
movq (%rax), %rbx
testq %rdi, %rdi
je 0x1150d
callq *0x78e2f(%rip)          # 0x8a328
jmp 0x1150d
addq $0x8, %rbx
leaq 0x68(%r14), %rax
testq %r14, %r14
cmoveq %rbx, %rax
movq (%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeUsesBtree
SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){
  assert( i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8 );
  assert( i<(int)sizeof(p->btreeMask)*8 );
  p->btreeMask |= ((yDbMask)1)<<i;
  if( i!=1 && sqlite3BtreeSharable(p->db->aDb[i].pBt) ){
    p->lockMask |= ((yDbMask)1)<<i;
  }
}

// Assembly:
movl %esi, %ecx
movl $0x1, %eax
shll %cl, %eax
orl %eax, 0xa0(%rdi)
cmpl $0x1, %esi
je 0x12043
movq (%rdi), %rdx
movq 0x20(%rdx), %rdx
movslq %ecx, %rcx
shlq $0x5, %rcx
movq 0x8(%rdx,%rcx), %rcx
cmpb $0x0, 0x11(%rcx)
je 0x12043
orl %eax, 0xa4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeChangeP4
SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
  Op *pOp;
  sqlite3 *db;
  assert( p!=0 );
  db = p->db;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( p->aOp==0 || db->mallocFailed ){
    if( n!=P4_VTAB ){
      freeP4(db, n, (void*)*(char**)&zP4);
    }
    return;
  }
  assert( p->nOp>0 );
  assert( addr<p->nOp );
  if( addr<0 ){
    addr = p->nOp - 1;
  }
  pOp = &p->aOp[addr];
  assert( pOp->p4type==P4_NOTUSED || pOp->p4type==P4_INT32 );
  freeP4(db, pOp->p4type, pOp->p4.p);
  pOp->p4.p = 0;
  if( n==P4_INT32 ){
    /* Note: this cast is safe, because the origin data point was an int
    ** that was cast to a (const char *). */
    pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
    pOp->p4type = P4_INT32;
  }else if( zP4==0 ){
    pOp->p4.p = 0;
    pOp->p4type = P4_NOTUSED;
  }else if( n==P4_KEYINFO ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = P4_KEYINFO;
  }else if( n==P4_VTAB ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = P4_VTAB;
    sqlite3VtabLock((VTable *)zP4);
    assert( ((VTable *)zP4)->db==p->db );
  }else if( n<0 ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = (signed char)n;
  }else{
    if( n==0 ) n = sqlite3Strlen30(zP4);
    pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
    pOp->p4type = P4_DYNAMIC;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rdi, %r15
movq (%rdi), %rdi
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x12067
cmpb $0x0, 0x50(%rdi)
je 0x12087
cmpl $-0xa, %r14d
je 0x12165
movl %r14d, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x246b5
testl %esi, %esi
jns 0x12091
movl 0x34(%r15), %esi
decl %esi
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %r12
movsbl 0x1(%r12), %esi
movq 0x10(%r12), %rdx
callq 0x246b5
movq $0x0, 0x10(%r12)
cmpl $-0xe, %r14d
jne 0x120cb
movl %ebx, 0x10(%r12)
movb $-0xe, 0x1(%r12)
jmp 0x12165
testq %rbx, %rbx
je 0x120e9
cmpl $-0xa, %r14d
je 0x120f1
cmpl $-0x6, %r14d
jne 0x12101
movq %rbx, 0x10(%r12)
movb $-0x6, 0x1(%r12)
jmp 0x12165
movb $0x0, 0x1(%r12)
jmp 0x12165
movq %rbx, 0x10(%r12)
movb $-0xa, 0x1(%r12)
incl 0x18(%rbx)
jmp 0x12165
testl %r14d, %r14d
js 0x1215b
jne 0x12124
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %rbx, %rax
incl %r14d
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x12111
andl $0x3fffffff, %r14d      # imm = 0x3FFFFFFF
movq (%r15), %rdi
leal 0x1(%r14), %esi
callq 0x11c9d
movq %rax, %r15
testq %rax, %rax
je 0x1214e
movl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x7230
movb $0x0, (%r15,%r14)
movq %r15, 0x10(%r12)
movb $-0x1, 0x1(%r12)
jmp 0x12165
movq %rbx, 0x10(%r12)
movb %r14b, 0x1(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeChangeToNoop
SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
  if( p->aOp ){
    VdbeOp *pOp = &p->aOp[addr];
    sqlite3 *db = p->db;
    freeP4(db, pOp->p4type, pOp->p4.p);
    memset(pOp, 0, sizeof(pOp[0]));
    pOp->opcode = OP_Noop;
    if( addr==p->nOp-1 ) p->nOp--;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x121c7
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %r12
leaq (%r12,%r12,2), %r13
movq (%rdi), %rdi
movsbl 0x1(%r15,%r13,8), %esi
movq 0x10(%r15,%r13,8), %rdx
callq 0x246b5
xorps %xmm0, %xmm0
movups %xmm0, (%r15,%r13,8)
movq $0x0, 0x10(%r15,%r13,8)
movb $-0x69, (%r15,%r13,8)
movl 0x34(%r14), %eax
decl %eax
cmpl %r12d, %eax
jne 0x121c7
movl %ebx, 0x34(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_enable_load_extension
SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
  sqlite3_mutex_enter(db->mutex);
  if( onoff ){
    db->flags |= SQLITE_LoadExtension;
  }else{
    db->flags &= ~SQLITE_LoadExtension;
  }
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x1393f
callq *0x769d9(%rip)          # 0x8a318
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl $0xffbfffff, %ecx       # imm = 0xFFBFFFFF
andl 0x2c(%rbx), %ecx
shll $0x16, %eax
orl %ecx, %eax
movl %eax, 0x2c(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x13965
callq *0x769c3(%rip)          # 0x8a328
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_reset_auto_extension
SQLITE_API void sqlite3_reset_auto_extension(void){
#ifndef SQLITE_OMIT_AUTOINIT
  if( sqlite3_initialize()==SQLITE_OK )
#endif
  {
#if SQLITE_THREADSAFE
    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
    wsdAutoextInit;
    sqlite3_mutex_enter(mutex);
    sqlite3_free(wsdAutoext.aExt);
    wsdAutoext.aExt = 0;
    wsdAutoext.nExt = 0;
    sqlite3_mutex_leave(mutex);
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x9c60
testl %eax, %eax
jne 0x13b45
movb $0x1, %bpl
cmpl $0x0, 0x76799(%rip)     # 0x8a294
je 0x13b1d
movl $0x2, %edi
callq *0x76800(%rip)          # 0x8a308
testq %rax, %rax
je 0x13b1d
movq %rax, %rbx
movq %rax, %rdi
callq *0x767ff(%rip)          # 0x8a318
xorl %ebp, %ebp
jmp 0x13b1f
xorl %ebx, %ebx
movq 0x7832a(%rip), %rdi     # 0x8be50
callq 0xa4bf
movq $0x0, 0x7831a(%rip) # 0x8be50
movl $0x0, 0x78308(%rip)     # 0x8be48
testb %bpl, %bpl
je 0x13b4c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x767cd(%rip)          # 0x8a328
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3PCacheBufferSetup
SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
  if( pcache1.isInit ){
    PgFreeslot *p;
    sz = ROUNDDOWN8(sz);
    pcache1.szSlot = sz;
    pcache1.nSlot = pcache1.nFreeSlot = n;
    pcache1.nReserve = n>90 ? 10 : (n/10 + 1);
    pcache1.pStart = pBuf;
    pcache1.pFree = 0;
    pcache1.bUnderPressure = 0;
    while( n-- ){
      p = (PgFreeslot*)pBuf;
      p->pNext = pcache1.pFree;
      pcache1.pFree = p;
      pBuf = (void*)&((char*)pBuf)[sz];
    }
    pcache1.pEnd = pBuf;
  }
}

// Assembly:
cmpl $0x0, 0x77010(%rip)     # 0x8bf68
je 0x14ffa
andl $-0x8, %esi
movl %esi, 0x77005(%rip)     # 0x8bf6c
movl %edx, 0x7702b(%rip)     # 0x8bf98
movl %edx, 0x76ffd(%rip)     # 0x8bf70
cmpl $0x5b, %edx
jl 0x14f95
movl $0xa, 0x76ff2(%rip)     # 0x8bf74
movq %rdi, 0x76fef(%rip)     # 0x8bf78
movl $0x0, 0x77009(%rip)     # 0x8bf9c
jmp 0x14fd4
movslq %edx, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
sarq $0x22, %rcx
shrq $0x3f, %rax
addl %ecx, %eax
incl %eax
movl %eax, 0x76fc0(%rip)     # 0x8bf74
movq %rdi, 0x76fbd(%rip)     # 0x8bf78
movq $0x0, 0x76fca(%rip) # 0x8bf90
movl $0x0, 0x76fcc(%rip)     # 0x8bf9c
testl %edx, %edx
je 0x14ff3
movslq %esi, %rax
xorl %ecx, %ecx
movq %rcx, (%rdi)
movq %rdi, %rcx
addq %rax, %rdi
decl %edx
jne 0x14fd9
movq %rdi, %rcx
subq %rax, %rcx
movq %rcx, 0x76f9d(%rip)     # 0x8bf90
movq %rdi, 0x76f86(%rip)     # 0x8bf80
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_busy_handler
SQLITE_API int sqlite3_busy_handler(
  sqlite3 *db,
  int (*xBusy)(void*,int),
  void *pArg
){
  sqlite3_mutex_enter(db->mutex);
  db->busyHandler.xFunc = xBusy;
  db->busyHandler.pArg = pArg;
  db->busyHandler.nBusy = 0;
  db->busyTimeout = 0;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x15caf
callq *0x74696(%rip)          # 0x8a318
movq 0x18(%rbx), %rdi
movq %r15, 0x298(%rbx)
movq %r14, 0x2a0(%rbx)
xorl %eax, %eax
movl %eax, 0x2a8(%rbx)
movl %eax, 0x2f8(%rbx)
testq %rdi, %rdi
je 0x15ccb
callq *0x7467b(%rip)          # 0x8a328
jmp 0x15ccb
movq %r15, 0x298(%rbx)
movq %r14, 0x2a0(%rbx)
xorl %eax, %eax
movl %eax, 0x2a8(%rbx)
movl %eax, 0x2f8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_progress_handler
SQLITE_API void sqlite3_progress_handler(
  sqlite3 *db, 
  int nOps,
  int (*xProgress)(void*), 
  void *pArg
){
  sqlite3_mutex_enter(db->mutex);
  if( nOps>0 ){
    db->xProgress = xProgress;
    db->nProgressOps = (unsigned)nOps;
    db->pProgressArg = pArg;
  }else{
    db->xProgress = 0;
    db->nProgressOps = 0;
    db->pProgressArg = 0;
  }
  sqlite3_mutex_leave(db->mutex);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x15cf4
callq *0x74624(%rip)          # 0x8a318
xorl %eax, %eax
testl %ebp, %ebp
cmovleq %rax, %r15
movl $0x0, %ecx
cmovgl %ebp, %ecx
cmovleq %rax, %rbx
movq %r15, 0x180(%r14)
movl %ecx, 0x190(%r14)
movq %rbx, 0x188(%r14)
movq 0x18(%r14), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x15d36
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x745f2(%rip)          # 0x8a328
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_trace
SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
  void *pOld;
  sqlite3_mutex_enter(db->mutex);
  pOld = db->pTraceArg;
  db->xTrace = xTrace;
  db->pTraceArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pOld;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x16547
callq *0x73df7(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0xc0(%r15), %rbx
movq %r12, 0xb8(%r15)
movq %r14, 0xc0(%r15)
testq %rdi, %rdi
je 0x1655c
callq *0x73de3(%rip)          # 0x8a328
jmp 0x1655c
movq 0xc0(%r15), %rbx
movq %r12, 0xb8(%r15)
movq %r14, 0xc0(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_profile
SQLITE_API void *sqlite3_profile(
  sqlite3 *db,
  void (*xProfile)(void*,const char*,sqlite_uint64),
  void *pArg
){
  void *pOld;
  sqlite3_mutex_enter(db->mutex);
  pOld = db->pProfileArg;
  db->xProfile = xProfile;
  db->pProfileArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pOld;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x165b1
callq *0x73d8d(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0xd0(%r15), %rbx
movq %r12, 0xc8(%r15)
movq %r14, 0xd0(%r15)
testq %rdi, %rdi
je 0x165c6
callq *0x73d79(%rip)          # 0x8a328
jmp 0x165c6
movq 0xd0(%r15), %rbx
movq %r12, 0xc8(%r15)
movq %r14, 0xd0(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_commit_hook
SQLITE_API void *sqlite3_commit_hook(
  sqlite3 *db,              /* Attach the hook to this database */
  int (*xCallback)(void*),  /* Function to invoke on each commit */
  void *pArg                /* Argument to the function */
){
  void *pOld;
  sqlite3_mutex_enter(db->mutex);
  pOld = db->pCommitArg;
  db->xCommitCallback = xCallback;
  db->pCommitArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pOld;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x1661b
callq *0x73d23(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0xd8(%r15), %rbx
movq %r12, 0xe0(%r15)
movq %r14, 0xd8(%r15)
testq %rdi, %rdi
je 0x16630
callq *0x73d0f(%rip)          # 0x8a328
jmp 0x16630
movq 0xd8(%r15), %rbx
movq %r12, 0xe0(%r15)
movq %r14, 0xd8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_update_hook
SQLITE_API void *sqlite3_update_hook(
  sqlite3 *db,              /* Attach the hook to this database */
  void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
  void *pArg                /* Argument to the function */
){
  void *pRet;
  sqlite3_mutex_enter(db->mutex);
  pRet = db->pUpdateArg;
  db->xUpdateCallback = xCallback;
  db->pUpdateArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pRet;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x16685
callq *0x73cb9(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0xf8(%r15), %rbx
movq %r12, 0x100(%r15)
movq %r14, 0xf8(%r15)
testq %rdi, %rdi
je 0x1669a
callq *0x73ca5(%rip)          # 0x8a328
jmp 0x1669a
movq 0xf8(%r15), %rbx
movq %r12, 0x100(%r15)
movq %r14, 0xf8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_rollback_hook
SQLITE_API void *sqlite3_rollback_hook(
  sqlite3 *db,              /* Attach the hook to this database */
  void (*xCallback)(void*), /* Callback function */
  void *pArg                /* Argument to the function */
){
  void *pRet;
  sqlite3_mutex_enter(db->mutex);
  pRet = db->pRollbackArg;
  db->xRollbackCallback = xCallback;
  db->pRollbackArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pRet;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x166ef
callq *0x73c4f(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0xe8(%r15), %rbx
movq %r12, 0xf0(%r15)
movq %r14, 0xe8(%r15)
testq %rdi, %rdi
je 0x16704
callq *0x73c3b(%rip)          # 0x8a328
jmp 0x16704
movq 0xe8(%r15), %rbx
movq %r12, 0xf0(%r15)
movq %r14, 0xe8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_wal_hook
SQLITE_API void *sqlite3_wal_hook(
  sqlite3 *db,                    /* Attach the hook to this db handle */
  int(*xCallback)(void *, sqlite3*, const char*, int),
  void *pArg                      /* First argument passed to xCallback() */
){
#ifndef SQLITE_OMIT_WAL
  void *pRet;
  sqlite3_mutex_enter(db->mutex);
  pRet = db->pWalArg;
  db->xWalCallback = xCallback;
  db->pWalArg = pArg;
  sqlite3_mutex_leave(db->mutex);
  return pRet;
#else
  return 0;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x167e6
callq *0x73b58(%rip)          # 0x8a318
movq 0x18(%r15), %rdi
movq 0x110(%r15), %rbx
movq %r12, 0x108(%r15)
movq %r14, 0x110(%r15)
testq %rdi, %rdi
je 0x167fb
callq *0x73b44(%rip)          # 0x8a328
jmp 0x167fb
movq 0x110(%r15), %rbx
movq %r12, 0x108(%r15)
movq %r14, 0x110(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_create_collation
SQLITE_API int sqlite3_create_collation(
  sqlite3* db, 
  const char *zName, 
  int enc, 
  void* pCtx,
  int(*xCompare)(void*,int,const void*,int,const void*)
){
  int rc;
  sqlite3_mutex_enter(db->mutex);
  assert( !db->mallocFailed );
  rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, 0);
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x173b8
callq *0x72f60(%rip)          # 0x8a318
movzbl %bpl, %edx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x173f6
movq %rbx, %rdi
movl %eax, %esi
callq 0xef8a
movl %eax, %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x173eb
callq *0x72f3d(%rip)          # 0x8a328
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_create_collation_v2
SQLITE_API int sqlite3_create_collation_v2(
  sqlite3* db, 
  const char *zName, 
  int enc, 
  void* pCtx,
  int(*xCompare)(void*,int,const void*,int,const void*),
  void(*xDel)(void*)
){
  int rc;
  sqlite3_mutex_enter(db->mutex);
  assert( !db->mallocFailed );
  rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x17699
callq *0x72c7f(%rip)          # 0x8a318
movzbl %bpl, %edx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x173f6
movq %rbx, %rdi
movl %eax, %esi
callq 0xef8a
movl %eax, %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x176cc
callq *0x72c5c(%rip)          # 0x8a328
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_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_collation_needed
SQLITE_API int sqlite3_collation_needed(
  sqlite3 *db, 
  void *pCollNeededArg, 
  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
){
  sqlite3_mutex_enter(db->mutex);
  db->xCollNeeded = xCollNeeded;
  db->xCollNeeded16 = 0;
  db->pCollNeededArg = pCollNeededArg;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x177b0
callq *0x72b92(%rip)          # 0x8a318
movq 0x18(%r14), %rdi
movq %r15, 0x118(%r14)
movq $0x0, 0x120(%r14)
movq %rbx, 0x128(%r14)
testq %rdi, %rdi
je 0x177c9
callq *0x72b7a(%rip)          # 0x8a328
jmp 0x177c9
movq %r15, 0x118(%r14)
movq $0x0, 0x120(%r14)
movq %rbx, 0x128(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_collation_needed16
SQLITE_API int sqlite3_collation_needed16(
  sqlite3 *db, 
  void *pCollNeededArg, 
  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
){
  sqlite3_mutex_enter(db->mutex);
  db->xCollNeeded = 0;
  db->xCollNeeded16 = xCollNeeded16;
  db->pCollNeededArg = pCollNeededArg;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x17818
callq *0x72b2a(%rip)          # 0x8a318
movq 0x18(%r14), %rdi
movq $0x0, 0x118(%r14)
movq %r15, 0x120(%r14)
movq %rbx, 0x128(%r14)
testq %rdi, %rdi
je 0x17831
callq *0x72b12(%rip)          # 0x8a328
jmp 0x17831
movq $0x0, 0x118(%r14)
movq %r15, 0x120(%r14)
movq %rbx, 0x128(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_extended_result_codes
SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
  sqlite3_mutex_enter(db->mutex);
  db->errMask = onoff ? 0xffffffff : 0xff;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x178b6
callq *0x72a81(%rip)          # 0x8a318
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
movq 0x18(%rbx), %rdi
orl $0xff, %eax
movl %eax, 0x48(%rbx)
testq %rdi, %rdi
je 0x178c4
callq *0x72a74(%rip)          # 0x8a328
jmp 0x178c4
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
orl $0xff, %eax
movl %eax, 0x48(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3MallocAlarm
static void sqlite3MallocAlarm(int nByte){
  void (*xCallback)(void*,sqlite3_int64,int);
  sqlite3_int64 nowUsed;
  void *pArg;
  if( mem0.alarmCallback==0 ) return;
  xCallback = mem0.alarmCallback;
  nowUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
  pArg = mem0.alarmArg;
  mem0.alarmCallback = 0;
  sqlite3_mutex_leave(mem0.mutex);
  xCallback(pArg, nowUsed, nByte);
  sqlite3_mutex_enter(mem0.mutex);
  mem0.alarmCallback = xCallback;
  mem0.alarmArg = pArg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x7352b(%rip), %r15     # 0x8bd18
testq %r15, %r15
je 0x1884a
movl %edi, %ebp
movslq 0x734b5(%rip), %r14     # 0x8bcb0
movq 0x7351e(%rip), %rbx     # 0x8bd20
movq $0x0, 0x7350b(%rip) # 0x8bd18
movq 0x734f4(%rip), %rdi     # 0x8bd08
testq %rdi, %rdi
je 0x1881f
callq *0x71b09(%rip)          # 0x8a328
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *%r15
movq 0x734d7(%rip), %rdi     # 0x8bd08
testq %rdi, %rdi
je 0x1883c
callq *0x71adc(%rip)          # 0x8a318
movq %r15, 0x734d5(%rip)     # 0x8bd18
movq %rbx, 0x734d6(%rip)     # 0x8bd20
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: unixShmUnmap
static int unixShmUnmap(
  sqlite3_file *fd,               /* The underlying database file */
  int deleteFlag                  /* Delete shared-memory if true */
){
  unixShm *p;                     /* The connection to be closed */
  unixShmNode *pShmNode;          /* The underlying shared-memory file */
  unixShm **pp;                   /* For looping over sibling connections */
  unixFile *pDbFd;                /* The underlying database file */

  pDbFd = (unixFile*)fd;
  p = pDbFd->pShm;
  if( p==0 ) return SQLITE_OK;
  pShmNode = p->pShmNode;

  assert( pShmNode==pDbFd->pInode->pShmNode );
  assert( pShmNode->pInode==pDbFd->pInode );

  /* Remove connection p from the set of connections associated
  ** with pShmNode */
  sqlite3_mutex_enter(pShmNode->mutex);
  for(pp=&pShmNode->pFirst; (*pp)!=p; pp = &(*pp)->pNext){}
  *pp = p->pNext;

  /* Free the connection p */
  sqlite3_free(p);
  pDbFd->pShm = 0;
  sqlite3_mutex_leave(pShmNode->mutex);

  /* If pShmNode->nRef has reached 0, then close the underlying
  ** shared-memory file, too */
  unixEnterMutex();
  assert( pShmNode->nRef>0 );
  pShmNode->nRef--;
  if( pShmNode->nRef==0 ){
    if( deleteFlag && pShmNode->h>=0 ) osUnlink(pShmNode->zFilename);
    unixShmPurge(pDbFd);
  }
  unixLeaveMutex();

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0x1a19d
movl %esi, %ebp
movq %rdi, %rbx
movq (%r14), %r15
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1a0fd
callq *0x7021b(%rip)          # 0x8a318
leaq 0x38(%r15), %rcx
movq %rcx, %rax
movq (%rcx), %rdx
leaq 0x8(%rdx), %rcx
cmpq %r14, %rdx
jne 0x1a101
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
callq 0xa4bf
movq $0x0, 0x40(%rbx)
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1a136
callq *0x701f2(%rip)          # 0x8a328
cmpl $0x0, 0x70157(%rip)     # 0x8a294
je 0x1a158
movl $0x2, %edi
callq *0x701be(%rip)          # 0x8a308
testq %rax, %rax
je 0x1a158
movq %rax, %rdi
callq *0x701c0(%rip)          # 0x8a318
decl 0x30(%r15)
jne 0x1a17b
testl %ebp, %ebp
je 0x1a173
cmpl $0x0, 0x18(%r15)
js 0x1a173
movq 0x10(%r15), %rdi
callq *0x70705(%rip)          # 0x8a878
movq %rbx, %rdi
callq 0x1aad5
cmpl $0x0, 0x70112(%rip)     # 0x8a294
je 0x1a19d
movl $0x2, %edi
callq *0x70179(%rip)          # 0x8a308
testq %rax, %rax
je 0x1a19d
movq %rax, %rdi
callq *0x7018b(%rip)          # 0x8a328
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: robust_open
static int robust_open(const char *z, int f, mode_t m){
  int fd;
  mode_t m2 = m ? m : SQLITE_DEFAULT_FILE_PERMISSIONS;
  while(1){
#if defined(O_CLOEXEC)
    fd = osOpen(z,f|O_CLOEXEC,m2);
#else
    fd = osOpen(z,f,m2);
#endif
    if( fd<0 ){
      if( errno==EINTR ) continue;
      break;
    }
    if( fd>=SQLITE_MINIMUM_FILE_DESCRIPTOR ) break;
    osClose(fd);
    sqlite3_log(SQLITE_WARNING, 
                "attempt to open \"%s\" as file descriptor %d", z, fd);
    fd = -1;
    if( osOpen("/dev/null", f, m)<0 ) break;
  }
  if( fd>=0 ){
    if( m!=0 ){
      struct stat statbuf;
      if( osFstat(fd, &statbuf)==0 
       && statbuf.st_size==0
       && (statbuf.st_mode&0777)!=m 
      ){
        osFchmod(fd, m);
      }
    }
#if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
    osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
#endif
  }
  return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
testl %edx, %edx
movl $0x1a4, %r12d           # imm = 0x1A4
cmovnel %edx, %r12d
movl %esi, %r13d
orl $0x80000, %r13d         # imm = 0x80000
movq %r15, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq *0x70258(%rip)          # 0x8a6f8
movl %eax, %ebp
testl %eax, %eax
js 0x1a4e3
cmpl $0x2, %ebp
ja 0x1a4ef
movl %ebp, %edi
callq *0x7025d(%rip)          # 0x8a710
movl $0x1c, %edi
leaq 0x56fdc(%rip), %rsi     # 0x7149b
movq %r15, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xba6d
leaq 0x56ff4(%rip), %rdi     # 0x714c6
movl %r14d, %esi
movl %ebx, %edx
callq *0x7021b(%rip)          # 0x8a6f8
testl %eax, %eax
jns 0x1a491
jmp 0x1a525
callq 0x7030
cmpl $0x4, (%rax)
je 0x1a491
jmp 0x1a52a
testl %ebx, %ebx
je 0x1a52a
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
callq *0x70270(%rip)          # 0x8a770
testl %eax, %eax
jne 0x1a52a
cmpq $0x0, 0x38(%rsp)
jne 0x1a52a
movl $0x1ff, %eax            # imm = 0x1FF
andl 0x20(%rsp), %eax
cmpl %ebx, %eax
je 0x1a52a
movl %ebp, %edi
movl %ebx, %esi
callq *0x70325(%rip)          # 0x8a848
jmp 0x1a52a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeSchema
SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){
  BtShared *pBt = p->pBt;
  sqlite3BtreeEnter(p);
  if( !pBt->pSchema && nBytes ){
    pBt->pSchema = sqlite3DbMallocZero(0, nBytes);
    pBt->xFreeSchema = xFree;
  }
  sqlite3BtreeLeave(p);
  return pBt->pSchema;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r12
callq 0xd3a2
movq 0x40(%r12), %r14
testq %r14, %r14
setne %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x1be70
movl %ebp, %edi
callq 0xa44e
movq %rax, %r14
testq %rax, %rax
je 0x1be66
movslq %ebp, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7180
movq %r14, 0x40(%r12)
movq %r15, 0x48(%r12)
cmpb $0x0, 0x11(%rbx)
je 0x1be97
decl 0x14(%rbx)
jne 0x1be97
movq 0x8(%rbx), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x1be93
callq *0x6e49a(%rip)          # 0x8a328
movq 0x40(%r12), %r14
movb $0x0, 0x12(%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: vdbeFreeOpArray
static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
  if( aOp ){
    Op *pOp;
    for(pOp=aOp; pOp<&aOp[nOp]; pOp++){
      freeP4(db, pOp->p4type, pOp->p4.p);
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
      sqlite3DbFree(db, pOp->zComment);
#endif     
    }
  }
  sqlite3DbFree(db, aOp);
}

// Assembly:
testq %rsi, %rsi
je 0x246b4
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
jle 0x2469e
movslq %edx, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %r15
movq %rbx, %r12
movsbl 0x1(%r12), %esi
movq 0x10(%r12), %rdx
movq %r14, %rdi
callq 0x246b5
addq $0x18, %r12
cmpq %r15, %r12
jb 0x24682
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x9b42
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeEnter
SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){
  int i;
  yDbMask mask;
  sqlite3 *db;
  Db *aDb;
  int nDb;
  if( p->lockMask==0 ) return;  /* The common case */
  db = p->db;
  aDb = db->aDb;
  nDb = db->nDb;
  for(i=0, mask=1; i<nDb; i++, mask += mask){
    if( i!=1 && (mask & p->lockMask)!=0 && ALWAYS(aDb[i].pBt!=0) ){
      sqlite3BtreeEnter(aDb[i].pBt);
    }
  }
}

// Assembly:
cmpl $0x0, 0xa4(%rdi)
je 0x24d8e
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0x28(%rax), %r14
testq %r14, %r14
jle 0x24d86
movq 0x20(%rax), %r15
shlq $0x5, %r14
movl $0x1, %ebp
xorl %r12d, %r12d
cmpq $0x20, %r12
je 0x24d7b
testl %ebp, 0xa4(%rbx)
je 0x24d7b
movq 0x8(%r15,%r12), %rdi
testq %rdi, %rdi
je 0x24d7b
callq 0xd3a2
addl %ebp, %ebp
addq $0x20, %r12
cmpq %r12, %r14
jne 0x24d5e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeCheckFk
SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
  sqlite3 *db = p->db;
  if( (deferred && (db->nDeferredCons+db->nDeferredImmCons)>0) 
   || (!deferred && p->nFkConstraint>0) 
  ){
    p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
    p->errorAction = OE_Abort;
    sqlite3SetString(&p->zErrMsg, db, "FOREIGN KEY constraint failed");
    return SQLITE_ERROR;
  }
  return SQLITE_OK;
}

// Assembly:
movl %esi, %eax
movq (%rdi), %rsi
testl %eax, %eax
je 0x24f27
movq 0x310(%rsi), %rax
addq 0x308(%rsi), %rax
jle 0x24f31
pushq %rax
movl $0x313, 0x94(%rdi)      # imm = 0x313
movb $0x2, 0x98(%rdi)
addq $0x58, %rdi
leaq 0x4c78e(%rip), %rdx     # 0x716a4
xorl %eax, %eax
callq 0x25c31
movl $0x1, %eax
addq $0x8, %rsp
retq
cmpq $0x0, 0xd0(%rdi)
jg 0x24ef9
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeLeave
SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){
  int i;
  yDbMask mask;
  sqlite3 *db;
  Db *aDb;
  int nDb;
  if( p->lockMask==0 ) return;  /* The common case */
  db = p->db;
  aDb = db->aDb;
  nDb = db->nDb;
  for(i=0, mask=1; i<nDb; i++, mask += mask){
    if( i!=1 && (mask & p->lockMask)!=0 && ALWAYS(aDb[i].pBt!=0) ){
      sqlite3BtreeLeave(aDb[i].pBt);
    }
  }
}

// Assembly:
cmpl $0x0, 0xa4(%rdi)
je 0x24fc1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0x28(%rax), %r14
testq %r14, %r14
jle 0x24fb3
movq 0x20(%rax), %r15
shlq $0x5, %r14
movl $0x1, %ebp
xorl %r12d, %r12d
cmpq $0x20, %r12
je 0x24fa8
testl %ebp, 0xa4(%rbx)
je 0x24fa8
movq 0x8(%r15,%r12), %r13
testq %r13, %r13
je 0x24fa8
cmpb $0x0, 0x11(%r13)
je 0x24fa8
decl 0x14(%r13)
jne 0x24fa8
movq 0x8(%r13), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x24fa3
callq *0x65385(%rip)          # 0x8a328
movb $0x0, 0x12(%r13)
addl %ebp, %ebp
addq $0x20, %r12
cmpq %r12, %r14
jne 0x24f6b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/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. */
  int key,          /* If true, retrieve from the btree key, not data. */
  Mem *pMem         /* OUT: Return data in this Mem structure. */
){
  char *zData;        /* Data from the btree layer */
  u32 available = 0;  /* Number of bytes available on the local btree page */
  int rc = SQLITE_OK; /* Return code */

  assert( sqlite3BtreeCursorIsValid(pCur) );

  /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert() 
  ** that both the BtShared and database handle mutexes are held. */
  assert( (pMem->flags & MEM_RowSet)==0 );
  if( key ){
    zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);
  }else{
    zData = (char *)sqlite3BtreeDataFetch(pCur, &available);
  }
  assert( zData!=0 );

  if( offset+amt<=available ){
    sqlite3VdbeMemRelease(pMem);
    pMem->z = &zData[offset];
    pMem->flags = MEM_Blob|MEM_Ephem;
  }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){
    pMem->flags = MEM_Blob|MEM_Dyn|MEM_Term;
    pMem->enc = 0;
    pMem->type = SQLITE_BLOB;
    if( key ){
      rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
    }else{
      rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
    }
    pMem->z[amt] = 0;
    pMem->z[amt+1] = 0;
    if( rc!=SQLITE_OK ){
      sqlite3VdbeMemRelease(pMem);
    }
  }
  pMem->n = (int)amt;

  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl $0x0, 0x4(%rsp)
cmpb $0x1, 0x77(%rdi)
jne 0x2dfc6
xorl %edx, %edx
testl %ebp, %ebp
sete %dl
leaq 0x4(%rsp), %rsi
movq %r12, %rdi
callq 0x31bbd
movq %rax, %r13
jmp 0x2dfc9
xorl %r13d, %r13d
leal (%r14,%r15), %eax
cmpl 0x4(%rsp), %eax
jbe 0x2e007
leal 0x2(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10778
testl %eax, %eax
jne 0x2e021
movl $0x40610, 0x24(%rbx)    # imm = 0x40610
movq 0x8(%rbx), %rcx
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
testl %ebp, %ebp
je 0x2e034
xorl %r8d, %r8d
callq 0x22e69
jmp 0x2e039
movq %rbx, %rdi
callq 0xf1df
movl %r15d, %eax
addq %rax, %r13
movq %r13, 0x8(%rbx)
movw $0x1010, 0x24(%rbx)     # imm = 0x1010
xorl %eax, %eax
movl %r14d, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x128f2
movl %eax, %ebp
movq 0x8(%rbx), %rcx
movl %r14d, %edx
xorl %eax, %eax
movb %al, (%rcx,%rdx)
movq 0x8(%rbx), %rcx
leal 0x1(%r14), %edx
movb %al, (%rcx,%rdx)
testl %ebp, %ebp
je 0x2e021
movq %rbx, %rdi
callq 0xf1df
movl %ebp, %eax
jmp 0x2e021
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeBeginStmt
SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree *p, int iStatement){
  int rc;
  BtShared *pBt = p->pBt;
  sqlite3BtreeEnter(p);
  assert( p->inTrans==TRANS_WRITE );
  assert( (pBt->btsFlags & BTS_READ_ONLY)==0 );
  assert( iStatement>0 );
  assert( iStatement>p->db->nSavepoint );
  assert( pBt->inTransaction==TRANS_WRITE );
  /* At the pager level, a statement transaction is a savepoint with
  ** an index greater than all savepoints created explicitly using
  ** SQL statements. It is illegal to open, release or rollback any
  ** such savepoints while the statement transaction savepoint is active.
  */
  rc = sqlite3PagerOpenSavepoint(pBt->pPager, iStatement);
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
callq 0xd3a2
movq (%r14), %rdi
movl %ebp, %esi
callq 0x2153d
movl %eax, %ebp
cmpb $0x0, 0x11(%rbx)
je 0x2e3bf
decl 0x14(%rbx)
jne 0x2e3bf
movq 0x8(%rbx), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x2e3bb
callq *0x5bf6d(%rip)          # 0x8a328
movb $0x0, 0x12(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeSorterCompare
SQLITE_PRIVATE int sqlite3VdbeSorterCompare(
  const VdbeCursor *pCsr,         /* Sorter cursor */
  Mem *pVal,                      /* Value to compare to current sorter key */
  int nIgnore,                    /* Ignore this many fields at the end */
  int *pRes                       /* OUT: Result of comparison */
){
  VdbeSorter *pSorter = pCsr->pSorter;
  void *pKey; int nKey;           /* Sorter key to compare pVal with */

  pKey = vdbeSorterRowkey(pSorter, &nKey);
  vdbeSorterCompare(pCsr, nIgnore, pVal->z, pVal->n, pKey, nKey, pRes);
  return SQLITE_OK;
}

// Assembly:
movq %rcx, %rax
movq 0x50(%rdi), %r10
movq 0x30(%r10), %rcx
testq %rcx, %rcx
je 0x2fa5d
movq 0x28(%r10), %r9
movslq 0x4(%rcx), %rcx
shlq $0x6, %rcx
leaq (%r9,%rcx), %r8
addq $0x14, %r8
addq %r9, %rcx
addq $0x28, %rcx
jmp 0x2fa65
movq 0x40(%r10), %rcx
leaq 0x8(%rcx), %r8
pushq %rax
movl (%r8), %r11d
movq (%rcx), %r9
movq 0x8(%rsi), %rcx
movl 0x20(%rsi), %r8d
movq 0x10(%rdi), %rdi
movq 0x48(%r10), %rsi
pushq %rax
pushq %r11
callq 0x34707
addq $0x10, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3AnalysisLoad
SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
  analysisInfo sInfo;
  HashElem *i;
  char *zSql;
  int rc;

  assert( iDb>=0 && iDb<db->nDb );
  assert( db->aDb[iDb].pBt!=0 );

  /* Clear any prior statistics */
  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  for(i=sqliteHashFirst(&db->aDb[iDb].pSchema->idxHash);i;i=sqliteHashNext(i)){
    Index *pIdx = sqliteHashData(i);
    sqlite3DefaultRowEst(pIdx);
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    sqlite3DeleteIndexSamples(db, pIdx);
    pIdx->aSample = 0;
#endif
  }

  /* Check to make sure the sqlite_stat1 table exists */
  sInfo.db = db;
  sInfo.zDatabase = db->aDb[iDb].zName;
  if( sqlite3FindTable(db, "sqlite_stat1", sInfo.zDatabase)==0 ){
    return SQLITE_ERROR;
  }

  /* Load new statistics out of the sqlite_stat1 table */
  zSql = sqlite3MPrintf(db, 
      "SELECT tbl,idx,stat FROM %Q.sqlite_stat1", sInfo.zDatabase);
  if( zSql==0 ){
    rc = SQLITE_NOMEM;
  }else{
    rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0);
    sqlite3DbFree(db, zSql);
  }


  /* Load the statistics from the sqlite_stat4 table. */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
  if( rc==SQLITE_OK ){
    int lookasideEnabled = db->lookaside.bEnabled;
    db->lookaside.bEnabled = 0;
    rc = loadStat4(db, sInfo.zDatabase);
    db->lookaside.bEnabled = lookasideEnabled;
  }
#endif

  if( rc==SQLITE_NOMEM ){
    db->mallocFailed = 1;
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movslq %esi, %r14
shlq $0x5, %r14
movq 0x18(%rax,%r14), %rcx
movq 0x28(%rcx), %r15
testq %r15, %r15
je 0x30354
movq 0x10(%r15), %rdi
callq 0x35454
movq (%r15), %r15
testq %r15, %r15
jne 0x3033f
movq 0x20(%rbx), %rax
movq %rbx, 0x8(%rsp)
movq (%rax,%r14), %r14
movq %r14, 0x10(%rsp)
leaq 0x41b5c(%rip), %rsi     # 0x71ec5
movq %rbx, %rdi
movq %r14, %rdx
callq 0x35497
testq %rax, %rax
je 0x303cc
leaq 0x41b29(%rip), %rsi     # 0x71ea9
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11e78
testq %rax, %rax
je 0x303c1
movq %rax, %r14
leaq 0x51ea(%rip), %rdx      # 0x35586
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x12ea3
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9b42
cmpl $0x7, %ebp
jne 0x303d1
movb $0x1, 0x50(%rbx)
movl $0x7, %ebp
jmp 0x303d1
movl $0x1, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeMaxPageCount
SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
  int n;
  sqlite3BtreeEnter(p);
  n = sqlite3PagerMaxPageCount(p->pBt->pPager, mxPage);
  sqlite3BtreeLeave(p);
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0xd3a2
movq 0x8(%r14), %rax
movq (%rax), %rcx
testl %ebx, %ebx
jle 0x316ca
movl %ebx, 0xc0(%rcx)
jmp 0x316d0
movl 0xc0(%rcx), %ebx
cmpb $0x0, 0x11(%r14)
je 0x316f1
decl 0x14(%r14)
jne 0x316f1
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x316ec
callq *0x58c3c(%rip)          # 0x8a328
movb $0x0, 0x12(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: vdbeSorterCompare
static void vdbeSorterCompare(
  const VdbeCursor *pCsr,         /* Cursor object (for pKeyInfo) */
  int nIgnore,                    /* Ignore the last nIgnore fields */
  const void *pKey1, int nKey1,   /* Left side of comparison */
  const void *pKey2, int nKey2,   /* Right side of comparison */
  int *pRes                       /* OUT: Result of comparison */
){
  KeyInfo *pKeyInfo = pCsr->pKeyInfo;
  VdbeSorter *pSorter = pCsr->pSorter;
  UnpackedRecord *r2 = pSorter->pUnpacked;
  int i;

  if( pKey2 ){
    sqlite3VdbeRecordUnpack(pKeyInfo, nKey2, pKey2, r2);
  }

  if( nIgnore ){
    r2->nField = pKeyInfo->nField - nIgnore;
    assert( r2->nField>0 );
    for(i=0; i<r2->nField; i++){
      if( r2->aMem[i].flags & MEM_Null ){
        *pRes = -1;
        return;
      }
    }
    r2->flags |= UNPACKED_PREFIX_MATCH;
  }

  *pRes = sqlite3VdbeRecordCompare(nKey1, pKey1, r2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
testq %r9, %r9
je 0x34738
movl 0x40(%rsp), %esi
movq %r12, %rdi
movq %r9, %rdx
movq %r14, %rcx
callq 0x2f097
movq 0x48(%rsp), %r13
testl %r15d, %r15d
je 0x34781
movzwl 0x6(%r12), %eax
subw %r15w, %ax
movw %ax, 0x8(%r14)
je 0x3477c
cmpw $0x2, %ax
movl $0x1, %ecx
cmovael %eax, %ecx
movq 0x10(%r14), %rax
movzwl %cx, %ecx
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
testb $0x1, 0x24(%rax,%rdx)
jne 0x347a1
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x3476c
orb $0x2, 0xa(%r14)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x32084
movl %eax, (%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3478e
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3DefaultRowEst
SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
  tRowcnt *a = pIdx->aiRowEst;
  int i;
  tRowcnt n;
  assert( a!=0 );
  a[0] = pIdx->pTable->nRowEst;
  if( a[0]<10 ) a[0] = 10;
  n = 10;
  for(i=1; i<=pIdx->nKeyCol; i++){
    a[i] = n;
    if( n>5 ) n--;
  }
  if( pIdx->onError!=OE_None ){
    a[pIdx->nKeyCol] = 1;
  }
}

// Assembly:
movq 0x18(%rdi), %rax
movl 0x38(%rax), %ecx
cmpl $0xb, %ecx
movl $0xa, %edx
cmovbl %edx, %ecx
movq 0x10(%rdi), %rax
movl %ecx, (%rax)
movzwl 0x5e(%rdi), %ecx
testq %rcx, %rcx
je 0x35489
xorl %esi, %esi
movl %edx, 0x4(%rax,%rsi,4)
cmpl $0x6, %edx
adcl $-0x1, %edx
incq %rsi
cmpq %rsi, %rcx
jne 0x35477
cmpb $0x0, 0x62(%rdi)
je 0x35496
movl $0x1, (%rax,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: analysisLoader
static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
  analysisInfo *pInfo = (analysisInfo*)pData;
  Index *pIndex;
  Table *pTable;
  const char *z;

  assert( argc==3 );
  UNUSED_PARAMETER2(NotUsed, argc);

  if( argv==0 || argv[0]==0 || argv[2]==0 ){
    return 0;
  }
  pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
  if( pTable==0 ){
    return 0;
  }
  if( argv[1]==0 ){
    pIndex = 0;
  }else if( sqlite3_stricmp(argv[0],argv[1])==0 ){
    pIndex = sqlite3PrimaryKeyIndex(pTable);
  }else{
    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
  }
  z = argv[2];

  if( pIndex ){
    decodeIntArray((char*)z, pIndex->nKeyCol+1, pIndex->aiRowEst, pIndex);
    if( pIndex->pPartIdxWhere==0 ) pTable->nRowEst = pIndex->aiRowEst[0];
  }else{
    Index fakeIdx;
    fakeIdx.szIdxRow = pTable->szTabRow;
    decodeIntArray((char*)z, 1, &pTable->nRowEst, &fakeIdx);
    pTable->szTabRow = fakeIdx.szIdxRow;
  }

  return 0;
}

// Assembly:
testq %rdx, %rdx
je 0x356cc
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbp
movq (%rdx), %r13
testq %r13, %r13
je 0x356be
movq 0x10(%rbp), %r14
testq %r14, %r14
je 0x356be
movq (%rdi), %r12
movq 0x8(%rdi), %r15
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x35497
testq %rax, %rax
je 0x356be
movq %rax, %rbx
movq 0x8(%rbp), %rsi
testq %rsi, %rsi
je 0x35692
movb (%r13), %dil
testb %dil, %dil
je 0x35622
incq %r13
leaq 0x38dd6(%rip), %rdx     # 0x6e3d0
xorl %eax, %eax
movq %rsi, %rcx
movzbl %dil, %edi
movb (%rdi,%rdx), %r8b
movzbl (%rcx), %r9d
cmpb (%r9,%rdx), %r8b
jne 0x35629
incq %rcx
movb (%r13), %dil
incq %r13
testb %dil, %dil
jne 0x355ff
jmp 0x3562c
xorl %eax, %eax
movq %rsi, %rcx
jmp 0x3562c
movq %rdi, %rax
leaq 0x38d9d(%rip), %rdx     # 0x6e3d0
movb (%rax,%rdx), %al
movzbl (%rcx), %ecx
cmpb (%rcx,%rdx), %al
jne 0x35657
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x35692
movb 0x63(%r15), %al
andb $0x3, %al
cmpb $0x2, %al
je 0x3566a
movq 0x28(%r15), %r15
jmp 0x35642
movq %r12, %rdi
movq %r15, %rdx
callq 0x3514d
movq %rax, %r15
testq %rax, %rax
je 0x35692
movzwl 0x5e(%r15), %esi
incl %esi
movq 0x10(%r15), %rdx
movq %r14, %rdi
movq %r15, %rcx
callq 0x356cf
cmpq $0x0, 0x48(%r15)
jne 0x356be
movq 0x10(%r15), %rax
movl (%rax), %eax
movl %eax, 0x38(%rbx)
jmp 0x356be
movzwl 0x46(%rbx), %eax
movq %rsp, %r15
movw %ax, 0x5c(%r15)
movq %rbx, %rdx
addq $0x38, %rdx
movq %r14, %rdi
movl $0x1, %esi
movq %r15, %rcx
callq 0x356cf
movzwl 0x5c(%r15), %eax
movw %ax, 0x46(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq