LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeExprList
SQLITE_PRIVATE int sqlite3ExprCodeExprList(
  Parse *pParse,     /* Parsing context */
  ExprList *pList,   /* The expression list to be coded */
  int target,        /* Where to write results */
  int doHardCopy     /* Make a hard copy of every element */
){
  struct ExprList_item *pItem;
  int i, n;
  assert( pList!=0 );
  assert( target>0 );
  assert( pParse->pVdbe!=0 );  /* Never gets this far otherwise */
  n = pList->nExpr;
  for(pItem=pList->a, i=0; i<n; i++, pItem++){
    Expr *pExpr = pItem->pExpr;
    int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i);
    if( inReg!=target+i ){
      sqlite3VdbeAddOp2(pParse->pVdbe, doHardCopy ? OP_Copy : OP_SCopy,
                        inReg, target+i);
    }
  }
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl (%rsi), %eax
xorl %r12d, %r12d
cmpl $0x1, %ecx
movl $0x0, %r15d
adcl $0x1c, %r15d
movq 0x8(%rsi), %r13
testl %eax, %eax
cmovgl %eax, %r12d
subl $0x1, %r12d
jb 0x495f8
movq (%r13), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x484da
cmpl %eax, %ebx
je 0x495f0
movq 0x10(%r14), %rdi
movl %r15d, %esi
movl %eax, %edx
movl %ebx, %ecx
callq 0x41f42
addq $0x20, %r13
incl %ebx
jmp 0x495c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeGetColumnOfTable
SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(
  Vdbe *v,        /* The VDBE under construction */
  Table *pTab,    /* The table containing the value */
  int iTabCur,    /* The cursor for this table */
  int iCol,       /* Index of the column to extract */
  int regOut      /* Extract the valud into this register */
){
  if( iCol<0 || iCol==pTab->iPKey ){
    sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut);
  }else{
    int op = IsVirtual(pTab) ? OP_VColumn : OP_Column;
    sqlite3VdbeAddOp3(v, op, iTabCur, iCol, regOut);
  }
  if( iCol>=0 ){
    sqlite3ColumnDefault(v, pTab, iCol, regOut);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %r12
testl %ecx, %ecx
js 0x49a71
movswl 0x40(%r15), %eax
cmpl %r14d, %eax
jne 0x49a8c
pushq $0x60
popq %rsi
movq %r12, %rdi
movl %ebx, %ecx
callq 0x41f42
testl %r14d, %r14d
jns 0x49aaa
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb $0x10, 0x46(%r15)
pushq $0x29
popq %rax
movl $0x8a, %esi
cmovel %eax, %esi
movq %r12, %rdi
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x41f4c
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x47c51
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: dup8bytes
static char *dup8bytes(Vdbe *v, const char *in){
  char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);
  if( out ){
    memcpy(out, in, 8);
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rdi
pushq $0x8
popq %rsi
callq 0x103b4
testq %rax, %rax
je 0x49b7f
movq (%rbx), %rcx
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BinaryCompareCollSeq
SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(
  Parse *pParse, 
  Expr *pLeft, 
  Expr *pRight
){
  CollSeq *pColl;
  assert( pLeft );
  if( pLeft->flags & EP_Collate ){
    pColl = sqlite3ExprCollSeq(pParse, pLeft);
  }else if( pRight && (pRight->flags & EP_Collate)!=0 ){
    pColl = sqlite3ExprCollSeq(pParse, pRight);
  }else{
    pColl = sqlite3ExprCollSeq(pParse, pLeft);
    if( !pColl ){
      pColl = sqlite3ExprCollSeq(pParse, pRight);
    }
  }
  return pColl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
testb $0x1, 0x3(%rsi)
jne 0x49bde
movq %rdx, %rbx
testq %rdx, %rdx
je 0x49bcc
testb $0x1, 0x3(%rbx)
jne 0x49be3
movq %r14, %rdi
callq 0x466ee
testq %rax, %rax
je 0x49be3
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
jmp 0x49be9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x466ee
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CompareAffinity
SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2){
  char aff1 = sqlite3ExprAffinity(pExpr);
  if( aff1 && aff2 ){
    /* Both sides of the comparison are columns. If one has numeric
    ** affinity, use that. Otherwise use no affinity.
    */
    if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){
      return SQLITE_AFF_NUMERIC;
    }else{
      return SQLITE_AFF_NONE;
    }
  }else if( !aff1 && !aff2 ){
    /* Neither side of the comparison is a column.  Compare the
    ** results directly.
    */
    return SQLITE_AFF_NONE;
  }else{
    /* One side is a column, the other is not. Use the columns affinity. */
    assert( aff1==0 || aff2==0 );
    return (aff1 + aff2);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
callq 0x4667c
testb %al, %al
sete %cl
testb %bl, %bl
sete %dl
orb %cl, %dl
jne 0x49c1e
cmpb $0x63, %al
setge %cl
cmpb $0x63, %bl
setge %al
orb %cl, %al
orb $0x62, %al
jmp 0x49c2c
leal (%rax,%rbx), %ecx
orb %bl, %al
movzbl %cl, %ecx
pushq $0x62
popq %rax
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: comparisonAffinity
static char comparisonAffinity(Expr *pExpr){
  char aff;
  assert( pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT ||
          pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE ||
          pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT );
  assert( pExpr->pLeft );
  aff = sqlite3ExprAffinity(pExpr->pLeft);
  if( pExpr->pRight ){
    aff = sqlite3CompareAffinity(pExpr->pRight, aff);
  }else if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);
  }else if( !aff ){
    aff = SQLITE_AFF_NONE;
  }
  return aff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x4667c
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
jne 0x49fec
testb $0x8, 0x3(%rbx)
jne 0x49fde
testb %al, %al
movzbl %al, %ecx
pushq $0x62
popq %rax
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x20(%rbx), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movsbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x49bf2
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IndexAffinityOk
SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){
  char aff = comparisonAffinity(pExpr);
  switch( aff ){
    case SQLITE_AFF_NONE:
      return 1;
    case SQLITE_AFF_TEXT:
      return idx_affinity==SQLITE_AFF_TEXT;
    default:
      return sqlite3IsNumericAffinity(idx_affinity);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
callq 0x49fab
cmpb $0x62, %al
je 0x4a051
movzbl %al, %eax
cmpl $0x61, %eax
jne 0x4a055
cmpb $0x61, %bl
sete %al
jmp 0x4a05b
movb $0x1, %al
jmp 0x4a05b
cmpb $0x63, %bl
setge %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeVerifyNamedSchema
SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse *pParse, const char *zDb){
  sqlite3 *db = pParse->db;
  int i;
  for(i=0; i<db->nDb; i++){
    Db *pDb = &db->aDb[i];
    if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
      sqlite3CodeVerifySchema(pParse, i);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
pushq $0x8
popq %r13
xorl %r15d, %r15d
movslq 0x28(%r12), %rax
cmpq %rax, %r15
jge 0x4a38e
movq 0x20(%r12), %rax
cmpq $0x0, (%rax,%r13)
je 0x4a385
testq %rbx, %rbx
je 0x4a37a
movq -0x8(%rax,%r13), %rsi
movq %rbx, %rdi
callq 0xb1bf
testl %eax, %eax
jne 0x4a385
movq %r14, %rdi
movl %r15d, %esi
callq 0x4234d
incq %r15
addq $0x20, %r13
jmp 0x4a34e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ClearStatTables
static void sqlite3ClearStatTables(
  Parse *pParse,         /* The parsing context */
  int iDb,               /* The database number */
  const char *zType,     /* "idx" or "tbl" */
  const char *zName      /* Name of index or table */
){
  int i;
  const char *zDbName = pParse->db->aDb[iDb].zName;
  for(i=1; i<=3; i++){
    char zTab[24];
    sqlite3_snprintf(sizeof(zTab),zTab,"sqlite_stat%d",i);
    if( sqlite3FindTable(pParse->db, zTab, zDbName) ){
      sqlite3NestedParse(pParse,
        "DELETE FROM %Q.%s WHERE %s=%Q",
        zDbName, zTab, zType, zName
      );
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq 0x20(%rax), %rax
movslq %esi, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r12
pushq $0x1
popq %r13
leaq -0x50(%rbp), %rbx
cmpl $0x4, %r13d
je 0x4a425
pushq $0x18
popq %rdi
movq %rbx, %rsi
leaq 0x2342d(%rip), %rdx     # 0x6d812
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaf26
movq (%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2eff6
testq %rax, %rax
je 0x4a420
movq %r15, %rdi
leaq 0x23414(%rip), %rsi     # 0x6d820
movq %r12, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq -0x30(%rbp), %r9
xorl %eax, %eax
callq 0x4268c
incl %r13d
jmp 0x4a3d2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TriggerList
SQLITE_PRIVATE Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
  Schema * const pTmpSchema = pParse->db->aDb[1].pSchema;
  Trigger *pList = 0;                  /* List of triggers to return */

  if( pParse->disableTriggers ){
    return 0;
  }

  if( pTmpSchema!=pTab->pSchema ){
    HashElem *p;
    assert( sqlite3SchemaMutexHeld(pParse->db, 0, pTmpSchema) );
    for(p=sqliteHashFirst(&pTmpSchema->trigHash); p; p=sqliteHashNext(p)){
      Trigger *pTrig = (Trigger *)sqliteHashData(p);
      if( pTrig->pTabSchema==pTab->pSchema
       && 0==sqlite3StrICmp(pTrig->table, pTab->zName) 
      ){
        pTrig->pNext = (pList ? pList : pTab->pTrigger);
        pList = pTrig;
      }
    }
  }

  return (pList ? pList : pTab->pTrigger);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x1f6(%rdi)
je 0x4a47b
xorl %r14d, %r14d
jmp 0x4a4d6
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq 0x38(%rax), %r15
movq 0x68(%rsi), %r12
cmpq %r12, %r15
je 0x4a4d2
addq $0x40, %r15
xorl %r14d, %r14d
movq (%r15), %r15
testq %r15, %r15
je 0x4a4cd
movq 0x10(%r15), %r13
cmpq %r12, 0x30(%r13)
jne 0x4a499
movq 0x8(%r13), %rdi
movq (%rbx), %rsi
callq 0xb1bf
testl %eax, %eax
jne 0x4a499
testq %r14, %r14
jne 0x4a4c4
movq 0x60(%rbx), %r14
movq %r14, 0x40(%r13)
movq %r13, %r14
jmp 0x4a499
testq %r14, %r14
jne 0x4a4d6
movq 0x60(%rbx), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: destroyRootPage
static void destroyRootPage(Parse *pParse, int iTable, int iDb){
  Vdbe *v = sqlite3GetVdbe(pParse);
  int r1 = sqlite3GetTempReg(pParse);
  sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
  sqlite3MayAbort(pParse);
#ifndef SQLITE_OMIT_AUTOVACUUM
  /* OP_Destroy stores an in integer r1. If this integer
  ** is non-zero, then it is the root page number of a table moved to
  ** location iTable. The following code modifies the sqlite_master table to
  ** reflect this.
  **
  ** The "#NNN" in the SQL is a special constant that means whatever value
  ** is in register NNN.  See grammar rules associated with the TK_REGISTER
  ** token for additional information.
  */
  sqlite3NestedParse(pParse, 
     "UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d",
     pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
#endif
  sqlite3ReleaseTempReg(pParse, r1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %rbx
callq 0x41ef4
movq %rax, %r13
movq %rbx, %rdi
callq 0x46ff9
movl %eax, %r15d
pushq $0x6c
popq %rsi
movq %r13, %rdi
movl %r14d, %edx
movl %eax, %ecx
movl %r12d, %r8d
callq 0x41f4c
movq 0x1d8(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movb $0x1, 0x24(%rax)
movq (%rbx), %rax
movq 0x20(%rax), %rax
movslq %r12d, %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
movq (%rax,%rdx), %rdx
cmpl $0x1, %ecx
leaq 0x21896(%rip), %rax     # 0x6bf39
leaq 0x218a2(%rip), %rcx     # 0x6bf4c
cmoveq %rax, %rcx
movl %r15d, (%rsp)
leaq 0x231ea(%rip), %rsi     # 0x6d8a3
movq %rbx, %rdi
movl %r14d, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x4268c
movq %rbx, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4701c
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: keyInfoFromExprList
static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
  int nExpr;
  KeyInfo *pInfo;
  struct ExprList_item *pItem;
  sqlite3 *db = pParse->db;
  int i;

  nExpr = pList->nExpr;
  pInfo = sqlite3KeyInfoAlloc(db, nExpr);
  if( pInfo ){
    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
      CollSeq *pColl;
      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
      if( !pColl ) pColl = db->pDfltColl;
      pInfo->aColl[i] = pColl;
      pInfo->aSortOrder[i] = pItem->sortOrder;
    }
  }
  return pInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %rbx
movq (%rdi), %rdi
movl (%rsi), %r15d
movq %rdi, -0x30(%rbp)
movl %r15d, %esi
callq 0x3107c
movq %rax, %r12
testq %rax, %rax
je 0x4a775
movq 0x8(%r13), %r13
xorl %r14d, %r14d
testl %r15d, %r15d
cmovlel %r14d, %r15d
cmpq %r14, %r15
je 0x4a775
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x466ee
testq %rax, %rax
jne 0x4a75a
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%r12,%r14,8)
movb 0x18(%r13), %al
movq 0x10(%r12), %rcx
movb %al, (%rcx,%r14)
incq %r14
addq $0x20, %r13
jmp 0x4a73c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAnalyzeAggList
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
  struct ExprList_item *pItem;
  int i;
  if( pList ){
    for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
      sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x4d9c5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
xorl %r12d, %r12d
cmpl (%rbx), %r12d
jge 0x4d9bd
movq (%r15), %rsi
movq %r14, %rdi
callq 0x4d9c6
incl %r12d
addq $0x20, %r15
jmp 0x4d9a4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAnalyzeAggregates
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
  Walker w;
  memset(&w, 0, sizeof(w));
  w.xExprCallback = analyzeAggregate;
  w.xSelectCallback = analyzeAggregatesInSelect;
  w.u.pNC = pNC;
  assert( pNC->pSrcList!=0 );
  sqlite3WalkExpr(&w, pExpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
xorps %xmm0, %xmm0
leaq -0x28(%rbp), %rax
movups %xmm0, 0x10(%rax)
leaq 0x5018(%rip), %rcx      # 0x529f8
movq %rcx, (%rax)
leaq 0x52bf(%rip), %rcx      # 0x52ca9
movq %rcx, 0x8(%rax)
movq %rdi, 0x20(%rax)
movq %rax, %rdi
callq 0x4336b
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: explainTempTable
static void explainTempTable(Parse *pParse, const char *zUsage){
  if( pParse->explain==2 ){
    Vdbe *v = pParse->pVdbe;
    char *zMsg = sqlite3MPrintf(pParse->db, "USE TEMP B-TREE FOR %s", zUsage);
    sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
  }
}

// Assembly:
cmpb $0x2, 0x200(%rdi)
jne 0x4da56
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %r14
leaq 0x2021c(%rip), %rsi     # 0x6dc44
xorl %eax, %eax
callq 0x10594
movl 0x210(%rbx), %edx
orl $-0x1, (%rsp)
movq %r14, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x41fd2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCacheClear
SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse *pParse){
  int i;
  struct yColCache *p;

  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    if( p->iReg ){
      cacheEntryClear(pParse, p);
      p->iReg = 0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x74(%rdi), %r14
pushq $0xa
popq %r15
subl $0x1, %r15d
jb 0x4da8f
cmpl $0x0, 0x10(%r14)
je 0x4da89
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484b3
andl $0x0, 0x10(%r14)
addq $0x18, %r14
jmp 0x4da6c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeMove
SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
  int i;
  struct yColCache *p;
  assert( iFrom>=iTo+nReg || iFrom+nReg<=iTo );
  sqlite3VdbeAddOp3(pParse->pVdbe, OP_Move, iFrom, iTo, nReg-1);
  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    int x = p->iReg;
    if( x>=iFrom && x<iFrom+nReg ){
      p->iReg += iTo-iFrom;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movq 0x10(%rdi), %rdi
leal -0x1(%rbx), %r8d
pushq $0x1b
popq %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x41f4c
addl %r15d, %ebx
subl %r15d, %r14d
xorl %eax, %eax
cmpl $0xf0, %eax
je 0x4db03
movl 0x84(%r12,%rax), %ecx
cmpl %r15d, %ecx
setge %dl
cmpl %ebx, %ecx
setl %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x4dafd
addl %r14d, %ecx
movl %ecx, 0x84(%r12,%rax)
addq $0x18, %rax
jmp 0x4dace
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: finalizeAggFunctions
static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){
  Vdbe *v = pParse->pVdbe;
  int i;
  struct AggInfo_func *pF;
  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
    ExprList *pList = pF->pExpr->x.pList;
    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
    sqlite3VdbeAddOp4(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0, 0,
                      (void*)pF->pFunc, P4_FUNCDEF);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x10(%rdi), %r14
movq 0x28(%rsi), %r15
xorl %r12d, %r12d
cmpl 0x30(%rbx), %r12d
jge 0x4ddbd
movq (%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x4dd93
movl (%rax), %ecx
jmp 0x4dd95
xorl %ecx, %ecx
movl 0x10(%r15), %edx
movq 0x8(%r15), %r9
movl $0xfffffffb, (%rsp)     # imm = 0xFFFFFFFB
movq %r14, %rdi
movl $0x81, %esi
xorl %r8d, %r8d
callq 0x41fd2
incl %r12d
addq $0x18, %r15
jmp 0x4dd7d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: resetAccumulator
static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
  Vdbe *v = pParse->pVdbe;
  int i;
  struct AggInfo_func *pFunc;
  if( pAggInfo->nFunc+pAggInfo->nColumn==0 ){
    return;
  }
  for(i=0; i<pAggInfo->nColumn; i++){
    sqlite3VdbeAddOp2(v, OP_Null, 0, pAggInfo->aCol[i].iMem);
  }
  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){
    sqlite3VdbeAddOp2(v, OP_Null, 0, pFunc->iMem);
    if( pFunc->iDistinct>=0 ){
      Expr *pE = pFunc->pExpr;
      assert( !ExprHasProperty(pE, EP_xIsSelect) );
      if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
        sqlite3ErrorMsg(pParse, "DISTINCT aggregates must have exactly one "
           "argument");
        pFunc->iDistinct = -1;
      }else{
        KeyInfo *pKeyInfo = keyInfoFromExprList(pParse, pE->x.pList);
        sqlite3VdbeAddOp4(v, OP_OpenEphemeral, pFunc->iDistinct, 0, 0,
                          (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x30(%rbp)
movl 0x20(%rsi), %eax
movl 0x30(%rsi), %ecx
addl %eax, %ecx
jne 0x4ddf8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %r15
pushq $0x14
popq %r14
xorl %r13d, %r13d
pushq $0x18
popq %r12
cltq
cmpq %rax, %r13
jge 0x4de36
movq 0x18(%rbx), %rax
movl (%rax,%r14), %ecx
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x41f42
incq %r13
movl 0x20(%rbx), %eax
addq $0x20, %r14
jmp 0x4de0e
movq 0x28(%rbx), %r13
addq $0x14, %r13
pushq $0x18
popq %r12
xorl %r14d, %r14d
cmpl 0x30(%rbx), %r14d
jge 0x4dde9
movl -0x4(%r13), %ecx
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x41f42
cmpl $0x0, (%r13)
js 0x4deb5
movq -0x14(%r13), %rax
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x4de9e
cmpl $0x1, (%rsi)
jne 0x4de9e
movq -0x30(%rbp), %rdi
callq 0x4a700
movl (%r13), %edx
movl $0xfffffff0, (%rsp)     # imm = 0xFFFFFFF0
movq %r15, %rdi
pushq $0x33
popq %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x41fd2
jmp 0x4deb5
movq -0x30(%rbp), %rdi
leaq 0x1fdb2(%rip), %rsi     # 0x6dc5b
xorl %eax, %eax
callq 0x104d6
orl $-0x1, (%r13)
incl %r14d
addq $0x18, %r13
jmp 0x4de45
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListEnlarge
SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(
  sqlite3 *db,       /* Database connection to notify of OOM errors */
  SrcList *pSrc,     /* The SrcList to be enlarged */
  int nExtra,        /* Number of new slots to add to pSrc->a[] */
  int iStart         /* Index in pSrc->a[] of first new slot */
){
  int i;

  /* Sanity checking on calling parameters */
  assert( iStart>=0 );
  assert( nExtra>=1 );
  assert( pSrc!=0 );
  assert( iStart<=pSrc->nSrc );

  /* Allocate additional space if needed */
  if( pSrc->nSrc+nExtra>pSrc->nAlloc ){
    SrcList *pNew;
    int nAlloc = pSrc->nSrc+nExtra;
    int nGot;
    pNew = sqlite3DbRealloc(db, pSrc,
               sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc->a[0]) );
    if( pNew==0 ){
      assert( db->mallocFailed );
      return pSrc;
    }
    pSrc = pNew;
    nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
    pSrc->nAlloc = (u8)nGot;
  }

  /* Move existing slots that come after the newly inserted slots
  ** out of the way */
  for(i=pSrc->nSrc-1; i>=iStart; i--){
    pSrc->a[i+nExtra] = pSrc->a[i];
  }
  pSrc->nSrc += (i8)nExtra;

  /* Zero the newly allocated slots */
  memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);
  for(i=iStart; i<iStart+nExtra; i++){
    pSrc->a[i].iCursor = -1;
  }

  /* Return a pointer to the enlarged SrcList */
  return pSrc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebx
movq %rsi, %r14
movzbl (%rsi), %ecx
movl %ecx, %eax
addl %edx, %eax
movzbl 0x1(%rsi), %edx
cmpl %edx, %eax
jle 0x4e115
movq %rdi, %r13
imull $0x68, %eax, %edx
addl $0x8, %edx
movq %r14, %rsi
callq 0x157c3
testq %rax, %rax
je 0x4e18a
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x155aa
cltq
addq $-0x70, %rax
pushq $0x68
popq %rcx
xorl %edx, %edx
divq %rcx
incb %al
movb %al, 0x1(%r12)
movb (%r12), %cl
movq %r12, %r14
leaq 0x8(%r14), %rax
movzbl %cl, %r8d
movslq %ebx, %rcx
movslq %r15d, %r15
imulq $0x68, %r8, %r9
addq $-0x60, %r9
imulq $0x68, %rcx, %r10
addq %r14, %r10
pushq $0xd
popq %rdx
cmpq %r15, %r8
jle 0x4e151
decq %r8
leaq (%r10,%r9), %rdi
leaq (%r14,%r9), %rsi
movq %rdx, %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $-0x68, %r9
jmp 0x4e135
addb %bl, (%r14)
imulq $0x68, %r15, %r12
addq %r12, %rax
movl %ebx, %ecx
imulq $0x68, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x81e0
addl %r15d, %ebx
movslq %ebx, %rax
leaq (%r12,%r14), %rcx
addq $0x44, %rcx
cmpq %rax, %r15
jge 0x4e18a
orl $-0x1, (%rcx)
incq %r15
addq $0x68, %rcx
jmp 0x4e179
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: substExprList
static void substExprList(
  sqlite3 *db,         /* Report malloc errors here */
  ExprList *pList,     /* List to scan and in which to make substitutes */
  int iTable,          /* Table to be substituted */
  ExprList *pEList     /* Substitute values */
){
  int i;
  if( pList==0 ) return;
  for(i=0; i<pList->nExpr; i++){
    pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
testq %rsi, %rsi
je 0x4e1f1
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
movslq (%r15), %rax
cmpq %rax, %rbx
jge 0x4e1f1
movq 0x8(%r15), %rax
movq (%rax,%r13), %rsi
movq %r12, %rdi
movl %r14d, %edx
movq -0x30(%rbp), %rcx
callq 0x4e200
movq 0x8(%r15), %rcx
movq %rax, (%rcx,%r13)
incq %rbx
addq $0x20, %r13
jmp 0x4e1c1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: substExpr
static Expr *substExpr(
  sqlite3 *db,        /* Report malloc errors to this connection */
  Expr *pExpr,        /* Expr in which substitution occurs */
  int iTable,         /* Table to be substituted */
  ExprList *pEList    /* Substitute expressions */
){
  if( pExpr==0 ) return 0;
  if( pExpr->op==TK_COLUMN && pExpr->iTable==iTable ){
    if( pExpr->iColumn<0 ){
      pExpr->op = TK_NULL;
    }else{
      Expr *pNew;
      assert( pEList!=0 && pExpr->iColumn<pEList->nExpr );
      assert( pExpr->pLeft==0 && pExpr->pRight==0 );
      pNew = sqlite3ExprDup(db, pEList->a[pExpr->iColumn].pExpr, 0);
      sqlite3ExprDelete(db, pExpr);
      pExpr = pNew;
    }
  }else{
    pExpr->pLeft = substExpr(db, pExpr->pLeft, iTable, pEList);
    pExpr->pRight = substExpr(db, pExpr->pRight, iTable, pEList);
    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
      substSelect(db, pExpr->x.pSelect, iTable, pEList);
    }else{
      substExprList(db, pExpr->x.pList, iTable, pEList);
    }
  }
  return pExpr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x4e2a8
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
cmpb $-0x68, (%rsi)
jne 0x4e262
cmpl %r12d, 0x2c(%rbx)
jne 0x4e262
movswq 0x30(%rbx), %rax
testq %rax, %rax
js 0x4e2bd
movq 0x8(%r15), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x440d6
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f476
movq %r15, %rax
jmp 0x4e2b4
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
callq 0x4e200
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
callq 0x4e200
movq %rax, 0x18(%rbx)
testb $0x8, 0x3(%rbx)
movq 0x20(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
jne 0x4e2ac
callq 0x4e19c
jmp 0x4e2b1
xorl %ebx, %ebx
jmp 0x4e2b1
callq 0x4e2c2
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x62, (%rbx)
jmp 0x4e2b1
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: substSelect
static void substSelect(
  sqlite3 *db,         /* Report malloc errors here */
  Select *p,           /* SELECT statement in which to make substitutions */
  int iTable,          /* Table to be replaced */
  ExprList *pEList     /* Substitute values */
){
  SrcList *pSrc;
  struct SrcList_item *pItem;
  int i;
  if( !p ) return;
  substExprList(db, p->pEList, iTable, pEList);
  substExprList(db, p->pGroupBy, iTable, pEList);
  substExprList(db, p->pOrderBy, iTable, pEList);
  p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
  p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
  substSelect(db, p->pPrior, iTable, pEList);
  pSrc = p->pSrc;
  assert( pSrc );  /* Even for (SELECT 1) we have: pSrc!=0 but pSrc->nSrc==0 */
  if( ALWAYS(pSrc) ){
    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
      substSelect(db, pItem->pSelect, iTable, pEList);
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x4e397
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
movq (%rsi), %rsi
callq 0x4e19c
movq 0x38(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e19c
movq 0x48(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e19c
movq 0x40(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e200
movq %rax, 0x40(%r12)
movq 0x30(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e200
movq %rax, 0x30(%r12)
movq 0x50(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e2c2
movq 0x28(%r12), %r12
testq %r12, %r12
je 0x4e389
movzbl (%r12), %r13d
addq $0x30, %r12
testl %r13d, %r13d
jle 0x4e389
movq (%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x4e2c2
decl %r13d
addq $0x68, %r12
jmp 0x4e369
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: explainComposite
static void explainComposite(
  Parse *pParse,                  /* Parse context */
  int op,                         /* One of TK_UNION, TK_EXCEPT etc. */
  int iSub1,                      /* Subquery id 1 */
  int iSub2,                      /* Subquery id 2 */
  int bUseTmp                     /* True if a temp table was used */
){
  assert( op==TK_UNION || op==TK_EXCEPT || op==TK_INTERSECT || op==TK_ALL );
  if( pParse->explain==2 ){
    Vdbe *v = pParse->pVdbe;
    char *zMsg = sqlite3MPrintf(
        pParse->db, "COMPOUND SUBQUERIES %d AND %d %s(%s)", iSub1, iSub2,
        bUseTmp?"USING TEMP B-TREE ":"", selectOpName(op)
    );
    sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
  }
}

// Assembly:
cmpb $0x2, 0x200(%rdi)
jne 0x4e41e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %r14
testl %r8d, %r8d
leaq 0x21f85(%rip), %rax     # 0x70345
leaq 0x1f6e0(%rip), %r8      # 0x6daa7
cmoveq %rax, %r8
addl $-0x71, %esi
cmpl $0x2, %esi
ja 0x4e3e2
movl %esi, %eax
leaq 0x3854c(%rip), %rsi     # 0x86928
movq (%rsi,%rax,8), %r9
jmp 0x4e3e9
leaq 0x1f693(%rip), %r9      # 0x6da7c
leaq 0x1f692(%rip), %rsi     # 0x6da82
xorl %eax, %eax
callq 0x10594
movl 0x210(%rbx), %edx
orl $-0x1, (%rsp)
movq %r14, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x41fd2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: multiSelectCollSeq
static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
  CollSeq *pRet;
  if( p->pPrior ){
    pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);
  }else{
    pRet = 0;
  }
  assert( iCol>=0 );
  if( pRet==0 && iCol<p->pEList->nExpr ){
    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
  }
  return pRet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x50(%rsi), %rsi
testq %rsi, %rsi
je 0x4e44b
movq %rbx, %rdi
movl %r14d, %edx
callq 0x4e41f
testq %rax, %rax
jne 0x4e476
movq (%r15), %rax
cmpl %r14d, (%rax)
jle 0x4e474
movq 0x8(%rax), %rax
movslq %r14d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x466ee
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeOffset
static void codeOffset(
  Vdbe *v,          /* Generate code into this VM */
  Select *p,        /* The SELECT statement being coded */
  int iContinue     /* Jump here to skip the current record */
){
  if( p->iOffset && iContinue!=0 ){
    int addr;
    sqlite3VdbeAddOp2(v, OP_AddImm, p->iOffset, -1);
    addr = sqlite3VdbeAddOp1(v, OP_IfNeg, p->iOffset);
    sqlite3VdbeAddOp2(v, OP_Goto, 0, iContinue);
    VdbeComment((v, "skip OFFSET records"));
    sqlite3VdbeJumpHere(v, addr);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl 0x10(%rsi), %edx
testl %edx, %edx
sete %al
testl %r14d, %r14d
sete %cl
orb %al, %cl
jne 0x4e81d
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x20
popq %rsi
pushq $-0x1
popq %rcx
callq 0x41f42
movl 0x10(%r15), %edx
pushq $0x7f
popq %rsi
movq %rbx, %rdi
callq 0x42436
movl %eax, %r15d
pushq $0xe
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl %r14d, %ecx
callq 0x41f42
testl %r15d, %r15d
js 0x4e81d
movl 0x34(%rbx), %eax
cmpl %r15d, %eax
jbe 0x4e81d
movq 0x8(%rbx), %rcx
movl %r15d, %edx
imulq $0x18, %rdx, %rdx
movl %eax, 0x8(%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereSplit
static void whereSplit(WhereClause *pWC, Expr *pExpr, u8 op){
  pWC->op = op;
  if( pExpr==0 ) return;
  if( pExpr->op!=op ){
    whereClauseInsert(pWC, pExpr, 0);
  }else{
    whereSplit(pWC, pExpr->pLeft, op);
    whereSplit(pWC, pExpr->pRight, op);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movzbl %r14b, %r12d
movb %r14b, 0x10(%r15)
testq %rbx, %rbx
je 0x4e863
cmpb %r14b, (%rbx)
jne 0x4e86c
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movl %r12d, %edx
callq 0x4e828
movq 0x18(%rbx), %rbx
jmp 0x4e840
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4f3bf
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprListTableUsage
static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
  int i;
  Bitmask mask = 0;
  if( pList ){
    for(i=0; i<pList->nExpr; i++){
      mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
    }
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x4ee03
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %r12d
testl %r12d, %r12d
cmovlel %ebx, %r12d
shlq $0x5, %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x4ee03
movq 0x8(%r14), %rax
movq (%rax,%r13), %rsi
movq %r15, %rdi
callq 0x5034c
orq %rax, %rbx
addq $0x20, %r13
jmp 0x4ede5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getMask
static Bitmask getMask(WhereMaskSet *pMaskSet, int iCursor){
  int i;
  assert( pMaskSet->n<=(int)sizeof(Bitmask)*8 );
  for(i=0; i<pMaskSet->n; i++){
    if( pMaskSet->ix[i]==iCursor ){
      return MASKBIT(i);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %edx
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
negq %rdx
movabsq $-0x1, %r8
leaq (%rdx,%r8), %rcx
cmpq $-0x1, %rcx
je 0x4ee54
leaq 0x1(%r8), %rcx
cmpl %esi, 0x8(%rdi,%r8,4)
movq %rcx, %r8
jne 0x4ee2f
movabsq $0x1, %rax
shlq %cl, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereInfoFree
static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
  if( ALWAYS(pWInfo) ){
    whereClauseClear(&pWInfo->sWC);
    while( pWInfo->pLoops ){
      WhereLoop *p = pWInfo->pLoops;
      pWInfo->pLoops = p->pNextLoop;
      whereLoopDelete(db, p);
    }
    sqlite3DbFree(db, pWInfo);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x150(%rsi), %rdi
callq 0x5272f
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0x4f2b4
movq 0x38(%r15), %rax
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x512a8
movq %r14, %rdi
movq %r15, %rsi
callq 0x968b
jmp 0x4f28b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x968b
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: evalConstExpr
static int evalConstExpr(Walker *pWalker, Expr *pExpr){
  Parse *pParse = pWalker->pParse;
  switch( pExpr->op ){
    case TK_IN:
    case TK_REGISTER: {
      return WRC_Prune;
    }
    case TK_COLLATE: {
      return WRC_Continue;
    }
    case TK_FUNCTION:
    case TK_AGG_FUNCTION:
    case TK_CONST_FUNC: {
      /* The arguments to a function have a fixed destination.
      ** Mark them this way to avoid generated unneeded OP_SCopy
      ** instructions. 
      */
      ExprList *pList = pExpr->x.pList;
      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
      if( pList ){
        int i = pList->nExpr;
        struct ExprList_item *pItem = pList->a;
        for(; i>0; i--, pItem++){
          if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
        }
      }
      break;
    }
  }
  if( isAppropriateForFactoring(pExpr) ){
    int r1 = ++pParse->nMem;
    int r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
    /* If r2!=r1, it means that register r1 is never used.  That is harmless
    ** but suboptimal, so we want to know about the situation to fix it.
    ** Hence the following assert: */
    assert( r2==r1 );
    pExpr->op2 = pExpr->op;
    pExpr->op = TK_REGISTER;
    pExpr->iTable = r2;
    return WRC_Prune;
  }
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzbl (%rsi), %eax
pushq $0x1
popq %r15
cmpl $0x48, %eax
je 0x4f36f
movq %rsi, %rbx
movq 0x10(%rdi), %r14
cmpl $0x9b, %eax
je 0x4f312
cmpl $0x84, %eax
je 0x4f36f
cmpl $0x97, %eax
je 0x4f312
cmpl $0x99, %eax
je 0x4f312
cmpl $0x5c, %eax
jne 0x4f339
xorl %eax, %eax
jmp 0x4f39e
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x4f339
movl (%rcx), %eax
movq 0x8(%rcx), %rcx
testl %eax, %eax
jle 0x4f339
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x4f331
orb $0x2, 0x3(%rdx)
decl %eax
addq $0x20, %rcx
jmp 0x4f321
movq %rbx, %rdi
callq 0x4e881
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4f39e
testb $0x2, 0x3(%rbx)
jne 0x4f374
movl 0x58(%r14), %edx
incl %edx
movl %edx, 0x58(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x484da
movb (%rbx), %cl
movb %cl, 0x37(%rbx)
movb $-0x7c, (%rbx)
movl %eax, 0x2c(%rbx)
movl %r15d, %eax
jmp 0x4f39e
movq %rbx, %rcx
movzbl (%rcx), %edx
addl $-0x5e, %edx
cmpl $0x3f, %edx
ja 0x4f34f
cmpq $0x3f, %rdx
jne 0x4f38e
movq 0x10(%rcx), %rcx
jmp 0x4f377
movabsq $0xb800000011, %rsi     # imm = 0xB800000011
btq %rdx, %rsi
jae 0x4f3a9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x3e, %rdx
jne 0x4f34f
movq 0x10(%rcx), %rcx
movb (%rcx), %cl
addb $0x7f, %cl
cmpb $0x2, %cl
jae 0x4f34f
jmp 0x4f39e
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereClauseInsert
static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
  WhereTerm *pTerm;
  int idx;
  testcase( wtFlags & TERM_VIRTUAL );
  if( pWC->nTerm>=pWC->nSlot ){
    WhereTerm *pOld = pWC->a;
    sqlite3 *db = pWC->pWInfo->pParse->db;
    pWC->a = sqlite3DbMallocRaw(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
    if( pWC->a==0 ){
      if( wtFlags & TERM_DYNAMIC ){
        sqlite3ExprDelete(db, p);
      }
      pWC->a = pOld;
      return 0;
    }
    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
    if( pOld!=pWC->aStatic ){
      sqlite3DbFree(db, pOld);
    }
    pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
  }
  pTerm = &pWC->a[idx = pWC->nTerm++];
  pTerm->pExpr = sqlite3ExprSkipCollate(p);
  pTerm->wtFlags = wtFlags;
  pTerm->pWC = pWC;
  pTerm->iParent = -1;
  return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rdi, %rbx
movl 0x14(%rdi), %r12d
movl 0x18(%rdi), %eax
cmpl %eax, %r12d
jl 0x4f44e
movq %rsi, %r14
movq (%rbx), %rcx
movq 0x20(%rbx), %r12
movq (%rcx), %rcx
movq (%rcx), %r13
imull $0x70, %eax, %esi
movq %r13, %rdi
callq 0x103b4
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x4f490
movslq 0x14(%rbx), %rcx
imulq $0x38, %rcx, %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x82c0
leaq 0x28(%rbx), %rax
cmpq %rax, %r12
je 0x4f42e
movq %r13, %rdi
movq %r12, %rsi
callq 0x968b
movq 0x20(%rbx), %rsi
movq %r13, %rdi
callq 0x155aa
cltq
pushq $0x38
popq %rcx
xorl %edx, %edx
divq %rcx
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %r12d
movq %r14, %rsi
movq 0x20(%rbx), %r13
leal 0x1(%r12), %eax
movl %eax, 0x14(%rbx)
movslq %r12d, %rax
imulq $0x38, %rax, %r14
movq %rsi, %rdi
callq 0x45e0b
movq %rax, (%r13,%r14)
movb %r15b, 0x1a(%r13,%r14)
movq %rbx, 0x20(%r13,%r14)
orl $-0x1, 0x8(%r13,%r14)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r15b
je 0x4f4a1
movq %r13, %rdi
movq %r14, %rsi
callq 0x2f476
movq %r12, 0x20(%rbx)
xorl %r12d, %r12d
jmp 0x4f47e
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprTableUsage
static Bitmask exprTableUsage(WhereMaskSet *pMaskSet, Expr *p){
  Bitmask mask = 0;
  if( p==0 ) return 0;
  if( p->op==TK_COLUMN ){
    mask = getMask(pMaskSet, p->iTable);
    return mask;
  }
  mask = exprTableUsage(pMaskSet, p->pRight);
  mask |= exprTableUsage(pMaskSet, p->pLeft);
  if( ExprHasProperty(p, EP_xIsSelect) ){
    mask |= exprSelectTableUsage(pMaskSet, p->x.pSelect);
  }else{
    mask |= exprListTableUsage(pMaskSet, p->x.pList);
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x5037b
movq %rsi, %r15
movq %rdi, %r14
cmpb $-0x68, (%rsi)
jne 0x5037f
movl 0x2c(%r15), %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4ee15
xorl %ebx, %ebx
jmp 0x503bd
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x5034c
movq %rax, %r12
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x5034c
movq %rax, %rbx
orq %r12, %rbx
testb $0x8, 0x3(%r15)
movq 0x20(%r15), %rsi
movq %r14, %rdi
jne 0x503b5
callq 0x4edb9
jmp 0x503ba
callq 0x503c9
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprSelectTableUsage
static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
  Bitmask mask = 0;
  while( pS ){
    SrcList *pSrc = pS->pSrc;
    mask |= exprListTableUsage(pMaskSet, pS->pEList);
    mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
    mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
    mask |= exprTableUsage(pMaskSet, pS->pWhere);
    mask |= exprTableUsage(pMaskSet, pS->pHaving);
    if( ALWAYS(pSrc!=0) ){
      int i;
      for(i=0; i<pSrc->nSrc; i++){
        mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect);
        mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn);
      }
    }
    pS = pS->pPrior;
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, -0x40(%rbp)
xorl %eax, %eax
testq %r14, %r14
je 0x504b0
movq (%r14), %rsi
movq 0x28(%r14), %rbx
movq -0x40(%rbp), %r12
movq %r12, %rdi
movq %rax, -0x38(%rbp)
callq 0x4edb9
movq %rax, -0x30(%rbp)
movq 0x38(%r14), %rsi
movq %r12, %rdi
callq 0x4edb9
movq %rax, %r15
movq 0x48(%r14), %rsi
movq %r12, %rdi
callq 0x4edb9
movq %rax, -0x48(%rbp)
movq 0x30(%r14), %rsi
movq %r12, %rdi
callq 0x5034c
movq %rax, %r13
movq 0x40(%r14), %rsi
movq %r12, %rdi
callq 0x5034c
movq %rax, %r12
orq -0x30(%rbp), %r15
orq -0x48(%rbp), %r13
orq %r15, %r13
orq -0x38(%rbp), %r12
orq %r13, %r12
testq %rbx, %rbx
je 0x504a4
movq %r14, -0x30(%rbp)
movzbl (%rbx), %eax
imulq $0x68, %rax, %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
cmpq %r14, -0x38(%rbp)
je 0x504a0
movq 0x30(%rbx,%r14), %rsi
movq -0x40(%rbp), %r13
movq %r13, %rdi
callq 0x503c9
movq %rax, %r15
movq 0x48(%rbx,%r14), %rsi
movq %r13, %rdi
callq 0x5034c
orq %r15, %rax
orq %rax, %r12
addq $0x68, %r14
jmp 0x5046d
movq -0x30(%rbp), %r14
movq 0x50(%r14), %r14
movq %r12, %rax
jmp 0x503e3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: findTerm
static WhereTerm *findTerm(
  WhereClause *pWC,     /* The WHERE clause to be searched */
  int iCur,             /* Cursor number of LHS */
  int iColumn,          /* Column number of LHS */
  Bitmask notReady,     /* RHS must not overlap with this mask */
  u32 op,               /* Mask of WO_xx values describing operator */
  Index *pIdx           /* Must be compatible with this index, if not NULL */
){
  WhereTerm *pResult = 0;
  WhereTerm *p;
  WhereScan scan;

  p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx);
  while( p ){
    if( (p->prereqRight & notReady)==0 ){
      if( p->prereqRight==0 && (p->eOperator&WO_EQ)!=0 ){
        return p;
      }
      if( pResult==0 ) pResult = p;
    }
    p = whereScanNext(&scan);
  }
  return pResult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %rsi
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x50547
xorl %r15d, %r15d
testq %rax, %rax
je 0x50536
movq 0x28(%rax), %rcx
testq %rbx, %rcx
jne 0x50529
testq %rcx, %rcx
jne 0x50522
testb $0x2, 0x18(%rax)
jne 0x50533
testq %r15, %r15
cmoveq %rax, %r15
movq %r14, %rdi
callq 0x505c9
jmp 0x50509
movq %rax, %r15
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq