LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SchemaGet
SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
  Schema * p;
  if( pBt ){
    p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaClear);
  }else{
    p = (Schema *)sqlite3DbMallocZero(0, sizeof(Schema));
  }
  if( !p ){
    db->mallocFailed = 1;
  }else if ( 0==p->file_format ){
    sqlite3HashInit(&p->tblHash);
    sqlite3HashInit(&p->idxHash);
    sqlite3HashInit(&p->trigHash);
    sqlite3HashInit(&p->fkeyHash);
    p->enc = SQLITE_UTF8;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x83962
movq -0x10(%rbp), %rdi
movl $0x78, %esi
leaq -0x42c27(%rip), %rdx    # 0x40d30
callq 0x20d30
movq %rax, -0x18(%rbp)
jmp 0x83974
xorl %eax, %eax
movl %eax, %edi
movl $0x78, %esi
callq 0x11ca0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x83985
movq -0x8(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x839d1
movq -0x18(%rbp), %rax
movzbl 0x70(%rax), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x839cf
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x40e70
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x40e70
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
callq 0x40e70
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
callq 0x40e70
movq -0x18(%rbp), %rax
movb $0x1, 0x71(%rax)
jmp 0x839d1
movq -0x18(%rbp), %rax
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: resolveAttachExpr
static int resolveAttachExpr(NameContext *pName, Expr *pExpr)
{
  int rc = SQLITE_OK;
  if( pExpr ){
    if( pExpr->op!=TK_ID ){
      rc = sqlite3ResolveExprNames(pName, pExpr);
      if( rc==SQLITE_OK && !sqlite3ExprIsConstant(pExpr) ){
        sqlite3ErrorMsg(pName->pParse, "invalid name: \"%s\"", pExpr->u.zToken);
        return SQLITE_ERROR;
      }
    }else{
      pExpr->op = TK_STRING;
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x83a5f
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1a, %eax
je 0x83a56
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5f5b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x83a54
movq -0x18(%rbp), %rdi
callq 0x6a0a0
cmpl $0x0, %eax
jne 0x83a54
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x2d84a(%rip), %rsi     # 0xb128e
movb $0x0, %al
callq 0x136f0
movl $0x1, -0x4(%rbp)
jmp 0x83a65
jmp 0x83a5d
movq -0x18(%rbp), %rax
movb $0x5e, (%rax)
jmp 0x83a5f
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reindexDatabases
static void reindexDatabases(Parse *pParse, char const *zColl){
  Db *pDb;                    /* A single database */
  int iDb;                    /* The database index number */
  sqlite3 *db = pParse->db;   /* The database connection */
  HashElem *k;                /* For looping over tables in pDb */
  Table *pTab;                /* A table in the database */

  assert( sqlite3BtreeHoldsAllMutexes(db) );  /* Needed for schema access */
  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
    assert( pDb!=0 );
    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){
      pTab = (Table*)sqliteHashData(k);
      reindexTable(pParse, pTab, zColl);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x83ce4
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x83ccb
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x83cf0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x83c9a
jmp 0x83ccd
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x83c7e
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reindexTable
static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){
  Index *pIndex;              /* An index associated with pTab */

  for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
    if( zColl==0 || collationMatch(zColl, pIndex) ){
      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
      sqlite3BeginWriteOperation(pParse, 0, iDb);
      sqlite3RefillIndex(pParse, pIndex, -1);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x83d77
cmpq $0x0, -0x18(%rbp)
je 0x83d30
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x83d80
cmpl $0x0, %eax
je 0x83d67
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
xorl %esi, %esi
callq 0x5ec70
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x66fc0
jmp 0x83d69
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x83d10
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: collationMatch
static int collationMatch(const char *zColl, Index *pIndex){
  int i;
  assert( zColl!=0 );
  for(i=0; i<pIndex->nColumn; i++){
    const char *z = pIndex->azColl[i];
    assert( z!=0 );
    if( 0==sqlite3StrICmp(z, zColl) ){
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
cmpl %ecx, %eax
jge 0x83de5
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc970
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x83dd8
movl $0x1, -0x4(%rbp)
jmp 0x83dec
jmp 0x83dda
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x83d97
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: analyzeDatabase
static void analyzeDatabase(Parse *pParse, int iDb){
  sqlite3 *db = pParse->db;
  Schema *pSchema = db->aDb[iDb].pSchema;    /* Schema of database iDb */
  HashElem *k;
  int iStatCur;
  int iMem;

  sqlite3BeginWriteOperation(pParse, 0, iDb);
  iStatCur = pParse->nTab;
  pParse->nTab += 3;
  openStatTable(pParse, iDb, iStatCur, 0, 0);
  iMem = pParse->nMem+1;
  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){
    Table *pTab = (Table*)sqliteHashData(k);
    analyzeOneTable(pParse, pTab, 0, iStatCur, iMem);
  }
  loadAnalysis(pParse, iDb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
xorl %esi, %esi
callq 0x5ec70
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x83fb0
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x83ec2
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
xorl %eax, %eax
movl %eax, %edx
callq 0x841b0
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x83e8a
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x84940
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: analyzeTable
static void analyzeTable(Parse *pParse, Table *pTab, Index *pOnlyIdx){
  int iDb;
  int iStatCur;

  assert( pTab!=0 );
  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
  sqlite3BeginWriteOperation(pParse, 0, iDb);
  iStatCur = pParse->nTab;
  pParse->nTab += 3;
  if( pOnlyIdx ){
    openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
  }else{
    openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
  }
  analyzeOneTable(pParse, pTab, pOnlyIdx, iStatCur, pParse->nMem+1);
  loadAnalysis(pParse, iDb);
}

// 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
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
xorl %esi, %esi
callq 0x5ec70
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x54(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x83f56
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
leaq 0x2cb59(%rip), %r8      # 0xb0aa8
callq 0x83fb0
jmp 0x83f73
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x2c37c(%rip), %r8      # 0xb02ea
callq 0x83fb0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl 0x58(%rax), %r8d
addl $0x1, %r8d
callq 0x841b0
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x84940
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: isSystemTable
static int isSystemTable(Parse *pParse, const char *zName){
  if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
    sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92f0
cmpl $0x6, %eax
jle 0x849da
movq -0x18(%rbp), %rdi
leaq 0x2af3f(%rip), %rsi     # 0xaf8e8
movl $0x7, %edx
callq 0x9210
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x849da
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2cc5b(%rip), %rsi     # 0xb1625
movb $0x0, %al
callq 0x136f0
movl $0x1, -0x4(%rbp)
jmp 0x849e1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: whereForeignKeys
static char *whereForeignKeys(Parse *pParse, Table *pTab){
  FKey *p;
  char *zWhere = 0;
  for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
  }
  return zWhere;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6bb10
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x84a48
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdx
callq 0x84c70
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x84a15
movq -0x20(%rbp), %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: whereTempTriggers
static char *whereTempTriggers(Parse *pParse, Table *pTab){
  Trigger *pTrig;
  char *zWhere = 0;
  const Schema *pTempSchema = pParse->db->aDb[1].pSchema; /* Temp db schema */

  /* If the table is not located in the temp-db (in which case NULL is 
  ** returned, loop through the tables list of triggers. For each trigger
  ** that is not part of the temp-db schema, add a clause to the WHERE 
  ** expression being built up in zWhere.
  */
  if( pTab->pSchema!=pTempSchema ){
    sqlite3 *db = pParse->db;
    for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
      if( pTrig->pSchema==pTempSchema ){
        zWhere = whereOrName(db, zWhere, pTrig->zName);
      }
    }
  }
  if( zWhere ){
    char *zNew = sqlite3MPrintf(pParse->db, "type='trigger' AND (%s)", zWhere);
    sqlite3DbFree(pParse->db, zWhere);
    zWhere = zNew;
  }
  return zWhere;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0x84af4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6bb50
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x84af2
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x84ae2
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x84c70
movq %rax, -0x20(%rbp)
jmp 0x84ae4
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x84ab5
jmp 0x84af4
cmpq $0x0, -0x20(%rbp)
je 0x84b30
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x2cb42(%rip), %rsi     # 0xb164f
movb $0x0, %al
callq 0x137f0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x9cd0
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reloadTableSchema
static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
  Vdbe *v;
  char *zWhere;
  int iDb;                   /* Index of database containing pTab */
#ifndef SQLITE_OMIT_TRIGGER
  Trigger *pTrig;
#endif

  v = sqlite3GetVdbe(pParse);
  if( NEVER(v==0) ) return;
  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
  assert( iDb>=0 );

#ifndef SQLITE_OMIT_TRIGGER
  /* Drop any table triggers from the internal schema. */
  for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
    int iTrigDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
    assert( iTrigDb==iDb || iTrigDb==1 );
    sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
  }
#endif

  /* Drop the table and index from the internal schema.  */
  sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);

  /* Reload the table, index and permanent trigger schemas. */
  zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
  if( !zWhere ) return;
  sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere);

#ifndef SQLITE_OMIT_TRIGGER
  /* Now, if the table is not stored in the temp database, reload any temp 
  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. 
  */
  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
    sqlite3VdbeAddParseSchemaOp(v, 1, zWhere);
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5e000
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x84b6d
jmp 0x84c6a
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6bb50
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x84be6
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x13940
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %edx
movq -0x38(%rbp), %rax
movq (%rax), %r9
movl $0x74, %esi
xorl %r8d, %r8d
movl %r8d, %ecx
movl $0x0, (%rsp)
callq 0x5e1b0
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x84b95
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %r9
movl $0x72, %esi
xorl %r8d, %r8d
movl %r8d, %ecx
movl $0x0, (%rsp)
callq 0x5e1b0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2ca4a(%rip), %rsi     # 0xb1667
movb $0x0, %al
callq 0x137f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x84c31
jmp 0x84c6a
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x5f530
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x84a60
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x84c6a
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x1, %esi
callq 0x5f530
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereOrName
static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
  char *zNew;
  if( !zWhere ){
    zNew = sqlite3MPrintf(db, "name=%Q", zConstant);
  }else{
    zNew = sqlite3MPrintf(db, "%s OR name=%Q", zWhere, zConstant);
    sqlite3DbFree(db, zWhere);
  }
  return zNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x84ca7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2b6a5(%rip), %rsi     # 0xb033f
movb $0x0, %al
callq 0x137f0
movq %rax, -0x20(%rbp)
jmp 0x84cd2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x2c987(%rip), %rsi     # 0xb1641
movb $0x0, %al
callq 0x137f0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9cd0
movq -0x20(%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: sqlite3MinimumFileFormat
SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minFormat){
  Vdbe *v;
  v = sqlite3GetVdbe(pParse);
  /* The VDBE should have been allocated before this routine is called.
  ** If that allocation failed, we would have quit before reaching this
  ** point */
  if( ALWAYS(v) ){
    int r1 = sqlite3GetTempReg(pParse);
    int r2 = sqlite3GetTempReg(pParse);
    int j1;
    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
    sqlite3VdbeUsesBtree(v, iDb);
    sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
    j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
    sqlite3VdbeJumpHere(v, j1);
    sqlite3ReleaseTempReg(pParse, r1);
    sqlite3ReleaseTempReg(pParse, r2);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5e000
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x84db4
movq -0x8(%rbp), %rdi
callq 0x66a70
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x66a70
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0x2d, %esi
movl $0x2, %r8d
callq 0x5e0f0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x13bc0
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %edx
movl -0x20(%rbp), %ecx
movl $0x15, %esi
callq 0x5e0c0
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %edx
movl -0x1c(%rbp), %r8d
movl $0x50, %esi
xorl %ecx, %ecx
callq 0x5e0f0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x20(%rbp), %r8d
movl $0x2e, %esi
movl $0x2, %ecx
callq 0x5e0f0
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x5e090
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x66ac0
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x66ac0
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: addArgumentToVtab
static void addArgumentToVtab(Parse *pParse){
  if( pParse->sArg.z && pParse->pNewTable ){
    const char *z = (const char*)pParse->sArg.z;
    int n = pParse->sArg.n;
    sqlite3 *db = pParse->db;
    addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x270(%rax)
je 0x84e46
movq -0x8(%rbp), %rax
cmpq $0x0, 0x238(%rax)
je 0x84e46
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x278(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x238(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x4a7a0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
callq 0x84e50
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: addModuleArgument
static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
  int i = pTable->nModuleArg++;
  int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
  char **azModuleArg;
  azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
  if( azModuleArg==0 ){
    int j;
    for(j=0; j<i; j++){
      sqlite3DbFree(db, pTable->azModuleArg[j]);
    }
    sqlite3DbFree(db, zArg);
    sqlite3DbFree(db, pTable->azModuleArg);
    pTable->nModuleArg = 0;
  }else{
    azModuleArg[i] = zArg;
    azModuleArg[i+1] = 0;
  }
  pTable->azModuleArg = azModuleArg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movl 0x4c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x4c(%rcx)
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movl -0x20(%rbp), %edx
callq 0x1bee0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x84f06
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x84edb
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x9cd0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x84eaf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x9cd0
movq -0x10(%rbp), %rax
movl $0x0, 0x4c(%rax)
jmp 0x84f2b
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%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: minmaxFunc
static void minmaxFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int i;
  int mask;    /* 0 for min() or 0xffffffff for max() */
  int iBest;
  CollSeq *pColl;

  assert( argc>1 );
  mask = sqlite3_user_data(context)==0 ? 0 : -1;
  pColl = sqlite3GetFuncCollSeq(context);
  assert( pColl );
  assert( mask==-1 || mask==0 );
  iBest = 0;
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  for(i=1; i<argc; i++){
    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;
    if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){
      testcase( mask==0 );
      iBest = i;
    }
  }
  sqlite3_result_value(context, argv[iBest]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11790
movq %rax, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x87450
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
cmpl $0x5, %eax
jne 0x85307
jmp 0x8537f
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8536a
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10770
cmpl $0x5, %eax
jne 0x8532e
jmp 0x8537f
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x30(%rbp), %rdx
callq 0x3b1c0
xorl -0x20(%rbp), %eax
cmpl $0x0, %eax
jl 0x8535d
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x8535f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8530e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x10e80
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: minmaxStep
static void minmaxStep(
  sqlite3_context *context, 
  int NotUsed, 
  sqlite3_value **argv
){
  Mem *pArg  = (Mem *)argv[0];
  Mem *pBest;
  UNUSED_PARAMETER(NotUsed);

  pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
  if( !pBest ) return;

  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){
    if( pBest->flags ) sqlite3SkipAccumulatorLoad(context);
  }else if( pBest->flags ){
    int max;
    int cmp;
    CollSeq *pColl = sqlite3GetFuncCollSeq(context);
    /* This step function is used for both the min() and max() aggregates,
    ** the only difference between the two being that the sense of the
    ** comparison is inverted. For the max() aggregate, the
    ** sqlite3_user_data() function returns (void *)-1. For min() it
    ** returns (void *)db, where db is the sqlite3* database pointer.
    ** Therefore the next statement sets variable 'max' to 1 for the max()
    ** aggregate, or 0 for min().
    */
    max = sqlite3_user_data(context)!=0;
    cmp = sqlite3MemCompare(pBest, pArg, pColl);
    if( (max && cmp<0) || (!max && cmp>0) ){
      sqlite3VdbeMemCopy(pBest, pArg);
    }else{
      sqlite3SkipAccumulatorLoad(context);
    }
  }else{
    sqlite3VdbeMemCopy(pBest, pArg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x38, %esi
callq 0x117d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x853cc
jmp 0x8547b
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
cmpl $0x5, %eax
jne 0x853f6
movq -0x28(%rbp), %rax
cmpw $0x0, 0x24(%rax)
je 0x853f1
movq -0x8(%rbp), %rdi
callq 0x87470
jmp 0x8547b
movq -0x28(%rbp), %rax
cmpw $0x0, 0x24(%rax)
je 0x8546c
movq -0x8(%rbp), %rdi
callq 0x87450
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11790
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x3b1c0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x85446
cmpl $0x0, -0x30(%rbp)
jl 0x85452
cmpl $0x0, -0x2c(%rbp)
jne 0x85461
cmpl $0x0, -0x30(%rbp)
jle 0x85461
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10eb0
jmp 0x8546a
movq -0x8(%rbp), %rdi
callq 0x87470
jmp 0x85479
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10eb0
jmp 0x8547b
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: minMaxFinalize
static void minMaxFinalize(sqlite3_context *context){
  sqlite3_value *pRes;
  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
  if( pRes ){
    if( pRes->flags ){
      sqlite3_result_value(context, pRes);
    }
    sqlite3VdbeMemRelease(pRes);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x117d0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x854d3
movq -0x10(%rbp), %rax
cmpw $0x0, 0x24(%rax)
je 0x854ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10e80
movq -0x10(%rbp), %rdi
callq 0x10190
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: typeofFunc
static void typeofFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  const char *z = 0;
  UNUSED_PARAMETER(NotUsed);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_INTEGER: z = "integer"; break;
    case SQLITE_TEXT:    z = "text";    break;
    case SQLITE_FLOAT:   z = "real";    break;
    case SQLITE_BLOB:    z = "blob";    break;
    default:             z = "null";    break;
  }
  sqlite3_result_text(context, z, -1, SQLITE_STATIC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x8555c
movq -0x28(%rbp), %rax
leaq 0x251b9(%rip), %rcx     # 0xaa6d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x29fa0(%rip), %rax     # 0xaf4cf
movq %rax, -0x20(%rbp)
jmp 0x85567
leaq 0x2c928(%rip), %rax     # 0xb1e64
movq %rax, -0x20(%rbp)
jmp 0x85567
leaq 0x29f81(%rip), %rax     # 0xaf4ca
movq %rax, -0x20(%rbp)
jmp 0x85567
leaq 0x2c3a5(%rip), %rax     # 0xb18fb
movq %rax, -0x20(%rbp)
jmp 0x85567
leaq 0x2d7d5(%rip), %rax     # 0xb2d38
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %ecx
callq 0x10d80
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: lengthFunc
static void lengthFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int len;

  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_BLOB:
    case SQLITE_INTEGER:
    case SQLITE_FLOAT: {
      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));
      break;
    }
    case SQLITE_TEXT: {
      const unsigned char *z = sqlite3_value_text(argv[0]);
      if( z==0 ) return;
      len = 0;
      while( *z ){
        len++;
        SQLITE_SKIP_UTF8(z);
      }
      sqlite3_result_int(context, len);
      break;
    }
    default: {
      sqlite3_result_null(context);
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
movl %eax, %ecx
movl %ecx, %eax
decl %eax
movl %ecx, -0x2c(%rbp)
subl $0x2, %eax
jb 0x855d7
jmp 0x855bf
movl -0x2c(%rbp), %eax
subl $0x3, %eax
je 0x855fb
jmp 0x855c9
movl -0x2c(%rbp), %eax
subl $0x4, %eax
jne 0x8567b
jmp 0x855d7
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10370
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0x10c20
jmp 0x85684
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10350
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x85614
jmp 0x85684
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x8566d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movzbl (%rax), %eax
cmpl $0xc0, %eax
jl 0x8566b
jmp 0x85648
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x85669
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x85648
jmp 0x8566b
jmp 0x8561b
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x10c20
jmp 0x85684
movq -0x8(%rbp), %rdi
callq 0x10cc0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: instrFunc
static void instrFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  const unsigned char *zHaystack;
  const unsigned char *zNeedle;
  int nHaystack;
  int nNeedle;
  int typeHaystack, typeNeedle;
  int N = 1;
  int isText;

  UNUSED_PARAMETER(argc);
  typeHaystack = sqlite3_value_type(argv[0]);
  typeNeedle = sqlite3_value_type(argv[1]);
  if( typeHaystack==SQLITE_NULL || typeNeedle==SQLITE_NULL ) return;
  nHaystack = sqlite3_value_bytes(argv[0]);
  nNeedle = sqlite3_value_bytes(argv[1]);
  if( typeHaystack==SQLITE_BLOB && typeNeedle==SQLITE_BLOB ){
    zHaystack = sqlite3_value_blob(argv[0]);
    zNeedle = sqlite3_value_blob(argv[1]);
    isText = 0;
  }else{
    zHaystack = sqlite3_value_text(argv[0]);
    zNeedle = sqlite3_value_text(argv[1]);
    isText = 1;
  }
  while( nNeedle<=nHaystack && memcmp(zHaystack, zNeedle, nNeedle)!=0 ){
    N++;
    do{
      nHaystack--;
      zHaystack++;
    }while( isText && (zHaystack[0]&0xc0)==0x80 );
  }
  if( nNeedle>nHaystack ) N = 0;
  sqlite3_result_int(context, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10770
movl %eax, -0x38(%rbp)
cmpl $0x5, -0x34(%rbp)
je 0x856d5
cmpl $0x5, -0x38(%rbp)
jne 0x856da
jmp 0x857ed
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10370
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10370
movl %eax, -0x30(%rbp)
cmpl $0x4, -0x34(%rbp)
jne 0x8572f
cmpl $0x4, -0x38(%rbp)
jne 0x8572f
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10200
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10200
movq %rax, -0x28(%rbp)
movl $0x0, -0x40(%rbp)
jmp 0x85757
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10350
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10350
movq %rax, -0x28(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x85759
movl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl -0x2c(%rbp), %ecx
movb %al, -0x41(%rbp)
jg 0x85780
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq -0x30(%rbp), %rdx
callq 0x81c0
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x85789
jmp 0x857d2
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x40(%rbp)
movb %al, -0x42(%rbp)
je 0x857c9
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
sete %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x85792
jmp 0x85759
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x857e1
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x10c20
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: absFunc
static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_INTEGER: {
      i64 iVal = sqlite3_value_int64(argv[0]);
      if( iVal<0 ){
        if( (iVal<<1)==0 ){
          /* IMP: R-35460-15084 If X is the integer -9223372036854775807 then
          ** abs(X) throws an integer overflow error since there is no
          ** equivalent positive 64-bit two complement value. */
          sqlite3_result_error(context, "integer overflow", -1);
          return;
        }
        iVal = -iVal;
      } 
      sqlite3_result_int64(context, iVal);
      break;
    }
    case SQLITE_NULL: {
      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */
      sqlite3_result_null(context);
      break;
    }
    default: {
      /* Because sqlite3_value_double() returns 0.0 if the argument is not
      ** something that can be converted into a number, we have:
      ** IMP: R-57326-31541 Abs(X) return 0.0 if X is a string or blob that
      ** cannot be converted to a numeric value. 
      */
      double rVal = sqlite3_value_double(argv[0]);
      if( rVal<0 ) rVal = -rVal;
      sqlite3_result_double(context, rVal);
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10770
movl %eax, %ecx
movl %ecx, -0x2c(%rbp)
subl $0x1, %eax
je 0x85e65
jmp 0x85e5b
movl -0x2c(%rbp), %eax
subl $0x5, %eax
je 0x85eb9
jmp 0x85ec4
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x105c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x85eaa
movq -0x20(%rbp), %rax
shlq %rax
cmpq $0x0, %rax
jne 0x85ea0
movq -0x8(%rbp), %rdi
leaq 0x2bb23(%rip), %rsi     # 0xb19b7
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x108b0
jmp 0x85f0e
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10c90
jmp 0x85f0e
movq -0x8(%rbp), %rdi
callq 0x10cc0
jmp 0x85f0e
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10430
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x85f00
movsd -0x28(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
callq 0x10820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: upperFunc
static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  char *z1;
  const char *z2;
  int i, n;
  UNUSED_PARAMETER(argc);
  z2 = (char*)sqlite3_value_text(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
  assert( z2==(char*)sqlite3_value_text(argv[0]) );
  if( z2 ){
    z1 = contextMalloc(context, ((i64)n)+1);
    if( z1 ){
      for(i=0; i<n; i++){
        z1[i] = (char)sqlite3Toupper(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10350
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10370
movl %eax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x861c6
movq -0x8(%rbp), %rdi
movslq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x873e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x861c4
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x861ad
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
leaq 0x248b7(%rip), %rcx     # 0xaaa40
movzbl (%rcx,%rdx), %ecx
andl $0x20, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x86160
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x30(%rbp), %edx
leaq -0x7bd9f(%rip), %rcx    # 0xa420
callq 0x10d80
jmp 0x861c6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: lowerFunc
static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  char *z1;
  const char *z2;
  int i, n;
  UNUSED_PARAMETER(argc);
  z2 = (char*)sqlite3_value_text(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
  assert( z2==(char*)sqlite3_value_text(argv[0]) );
  if( z2 ){
    z1 = contextMalloc(context, ((i64)n)+1);
    if( z1 ){
      for(i=0; i<n; i++){
        z1[i] = sqlite3Tolower(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10350
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10370
movl %eax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8627b
movq -0x8(%rbp), %rdi
movslq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x873e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x86279
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x86262
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x248f7(%rip), %rax     # 0xaab40
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8622c
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x30(%rbp), %edx
leaq -0x7be54(%rip), %rcx    # 0xa420
callq 0x10d80
jmp 0x8627b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: hexFunc
static void hexFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int i, n;
  const unsigned char *pBlob;
  char *zHex, *z;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  pBlob = sqlite3_value_blob(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  assert( pBlob==sqlite3_value_blob(argv[0]) );  /* No encoding change */
  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);
  if( zHex ){
    for(i=0; i<n; i++, pBlob++){
      unsigned char c = *pBlob;
      *(z++) = hexdigits[(c>>4)&0xf];
      *(z++) = hexdigits[c&0xf];
    }
    *z = 0;
    sqlite3_result_text(context, zHex, n*2, sqlite3_free);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10200
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10370
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x20(%rbp), %rsi
shlq %rsi
addq $0x1, %rsi
callq 0x873e0
movq %rax, -0x30(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x863c5
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x863a5
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movzbl -0x39(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x2748b(%rip), %rax     # 0xad7e0
movb (%rax,%rcx), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movzbl -0x39(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x27466(%rip), %rax     # 0xad7e0
movb (%rax,%rcx), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x86330
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x20(%rbp), %edx
shll %edx
leaq -0x7bfa0(%rip), %rcx    # 0xa420
callq 0x10d80
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: randomFunc
static void randomFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **NotUsed2
){
  sqlite_int64 r;
  UNUSED_PARAMETER2(NotUsed, NotUsed2);
  sqlite3_randomness(sizeof(r), &r);
  if( r<0 ){
    /* We need to prevent a random number of 0x8000000000000000 
    ** (or -9223372036854775808) since when you do abs() of that
    ** number of you get the same value back again.  To do this
    ** in a way that is testable, mask the sign bit off of negative
    ** values, resulting in a positive value.  Then take the 
    ** 2s complement of that positive value.  The end result can
    ** therefore be no less than -9223372036854775807.
    */
    r = -(r & LARGEST_INT64);
  }
  sqlite3_result_int64(context, r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x8, %edi
leaq -0x20(%rbp), %rsi
callq 0xc740
cmpq $0x0, -0x20(%rbp)
jge 0x8640f
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq -0x20(%rbp), %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10c90
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: randomBlob
static void randomBlob(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int n;
  unsigned char *p;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  n = sqlite3_value_int(argv[0]);
  if( n<1 ){
    n = 1;
  }
  p = contextMalloc(context, n);
  if( p ){
    sqlite3_randomness(n, p);
    sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10500
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
jge 0x8645f
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x873e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8649a
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0xc740
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x7c075(%rip), %rcx    # 0xa420
callq 0x10790
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: zeroblobFunc
static void zeroblobFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  i64 n;
  sqlite3 *db = sqlite3_context_db_handle(context);
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  n = sqlite3_value_int64(argv[0]);
  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
  if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    sqlite3_result_error_toobig(context);
  }else{
    sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x117b0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x105c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq 0x68(%rcx), %rcx
cmpq %rcx, %rax
jle 0x86d9c
movq -0x8(%rbp), %rdi
callq 0x110d0
jmp 0x86dab
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %esi
callq 0x10f60
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)