LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: rowSetEntryMerge
static struct RowSetEntry *rowSetEntryMerge(
  struct RowSetEntry *pA,    /* First sorted list to be merged */
  struct RowSetEntry *pB     /* Second sorted list to be merged */
){
  struct RowSetEntry head;
  struct RowSetEntry *pTail;

  pTail = &head;
  while( pA && pB ){
    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
    assert( pB->pRight==0 || pB->v<=pB->pRight->v );
    if( pA->v<pB->v ){
      pTail->pRight = pA;
      pA = pA->pRight;
      pTail = pTail->pRight;
    }else if( pB->v<pA->v ){
      pTail->pRight = pB;
      pB = pB->pRight;
      pTail = pTail->pRight;
    }else{
      pA = pA->pRight;
    }
  }
  if( pA ){
    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
    pTail->pRight = pA;
  }else{
    assert( pB==0 || pB->pRight==0 || pB->v<=pB->pRight->v );
    pTail->pRight = pB;
  }
  return head.pRight;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x31(%rbp)
je 0x489db
cmpq $0x0, -0x10(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x489e4
jmp 0x48a63
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x48a1a
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x48a5e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x48a50
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x48a5c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x48a5e
jmp 0x489c4
cmpq $0x0, -0x8(%rbp)
je 0x48a78
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x48a84
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: rowSetListToTree
static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
  int iDepth;           /* Depth of the tree so far */
  struct RowSetEntry *p;       /* Current tree root */
  struct RowSetEntry *pLeft;   /* Left subtree */

  assert( pList!=0 );
  p = pList;
  pList = p->pRight;
  p->pLeft = p->pRight = 0;
  for(iDepth=1; pList; iDepth++){
    pLeft = p;
    p = pList;
    pList = p->pRight;
    p->pLeft = pLeft;
    p->pRight = rowSetNDeepTree(&pList, iDepth);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movl $0x1, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x48b20
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %esi
leaq -0x8(%rbp), %rdi
callq 0x48bc0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x48acf
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: rowSetTreeToList
static void rowSetTreeToList(
  struct RowSetEntry *pIn,         /* Root of the input tree */
  struct RowSetEntry **ppFirst,    /* Write head of the output list here */
  struct RowSetEntry **ppLast      /* Write tail of the output list here */
){
  assert( pIn!=0 );
  if( pIn->pLeft ){
    struct RowSetEntry *p;
    rowSetTreeToList(pIn->pLeft, ppFirst, &p);
    p->pRight = pIn;
  }else{
    *ppFirst = pIn;
  }
  if( pIn->pRight ){
    rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
  }else{
    *ppLast = pIn;
  }
  assert( (*ppLast)->pRight==0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48b72
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x48b30
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x48b7d
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x48ba3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
callq 0x48b30
jmp 0x48bae
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: rowSetNDeepTree
static struct RowSetEntry *rowSetNDeepTree(
  struct RowSetEntry **ppList,
  int iDepth
){
  struct RowSetEntry *p;         /* Root of the new tree */
  struct RowSetEntry *pLeft;     /* Left subtree */
  if( *ppList==0 ){
    return 0;
  }
  if( iDepth==1 ){
    p = *ppList;
    *ppList = p->pRight;
    p->pLeft = p->pRight = 0;
    return p;
  }
  pLeft = rowSetNDeepTree(ppList, iDepth-1);
  p = *ppList;
  if( p==0 ){
    return pLeft;
  }
  p->pLeft = pLeft;
  *ppList = p->pRight;
  p->pRight = rowSetNDeepTree(ppList, iDepth-1);
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x48be6
movq $0x0, -0x8(%rbp)
jmp 0x48c94
cmpl $0x1, -0x14(%rbp)
jne 0x48c28
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48c94
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl $0x1, %esi
callq 0x48bc0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x48c57
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48c94
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl $0x1, %esi
callq 0x48bc0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: execSql
static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
  sqlite3_stmt *pStmt;
  VVA_ONLY( int rc; )
  if( !zSql ){
    return SQLITE_NOMEM;
  }
  if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){
    sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db));
    return sqlite3_errcode(db);
  }
  VVA_ONLY( rc = ) sqlite3_step(pStmt);
  assert( rc!=SQLITE_ROW || (db->flags&SQLITE_CountRows) );
  return vacuumFinalize(db, pStmt, pzErrMsg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x48cc4
movl $0x7, -0x4(%rbp)
jmp 0x48d3d
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x15730
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x48d20
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x154c0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
movb $0x0, %al
callq 0x30360
movq -0x10(%rbp), %rdi
callq 0x15450
movl %eax, -0x4(%rbp)
jmp 0x48d3d
movq -0x28(%rbp), %rdi
callq 0x11160
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x490e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeCommit
SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
  int rc;
  sqlite3BtreeEnter(p);
  rc = sqlite3BtreeCommitPhaseOne(p, 0);
  if( rc==SQLITE_OK ){
    rc = sqlite3BtreeCommitPhaseTwo(p, 0);
  }
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf600
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x48d89
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xf560
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeGetReserve
SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree *p){
  int n;
  sqlite3BtreeEnter(p);
  n = p->pBt->pageSize - p->pBt->usableSize;
  sqlite3BtreeLeave(p);
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x30(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
subl 0x34(%rcx), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSetAutoVacuum
SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){
#ifdef SQLITE_OMIT_AUTOVACUUM
  return SQLITE_READONLY;
#else
  BtShared *pBt = p->pBt;
  int rc = SQLITE_OK;
  u8 av = (u8)autoVacuum;

  sqlite3BtreeEnter(p);
  if( (pBt->btsFlags & BTS_PAGESIZE_FIXED)!=0 && (av ?1:0)!=pBt->autoVacuum ){
    rc = SQLITE_READONLY;
  }else{
    pBt->autoVacuum = av ?1:0;
    pBt->incrVacuum = av==2 ?1:0;
  }
  sqlite3BtreeLeave(p);
  return rc;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movb %al, -0x1d(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x18(%rbp), %rax
movzwl 0x26(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x48e47
movzbl -0x1d(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x21(%rcx), %ecx
cmpl %ecx, %eax
je 0x48e47
movl $0x8, -0x1c(%rbp)
jmp 0x48e7b
movzbl -0x1d(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x21(%rax)
movzbl -0x1d(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x22(%rax)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeGetAutoVacuum
SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
#ifdef SQLITE_OMIT_AUTOVACUUM
  return BTREE_AUTOVACUUM_NONE;
#else
  int rc;
  sqlite3BtreeEnter(p);
  rc = (
    (!p->pBt->autoVacuum)?BTREE_AUTOVACUUM_NONE:
    (!p->pBt->incrVacuum)?BTREE_AUTOVACUUM_FULL:
    BTREE_AUTOVACUUM_INCR
  );
  sqlite3BtreeLeave(p);
  return rc;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x21(%rax)
jne 0x48eba
xorl %eax, %eax
movl %eax, -0x10(%rbp)
jmp 0x48edf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x22(%rax)
setne %dl
xorb $-0x1, %dl
movl $0x2, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: execExecSql
static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
  sqlite3_stmt *pStmt;
  int rc;

  rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
  if( rc!=SQLITE_OK ) return rc;

  while( SQLITE_ROW==sqlite3_step(pStmt) ){
    rc = execSql(db, pzErrMsg, (char*)sqlite3_column_text(pStmt, 0));
    if( rc!=SQLITE_OK ){
      vacuumFinalize(db, pStmt, pzErrMsg);
      return rc;
    }
  }

  return vacuumFinalize(db, pStmt, pzErrMsg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x15730
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x48f30
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x48fa9
jmp 0x48f32
movq -0x28(%rbp), %rdi
callq 0x11160
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jne 0x48f95
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x11fe0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0x48ca0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x48f93
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x490e0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x48fa9
jmp 0x48f32
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x490e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: vacuumFinalize
static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
  int rc;
  rc = sqlite3VdbeFinalize((Vdbe*)pStmt);
  if( rc ){
    sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db));
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xfdc0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x49131
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x154c0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movb $0x0, %al
callq 0x30360
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: growVTrans
static int growVTrans(sqlite3 *db){
  const int ARRAY_INCR = 5;

  /* Grow the sqlite3.aVTrans array if required */
  if( (db->nVTrans%ARRAY_INCR)==0 ){
    VTable **aVTrans;
    int nBytes = sizeof(sqlite3_vtab *) * (db->nVTrans + ARRAY_INCR);
    aVTrans = sqlite3DbRealloc(db, (void *)db->aVTrans, nBytes);
    if( !aVTrans ){
      return SQLITE_NOMEM;
    }
    memset(&aVTrans[db->nVTrans], 0, sizeof(sqlite3_vtab *)*ARRAY_INCR);
    db->aVTrans = aVTrans;
  }

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x5, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x1a4(%rax), %eax
movl $0x5, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x4930c
movq -0x10(%rbp), %rax
movl 0x1a4(%rax), %eax
addl $0x5, %eax
cltq
shlq $0x3, %rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x1c8(%rax), %rsi
movl -0x24(%rbp), %edx
callq 0x1bee0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x492db
movl $0x7, -0x4(%rbp)
jmp 0x49313
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x1a4(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x8200
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1c8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3GetVTable
SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
  VTable *pVtab;
  assert( IsVirtual(pTab) );
  for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
  return pVtab;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x498b5
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x498be
jmp 0x498ce
jmp 0x498c0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x49898
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: vtabDisconnectAll
static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
  VTable *pRet = 0;
  VTable *pVTable = p->pVTable;
  p->pVTable = 0;

  /* Assert that the mutex (if any) associated with the BtShared database 
  ** that contains table p is held by the caller. See header comments 
  ** above function sqlite3VtabUnlockList() for an explanation of why
  ** this makes it safe to access the sqlite3.pDisconnect list of any
  ** database connection that may have an entry in the p->pVTable list.
  */
  assert( db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema) );

  while( pVTable ){
    sqlite3 *db2 = pVTable->db;
    VTable *pNext = pVTable->pNext;
    assert( db2 );
    if( db2==db ){
      pRet = pVTable;
      p->pVTable = pRet;
      pRet->pNext = 0;
    }else{
      pVTable->pNext = db2->pDisconnect;
      db2->pDisconnect = pVTable;
    }
    pVTable = pNext;
  }

  assert( !db || pRet );
  return pRet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x58(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x49982
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x49956
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
jmp 0x49978
movq -0x28(%rbp), %rax
movq 0x1d0(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x1d0(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x4990c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3PagerMaxPageCount
SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
  if( mxPage>0 ){
    pPager->mxPgno = mxPage;
  }
  assert( pPager->eState!=PAGER_OPEN );      /* Called only by OP_MaxPgcnt */
  assert( pPager->mxPgno>=pPager->dbSize );  /* OP_MaxPgcnt enforces this */
  return pPager->mxPgno;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x499ae
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movl 0xc0(%rax), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: findNextHostParameter
static int findNextHostParameter(const char *zSql, int *pnToken){
  int tokenType;
  int nTotal = 0;
  int n;

  *pnToken = 0;
  while( zSql[0] ){
    n = sqlite3GetToken((u8*)zSql, &tokenType);
    assert( n>0 && tokenType!=TK_ILLEGAL );
    if( tokenType==TK_VARIABLE ){
      *pnToken = n;
      break;
    }
    nTotal += n;
    zSql += n;
  }
  return nTotal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x49a2a
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x49ae0
movl %eax, -0x1c(%rbp)
cmpl $0x85, -0x14(%rbp)
jne 0x49a0e
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x49a2a
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x499e1
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3WalCallback
SQLITE_PRIVATE int sqlite3WalCallback(Wal *pWal){
  u32 ret = 0;
  if( pWal ){
    ret = pWal->iCallback;
    pWal->iCallback = 0;
  }
  return (int)ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4a65b
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: growOpArray
static int growOpArray(Vdbe *p){
  VdbeOp *pNew;
  int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
  pNew = sqlite3DbRealloc(p->db, p->aOp, nNew*sizeof(Op));
  if( pNew ){
    p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op);
    p->aOp = pNew;
  }
  return (pNew ? SQLITE_OK : SQLITE_NOMEM);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x4a684
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
shll %eax
movl %eax, -0x18(%rbp)
jmp 0x4a68e
movl $0x2a, %eax
movl %eax, -0x18(%rbp)
jmp 0x4a68e
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
movl %eax, %edx
callq 0x1bee0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4a6ee
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1bac0
cltq
movl $0x18, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdx
movl $0x7, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3KeyInfoAlloc
SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N){
  KeyInfo *p = sqlite3DbMallocZero(db, 
                   sizeof(KeyInfo) + (N+1)*(sizeof(CollSeq*)+1));
  if( p ){
    p->aSortOrder = (u8*)&p->aColl[N+1];
    p->nField = (u16)N;
    p->enc = ENC(db);
    p->db = db;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0x9, %rax, %rax
addq $0x20, %rax
movl %eax, %esi
callq 0x11ca0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4a793
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movb 0x71(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DbStrNDup
SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
  char *zNew;
  if( z==0 ){
    return 0;
  }
  assert( (n&0x7fffffff)==n );
  zNew = sqlite3DbMallocRaw(db, n+1);
  if( zNew ){
    memcpy(zNew, z, n);
    zNew[n] = 0;
  }
  return zNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4a7c4
movq $0x0, -0x8(%rbp)
jmp 0x4a803
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl $0x1, %esi
callq 0x134e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4a7fb
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x82f0
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: allocSpace
static void *allocSpace(
  void *pBuf,          /* Where return pointer will be stored */
  int nByte,           /* Number of bytes to allocate */
  u8 **ppFrom,         /* IN/OUT: Allocate from *ppFrom */
  u8 *pEnd,            /* Pointer to 1 byte past the end of *ppFrom buffer */
  int *pnByte          /* If allocation cannot be made, increment *pnByte */
){
  assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
  if( pBuf ) return pBuf;
  nByte = ROUND8(nByte);
  if( &(*ppFrom)[nByte] <= pEnd ){
    pBuf = (void*)*ppFrom;
    *ppFrom += nByte;
  }else{
    *pnByte += nByte;
  }
  return pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4aa88
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4aadb
movl -0x14(%rbp), %eax
addl $0x7, %eax
andl $-0x8, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
ja 0x4aac8
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4aad3
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ReadSchema
SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse){
  int rc = SQLITE_OK;
  sqlite3 *db = pParse->db;
  assert( sqlite3_mutex_held(db->mutex) );
  if( !db->init.busy ){
    rc = sqlite3Init(db, &pParse->zErrMsg);
  }
  if( rc!=SQLITE_OK ){
    pParse->rc = rc;
    pParse->nErr++;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x99(%rax)
jne 0x4ab5f
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
callq 0x4ab90
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4ab7c
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rax)
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Init
SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
  int i, rc;
  int commit_internal = !(db->flags&SQLITE_InternChanges);
  
  assert( sqlite3_mutex_held(db->mutex) );
  rc = SQLITE_OK;
  db->init.busy = 1;
  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
    if( DbHasProperty(db, i, DB_SchemaLoaded) || i==1 ) continue;
    rc = sqlite3InitOne(db, i, pzErrMsg);
    if( rc ){
      sqlite3ResetOneSchema(db, i);
    }
  }

  /* Once all the other databases have been initialized, load the schema
  ** for the TEMP database. This is loaded last, as the TEMP database
  ** schema may contain references to objects in other databases.
  */
#ifndef SQLITE_OMIT_TEMPDB
  if( rc==SQLITE_OK && ALWAYS(db->nDb>1)
                    && !DbHasProperty(db, 1, DB_SchemaLoaded) ){
    rc = sqlite3InitOne(db, 1, pzErrMsg);
    if( rc ){
      sqlite3ResetOneSchema(db, 1);
    }
  }
#endif

  db->init.busy = 0;
  if( rc==SQLITE_OK && commit_internal ){
    sqlite3CommitInternalChanges(db);
  }

  return rc; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, 0x99(%rax)
movl $0x0, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x18(%rbp)
movb %al, -0x1d(%rbp)
jne 0x4abee
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
setl %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x4abf7
jmp 0x4ac57
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movzwl 0x72(%rax), %eax
andl $0x1, %eax
cmpl $0x1, %eax
je 0x4ac20
cmpl $0x1, -0x14(%rbp)
jne 0x4ac22
jmp 0x4ac49
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x4ace0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x4ac47
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3c200
jmp 0x4ac49
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4abd3
cmpl $0x0, -0x18(%rbp)
jne 0x4acaa
movq -0x8(%rbp), %rax
cmpl $0x1, 0x28(%rax)
jle 0x4acaa
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x38(%rax), %rax
movzwl 0x72(%rax), %eax
andl $0x1, %eax
cmpl $0x1, %eax
je 0x4acaa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x1, %esi
callq 0x4ace0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x4aca8
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3c200
jmp 0x4acaa
movq -0x8(%rbp), %rax
movb $0x0, 0x99(%rax)
cmpl $0x0, -0x18(%rbp)
jne 0x4acca
cmpl $0x0, -0x1c(%rbp)
je 0x4acca
movq -0x8(%rbp), %rdi
callq 0x2f8e0
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSetCacheSize
SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
  BtShared *pBt = p->pBt;
  assert( sqlite3_mutex_held(p->db->mutex) );
  sqlite3BtreeEnter(p);
  sqlite3PagerSetCachesize(pBt->pPager, mxPage);
  sqlite3BtreeLeave(p);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x20da0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VtabUnlockList
SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
  VTable *p = db->pDisconnect;
  db->pDisconnect = 0;

  assert( sqlite3BtreeHoldsAllMutexes(db) );
  assert( sqlite3_mutex_held(db->mutex) );

  if( p ){
    sqlite3ExpirePreparedStatements(db);
    do {
      VTable *pNext = p->pNext;
      sqlite3VtabUnlock(p);
      p = pNext;
    }while( p );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x1d0(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x4b2a0
movq -0x8(%rbp), %rdi
callq 0x14a20
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e700
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4b27a
jmp 0x4b2a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CollapseDatabaseArray
SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3 *db){
  int i, j;
  for(i=j=2; i<db->nDb; i++){
    struct Db *pDb = &db->aDb[i];
    if( pDb->pBt==0 ){
      sqlite3DbFree(db, pDb->zName);
      pDb->zName = 0;
      continue;
    }
    if( j<i ){
      db->aDb[j] = db->aDb[i];
    }
    j++;
  }
  memset(&db->aDb[j], 0, (db->nDb-j)*sizeof(db->aDb[j]));
  db->nDb = j;
  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){
    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
    sqlite3DbFree(db, db->aDb);
    db->aDb = db->aDbStatic;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x2, -0x10(%rbp)
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x4b37c
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4b319
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x9cd0
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4b36e
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4b365
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4b2ca
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
subl -0x10(%rbp), %eax
movslq %eax, %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x8200
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jg 0x4b414
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
addq $0x2c0, %rcx            # imm = 0x2C0
cmpq %rcx, %rax
je 0x4b414
movq -0x8(%rbp), %rdi
addq $0x2c0, %rdi            # imm = 0x2C0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movl $0x40, %edx
callq 0x82f0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rcx
addq $0x2c0, %rcx            # imm = 0x2C0
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FkDelete
SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
  FKey *pFKey;                    /* Iterator variable */
  FKey *pNext;                    /* Copy of pFKey->pNextFrom */

  assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) );
  for(pFKey=pTab->pFKey; pFKey; pFKey=pNext){

    /* Remove the FK from the fkeyHash hash table. */
    if( !db || db->pnBytesFreed==0 ){
      if( pFKey->pPrevTo ){
        pFKey->pPrevTo->pNextTo = pFKey->pNextTo;
      }else{
        void *p = (void *)pFKey->pNextTo;
        const char *z = (p ? pFKey->pNextTo->zTo : pFKey->zTo);
        sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, sqlite3Strlen30(z), p);
      }
      if( pFKey->pNextTo ){
        pFKey->pNextTo->pPrevTo = pFKey->pPrevTo;
      }
    }

    /* EV: R-30323-21917 Each foreign key constraint in SQLite is
    ** classified as either immediate or deferred.
    */
    assert( pFKey->isDeferred==0 || pFKey->isDeferred==1 );

    /* Delete any triggers created to implement actions for this FK. */
#ifndef SQLITE_OMIT_TRIGGER
    fkTriggerDelete(db, pFKey->apTrigger[0]);
    fkTriggerDelete(db, pFKey->apTrigger[1]);
#endif

    pNext = pFKey->pNextFrom;
    sqlite3DbFree(db, pFKey);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4b557
cmpq $0x0, -0x8(%rbp)
je 0x4b460
movq -0x8(%rbp), %rax
cmpq $0x0, 0x328(%rax)
jne 0x4b50f
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x4b481
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x4b4ee
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4b4a6
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x4b4b2
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
addq $0x50, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x92f0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
movq -0x28(%rbp), %rcx
callq 0x46e00
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4b50d
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0x4b50f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x4b6c0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x4b6c0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cd0
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4b43c
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqliteDeleteColumnNames
static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
  int i;
  Column *pCol;
  assert( pTable!=0 );
  if( (pCol = pTable->aCol)!=0 ){
    for(i=0; i<pTable->nCol; i++, pCol++){
      sqlite3DbFree(db, pCol->zName);
      sqlite3ExprDelete(db, pCol->pDflt);
      sqlite3DbFree(db, pCol->zDflt);
      sqlite3DbFree(db, pCol->zType);
      sqlite3DbFree(db, pCol->zColl);
    }
    sqlite3DbFree(db, pTable->aCol);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x4b618
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x4b607
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x47330
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x9cd0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x20(%rbp)
jmp 0x4b58d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x9cd0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VtabClear
SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
  if( !db || db->pnBytesFreed==0 ) vtabDisconnectAll(0, p);
  if( p->azModuleArg ){
    int i;
    for(i=0; i<p->nModuleArg; i++){
      if( i!=1 ) sqlite3DbFree(db, p->azModuleArg[i]);
    }
    sqlite3DbFree(db, p->azModuleArg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4b645
movq -0x8(%rbp), %rax
cmpq $0x0, 0x328(%rax)
jne 0x4b652
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x498e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x4b6ad
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
jge 0x4b69c
cmpl $0x1, -0x14(%rbp)
je 0x4b68f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x9cd0
jmp 0x4b691
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4b664
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x9cd0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: fkTriggerDelete
static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
  if( p ){
    TriggerStep *pStep = p->step_list;
    sqlite3ExprDelete(dbMem, pStep->pWhere);
    sqlite3ExprListDelete(dbMem, pStep->pExprList);
    sqlite3SelectDelete(dbMem, pStep->pSelect);
    sqlite3ExprDelete(dbMem, p->pWhen);
    sqlite3DbFree(dbMem, p);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4b734
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x47330
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x47460
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x47420
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x47330
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9cd0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Utf8Read
SQLITE_PRIVATE u32 sqlite3Utf8Read(
  const unsigned char **pz    /* Pointer to string from which to read char */
){
  unsigned int c;

  /* Same as READ_UTF8() above but without the zTerm parameter.
  ** For this routine, we assume the UTF8 string is always zero-terminated.
  */
  c = *((*pz)++);
  if( c>=0xc0 ){
    c = sqlite3Utf8Trans1[c-0xc0];
    while( (*(*pz) & 0xc0)==0x80 ){
      c = (c<<6) + (0x3f & *((*pz)++));
    }
    if( c<0x80
        || (c&0xFFFFF800)==0xD800
        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }
  }
  return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movzbl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0xc0, -0xc(%rbp)
jb 0x4b7ee
movl -0xc(%rbp), %eax
subl $0xc0, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x5f791(%rip), %rax     # 0xaaf10
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x4b7c0
movl -0xc(%rbp), %eax
shll $0x6, %eax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movzbl (%rcx), %ecx
andl $0x3f, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x4b786
cmpl $0x80, -0xc(%rbp)
jb 0x4b7e5
movl -0xc(%rbp), %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
je 0x4b7e5
movl -0xc(%rbp), %eax
andl $-0x2, %eax
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0x4b7ec
movl $0xfffd, -0xc(%rbp)     # imm = 0xFFFD
jmp 0x4b7ee
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeSwap
SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
  Vdbe tmp, *pTmp;
  char *zTmp;
  tmp = *pA;
  *pA = *pB;
  *pB = tmp;
  pTmp = pA->pNext;
  pA->pNext = pB->pNext;
  pB->pNext = pTmp;
  pTmp = pA->pPrev;
  pA->pPrev = pB->pPrev;
  pB->pPrev = pTmp;
  zTmp = pA->zSql;
  pA->zSql = pB->zSql;
  pB->zSql = zTmp;
  pB->isPrepareV2 = pA->isPrepareV2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x138(%rbp), %rdi
movl $0x128, %edx            # imm = 0x128
callq 0x82f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x128, %edx            # imm = 0x128
callq 0x82f0
movq -0x10(%rbp), %rdi
leaq -0x138(%rbp), %rsi
movl $0x128, %edx            # imm = 0x128
callq 0x82f0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x140(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x140(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x148(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x8(%rbp), %rax
movw 0x9a(%rax), %ax
shrw $0xa, %ax
andw $0x1, %ax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movw %cx, %dx
movw 0x9a(%rax), %cx
andw $0x1, %dx
shlw $0xa, %dx
andw $0xfbff, %cx            # imm = 0xFBFF
orw %dx, %cx
movw %cx, 0x9a(%rax)
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSchemaLocked
SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){
  int rc;
  assert( sqlite3_mutex_held(p->db->mutex) );
  sqlite3BtreeEnter(p);
  rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);
  assert( rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE );
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x29180
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: schemaIsValid
static void schemaIsValid(Parse *pParse){
  sqlite3 *db = pParse->db;
  int iDb;
  int rc;
  int cookie;

  assert( pParse->checkSchema );
  assert( sqlite3_mutex_held(db->mutex) );
  for(iDb=0; iDb<db->nDb; iDb++){
    int openedTransaction = 0;         /* True if a transaction is opened */
    Btree *pBt = db->aDb[iDb].pBt;     /* Btree database to read cookie from */
    if( pBt==0 ) continue;

    /* If there is not already a read-only (or read-write) transaction opened
    ** on the b-tree database, open one now. If a transaction is opened, it 
    ** will be closed immediately after reading the meta-value. */
    if( !sqlite3BtreeIsInReadTrans(pBt) ){
      rc = sqlite3BtreeBeginTrans(pBt, 0);
      if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
        db->mallocFailed = 1;
      }
      if( rc!=SQLITE_OK ) return;
      openedTransaction = 1;
    }

    /* Read the schema cookie from the database. If it does not match the 
    ** value stored as part of the in-memory schema representation,
    ** set Parse.rc to SQLITE_SCHEMA. */
    sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
    if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){
      sqlite3ResetOneSchema(db, iDb);
      pParse->rc = SQLITE_SCHEMA;
    }

    /* Close the transaction, if one was opened. */
    if( openedTransaction ){
      sqlite3BtreeCommit(pBt);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x4bf54
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4beac
jmp 0x4bf46
movq -0x28(%rbp), %rdi
callq 0xe570
cmpl $0x0, %eax
jne 0x4beee
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xe150
movl %eax, -0x18(%rbp)
cmpl $0x7, -0x18(%rbp)
je 0x4bed7
cmpl $0xc0a, -0x18(%rbp)     # imm = 0xC0A
jne 0x4bedf
movq -0x10(%rbp), %rax
movb $0x1, 0x50(%rax)
cmpl $0x0, -0x18(%rbp)
je 0x4bee7
jmp 0x4bf54
movl $0x1, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl $0x1, %esi
leaq -0x1c(%rbp), %rdx
callq 0xe510
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
cmpl (%rcx), %eax
je 0x4bf35
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3c200
movq -0x8(%rbp), %rax
movl $0x11, 0x18(%rax)
cmpl $0x0, -0x20(%rbp)
je 0x4bf44
movq -0x28(%rbp), %rdi
callq 0x48d50
jmp 0x4bf46
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4be6e
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)